diff --git a/physics/rrtmgp_lw_cloud_optics.F90 b/physics/rrtmgp_lw_cloud_optics.F90 index 418fe8cbf..c8c7d8470 100644 --- a/physics/rrtmgp_lw_cloud_optics.F90 +++ b/physics/rrtmgp_lw_cloud_optics.F90 @@ -100,7 +100,7 @@ subroutine rrtmgp_lw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_d if (cld_optics_scheme .eq. 0) return - ! Filenames are set in the gfs_physics_nml (scm/src/GFS_typedefs.F90) + ! Filenames are set in the physics_nml lw_cloud_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_lw_file_clouds) ! Read dimensions for k-distribution fields (only on master processor(0)) @@ -437,7 +437,7 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, nCol, nLev, cld_optics_scheme, nr endif endif - ! GFS_RRTMGP_POST_RUN() requires the LW optical depth ~10microns + ! All-sky LW optical depth ~10microns cldtaulw = lw_optical_props_cloudsByBand%tau(:,:,7) end subroutine rrtmgp_lw_cloud_optics_run diff --git a/physics/rrtmgp_lw_clrallsky_driver.F90 b/physics/rrtmgp_lw_clrallsky_driver.F90 deleted file mode 100644 index e27a008bf..000000000 --- a/physics/rrtmgp_lw_clrallsky_driver.F90 +++ /dev/null @@ -1,131 +0,0 @@ -! ########################################################################################### -! ########################################################################################### -module rrtmgp_lw_clrallsky_driver - use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type, GFS_Interstitial_type - use mo_rte_kind, only: wl - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp - use mo_cloud_optics, only: ty_cloud_optics - use mo_optical_props, only: ty_optical_props_1scl - use mo_rrtmgp_clr_all_sky, only: rte_lw - use mo_gas_concentrations, only: ty_gas_concs - use mo_fluxes_byband, only: ty_fluxes_byband - use rrtmgp_aux, only: check_error_msg - - public rrtmgp_lw_clrallsky_driver_init, rrtmgp_lw_clrallsky_driver_run, rrtmgp_lw_clrallsky_driver_finalize -contains - - ! ######################################################################################### - ! SUBROUTINE rrtmgp_lw_clrallsky_driver_init - ! ######################################################################################### - subroutine rrtmgp_lw_clrallsky_driver_init() - end subroutine rrtmgp_lw_clrallsky_driver_init - - ! ######################################################################################### - ! SUBROUTINE rrtmgp_lw_clrallsky_driver_run - ! ######################################################################################### -!! \section arg_table_rrtmgp_lw_clrallsky_driver_run -!! \htmlinclude rrtmgp_lw_clrallsky_driver.html -!! - subroutine rrtmgp_lw_clrallsky_driver_run(Model, Interstitial, ncol, lw_gas_props, p_lay, t_lay,& - p_lev, skt, gas_concentrations, lw_optical_props_clouds, lw_optical_props_aerosol, & - lslwr, fluxlwUP_allsky, fluxlwDOWN_allsky, fluxlwUP_clrsky, fluxlwDOWN_clrsky, hlw0, & - hlwb, errmsg, errflg) - - ! Inputs - type(GFS_control_type), intent(in) :: & - Model - type(GFS_Interstitial_type), intent(in) :: & - Interstitial ! Fortran DDT containing FV3-GFS radiation tendencies - integer, intent(in) :: & - ncol ! Number of horizontal gridpoints - real(kind_phys), dimension(ncol,model%levs), intent(in) :: & - p_lay, & ! Pressure @ model layer-centers (hPa) - t_lay ! Temperature (K) - real(kind_phys), dimension(ncol,model%levs+1), intent(in) :: & - p_lev ! Pressure @ model layer-interfaces (hPa) - real(kind_phys), dimension(ncol), intent(in) :: & - skt ! Surface(skin) temperature (K) - type(ty_gas_optics_rrtmgp),intent(in) :: & - lw_gas_props ! DDT containing LW spectral information - type(ty_optical_props_1scl),intent(in) :: & - lw_optical_props_clouds, & ! RRTMGP DDT: longwave cloud radiative properties - lw_optical_props_aerosol ! RRTMGP DDT: longwave aerosol radiative properties - type(ty_gas_concs),intent(in) :: & - gas_concentrations ! RRTMGP DDT: trace gas concentrations (vmr) - logical, intent(in) :: & - lslwr ! Flag to calculate LW irradiances - - ! Outputs - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - real(kind_phys), dimension(ncol,model%levs+1), intent(out) :: & - fluxlwUP_allsky, & ! All-sky flux (W/m2) - fluxlwDOWN_allsky, & ! All-sky flux (W/m2) - fluxlwUP_clrsky, & ! Clear-sky flux (W/m2) - fluxlwDOWN_clrsky ! All-sky flux (W/m2) - - ! Outputs (optional) - real(kind_phys), dimension(ncol,model%levs,lw_gas_props%get_nband()), optional, intent(inout) :: & - hlwb ! All-sky heating rate, by band (K/sec) - real(kind_phys), dimension(ncol,model%levs), optional, intent(inout) :: & - hlw0 ! Clear-sky heating rate (K/sec) - - ! Local variables - type(ty_fluxes_byband) :: & - flux_allsky, & ! All-sky flux (W/m2) - flux_clrsky ! Clear-sky flux (W/m2) - real(kind_phys), dimension(ncol,model%levs+1),target :: & - fluxLW_up_allsky, fluxLW_up_clrsky, fluxLW_dn_allsky, fluxLW_dn_clrsky - real(kind_phys), dimension(ncol,model%levs+1,lw_gas_props%get_nband()),target :: & - fluxLWBB_up_allsky, fluxLWBB_dn_allsky - logical :: l_ClrSky_HR, l_AllSky_HR_byband - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - if (.not. lslwr) return - - ! Are any optional outputs requested? Need to know now to compute correct fluxes. - l_ClrSky_HR = present(hlw0) - l_AllSky_HR_byband = present(hlwb) - - ! Initialize RRTMGP DDT containing 2D(3D) fluxes - flux_allsky%flux_up => fluxLW_up_allsky - flux_allsky%flux_dn => fluxLW_dn_allsky - flux_clrsky%flux_up => fluxLW_up_clrsky - flux_clrsky%flux_dn => fluxLW_dn_clrsky - ! Only calculate fluxes by-band, only when heating-rate profiles by band are requested. - if (l_AllSky_HR_byband) then - flux_allsky%bnd_flux_up => fluxLWBB_up_allsky - flux_allsky%bnd_flux_dn => fluxLWBB_dn_allsky - endif - - ! Call RRTMGP LW scheme - call check_error_msg('rrtmgp_lw_clrallsky_driver_run',rte_lw( & - lw_gas_props, & ! IN - spectral information - gas_concentrations, & ! IN - gas concentrations (vmr) - p_lay, & ! IN - pressure at layer interfaces (Pa) - t_lay, & ! IN - temperature at layer interfaes (K) - p_lev, & ! IN - pressure at layer centers (Pa) - skt, & ! IN - skin temperature (K) - Interstitial%sfc_emiss_byband, & ! IN - surface emissivity in each LW band - lw_optical_props_clouds, & ! IN - DDT containing cloud optical information - flux_allsky, & ! OUT - Fluxes, all-sky, 3D (nCol,model%levs,nBand) - flux_clrsky, & ! OUT - Fluxes, clear-sky, 3D (nCol,model%levs,nBand) - aer_props = lw_optical_props_aerosol)) ! IN(optional) - DDT containing aerosol optical information - fluxlwUP_allsky = flux_allsky%flux_up - fluxlwDOWN_allsky = flux_allsky%flux_dn - fluxlwUP_clrsky = flux_clrsky%flux_up - fluxlwDOWN_clrsky = flux_clrsky%flux_dn - - end subroutine rrtmgp_lw_clrallsky_driver_run - - ! ######################################################################################### - ! SUBROUTINE rrtmgp_lw_clrallsky_driver_finalize - ! ######################################################################################### - subroutine rrtmgp_lw_clrallsky_driver_finalize() - end subroutine rrtmgp_lw_clrallsky_driver_finalize - - -end module rrtmgp_lw_clrallsky_driver diff --git a/physics/rrtmgp_lw_clrallsky_driver.meta b/physics/rrtmgp_lw_clrallsky_driver.meta deleted file mode 100644 index eea012c87..000000000 --- a/physics/rrtmgp_lw_clrallsky_driver.meta +++ /dev/null @@ -1,175 +0,0 @@ -[ccpp-arg-table] - name = rrtmgp_lw_clrallsky_driver_run - type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = instance of derived type GFS_control_type - units = DDT - dimensions = () - type = GFS_control_type - intent = in - optional = F -[Interstitial] - standard_name = GFS_interstitial_type_instance - long_name = derived type GFS_interstitial_type in FV3 - units = DDT - dimensions = () - type = GFS_interstitial_type - intent = in - optional = F -[ncol] - standard_name = horizontal_loop_extent - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F -[p_lay] - standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa - long_name = air pressure layer - units = hPa - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[p_lev] - standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa - long_name = air pressure level - units = hPa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = in - optional = F -[t_lay] - standard_name = air_temperature_at_layer_for_RRTMGP - long_name = air temperature layer - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[skt] - standard_name = surface_ground_temperature_for_radiation - long_name = surface ground temperature for radiation - units = K - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[lw_gas_props] - standard_name = coefficients_for_lw_gas_optics - long_name = DDT containing spectral information for RRTMGP LW radiation scheme - units = DDT - dimensions = () - type = ty_gas_optics_rrtmgp - intent = in - optional = F -[lw_optical_props_clouds] - standard_name = longwave_optical_properties_for_cloudy_atmosphere - long_name = Fortran DDT containing RRTMGP optical properties - units = DDT - dimensions = () - type = ty_optical_props_1scl - intent = in - optional = F -[lw_optical_props_aerosol] - standard_name = longwave_optical_properties_for_aerosols - long_name = Fortran DDT containing RRTMGP optical properties - units = DDT - dimensions = () - type = ty_optical_props_1scl - intent = in - optional = F -[gas_concentrations] - standard_name = Gas_concentrations_for_RRTMGP_suite - long_name = DDT containing gas concentrations for RRTMGP radiation scheme - units = DDT - dimensions = () - type = ty_gas_concs - intent = in - optional = F -[lslwr] - standard_name = flag_to_calc_lw - long_name = flag to calculate LW irradiances - units = flag - dimensions = () - type = logical - intent = in - optional = F -[hlw0] - standard_name = RRTMGP_lw_heating_rate_clear_sky - long_name = RRTMGP longwave clear sky heating rate - units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - optional = T - intent = in -[hlwb] - standard_name = RRTMGP_lw_heating_rate_spectral - long_name = RRTMGP longwave total sky heating rate (spectral) - units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_lw_spectral_points_rrtmgp) - type = real - kind = kind_phys - optional = T - kind = kind_phys - intent = in -[fluxlwUP_allsky] - standard_name = RRTMGP_lw_flux_profile_upward_allsky - long_name = RRTMGP upward longwave all-sky flux profile - units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = out - optional = F -[fluxlwDOWN_allsky] - standard_name = RRTMGP_lw_flux_profile_downward_allsky - long_name = RRTMGP downward longwave all-sky flux profile - units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = out - optional = F -[fluxlwUP_clrsky] - standard_name = RRTMGP_lw_flux_profile_upward_clrsky - long_name = RRTMGP upward longwave clr-sky flux profile - units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = out - optional = F -[fluxlwDOWN_clrsky] - standard_name = RRTMGP_lw_flux_profile_downward_clrsky - long_name = RRTMGP downward longwave clr-sky flux profile - units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = out - optional = F -[errmsg] - standard_name = ccpp_error_message - long_name = error message for error handling in CCPP - units = none - dimensions = () - type = character - kind = len=* - intent = out - optional = F -[errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag - dimensions = () - type = integer - intent = out - optional = F diff --git a/physics/rrtmgp_lw_gas_optics.F90 b/physics/rrtmgp_lw_gas_optics.F90 index 2adcdc8de..d15adbc23 100644 --- a/physics/rrtmgp_lw_gas_optics.F90 +++ b/physics/rrtmgp_lw_gas_optics.F90 @@ -123,7 +123,7 @@ subroutine rrtmgp_lw_gas_optics_init(rrtmgp_root_dir, rrtmgp_lw_file_gas, rrtmgp errmsg = '' errflg = 0 - ! Filenames are set in the gfs_physics_nml (scm/src/GFS_typedefs.F90) + ! Filenames are set in the physics_nml lw_gas_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_lw_file_gas) ! Read dimensions for k-distribution fields (only on master processor(0)) diff --git a/physics/rrtmgp_lw_rte.F90 b/physics/rrtmgp_lw_rte.F90 index 51d18ce4b..1728a6baf 100644 --- a/physics/rrtmgp_lw_rte.F90 +++ b/physics/rrtmgp_lw_rte.F90 @@ -2,7 +2,6 @@ ! ########################################################################################### module rrtmgp_lw_rte use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type, GFS_statein_type use mo_rte_kind, only: wl use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_cloud_optics, only: ty_cloud_optics @@ -27,73 +26,69 @@ end subroutine rrtmgp_lw_rte_init !! \section arg_table_rrtmgp_lw_rte_run !! \htmlinclude rrtmgp_lw_rte.html !! - subroutine rrtmgp_lw_rte_run(Model, Statein, ncol, lw_gas_props, p_lay, t_lay, p_lev, skt,& + subroutine rrtmgp_lw_rte_run(doLWrad, nCol, nLev, p_lay, t_lay, p_lev, skt, lw_gas_props, & sfc_emiss_byband, sources, lw_optical_props_clrsky, lw_optical_props_clouds, & - lw_optical_props_aerosol, lslwr, fluxlwUP_allsky, fluxlwDOWN_allsky, fluxlwUP_clrsky,& + lw_optical_props_aerosol, fluxlwUP_allsky, fluxlwDOWN_allsky, fluxlwUP_clrsky, & fluxlwDOWN_clrsky, hlw0, hlwb, errmsg, errflg) ! Inputs - type(GFS_control_type), intent(in) :: & - Model ! Fortran DDT containing FV3-GFS model control parameters - type(GFS_statein_type), intent(in) :: & - Statein ! Fortran DDT containing FV3-GFS prognostic state data in from dycore + logical, intent(in) :: & + doLWrad ! Logical flag for longwave radiation call integer, intent(in) :: & - ncol ! Number of horizontal gridpoints - real(kind_phys), dimension(ncol,model%levs), intent(in) :: & - p_lay, & ! Pressure @ model layer-centers (hPa) - t_lay ! Temperature (K) - real(kind_phys), dimension(ncol,model%levs+1), intent(in) :: & - p_lev ! Pressure @ model layer-interfaces (hPa) + nCol, & ! Number of horizontal gridpoints + nLev ! Number of vertical levels + real(kind_phys), dimension(ncol,nLev), intent(in) :: & + p_lay, & ! Pressure @ model layer-centers (hPa) + t_lay ! Temperature (K) + real(kind_phys), dimension(ncol,nLev+1), intent(in) :: & + p_lev ! Pressure @ model layer-interfaces (hPa) real(kind_phys), dimension(ncol), intent(in) :: & - skt ! Surface(skin) temperature (K) + skt ! Surface(skin) temperature (K) type(ty_gas_optics_rrtmgp),intent(in) :: & - lw_gas_props ! DDT containing LW spectral information + lw_gas_props ! DDT containing LW spectral information + real(kind_phys), dimension(lw_gas_props%get_nband(),ncol), intent(in) :: & + sfc_emiss_byband ! Surface emissivity in each band + type(ty_source_func_lw),intent(in) :: & + sources type(ty_optical_props_1scl),intent(inout) :: & lw_optical_props_clrsky ! RRTMGP DDT: longwave clear-sky radiative properties type(ty_optical_props_1scl),intent(in) :: & - lw_optical_props_clouds, & ! RRTMGP DDT: longwave cloud radiative properties + lw_optical_props_clouds, & ! RRTMGP DDT: longwave cloud radiative properties lw_optical_props_aerosol ! RRTMGP DDT: longwave aerosol radiative properties - type(ty_source_func_lw),intent(in) :: & - sources - logical, intent(in) :: & - lslwr ! Flag to calculate LW irradiances - real(kind_phys), dimension(lw_gas_props%get_nband(),ncol), intent(in) :: & - sfc_emiss_byband ! Surface emissivity in each band - + ! Outputs + real(kind_phys), dimension(ncol,nLev+1), intent(out) :: & + fluxlwUP_allsky, & ! All-sky flux (W/m2) + fluxlwDOWN_allsky, & ! All-sky flux (W/m2) + fluxlwUP_clrsky, & ! Clear-sky flux (W/m2) + fluxlwDOWN_clrsky ! All-sky flux (W/m2) character(len=*), intent(out) :: & - errmsg ! CCPP error message + errmsg ! CCPP error message integer, intent(out) :: & - errflg ! CCPP error flag - real(kind_phys), dimension(ncol,model%levs+1), intent(out) :: & - fluxlwUP_allsky, & ! All-sky flux (W/m2) - fluxlwDOWN_allsky, & ! All-sky flux (W/m2) - fluxlwUP_clrsky, & ! Clear-sky flux (W/m2) - fluxlwDOWN_clrsky ! All-sky flux (W/m2) + errflg ! CCPP error flag ! Outputs (optional) - real(kind_phys), dimension(ncol,model%levs,lw_gas_props%get_nband()), optional, intent(inout) :: & - hlwb ! All-sky heating rate, by band (K/sec) - real(kind_phys), dimension(ncol,model%levs), optional, intent(inout) :: & - hlw0 ! Clear-sky heating rate (K/sec) + real(kind_phys), dimension(ncol,nLev,lw_gas_props%get_nband()), optional, intent(inout) :: & + hlwb ! All-sky heating rate, by band (K/sec) + real(kind_phys), dimension(ncol,nLev), optional, intent(inout) :: & + hlw0 ! Clear-sky heating rate (K/sec) ! Local variables type(ty_fluxes_byband) :: & flux_allsky, flux_clrsky - real(kind_phys), dimension(ncol,model%levs+1,lw_gas_props%get_nband()),target :: & + real(kind_phys), dimension(ncol,nLev+1,lw_gas_props%get_nband()),target :: & fluxLW_up_allsky, fluxLW_up_clrsky, fluxLW_dn_allsky, fluxLW_dn_clrsky -! real(kind_phys), dimension(ncol,model%levs+1,lw_gas_props%get_nband()),target :: & -! fluxLWBB_up_allsky, fluxLWBB_dn_allsky logical :: & l_ClrSky_HR, l_AllSky_HR_byband, top_at_1 ! Initialize CCPP error handling variables errmsg = '' errflg = 0 - if (.not. lslwr) return + + if (.not. doLWrad) return ! Vertical ordering? - top_at_1 = (p_lev(1,1) .lt. p_lev(1, Model%levs)) + top_at_1 = (p_lev(1,1) .lt. p_lev(1, nLev)) ! Are any optional outputs requested? Need to know now to compute correct fluxes. l_ClrSky_HR = present(hlw0) @@ -104,11 +99,6 @@ subroutine rrtmgp_lw_rte_run(Model, Statein, ncol, lw_gas_props, p_lay, t_lay, p flux_allsky%bnd_flux_dn => fluxLW_dn_allsky flux_clrsky%bnd_flux_up => fluxLW_up_clrsky flux_clrsky%bnd_flux_dn => fluxLW_dn_clrsky - ! Only calculate fluxes by-band, only when heating-rate profiles by band are requested. - !if (l_AllSky_HR_byband) then - ! flux_allsky%bnd_flux_up => fluxLWBB_up_allsky - ! flux_allsky%bnd_flux_dn => fluxLWBB_dn_allsky - !endif ! Compute clear-sky fluxes (if requested) ! Clear-sky fluxes are gas+aerosol @@ -138,6 +128,10 @@ subroutine rrtmgp_lw_rte_run(Model, Statein, ncol, lw_gas_props, p_lay, t_lay, p fluxlwUP_allsky = sum(flux_allsky%bnd_flux_up,dim=3) fluxlwDOWN_allsky = sum(flux_allsky%bnd_flux_dn,dim=3) + ! Only output fluxes by-band when heating-rate profiles by band are requested. + !if (l_AllSky_HR_byband) then + !endif + end subroutine rrtmgp_lw_rte_run ! ######################################################################################### diff --git a/physics/rrtmgp_lw_rte.meta b/physics/rrtmgp_lw_rte.meta index afd31d38c..47168c75b 100644 --- a/physics/rrtmgp_lw_rte.meta +++ b/physics/rrtmgp_lw_rte.meta @@ -1,20 +1,12 @@ [ccpp-arg-table] name = rrtmgp_lw_rte_run type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = instance of derived type GFS_control_type - units = DDT - dimensions = () - type = GFS_control_type - intent = in - optional = F -[Statein] - standard_name = GFS_statein_type_instance - long_name = instance of derived type GFS_statein_type - units = DDT +[doLWrad] + standard_name = flag_to_calc_lw + long_name = logical flags for lw radiation calls + units = flag dimensions = () - type = GFS_statein_type + type = logical intent = in optional = F [ncol] @@ -25,6 +17,14 @@ type = integer intent = in optional = F +[nLev] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count + dimensions = () + type = integer + intent = in + optional = F [p_lay] standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure layer @@ -110,14 +110,6 @@ type = ty_source_func_lw intent = in optional = F -[lslwr] - standard_name = flag_to_calc_lw - long_name = flag to calculate LW irradiances - units = flag - dimensions = () - type = logical - intent = in - optional = F [hlw0] standard_name = RRTMGP_lw_heating_rate_clear_sky long_name = RRTMGP longwave clear sky heating rate diff --git a/physics/rrtmgp_sw_cloud_optics.F90 b/physics/rrtmgp_sw_cloud_optics.F90 index 10c837622..e994dd558 100644 --- a/physics/rrtmgp_sw_cloud_optics.F90 +++ b/physics/rrtmgp_sw_cloud_optics.F90 @@ -1,6 +1,5 @@ module rrtmgp_sw_cloud_optics use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type use mo_rte_kind, only: wl use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_cloud_optics, only: ty_cloud_optics @@ -18,20 +17,23 @@ module rrtmgp_sw_cloud_optics !! \section arg_table_rrtmgp_sw_cloud_optics_init !! \htmlinclude rrtmgp_lw_cloud_optics.html !! - subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud_props, & - errmsg, errflg) + subroutine rrtmgp_sw_cloud_optics_init(cld_optics_scheme, nrghice, rrtmgp_root_dir, & + rrtmgp_sw_file_clouds, mpicomm, mpirank, mpiroot, sw_cloud_props, errmsg, errflg) use netcdf !#ifdef MPI ! use mpi !#endif ! Inputs - type(GFS_control_type), intent(in) :: & - Model ! DDT containing model control parameters - integer,intent(in) :: & - mpicomm, & ! MPI communicator - mpirank, & ! Current MPI rank - mpiroot ! Master MPI rank + integer, intent(in) :: & + nrghice, & ! Number of ice-roughness categories + cld_optics_scheme, & ! Cloud-optics scheme + mpicomm, & ! MPI communicator + mpirank, & ! Current MPI rank + mpiroot ! Master MPI rank + character(len=128),intent(in) :: & + rrtmgp_root_dir, & ! RTE-RRTMGP root directory + rrtmgp_sw_file_clouds ! RRTMGP file containing coefficients used to compute clouds optical properties ! Outputs type(ty_cloud_optics),intent(out) :: & @@ -96,10 +98,10 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud errmsg = '' errflg = 0 - if (Model%rrtmgp_cld_optics .eq. 0) return + if (cld_optics_scheme .eq. 0) return - ! Filenames are set in the gfs_physics_nml (scm/src/GFS_typedefs.F90) - sw_cloud_props_file = trim(Model%rrtmgp_root)//trim(Model%sw_file_clouds) + ! Filenames are set in the physics_nml + sw_cloud_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_sw_file_clouds) ! Read dimensions for k-distribution fields (only on master processor(0)) ! if (mpirank .eq. mpiroot) then @@ -126,14 +128,14 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud endif ! Check to ensure that number of ice-roughness categories is feasible. - if (Model%rrtmgp_nrghice .gt. nrghice_sw) then + if (nrghice .gt. nrghice_sw) then errmsg = 'Number of RRTMGP ice-roughness categories requested in namelist file is not allowed' endif ! endif ! ! Broadcast dimensions to all processors !#ifdef MPI -! if (Model%rrtmgp_cld_optics .eq. 1 .or. Model%rrtmgp_cld_optics .eq. 2) then +! if (cld_optics_scheme .eq. 1 .or. cld_optics_scheme .eq. 2) then ! call MPI_BCAST(nbandSWcldy_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) ! call MPI_BCAST(nrghice_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) ! call MPI_BCAST(nsize_liq_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr) @@ -146,7 +148,7 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud ! endif !#endif - if (Model%rrtmgp_cld_optics .eq. 1) then + if (cld_optics_scheme .eq. 1) then allocate(lut_extliq_sw(nsize_liq_sw, nBandSWcldy_sw)) allocate(lut_ssaliq_sw(nsize_liq_sw, nBandSWcldy_sw)) allocate(lut_asyliq_sw(nsize_liq_sw, nBandSWcldy_sw)) @@ -155,7 +157,7 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud allocate(lut_asyice_sw(nsize_ice_sw, nBandSWcldy_sw, nrghice_sw)) allocate(band_lims_cldy_sw(2, nBandSWcldy_sw)) endif - if (Model%rrtmgp_cld_optics .eq. 2) then + if (cld_optics_scheme .eq. 2) then allocate(pade_extliq_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ext_sw )) allocate(pade_ssaliq_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ssa_g_sw)) allocate(pade_asyliq_sw(nbandSWcldy_sw, nsizereg_sw, ncoeff_ssa_g_sw)) @@ -174,7 +176,7 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud ! On master processor, allocate space, read in fields, broadcast to all processors ! if (mpirank .eq. mpiroot) then ! - if (Model%rrtmgp_cld_optics .eq. 1) then + if (cld_optics_scheme .eq. 1) then write (*,*) 'Reading RRTMGP shortwave cloud data (LUT) ... ' ! if(nf90_open(trim(sw_cloud_props_file), NF90_WRITE, ncid_sw_clds) == NF90_NOERR) then @@ -208,7 +210,7 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud endif endif ! - if (Model%rrtmgp_cld_optics .eq. 2) then + if (cld_optics_scheme .eq. 2) then write (*,*) 'Reading RRTMGP shortwave cloud data (PADE) ... ' ! if(nf90_open(trim(sw_cloud_props_file), NF90_WRITE, ncid_sw_clds) == NF90_NOERR) then @@ -257,7 +259,7 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud ! Broadcast arrays to all processors !#ifdef MPI -! if (Model%rrtmgp_cld_optics .eq. 1) then +! if (cld_optics_scheme .eq. 1) then ! write (*,*) 'Broadcasting RRTMGP shortwave cloud data (LUT) ... ' !#ifndef SINGLE_PREC ! call MPI_BCAST(radliq_lwr_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) @@ -289,7 +291,7 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud ! call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), MPI_REAL, mpiroot, mpicomm, ierr) !#endif ! endif -! if (Model%rrtmgp_cld_optics .eq. 2) then +! if (cld_optics_scheme .eq. 2) then ! write (*,*) 'Broadcasting RRTMGP shortwave cloud data (PADE) ... ' !#ifndef SINGLE_PREC ! call MPI_BCAST(pade_extliq_sw, size(pade_extliq_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr) @@ -324,15 +326,15 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud !#endif ! Load tables data for RRTMGP cloud-optics - if (Model%rrtmgp_cld_optics .eq. 1) then - call check_error_msg('sw_cloud_optics_init',sw_cloud_props%set_ice_roughness(Model%rrtmgp_nrghice)) + if (cld_optics_scheme .eq. 1) then + call check_error_msg('sw_cloud_optics_init',sw_cloud_props%set_ice_roughness(nrghice)) call check_error_msg('sw_cloud_optics_init',sw_cloud_props%load(band_lims_cldy_sw, & radliq_lwr_sw, radliq_upr_sw, radliq_fac_sw, radice_lwr_sw, radice_upr_sw, & radice_fac_sw, lut_extliq_sw, lut_ssaliq_sw, lut_asyliq_sw, lut_extice_sw, & lut_ssaice_sw, lut_asyice_sw)) endif - if (Model%rrtmgp_cld_optics .eq. 2) then - call check_error_msg('sw_cloud_optics_init',sw_cloud_props%set_ice_roughness(Model%rrtmgp_nrghice)) + if (cld_optics_scheme .eq. 2) then + call check_error_msg('sw_cloud_optics_init',sw_cloud_props%set_ice_roughness(nrghice)) call check_error_msg('sw_cloud_optics_init', sw_cloud_props%load(band_lims_cldy_sw, & pade_extliq_sw, pade_ssaliq_sw, pade_asyliq_sw, pade_extice_sw, pade_ssaice_sw, & pade_asyice_sw, pade_sizereg_extliq_sw, pade_sizereg_ssaliq_sw, & @@ -347,53 +349,57 @@ end subroutine rrtmgp_sw_cloud_optics_init !! \section arg_table_rrtmgp_sw_cloud_optics_run !! \htmlinclude rrtmgp_sw_cloud_optics.html !! - subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, cld_frac, cld_lwp, cld_reliq, cld_iwp, & - cld_reice, cld_swp, cld_resnow, cld_rwp, cld_rerain, sw_cloud_props, sw_gas_props, & - nday, idxday, sw_optical_props_cloudsByBand, cldtausw, errmsg, errflg) + subroutine rrtmgp_sw_cloud_optics_run(doSWrad, nCol, nLev, nDay, idxday, nrghice, & + cld_optics_scheme, cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, & + cld_resnow, cld_rwp, cld_rerain, sw_cloud_props, sw_gas_props, & + sw_optical_props_cloudsByBand, cldtausw, errmsg, errflg) ! Inputs - type(GFS_control_type), intent(in) :: & - Model + logical, intent(in) :: & + doSWrad ! Logical flag for shortwave radiation call integer, intent(in) :: & - ncol, & ! Number of horizontal gridpoints - nday ! Number of daylit points. + nCol, & ! Number of horizontal gridpoints + nLev, & ! Number of vertical levels + nday, & ! Number of daylit points. + nrghice, & ! Number of ice-roughness categories + cld_optics_scheme ! Cloud-optics scheme integer,intent(in),dimension(ncol) :: & - idxday ! Indices for daylit points. - real(kind_phys), dimension(ncol,model%levs),intent(in) :: & - cld_frac, & ! Total cloud fraction by layer - cld_lwp, & ! Cloud liquid water path - cld_reliq, & ! Cloud liquid effective radius - cld_iwp, & ! Cloud ice water path - cld_reice, & ! Cloud ice effective radius - cld_swp, & ! Cloud snow water path - cld_resnow, & ! Cloud snow effective radius - cld_rwp, & ! Cloud rain water path - cld_rerain ! Cloud rain effective radius + idxday ! Indices for daylit points. + real(kind_phys), dimension(ncol,nLev),intent(in) :: & + cld_frac, & ! Total cloud fraction by layer + cld_lwp, & ! Cloud liquid water path + cld_reliq, & ! Cloud liquid effective radius + cld_iwp, & ! Cloud ice water path + cld_reice, & ! Cloud ice effective radius + cld_swp, & ! Cloud snow water path + cld_resnow, & ! Cloud snow effective radius + cld_rwp, & ! Cloud rain water path + cld_rerain ! Cloud rain effective radius type(ty_cloud_optics),intent(in) :: & - sw_cloud_props ! RRTMGP DDT: + sw_cloud_props ! RRTMGP DDT: type(ty_gas_optics_rrtmgp),intent(in) :: & - sw_gas_props ! RRTMGP DDT: K-distribution data + sw_gas_props ! RRTMGP DDT: K-distribution data ! Outputs character(len=*), intent(out) :: & - errmsg ! Error message + errmsg ! Error message integer, intent(out) :: & - errflg ! Error code + errflg ! Error code type(ty_optical_props_2str),intent(out) :: & sw_optical_props_cloudsByBand ! RRTMGP DDT: Shortwave optical properties (cloudy atmosphere) - real(kind_phys), dimension(ncol,Model%levs), intent(out) :: & - cldtausw ! approx 10.mu band layer cloud optical depth + real(kind_phys), dimension(ncol,NLev), intent(out) :: & + cldtausw ! approx 10.mu band layer cloud optical depth ! Local variables - logical,dimension(nday,model%levs) :: liqmask, icemask - real(kind_phys), dimension(nday,model%levs,sw_gas_props%get_nband()) :: & + logical,dimension(nday,nLev) :: liqmask, icemask + real(kind_phys), dimension(nday,nLev,sw_gas_props%get_nband()) :: & tau_cld, ssa_cld, asy_cld ! Initialize CCPP error handling variables errmsg = '' errflg = 0 - if (.not. Model%lsswr) return + if (.not. doSWrad) return if (nDay .gt. 0) then ! ####################################################################################### @@ -405,20 +411,20 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, cld_frac, cld_lwp, cld_reliq, ! ####################################################################################### ! Allocate space for RRTMGP DDTs containing cloud radiative properties ! ####################################################################################### - ! Cloud optics [nday,model%levs,nBands] + ! Cloud optics [nday,nLev,nBands] call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_optical_props_cloudsByBand%alloc_2str(& - nday, model%levs, sw_gas_props%get_band_lims_wavenumber())) + nday, nLev, sw_gas_props%get_band_lims_wavenumber())) ! ####################################################################################### ! Compute cloud-optics for RTE. ! ####################################################################################### - if (Model%rrtmgp_cld_optics .gt. 0) then + if (cld_optics_scheme .gt. 0) then ! RRTMGP cloud-optics. call check_error_msg('rrtmgp_sw_cloud_optics_run',sw_cloud_props%cloud_optics(& nday, & ! IN - Number of daylit gridpoints - model%levs, & ! IN - Number of vertical layers + nLev, & ! IN - Number of vertical layers sw_cloud_props%get_nband(), & ! IN - Number of SW bands - Model%rrtmgp_nrghice, & ! IN - Number of ice-roughness categories + nrghice, & ! IN - Number of ice-roughness categories liqmask, & ! IN - Liquid-cloud mask icemask, & ! IN - Ice-cloud mask cld_lwp(idxday(1:nday),:), & ! IN - Cloud liquid water path @@ -433,7 +439,7 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, cld_frac, cld_lwp, cld_reliq, sw_optical_props_cloudsByBand%tau(:,:,:) = 0._kind_phys sw_optical_props_cloudsByBand%ssa(:,:,:) = 0._kind_phys sw_optical_props_cloudsByBand%g(:,:,:) = 0._kind_phys - call rrtmg_sw_cloud_optics(nday, model%levs, sw_gas_props%get_nband(), & + call rrtmg_sw_cloud_optics(nday, nLev, sw_gas_props%get_nband(), & cld_lwp(idxday(1:nday),:), cld_reliq(idxday(1:nday),:), & cld_iwp(idxday(1:nday),:), cld_reice(idxday(1:nday),:), & cld_rwp(idxday(1:nday),:), cld_rerain(idxday(1:nday),:), & @@ -445,7 +451,7 @@ subroutine rrtmgp_sw_cloud_optics_run(Model, ncol, cld_frac, cld_lwp, cld_reliq, endif endif - ! GFS_RRTMGP_POST_RUN() requires the SW optical depth ~0.55microns + ! All-sky SW optical depth ~0.55microns cldtausw(idxday(1:nDay),:) = sw_optical_props_cloudsByBand%tau(:,:,11) endif diff --git a/physics/rrtmgp_sw_cloud_optics.meta b/physics/rrtmgp_sw_cloud_optics.meta index 283270081..e9450eb77 100644 --- a/physics/rrtmgp_sw_cloud_optics.meta +++ b/physics/rrtmgp_sw_cloud_optics.meta @@ -1,14 +1,40 @@ [ccpp-arg-table] name = rrtmgp_sw_cloud_optics_init type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = instance of derived type GFS_control_type - units = DDT - dimensions = () - type = GFS_control_type +[cld_optics_scheme] + standard_name = rrtmgp_cloud_optics_flag + long_name = Flag to control which RRTMGP cloud-optics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[nrghice] + standard_name = number_of_rrtmgp_ice_roughness + long_name = number of ice-roughness categories in RRTMGP calculation + units = count + dimensions = () + type = integer + intent = in + optional = F +[rrtmgp_root_dir] + standard_name = directory_for_rte_rrtmgp_source_code + long_name = directory for rte+rrtmgp source code + units = none + dimensions = () + type = character + intent = in + optional = F + kind = len=128 +[rrtmgp_sw_file_clouds] + standard_name = rrtmgp_coeff_sw_cloud_optics + long_name = file containing coefficients for RRTMGP SW cloud optics + units = none + dimensions = () + type = character intent = in optional = F + kind = len=128 [mpirank] standard_name = mpi_rank long_name = current MPI rank @@ -63,12 +89,12 @@ [ccpp-arg-table] name = rrtmgp_sw_cloud_optics_run type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = instance of derived type GFS_control_type - units = DDT +[doSWrad] + standard_name = flag_to_calc_sw + long_name = logical flags for sw radiation calls + units = flag dimensions = () - type = GFS_control_type + type = logical intent = in optional = F [ncol] @@ -79,6 +105,30 @@ type = integer intent = in optional = F +[nLev] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count + dimensions = () + type = integer + intent = in + optional = F +[cld_optics_scheme] + standard_name = rrtmgp_cloud_optics_flag + long_name = Flag to control which RRTMGP cloud-optics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[nrghice] + standard_name = number_of_rrtmgp_ice_roughness + long_name = number of ice-roughness categories in RRTMGP calculation + units = count + dimensions = () + type = integer + intent = in + optional = F [cld_frac] standard_name = total_cloud_fraction long_name = layer total cloud fraction diff --git a/physics/rrtmgp_sw_clrallsky_driver.F90 b/physics/rrtmgp_sw_clrallsky_driver.F90 deleted file mode 100644 index 3e7b94640..000000000 --- a/physics/rrtmgp_sw_clrallsky_driver.F90 +++ /dev/null @@ -1,179 +0,0 @@ -! ########################################################################################### -! ########################################################################################### -module rrtmgp_sw_clrallsky_driver - use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type, GFS_radtend_type, GFS_interstitial_type - use mo_rte_kind, only: wl - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp - use mo_cloud_optics, only: ty_cloud_optics - use mo_optical_props, only: ty_optical_props_2str - use mo_rrtmgp_clr_all_sky, only: rte_sw - use mo_gas_concentrations, only: ty_gas_concs - use mo_fluxes_byband, only: ty_fluxes_byband - use module_radsw_parameters, only: cmpfsw_type - use rrtmgp_aux, only: check_error_msg - - public rrtmgp_sw_clrallsky_driver_init, rrtmgp_sw_clrallsky_driver_run, rrtmgp_sw_clrallsky_driver_finalize - -contains - - ! ######################################################################################### - ! SUBROUTINE rrtmgp_sw_clrallsky_driver_init - ! ######################################################################################### - subroutine rrtmgp_sw_clrallsky_driver_init() - end subroutine rrtmgp_sw_clrallsky_driver_init - - ! ######################################################################################### - ! SUBROUTINE rrtmgp_sw_clrallsky_driver_run - ! ######################################################################################### -!! \section arg_table_rrtmgp_sw_clrallsky_driver_run -!! \htmlinclude rrtmgp_sw_clrallsky_driver.html -!! - subroutine rrtmgp_sw_clrallsky_driver_run(Model, Interstitial, Radtend, ncol, sw_gas_props, p_lay, t_lay,& - p_lev, gas_concentrations,sw_optical_props_clouds, sw_optical_props_aerosol, lsswr, & - nday, idxday, hsw0, hswb, scmpsw, & - fluxswUP_allsky, fluxswDOWN_allsky, fluxswUP_clrsky, fluxswDOWN_clrsky, errmsg, errflg) - - ! Inputs - type(GFS_control_type), intent(in) :: Model - type(GFS_interstitial_type), intent(in) :: Interstitial - type(GFS_radtend_type), intent(in) :: Radtend - integer, intent(in) :: & - ncol, & ! Number of horizontal gridpoints - nday ! Number of daytime points - integer, intent(in), dimension(nday) :: & - idxday ! Index array for daytime points - real(kind_phys), dimension(ncol,Model%levs), intent(in) :: & - p_lay, & ! Pressure @ model layer-centers (hPa) - t_lay ! Temperature (K) - real(kind_phys), dimension(ncol,Model%levs+1), intent(in) :: & - p_lev ! Pressure @ model layer-interfaces (hPa) - type(ty_gas_optics_rrtmgp),intent(in) :: & - sw_gas_props ! DDT containing SW spectral information - type(ty_optical_props_2str),intent(in) :: & - sw_optical_props_clouds, & ! RRTMGP DDT: longwave cloud radiative properties - sw_optical_props_aerosol ! RRTMGP DDT: longwave aerosol radiative properties - - type(ty_gas_concs),intent(in) :: & - gas_concentrations ! RRTMGP DDT: trace gas concentrations (vmr) - logical, intent(in) :: & - lsswr ! Flag to calculate SW irradiances - - ! Outputs - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - real(kind_phys), dimension(ncol,Model%levs+1), intent(out) :: & - fluxswUP_allsky, & ! All-sky flux (W/m2) - fluxswDOWN_allsky, & ! All-sky flux (W/m2) - fluxswUP_clrsky, & ! Clear-sky flux (W/m2) - fluxswDOWN_clrsky ! All-sky flux (W/m2) - - ! Inputs (optional) (NOTE. We only need the optional arguments to know what fluxes to output, HR's are computed later) - real(kind_phys), dimension(ncol,Model%levs), optional, intent(inout) :: & - hsw0 ! Clear-sky heating rate (K/sec) - real(kind_phys), dimension(ncol,Model%levs,sw_gas_props%get_nband()), intent(inout), optional :: & - hswb ! All-sky heating rate, by band (K/sec) - ! Outputs (optional) - type(cmpfsw_type), dimension(ncol), intent(inout),optional :: & - scmpsw ! 2D surface fluxes, components: - ! uvbfc - total sky downward uv-b flux at (W/m2) - ! uvbf0 - clear sky downward uv-b flux at (W/m2) - ! nirbm - downward nir direct beam flux (W/m2) - ! nirdf - downward nir diffused flux (W/m2) - ! visbm - downward uv+vis direct beam flux (W/m2) - ! visdf - downward uv+vis diffused flux (W/m2) - - ! Local variables - type(ty_fluxes_byband) :: & - flux_allsky, & ! All-sky flux (W/m2) - flux_clrsky ! Clear-sky flux (W/m2) - real(kind_phys), dimension(nday,Model%levs+1),target :: & - fluxSW_up_allsky, fluxSW_up_clrsky, fluxSW_dn_allsky, fluxSW_dn_clrsky - real(kind_phys), dimension(nday,Model%levs+1,sw_gas_props%get_nband()),target :: & - fluxSWBB_up_allsky, fluxSWBB_dn_allsky - real(kind_phys), dimension(ncol,Model%levs) :: vmrTemp - logical :: l_ClrSky_HR=.false., l_AllSky_HR_byband=.false., l_scmpsw=.false. - integer :: iGas - type(ty_optical_props_2str) :: & - sw_optical_props_clouds_daylit, & ! RRTMGP DDT: longwave cloud radiative properties - sw_optical_props_aerosol_daylit ! RRTMGP DDT: longwave aerosol radiative properties - type(ty_gas_concs) :: & - gas_concentrations_daylit ! RRTMGP DDT: trace gas concentrations (vmr) - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - if (.not. lsswr) return - - ! Are any optional outputs requested? Need to know now to compute correct fluxes. - l_ClrSky_HR = present(hsw0) - l_AllSky_HR_byband = present(hswb) - l_scmpsw = present(scmpsw) - if ( l_scmpsw ) then - scmpsw = cmpfsw_type (0., 0., 0., 0., 0., 0.) - endif - fluxswUP_allsky(:,:) = 0._kind_phys - fluxswDOWN_allsky(:,:) = 0._kind_phys - fluxswUP_clrsky(:,:) = 0._kind_phys - fluxswDOWN_clrsky(:,:) = 0._kind_phys - - if (nDay .gt. 0) then - - ! Subset the cloud and aerosol radiative properties over daylit points. - ! Cloud optics [nDay,Model%levs,nBands] - call check_error_msg('rrtmgp_sw_clrallsky_driver_run',sw_optical_props_clouds_daylit%alloc_2str(nday, Model%levs, sw_gas_props)) - sw_optical_props_clouds_daylit%tau = sw_optical_props_clouds%tau(idxday,:,:) - sw_optical_props_clouds_daylit%ssa = sw_optical_props_clouds%ssa(idxday,:,:) - sw_optical_props_clouds_daylit%g = sw_optical_props_clouds%g(idxday,:,:) - ! Aerosol optics [nDay,Model%levs,nBands] - call check_error_msg('rrtmgp_sw_clrallsky_driver_run',sw_optical_props_aerosol_daylit%alloc_2str(nday, Model%levs, sw_gas_props%get_band_lims_wavenumber())) - sw_optical_props_aerosol_daylit%tau = sw_optical_props_aerosol%tau(idxday,:,:) - sw_optical_props_aerosol_daylit%ssa = sw_optical_props_aerosol%ssa(idxday,:,:) - sw_optical_props_aerosol_daylit%g = sw_optical_props_aerosol%g(idxday,:,:) - - ! Similarly, subset the gas concentrations. - do iGas=1,Model%nGases - call check_error_msg('rrtmgp_sw_clrallsky_driver_run',gas_concentrations%get_vmr(trim(Model%active_gases_array(iGas)),vmrTemp)) - call check_error_msg('rrtmgp_sw_clrallsky_driver_run',gas_concentrations_daylit%set_vmr(trim(Model%active_gases_array(iGas)),vmrTemp(idxday,:))) - enddo - - ! Initialize RRTMGP DDT containing 2D(3D) fluxes - flux_allsky%flux_up => fluxSW_up_allsky - flux_allsky%flux_dn => fluxSW_dn_allsky - flux_clrsky%flux_up => fluxSW_up_clrsky - flux_clrsky%flux_dn => fluxSW_dn_clrsky - ! Only calculate fluxes by-band, only when heating-rate profiles by band are requested. - if (l_AllSky_HR_byband) then - flux_allsky%bnd_flux_up => fluxSWBB_up_allsky - flux_allsky%bnd_flux_dn => fluxSWBB_dn_allsky - endif - - ! Call RRTMGP SW scheme - call check_error_msg('rrtmgp_sw_clrallsky_driver_run',rte_sw( & - sw_gas_props, & ! IN - spectral information - gas_concentrations_daylit, & ! IN - gas concentrations (vmr) - p_lay(idxday,1:Model%levs), & ! IN - pressure at layer interfaces (Pa) - t_lay(idxday,1:Model%levs), & ! IN - temperature at layer interfaes (K) - p_lev(idxday,1:Model%levs+1), & ! IN - pressure at layer centers (Pa) - Radtend%coszen(idxday), & ! IN - Cosine of solar zenith angle - Interstitial%sfc_alb_nir_dir(:,idxday), & ! IN - Shortwave surface albedo (direct) - Interstitial%sfc_alb_nir_dif(:,idxday), & ! IN - Shortwave surface albedo (diffuse) - sw_optical_props_clouds_daylit, & ! IN - DDT containing cloud optical information - flux_allsky, & ! OUT - Fluxes, all-sky, 3D (nCol,Model%levs,nBand) - flux_clrsky, & ! OUT - Fluxes, clear-sky, 3D (nCol,Model%levs,nBand) - aer_props = sw_optical_props_aerosol_daylit)) ! IN(optional) - DDT containing aerosol optical information - fluxswUP_allsky(idxday,:) = flux_allsky%flux_up - fluxswDOWN_allsky(idxday,:) = flux_allsky%flux_dn - fluxswUP_clrsky(idxday,:) = flux_clrsky%flux_up - fluxswDOWN_clrsky(idxday,:) = flux_clrsky%flux_dn - endif - end subroutine rrtmgp_sw_clrallsky_driver_run - - ! ######################################################################################### - ! SUBROUTINE rrtmgp_sw_clrallsky_driver_finalize - ! ######################################################################################### - subroutine rrtmgp_sw_clrallsky_driver_finalize() - end subroutine rrtmgp_sw_clrallsky_driver_finalize - -end module rrtmgp_sw_clrallsky_driver diff --git a/physics/rrtmgp_sw_clrallsky_driver.meta b/physics/rrtmgp_sw_clrallsky_driver.meta deleted file mode 100644 index 092bdb417..000000000 --- a/physics/rrtmgp_sw_clrallsky_driver.meta +++ /dev/null @@ -1,197 +0,0 @@ -[ccpp-arg-table] - name = rrtmgp_sw_clrallsky_driver_run - type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = instance of derived type GFS_control_type - units = DDT - dimensions = () - type = GFS_control_type - intent = in - optional = F -[Interstitial] - standard_name = GFS_interstitial_type_instance - long_name = derived type GFS_interstitial_type in FV3 - units = DDT - dimensions = () - type = GFS_interstitial_type - intent = in - optional = F -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = instance of derived type GFS_radtend_type - units = DDT - dimensions = () - type = GFS_radtend_type - intent = in - optional = F -[ncol] - standard_name = horizontal_loop_extent - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F -[p_lay] - standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa - long_name = air pressure layer - units = hPa - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[p_lev] - standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa - long_name = air pressure level - units = hPa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = in - optional = F -[t_lay] - standard_name = air_temperature_at_layer_for_RRTMGP - long_name = air temperature layer - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[sw_gas_props] - standard_name = coefficients_for_sw_gas_optics - long_name = DDT containing spectral information for RRTMGP SW radiation scheme - units = DDT - dimensions = () - type = ty_gas_optics_rrtmgp - intent = in - optional = F -[sw_optical_props_clouds] - standard_name = shortwave_optical_properties_for_cloudy_atmosphere - long_name = Fortran DDT containing RRTMGP optical properties - units = DDT - dimensions = () - type = ty_optical_props_2str - intent = in - optional = F -[sw_optical_props_aerosol] - standard_name = shortwave_optical_properties_for_aerosols - long_name = Fortran DDT containing RRTMGP optical properties - units = DDT - dimensions = () - type = ty_optical_props_2str - intent = in - optional = F -[gas_concentrations] - standard_name = Gas_concentrations_for_RRTMGP_suite - long_name = DDT containing gas concentrations for RRTMGP radiation scheme - units = DDT - dimensions = () - type = ty_gas_concs - intent = in - optional = F -[lsswr] - standard_name = flag_to_calc_sw - long_name = flag to calculate SW irradiances - units = flag - dimensions = () - type = logical - intent = in - optional = F -[nday] - standard_name = daytime_points_dimension - long_name = daytime points dimension - units = count - dimensions = () - type = integer - intent = in - optional = F -[idxday] - standard_name = daytime_points - long_name = daytime points - units = index - dimensions = (horizontal_dimension) - type = integer - intent = in - optional = F -[hsw0] - standard_name = RRTMGP_sw_heating_rate_clear_sky - long_name = RRTMGP shortwave clear sky heating rate - units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = T -[hswb] - standard_name = RRTMGP_sw_heating_rate_spectral - long_name = RRTMGP shortwave total sky heating rate (spectral) - units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_sw_spectral_points_rrtmgp) - type = real - kind = kind_phys - intent = inout - optional = T -[scmpsw] - standard_name = components_of_surface_downward_shortwave_fluxes - long_name = derived type for special components of surface downward shortwave fluxes - units = W m-2 - dimensions = (horizontal_dimension) - type = cmpfsw_type - intent = inout - optional = T -[fluxswUP_allsky] - standard_name = RRTMGP_sw_flux_profile_upward_allsky - long_name = RRTMGP upward shortwave all-sky flux profile - units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = out - optional = F -[fluxswDOWN_allsky] - standard_name = RRTMGP_sw_flux_profile_downward_allsky - long_name = RRTMGP downward shortwave all-sky flux profile - units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = out - optional = F -[fluxswUP_clrsky] - standard_name = RRTMGP_sw_flux_profile_upward_clrsky - long_name = RRTMGP upward shortwave clr-sky flux profile - units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = out - optional = F -[fluxswDOWN_clrsky] - standard_name = RRTMGP_sw_flux_profile_downward_clrsky - long_name = RRTMGP downward shortwave clr-sky flux profile - units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = out - optional = F -[errmsg] - standard_name = ccpp_error_message - long_name = error message for error handling in CCPP - units = none - dimensions = () - type = character - kind = len=* - intent = out - optional = F -[errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag - dimensions = () - type = integer - intent = out - optional = F diff --git a/physics/rrtmgp_sw_gas_optics.F90 b/physics/rrtmgp_sw_gas_optics.F90 index 71fefa648..b14f1501c 100644 --- a/physics/rrtmgp_sw_gas_optics.F90 +++ b/physics/rrtmgp_sw_gas_optics.F90 @@ -1,6 +1,5 @@ module rrtmgp_sw_gas_optics use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type use module_radiation_gases, only: NF_VGAS use mo_rte_kind, only: wl use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp @@ -121,11 +120,9 @@ subroutine rrtmgp_sw_gas_optics_init(rrtmgp_root_dir, rrtmgp_sw_file_gas, rrtmgp errmsg = '' errflg = 0 - ! Filenames are set in the gfs_physics_nml (GFS_typedefs.F90) + ! Filenames are set in the gphysics_nml sw_gas_props_file = trim(rrtmgp_root_dir)//trim(rrtmgp_sw_file_gas) - print*,'sw_gas_props_file: ',sw_gas_props_file - print*,'1; ',rrtmgp_root_dir - print*,'2; ',rrtmgp_sw_file_gas + ! Read dimensions for k-distribution fields (only on master processor(0)) ! if (mpirank .eq. mpiroot) then if(nf90_open(trim(sw_gas_props_file), NF90_WRITE, ncid_sw) .eq. NF90_NOERR) then diff --git a/physics/rrtmgp_sw_rte.F90 b/physics/rrtmgp_sw_rte.F90 index 66e73516e..5adf04bee 100644 --- a/physics/rrtmgp_sw_rte.F90 +++ b/physics/rrtmgp_sw_rte.F90 @@ -1,6 +1,5 @@ module rrtmgp_sw_rte use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type, GFS_radtend_type, GFS_statein_type use mo_rte_kind, only: wl use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_cloud_optics, only: ty_cloud_optics @@ -27,37 +26,37 @@ end subroutine rrtmgp_sw_rte_init !! \section arg_table_rrtmgp_sw_rte_run !! \htmlinclude rrtmgp_sw_rte.html !! - subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, t_lay, & - p_lev, gas_concentrations, sw_optical_props_clrsky, sfc_alb_nir_dir, sfc_alb_nir_dif,& - sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, toa_src_sw, sw_optical_props_clouds, & - sw_optical_props_aerosol, lsswr, nday, idxday, hsw0, hswb, rrtmgp_nGases, active_gases_array, scmpsw, fluxswUP_allsky, & - fluxswDOWN_allsky, fluxswUP_clrsky, fluxswDOWN_clrsky, errmsg, errflg) + subroutine rrtmgp_sw_rte_run(doSWrad, nCol, nLev, nDay, idxday, coszen, p_lay, t_lay, & + p_lev, sw_gas_props, gas_concentrations, sw_optical_props_clrsky, sfc_alb_nir_dir, & + sfc_alb_nir_dif, sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, toa_src_sw, & + sw_optical_props_clouds, sw_optical_props_aerosol, rrtmgp_nGases, active_gases_array, & + scmpsw, fluxswUP_allsky, fluxswDOWN_allsky, fluxswUP_clrsky, fluxswDOWN_clrsky, & + hsw0, hswb, errmsg, errflg) ! Inputs - - integer, intent(in) :: & - rrtmgp_nGases ! Number of trace gases active in RRTMGP - character(len=*),dimension(rrtmgp_nGases), intent(in) :: & - active_gases_array ! Character array containing trace gases to include in RRTMGP - - type(GFS_control_type), intent(in) :: & - Model - type(GFS_radtend_type), intent(in) :: & - Radtend - type(GFS_statein_type), intent(in) :: & - Statein ! DDT: FV3-GFS prognostic state data in from dycore + logical, intent(in) :: & + doSWrad ! Flag to calculate SW irradiances integer, intent(in) :: & - ncol, & ! Number of horizontal gridpoints - nday ! Number of daytime points + nCol, & ! Number of horizontal gridpoints + nday, & ! Number of daytime points + nLev ! Number of vertical levels integer, intent(in), dimension(ncol) :: & idxday ! Index array for daytime points - real(kind_phys), dimension(ncol,Model%levs), intent(in) :: & + real(kind_phys),intent(in), dimension(ncol) :: & + coszen ! Cosize of SZA + real(kind_phys), dimension(ncol,NLev), intent(in) :: & p_lay, & ! Pressure @ model layer-centers (Pa) t_lay ! Temperature (K) - real(kind_phys), dimension(ncol,Model%levs+1), intent(in) :: & + real(kind_phys), dimension(ncol,NLev+1), intent(in) :: & p_lev ! Pressure @ model layer-interfaces (Pa) type(ty_gas_optics_rrtmgp),intent(in) :: & sw_gas_props ! RRTMGP DDT: SW spectral information + type(ty_gas_concs),intent(in) :: & + gas_concentrations ! RRTMGP DDT: trace gas concentrations (vmr) + type(ty_optical_props_2str),intent(inout) :: & + sw_optical_props_clrsky, & ! RRTMGP DDT: shortwave clear-sky radiative properties + sw_optical_props_clouds, & ! RRTMGP DDT: shortwave cloud radiative properties + sw_optical_props_aerosol ! RRTMGP DDT: shortwave aerosol radiative properties real(kind_phys), dimension(sw_gas_props%get_nband(),ncol), intent(in) :: & sfc_alb_nir_dir, & ! Surface albedo (direct) sfc_alb_nir_dif, & ! Surface albedo (diffuse) @@ -65,29 +64,28 @@ subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, sfc_alb_uvvis_dif ! Surface albedo (diffuse) real(kind_phys), dimension(ncol,sw_gas_props%get_ngpt()), intent(in) :: & toa_src_sw ! TOA incident spectral flux (W/m2) - type(ty_optical_props_2str),intent(inout) :: & - sw_optical_props_clrsky, & ! RRTMGP DDT: longwave clear-sky radiative properties - sw_optical_props_clouds, & ! RRTMGP DDT: longwave cloud radiative properties - sw_optical_props_aerosol ! RRTMGP DDT: longwave aerosol radiative properties - type(ty_gas_concs),intent(in) :: & - gas_concentrations ! RRTMGP DDT: trace gas concentrations (vmr) - logical, intent(in) :: & - lsswr ! Flag to calculate SW irradiances + integer, intent(in) :: & + rrtmgp_nGases ! Number of trace gases active in RRTMGP + character(len=*),dimension(rrtmgp_nGases), intent(in) :: & + active_gases_array ! Character array containing trace gases to include in RRTMGP + + ! Inputs (optional) (NOTE. We only need the optional arguments to know what fluxes to output, HR's are computed later) + real(kind_phys), dimension(ncol,NLev), optional, intent(inout) :: & + hsw0 ! Clear-sky heating rate (K/sec) + real(kind_phys), dimension(ncol,NLev,sw_gas_props%get_nband()), intent(inout), optional :: & + hswb ! All-sky heating rate, by band (K/sec) ! Outputs - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - real(kind_phys), dimension(ncol,Model%levs+1), intent(inout) :: & + character(len=*), intent(out) :: & + errmsg ! CCPP error message + integer, intent(out) :: & + errflg ! CCPP error flag + real(kind_phys), dimension(ncol,NLev+1), intent(inout) :: & fluxswUP_allsky, & ! RRTMGP upward all-sky flux profiles (W/m2) fluxswDOWN_allsky, & ! RRTMGP downward all-sky flux profiles (W/m2) fluxswUP_clrsky, & ! RRTMGP upward clear-sky flux profiles (W/m2) fluxswDOWN_clrsky ! RRTMGP downward clear-sky flux profiles (W/m2) - ! Inputs (optional) (NOTE. We only need the optional arguments to know what fluxes to output, HR's are computed later) - real(kind_phys), dimension(ncol,Model%levs), optional, intent(inout) :: & - hsw0 ! Clear-sky heating rate (K/sec) - real(kind_phys), dimension(ncol,Model%levs,sw_gas_props%get_nband()), intent(inout), optional :: & - hswb ! All-sky heating rate, by band (K/sec) ! Outputs (optional) type(cmpfsw_type), dimension(ncol), intent(inout),optional :: & scmpsw ! 2D surface fluxes, components: @@ -104,9 +102,9 @@ subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, type(ty_fluxes_byband) :: & flux_allsky, & ! All-sky flux (W/m2) flux_clrsky ! Clear-sky flux (W/m2) - real(kind_phys), dimension(nday,Model%levs+1,sw_gas_props%get_nband()),target :: & + real(kind_phys), dimension(nday,NLev+1,sw_gas_props%get_nband()),target :: & fluxSW_up_allsky, fluxSW_up_clrsky, fluxSW_dn_allsky, fluxSW_dn_clrsky, fluxSW_dn_dir_allsky - real(kind_phys), dimension(ncol,Model%levs) :: vmrTemp + real(kind_phys), dimension(ncol,NLev) :: vmrTemp logical :: l_ClrSky_HR=.false., l_AllSky_HR_byband=.false., l_scmpsw=.false., top_at_1 integer :: iGas,iSFC,iTOA type(ty_optical_props_2str) :: & @@ -120,17 +118,17 @@ subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, errmsg = '' errflg = 0 - if (.not. lsswr) return + if (.not. doSWrad) return if (nDay .gt. 0) then ! Vertical ordering? - top_at_1 = (p_lev(1,1) .lt. p_lev(1, Model%levs)) + top_at_1 = (p_lev(1,1) .lt. p_lev(1, NLev)) if (top_at_1) then - iSFC = Model%levs+1 + iSFC = NLev+1 iTOA = 1 else iSFC = 1 - iTOA = Model%levs+1 + iTOA = NLev+1 endif ! Are any optional outputs requested? Need to know now to compute correct fluxes. @@ -173,13 +171,13 @@ subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_clrsky%delta_scale()) if (l_ClrSky_HR) then call check_error_msg('rrtmgp_sw_rte_run',rte_sw( & - sw_optical_props_clrsky, & ! IN - optical-properties - top_at_1, & ! IN - veritcal ordering flag - Radtend%coszen(idxday(1:nday)), & ! IN - Cosine of solar zenith angle - toa_src_sw(idxday(1:nday),:), & ! IN - incident solar flux at TOA - sfc_alb_dir, & ! IN - Shortwave surface albedo (direct) - sfc_alb_dif, & ! IN - Shortwave surface albedo (diffuse) - flux_clrsky)) ! OUT - Fluxes, clear-sky, 3D (nCol,Model%levs,nBand) + sw_optical_props_clrsky, & ! IN - optical-properties + top_at_1, & ! IN - veritcal ordering flag + coszen(idxday(1:nday)), & ! IN - Cosine of solar zenith angle + toa_src_sw(idxday(1:nday),:), & ! IN - incident solar flux at TOA + sfc_alb_dir, & ! IN - Shortwave surface albedo (direct) + sfc_alb_dif, & ! IN - Shortwave surface albedo (diffuse) + flux_clrsky)) ! OUT - Fluxes, clear-sky, 3D (nCol,NLev,nBand) ! Store fluxes fluxswUP_clrsky(idxday(1:nday),:) = sum(flux_clrsky%bnd_flux_up,dim=3) fluxswDOWN_clrsky(idxday(1:nday),:) = sum(flux_clrsky%bnd_flux_dn,dim=3) @@ -191,13 +189,13 @@ subroutine rrtmgp_sw_rte_run(Model, Radtend, Statein, ncol, sw_gas_props, p_lay, ! Delta-scale optical properties call check_error_msg('rrtmgp_sw_rte_run',sw_optical_props_clouds%delta_scale()) call check_error_msg('rrtmgp_sw_rte_run',rte_sw( & - sw_optical_props_clrsky, & ! IN - optical-properties - top_at_1, & ! IN - veritcal ordering flag - Radtend%coszen(idxday(1:nday)), & ! IN - Cosine of solar zenith angle - toa_src_sw(idxday(1:nday),:), & ! IN - incident solar flux at TOA - sfc_alb_dir, & ! IN - Shortwave surface albedo (direct) - sfc_alb_dif, & ! IN - Shortwave surface albedo (diffuse) - flux_allsky)) ! OUT - Fluxes, clear-sky, 3D (nCol,Model%levs,nBand) + sw_optical_props_clrsky, & ! IN - optical-properties + top_at_1, & ! IN - veritcal ordering flag + coszen(idxday(1:nday)), & ! IN - Cosine of solar zenith angle + toa_src_sw(idxday(1:nday),:), & ! IN - incident solar flux at TOA + sfc_alb_dir, & ! IN - Shortwave surface albedo (direct) + sfc_alb_dif, & ! IN - Shortwave surface albedo (diffuse) + flux_allsky)) ! OUT - Fluxes, clear-sky, 3D (nCol,NLev,nBand) ! Store fluxes fluxswUP_allsky(idxday(1:nday),:) = sum(flux_allsky%bnd_flux_up,dim=3) fluxswDOWN_allsky(idxday(1:nday),:) = sum(flux_allsky%bnd_flux_dn,dim=3) diff --git a/physics/rrtmgp_sw_rte.meta b/physics/rrtmgp_sw_rte.meta index e9dee8cc4..4722a70f8 100644 --- a/physics/rrtmgp_sw_rte.meta +++ b/physics/rrtmgp_sw_rte.meta @@ -1,55 +1,55 @@ [ccpp-arg-table] name = rrtmgp_sw_rte_run type = scheme -[rrtmgp_nGases] - standard_name = number_of_active_gases_used_by_RRTMGP - long_name = number of gases available used by RRTMGP - units = count - dimensions = () - type = integer - intent = in - optional = F -[active_gases_array] - standard_name = list_of_active_gases_used_by_RRTMGP - long_name = list of active gases used by RRTMGP - units = none - dimensions = (number_of_active_gases_used_by_RRTMGP) - type = character - kind = len=128 - intent = in - optional = F -[Model] - standard_name = GFS_control_type_instance - long_name = instance of derived type GFS_control_type - units = DDT +[doSWrad] + standard_name = flag_to_calc_sw + long_name = flag to calculate SW irradiances + units = flag dimensions = () - type = GFS_control_type + type = logical intent = in optional = F -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = instance of derived type GFS_radtend_type - units = DDT +[ncol] + standard_name = horizontal_loop_extent + long_name = horizontal dimension + units = count dimensions = () - type = GFS_radtend_type + type = integer intent = in optional = F -[Statein] - standard_name = GFS_statein_type_instance - long_name = instance of derived type GFS_statein_type - units = DDT +[nLev] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count dimensions = () - type = GFS_statein_type + type = integer intent = in optional = F -[ncol] - standard_name = horizontal_loop_extent - long_name = horizontal dimension +[nday] + standard_name = daytime_points_dimension + long_name = daytime points dimension units = count dimensions = () type = integer intent = in optional = F +[idxday] + standard_name = daytime_points + long_name = daytime points + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[coszen] + standard_name = cosine_of_zenith_angle + long_name = mean cos of zenith angle over rad call period + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F [p_lay] standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa long_name = air pressure layer @@ -162,48 +162,23 @@ kind = kind_phys intent = in optional = F -[lsswr] - standard_name = flag_to_calc_sw - long_name = flag to calculate SW irradiances - units = flag - dimensions = () - type = logical - intent = in - optional = F -[nday] - standard_name = daytime_points_dimension - long_name = daytime points dimension +[rrtmgp_nGases] + standard_name = number_of_active_gases_used_by_RRTMGP + long_name = number of gases available used by RRTMGP units = count - dimensions = () + dimensions = () type = integer intent = in optional = F -[idxday] - standard_name = daytime_points - long_name = daytime points - units = index - dimensions = (horizontal_dimension) - type = integer +[active_gases_array] + standard_name = list_of_active_gases_used_by_RRTMGP + long_name = list of active gases used by RRTMGP + units = none + dimensions = (number_of_active_gases_used_by_RRTMGP) + type = character + kind = len=128 intent = in optional = F -[hsw0] - standard_name = RRTMGP_sw_heating_rate_clear_sky - long_name = shortwave clear sky heating rate - units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = T -[hswb] - standard_name = RRTMGP_sw_heating_rate_spectral - long_name = shortwave total sky heating rate (spectral) - units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_sw_spectral_points_rrtmgp) - type = real - kind = kind_phys - intent = inout - optional = T [scmpsw] standard_name = components_of_surface_downward_shortwave_fluxes long_name = derived type for special components of surface downward shortwave fluxes @@ -248,6 +223,24 @@ kind = kind_phys intent = inout optional = F +[hsw0] + standard_name = RRTMGP_sw_heating_rate_clear_sky + long_name = shortwave clear sky heating rate + units = K s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = T +[hswb] + standard_name = RRTMGP_sw_heating_rate_spectral + long_name = shortwave total sky heating rate (spectral) + units = K s-1 + dimensions = (horizontal_dimension,vertical_dimension,number_of_sw_spectral_points_rrtmgp) + type = real + kind = kind_phys + intent = inout + optional = T [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP