diff --git a/src/airsea/airsea.F90 b/src/airsea/airsea.F90 index e6b2ed448..23afe7df9 100644 --- a/src/airsea/airsea.F90 +++ b/src/airsea/airsea.F90 @@ -76,10 +76,10 @@ module airsea_driver ! ! surface shortwave radiation ! and surface heat flux (W/m^2) - type (type_scalar_input), public, target :: I_0, ql + type (type_scalar_input), public, target :: I_0 REALTYPE, public, target :: albedo - type (type_scalar_input), public, target :: heat - REALTYPE, public :: qe,qh + type (type_scalar_input), public, target :: heat, ql_ + REALTYPE, public :: qe,qh,ql ! surface stress components (Pa) REALTYPE, public, target :: tx,ty @@ -340,7 +340,7 @@ subroutine init_airsea_nml(namlst) call tx_%configure(method=momentum_method, path=momentumflux_file, index=1, constant_value=const_tx) call ty_%configure(method=momentum_method, path=momentumflux_file, index=2, constant_value=const_ty) call heat%configure(method=heat_method, path=heatflux_file, index=1, scale_factor=shf_factor, constant_value=const_heat) - call ql%configure(method=back_radiation_method, path=back_radiation_file, index=1) + call ql_%configure(method=back_radiation_method, path=back_radiation_file, index=1) call sst_obs%configure(method=sst_method, path=sst_file, index=1) call sss%configure(method=sss_method, path=sss_file, index=1) call precip%configure(method=precip_method, path=precip_file, index=1, scale_factor=precip_factor, constant_value=const_precip) @@ -496,7 +496,7 @@ subroutine init_airsea_yaml() call twig%get(ssuv_method, 'ssuv_method', 'wind treatment', & options=(/option(0, 'use absolute wind speed'), option(1, 'use wind speed relative to current velocity')/), default=1, display=display_advanced) - call branch%get(ql, 'longwave_radiation', 'longwave radiation', 'W/m^2', & + call branch%get(ql_, 'longwave_radiation', 'longwave radiation', 'W/m^2', & default=0._rk, method_file=0, method_constant=method_unsupported, & extra_options=(/option(1, 'Clark'), option(2, 'Hastenrath'), option(3, 'Bignami'), option(4, 'Berliand'), option(5, 'Josey-1'), option(6, 'Josey-2')/), default_method=1, pchild=leaf) call leaf%get(longwave_type, 'type', 'longwave type from file', & @@ -693,9 +693,9 @@ subroutine post_init_airsea(lat,lon) case default end select LEVEL3 'longwave radiation:' - select case (ql%method) + select case (ql_%method) case(0) ! Read from file instead of calculating - call register_input(ql) + call register_input(ql_) case(1) LEVEL4 'using Clark formulation' case(2) @@ -762,10 +762,10 @@ subroutine surface_fluxes(surface_temp,sensible,latent,longwave_radiation) latent = qe #if 1 if (qe .lt. _ZERO_) then - STDERR 'Stefan# ',qh/qe +!KB STDERR 'Stefan# ',qh/qe end if #endif - longwave_radiation = ql%value + longwave_radiation = ql return end subroutine surface_fluxes !EOC @@ -987,8 +987,8 @@ subroutine flux_from_meteo(jul,secs) cloud1 = cloud2 call humidity(hum_method,hum,airp,tw,ta) - call longwave_radiation(ql%method,longwave_type, & - dlat,tw_k,ta_k,cloud,ql%value) + call longwave_radiation(ql_%method,longwave_type, & + dlat,tw_k,ta_k,cloud,ql_%value,ql) end if #if 0 call airsea_fluxes(fluxes_method,rain_impact,calc_evaporation, & @@ -997,7 +997,7 @@ subroutine flux_from_meteo(jul,secs) call airsea_fluxes(fluxes_method, & tw,ta,u10%value-ssu,v10%value-ssv,precip%value,evap,tx2,ty2,qe,qh) #endif - h2 = ql%value+qe+qh + h2 = ql+qe+qh cloud2 = cloud%value if (init_saved_vars) then @@ -1038,11 +1038,11 @@ subroutine flux_from_meteo(jul,secs) end if call humidity(hum_method,hum%value,airp%value,tw,ta) - call longwave_radiation(ql%method,longwave_type, & - dlat,tw_k,ta_k,cloud%value,ql%value) + call longwave_radiation(ql_%method,longwave_type, & + dlat,tw_k,ta_k,cloud%value,ql_%value,ql) call airsea_fluxes(fluxes_method, & tw,ta,u10%value-ssu,v10%value-ssv,precip%value,evap,tx_%value,ty_%value,qe,qh) - heat%value = (ql%value+qe+qh) + heat%value = (ql+qe+qh) #endif w = sqrt((u10%value-ssu)*(u10%value-ssu)+(v10%value-ssv)*(v10%value-ssv)) diff --git a/src/airsea/longwave_radiation.F90 b/src/airsea/longwave_radiation.F90 index a33aa7c05..dc73928b8 100644 --- a/src/airsea/longwave_radiation.F90 +++ b/src/airsea/longwave_radiation.F90 @@ -5,7 +5,7 @@ ! !ROUTINE: Calculate the net longwave radiation \label{sec:back-rad} ! ! !INTERFACE: - subroutine longwave_radiation(method,type,dlat,tw,ta,cloud,ql) + subroutine longwave_radiation(method,type,dlat,tw,ta,cloud,qlobs,ql) ! ! !DESCRIPTION: ! @@ -28,7 +28,7 @@ subroutine longwave_radiation(method,type,dlat,tw,ta,cloud,ql) ! ! !INPUT PARAMETERS: integer, intent(in) :: method,type - REALTYPE, intent(in) :: dlat,tw,ta,cloud + REALTYPE, intent(in) :: dlat,tw,ta,cloud,qlobs ! ! !OUTPUT PARAMETERS: REALTYPE, intent(inout) :: ql @@ -79,8 +79,9 @@ subroutine longwave_radiation(method,type,dlat,tw,ta,cloud,ql) case(from_file) select case(type) case(1) + ql=qlobs case(2) - ql = ql-bolz*emiss*(tw**4) + ql = qlobs-bolz*emiss*(tw**4) end select case(clark) ! Clark et al. (1974) formula. diff --git a/src/gotm/register_all_variables.F90 b/src/gotm/register_all_variables.F90 index 68e578692..1cb3ec728 100644 --- a/src/gotm/register_all_variables.F90 +++ b/src/gotm/register_all_variables.F90 @@ -156,7 +156,8 @@ subroutine register_airsea_variables(nlev) call fm%register('I_0', 'W/m2', 'incoming short wave radiation', standard_name='', data0d=I_0%value, category='surface/heat_fluxes') call fm%register('qh', 'W/m2', 'sensible heat flux', standard_name='', data0d=qh, category='surface/heat_fluxes') call fm%register('qe', 'W/m2', 'latent heat flux', standard_name='', data0d=qe, category='surface/heat_fluxes') - call fm%register('ql', 'W/m2', 'net longwave radiation', standard_name='', data0d=ql%value, category='surface/heat_fluxes') + call fm%register('ql', 'W/m2', 'net longwave radiation', standard_name='', data0d=ql, category='surface/heat_fluxes') + call fm%register('qlobs', 'W/m2', 'longwave radiation (obs)', standard_name='', data0d=ql_%value, category='surface/heat_fluxes') call fm%register('heat', 'W/m2', 'net surface heat flux', standard_name='', data0d=heat%value, category='surface/heat_fluxes') call fm%register('tx', 'm2/s2', 'wind stress (x)', standard_name='', data0d=tx, category='surface') call fm%register('ty', 'm2/s2', 'wind stress (y)', standard_name='', data0d=ty, category='surface')