diff --git a/physics/GFS_rrtmgp_lw.F90 b/physics/GFS_rrtmgp_lw.F90 index c14481543..5004e419b 100644 --- a/physics/GFS_rrtmgp_lw.F90 +++ b/physics/GFS_rrtmgp_lw.F90 @@ -8,8 +8,8 @@ module GFS_rrtmgp_lw use mo_source_functions, only: ty_source_func_lw use mo_rte_kind, only: wl use mo_heating_rates, only: compute_heating_rate - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp_type - use mo_cloud_optics, only: ty_cloud_optics_type + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_cloud_optics, only: ty_cloud_optics use mo_cloud_sampling, only: sampled_mask_max_ran, sampled_mask_exp_ran, draw_samples use machine, only: kind_phys use module_radlw_parameters, only: topflw_type, sfcflw_type, proflw_type @@ -67,16 +67,16 @@ module GFS_rrtmgp_lw ! GFS_rrtmgp_lw_init ! ######################################################################################### !! \section arg_table_GFS_rrtmgp_lw_init Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |--------------------|-------------------------------------------------|---------------------------------------------------------------------------|-------|------|---------------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | -!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | -!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp_type | | inout | F | -!! | kdist_lw_cldy | K_distribution_file_for_cloudy_RRTMGP_LW_scheme | DDT containing spectral information for cloudy RRTMGP LW radiation scheme | DDT | 0 | ty_cloud_optics_type | | inout | F | +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |--------------------|-------------------------------------------------|---------------------------------------------------------------------------|-------|------|----------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | +!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | +!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | inout | F | +!! | kdist_lw_cldy | K_distribution_file_for_cloudy_RRTMGP_LW_scheme | DDT containing spectral information for cloudy RRTMGP LW radiation scheme | DDT | 0 | ty_cloud_optics | | inout | F | !! ! ######################################################################################### subroutine GFS_rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, kdist_lw, kdist_lw_cldy, & @@ -94,9 +94,9 @@ subroutine GFS_rrtmgp_lw_init(Model,mpicomm, mpirank, mpiroot, kdist_lw, kdist_l mpicomm, & ! MPI communicator mpirank, & ! Current MPI rank mpiroot ! Master MPI rank - type(ty_gas_optics_rrtmgp_type),intent(inout) :: & + type(ty_gas_optics_rrtmgp),intent(inout) :: & kdist_lw - type(ty_cloud_optics_type),intent(inout) :: & + type(ty_cloud_optics),intent(inout) :: & kdist_lw_cldy ! type(ty_gas_concs_type),intent(inout) :: & ! gas_concentrations @@ -732,59 +732,59 @@ end subroutine GFS_rrtmgp_lw_init ! rrtmg_lw_run ! ######################################################################################### !! \section arg_table_GFS_rrtmgp_lw_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-----------------|-----------------------------------------------------------------------------------------------|-----------------------------------------------------------|---------|------|-------------|-----------|--------|----------| -!! | p_lay | air_pressure_at_layer_for_radiation_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | -!! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | -!! | t_lay | air_temperature_at_layer_for_radiation | air temperature layer | K | 2 | real | kind_phys | in | F | -!! | t_lev | air_temperature_at_interface_for_radiation | air temperature level | K | 2 | real | kind_phys | in | F | -!! | q_lay | water_vapor_specific_humidity_at_layer_for_radiation | specific humidity layer | kg kg-1 | 2 | real | kind_phys | in | F | -!! | o3_lay | ozone_concentration_at_layer_for_radiation | ozone concentration layer | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_co2 | volume_mixing_ratio_co2 | volume mixing ratio co2 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_n2o | volume_mixing_ratio_n2o | volume mixing ratio no2 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_ch4 | volume_mixing_ratio_ch4 | volume mixing ratio ch4 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_o2 | volume_mixing_ratio_o2 | volume mixing ratio o2 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_co | volume_mixing_ratio_co | volume mixing ratio co | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_cfc11 | volume_mixing_ratio_cfc11 | volume mixing ratio cfc11 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_cfc12 | volume_mixing_ratio_cfc12 | volume mixing ratio cfc12 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_cfc22 | volume_mixing_ratio_cfc22 | volume mixing ratio cfc22 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_ccl4 | volume_mixing_ratio_ccl4 | volume mixing ratio ccl4 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | icseed | seed_random_numbers_lw | seed for random number generation for longwave radiation | none | 1 | integer | | in | F | -!! | tau_aer | aerosol_optical_depth_for_longwave_bands_01-16 | aerosol optical depth for longwave bands 01-16 | none | 3 | real | kind_phys | in | F | -!! | ssa_aer | aerosol_single_scattering_albedo_for_longwave_bands_01-16 | aerosol single scattering albedo for longwave bands 01-16 | frac | 3 | real | kind_phys | in | F | -!! | sfc_emiss | surface_longwave_emissivity | surface emissivity | frac | 1 | real | kind_phys | in | F | -!! | skt | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | -!! | dzlyr | layer_thickness_for_radiation | layer thickness | km | 2 | real | kind_phys | in | F | -!! | delpin | layer_pressure_thickness_for_radiation | layer pressure thickness | hPa | 2 | real | kind_phys | in | F | -!! | de_lgth | cloud_decorrelation_length | cloud decorrelation length | km | 1 | real | kind_phys | in | F | -!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | -!! | nlay | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | -!! | lprint | flag_print | flag to print | flag | 0 | logical | | in | F | -!! | cldfrac | total_cloud_fraction | total cloud fraction | frac | 2 | real | kind_phys | in | F | -!! | lslwr | flag_to_calc_lw | flag to calculate LW irradiances | flag | 0 | logical | | in | F | -!! | hlwc | tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step | longwave total sky heating rate | K s-1 | 2 | real | kind_phys | out | F | -!! | topflx | lw_fluxes_top_atmosphere | longwave total sky fluxes at the top of the atm | W m-2 | 1 | topflw_type | | inout | F | -!! | sfcflx | lw_fluxes_sfc | longwave total sky fluxes at the Earth surface | W m-2 | 1 | sfcflw_type | | inout | F | -!! | cldtau | cloud_optical_depth_layers_at_10mu_band | approx 10mu band layer cloud optical depth | none | 2 | real | kind_phys | inout | F | -!! | hlw0 | tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step | longwave clear sky heating rate | K s-1 | 2 | real | kind_phys | inout | T | -!! | hlwb | lw_heating_rate_spectral | longwave total sky heating rate (spectral) | K s-1 | 3 | real | kind_phys | inout | T | -!! | flxprf | lw_fluxes | lw fluxes total sky / csk and up / down at levels | W m-2 | 2 | proflw_type | | inout | T | -!! | cld_lwp | cloud_liquid_water_path | cloud liquid water path | g m-2 | 2 | real | kind_phys | in | T | -!! | cld_ref_liq | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | in | T | -!! | cld_iwp | cloud_ice_water_path | cloud ice water path | g m-2 | 2 | real | kind_phys | in | T | -!! | cld_ref_ice | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | in | T | -!! | cld_rwp | cloud_rain_water_path | cloud ice water path | g m-2 | 2 | real | kind_phys | in | T | -!! | cld_ref_rain | mean_effective_radius_for_rain_drop | mean effective radius for rain drop | micron | 2 | real | kind_phys | in | T | -!! | cld_swp | cloud_snow_water_path | cloud snow water path | g m-2 | 2 | real | kind_phys | in | T | -!! | cld_ref_snow | mean_effective_radius_for_snow_flake | mean effective radius for snow flake | micron | 2 | real | kind_phys | in | T | -!! | cld_od | cloud_optical_depth | cloud optical depth | none | 2 | real | kind_phys | in | T | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp_type | | in | F | -!! | kdist_lw_cldy | K_distribution_file_for_cloudy_RRTMGP_LW_scheme | DDT containing spectral information for cloudy RRTMGP LW radiation scheme | DDT | 0 | ty_cloud_optics_type | | inout | F | +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |------------------|-----------------------------------------------------------------------------------------------|---------------------------------------------------------------------------|---------|------|----------------------|-----------|--------|----------| +!! | p_lay | air_pressure_at_layer_for_radiation_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | +!! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | +!! | t_lay | air_temperature_at_layer_for_radiation | air temperature layer | K | 2 | real | kind_phys | in | F | +!! | t_lev | air_temperature_at_interface_for_radiation | air temperature level | K | 2 | real | kind_phys | in | F | +!! | q_lay | water_vapor_specific_humidity_at_layer_for_radiation | specific humidity layer | kg kg-1 | 2 | real | kind_phys | in | F | +!! | o3_lay | ozone_concentration_at_layer_for_radiation | ozone concentration layer | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_co2 | volume_mixing_ratio_co2 | volume mixing ratio co2 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_n2o | volume_mixing_ratio_n2o | volume mixing ratio no2 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_ch4 | volume_mixing_ratio_ch4 | volume mixing ratio ch4 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_o2 | volume_mixing_ratio_o2 | volume mixing ratio o2 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_co | volume_mixing_ratio_co | volume mixing ratio co | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_cfc11 | volume_mixing_ratio_cfc11 | volume mixing ratio cfc11 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_cfc12 | volume_mixing_ratio_cfc12 | volume mixing ratio cfc12 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_cfc22 | volume_mixing_ratio_cfc22 | volume mixing ratio cfc22 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_ccl4 | volume_mixing_ratio_ccl4 | volume mixing ratio ccl4 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | icseed | seed_random_numbers_lw | seed for random number generation for longwave radiation | none | 1 | integer | | in | F | +!! | tau_aer | aerosol_optical_depth_for_longwave_bands_01-16 | aerosol optical depth for longwave bands 01-16 | none | 3 | real | kind_phys | in | F | +!! | ssa_aer | aerosol_single_scattering_albedo_for_longwave_bands_01-16 | aerosol single scattering albedo for longwave bands 01-16 | frac | 3 | real | kind_phys | in | F | +!! | sfc_emiss | surface_longwave_emissivity | surface emissivity | frac | 1 | real | kind_phys | in | F | +!! | skt | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | +!! | dzlyr | layer_thickness_for_radiation | layer thickness | km | 2 | real | kind_phys | in | F | +!! | delpin | layer_pressure_thickness_for_radiation | layer pressure thickness | hPa | 2 | real | kind_phys | in | F | +!! | de_lgth | cloud_decorrelation_length | cloud decorrelation length | km | 1 | real | kind_phys | in | F | +!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | +!! | nlay | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | +!! | lprint | flag_print | flag to print | flag | 0 | logical | | in | F | +!! | cldfrac | total_cloud_fraction | total cloud fraction | frac | 2 | real | kind_phys | in | F | +!! | lslwr | flag_to_calc_lw | flag to calculate LW irradiances | flag | 0 | logical | | in | F | +!! | hlwc | tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step | longwave total sky heating rate | K s-1 | 2 | real | kind_phys | out | F | +!! | topflx | lw_fluxes_top_atmosphere | longwave total sky fluxes at the top of the atm | W m-2 | 1 | topflw_type | | inout | F | +!! | sfcflx | lw_fluxes_sfc | longwave total sky fluxes at the Earth surface | W m-2 | 1 | sfcflw_type | | inout | F | +!! | cldtau | cloud_optical_depth_layers_at_10mu_band | approx 10mu band layer cloud optical depth | none | 2 | real | kind_phys | inout | F | +!! | hlw0 | tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step | longwave clear sky heating rate | K s-1 | 2 | real | kind_phys | inout | T | +!! | hlwb | lw_heating_rate_spectral | longwave total sky heating rate (spectral) | K s-1 | 3 | real | kind_phys | inout | T | +!! | flxprf | lw_fluxes | lw fluxes total sky / csk and up / down at levels | W m-2 | 2 | proflw_type | | inout | T | +!! | cld_lwp | cloud_liquid_water_path | cloud liquid water path | g m-2 | 2 | real | kind_phys | in | T | +!! | cld_ref_liq | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | in | T | +!! | cld_iwp | cloud_ice_water_path | cloud ice water path | g m-2 | 2 | real | kind_phys | in | T | +!! | cld_ref_ice | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | in | T | +!! | cld_rwp | cloud_rain_water_path | cloud ice water path | g m-2 | 2 | real | kind_phys | in | T | +!! | cld_ref_rain | mean_effective_radius_for_rain_drop | mean effective radius for rain drop | micron | 2 | real | kind_phys | in | T | +!! | cld_swp | cloud_snow_water_path | cloud snow water path | g m-2 | 2 | real | kind_phys | in | T | +!! | cld_ref_snow | mean_effective_radius_for_snow_flake | mean effective radius for snow flake | micron | 2 | real | kind_phys | in | T | +!! | cld_od | cloud_optical_depth | cloud optical depth | none | 2 | real | kind_phys | in | T | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | kdist_lw_cldy | K_distribution_file_for_cloudy_RRTMGP_LW_scheme | DDT containing spectral information for cloudy RRTMGP LW radiation scheme | DDT | 0 | ty_cloud_optics | | inout | F | !! ! ######################################################################################### - subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr_n2o, & ! IN + subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr_n2o, & ! IN vmr_ch4, vmr_o2, vmr_co, vmr_cfc11, vmr_cfc12, vmr_cfc22, vmr_ccl4, icseed, tau_aer, & ! IN ssa_aer, sfc_emiss, skt, dzlyr, delpin, de_lgth, ncol, nlay, lprint, cldfrac, lslwr, & ! IN kdist_lw, kdist_lw_cldy, & @@ -805,9 +805,9 @@ subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, logical,intent(in) :: & lprint, & ! Control flag for diagnostics lslwr ! Flag to calculate RRTMGP LW? (1) - type(ty_gas_optics_rrtmgp_type),intent(in) :: & + type(ty_gas_optics_rrtmgp),intent(in) :: & kdist_lw ! DDT containing LW spectral information - type(ty_cloud_optics_type),intent(in) :: & + type(ty_cloud_optics),intent(in) :: & kdist_lw_cldy ! type(ty_gas_concs_type),intent(inout) :: & ! gas_concentrations @@ -868,6 +868,7 @@ subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, ! upfx0 - clear sky upward flux at sfc (w/m2) ! dnfxc - total sky downward flux at sfc (w/m2) ! dnfx0 - clear sky downward flux at sfc (w/m2) + ! Outputs (optional) real(kind_phys), dimension(ncol,nlay,nbandsLW), optional, intent(inout) :: & hlwb ! All-sky heating rate, in each band (K/sec) @@ -884,7 +885,7 @@ subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, integer :: iGpt,iCol,iLay,iBand,iTOA,iSFC integer,dimension(ncol) :: ipseed real(kind_phys), dimension(nBandsLW,ncol) :: & - semiss + sfc_emiss_byband real(kind_phys), dimension(ncol,nlay+1),target :: & flux_up_allSky, flux_up_clrSky, flux_dn_allSky, flux_dn_clrSky real(kind_phys), dimension(ncol,nlay+1,nBandsLW),target :: & @@ -979,9 +980,9 @@ subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, endif ! Surface emissivity - semiss(:,:) = 1. + sfc_emiss_byband(:,:) = 1. do iBand=1,nBandsLW - where(sfc_emiss .gt. epsilon .and. sfc_emiss .le. 1) semiss(iBand,:) = sfc_emiss + where(sfc_emiss .gt. epsilon .and. sfc_emiss .le. 1) sfc_emiss_byband(iBand,:) = sfc_emiss enddo ! Compute volume mixing-ratios for ozone (mmr) and specific-humidity. @@ -1113,7 +1114,7 @@ subroutine GFS_rrtmgp_lw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, t_lay(1:ncol,1:nlay), & p_lev(1:ncol,1:nlay+1), & skt(1:ncol), & - semiss, & + sfc_emiss_byband, & optical_props_mcica, & fluxAllSky, & fluxClrSky, & diff --git a/physics/GFS_rrtmgp_pre.F90 b/physics/GFS_rrtmgp_pre.F90 index fcc4cf0fe..6bfd47ee8 100644 --- a/physics/GFS_rrtmgp_pre.F90 +++ b/physics/GFS_rrtmgp_pre.F90 @@ -76,8 +76,8 @@ end subroutine GFS_rrtmgp_pre_init !! | alb1d | surface_albedo_perturbation | surface albedo perturbation | frac | 1 | real | kind_phys | out | F | !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp_type | | in | F | -!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp_type | | in | F | +!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | !! ! Attention - the output arguments lm, im, lmk, lmp must not be set ! in the CCPP version - they are defined in the interstitial_create routine @@ -140,7 +140,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coup use surface_perturbation, only: & cdfnor ! Routine to compute CDF (used to compute percentiles) ! RRTMGP types - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp_type + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp implicit none @@ -154,7 +154,7 @@ subroutine GFS_rrtmgp_pre_run (Model, Grid, Sfcprop, Statein, Tbd, Cldprop, Coup type(GFS_cldprop_type), intent(in) :: Cldprop type(GFS_coupling_type), intent(in) :: Coupling integer, intent(in) :: im, lm, lmk, lmp - type(ty_gas_optics_rrtmgp_type),intent(in) :: & + type(ty_gas_optics_rrtmgp),intent(in) :: & kdist_lw, & ! RRTMGP DDT containing spectral information for LW calculation kdist_sw ! RRTMGP DDT containing spectral information for SW calculation diff --git a/physics/GFS_rrtmgp_sw.F90 b/physics/GFS_rrtmgp_sw.F90 index f761306db..b0cc94e32 100644 --- a/physics/GFS_rrtmgp_sw.F90 +++ b/physics/GFS_rrtmgp_sw.F90 @@ -5,8 +5,8 @@ module GFS_rrtmgp_sw use physparam, only: iovrsw, icldflg, iswcliq, isubcsw use machine, only: kind_phys use mo_rte_kind, only: wl - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp_type - use mo_cloud_optics, only: ty_cloud_optics_type + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_cloud_optics, only: ty_cloud_optics use mo_gas_concentrations, only: ty_gas_concs use mo_fluxes, only: ty_fluxes_broadband use mo_fluxes_byband, only: ty_fluxes_byband @@ -55,7 +55,7 @@ module GFS_rrtmgp_sw ipsdsw0 ! Initial seed for McICA ! Classes used by rte+rrtmgp -! type(ty_gas_optics_rrtmgp_type) :: & +! type(ty_gas_optics_rrtmgp) :: & ! kdist_sw ! type(ty_cloud_optics) :: & ! kdist_sw_cldy @@ -68,16 +68,16 @@ module GFS_rrtmgp_sw ! GFS_rrtmgp_sw_init ! ######################################################################################### !! \section arg_table_GFS_rrtmgp_sw_init Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-----------------|-------------------------------------------------|--------------------------------------------------------------------|-------|------|---------------------------|-----------|--------|----------| -!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | -!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | -!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | -!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp_type | | inout | F | -!! | kdist_sw_cldy | K_distribution_file_for_cloudy_RRTMGP_SW_scheme | DDT containing spectral information for cloudy RRTMGP SW radiation scheme | DDT | 0 | ty_cloud_optics_type | | inout | F | +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |-----------------|-------------------------------------------------|---------------------------------------------------------------------------|-------|------|----------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | mpirank | mpi_rank | current MPI rank | index | 0 | integer | | in | F | +!! | mpiroot | mpi_root | master MPI rank | index | 0 | integer | | in | F | +!! | mpicomm | mpi_comm | MPI communicator | index | 0 | integer | | in | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | inout | F | +!! | kdist_sw_cldy | K_distribution_file_for_cloudy_RRTMGP_SW_scheme | DDT containing spectral information for cloudy RRTMGP SW radiation scheme | DDT | 0 | ty_cloud_optics | | inout | F | !! ! ######################################################################################### subroutine GFS_rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, kdist_sw, kdist_sw_cldy, & @@ -93,9 +93,9 @@ subroutine GFS_rrtmgp_sw_init(Model,mpicomm, mpirank, mpiroot, kdist_sw, kdist_s mpicomm, & ! MPI communicator mpirank, & ! Current MPI rank mpiroot ! Master MPI rank - type(ty_gas_optics_rrtmgp_type) :: & + type(ty_gas_optics_rrtmgp) :: & kdist_sw ! RRTMGP DDT containing SW spectral information - type(ty_cloud_optics_type) :: & + type(ty_cloud_optics) :: & kdist_sw_cldy ! type(ty_gas_concs_type),intent(inout) :: & ! gas_concentrations @@ -728,66 +728,66 @@ end subroutine GFS_rrtmgp_sw_init ! GFS_RRTMGP_SW_RUN ! ######################################################################################### !! \section arg_table_GFS_rrtmgp_sw_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |-----------------|------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|---------|------|---------------------------|-----------|--------|----------| -!! | p_lay | air_pressure_at_layer_for_radiation_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | -!! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | -!! | t_lay | air_temperature_at_layer_for_radiation | air temperature layer | K | 2 | real | kind_phys | in | F | -!! | t_lev | air_temperature_at_interface_for_radiation | air temperature level | K | 2 | real | kind_phys | in | F | -!! | q_lay | water_vapor_specific_humidity_at_layer_for_radiation | specific humidity layer | kg kg-1 | 2 | real | kind_phys | in | F | -!! | o3_lay | ozone_concentration_at_layer_for_radiation | ozone concentration layer | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_co2 | volume_mixing_ratio_co2 | volume mixing ratio co2 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_n2o | volume_mixing_ratio_n2o | volume mixing ratio no2 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_ch4 | volume_mixing_ratio_ch4 | volume mixing ratio ch4 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_o2 | volume_mixing_ratio_o2 | volume mixing ratio o2 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_co | volume_mixing_ratio_co | volume mixing ratio co | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_cfc11 | volume_mixing_ratio_cfc11 | volume mixing ratio cfc11 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_cfc12 | volume_mixing_ratio_cfc12 | volume mixing ratio cfc12 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_cfc22 | volume_mixing_ratio_cfc22 | volume mixing ratio cfc22 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | vmr_ccl4 | volume_mixing_ratio_ccl4 | volume mixing ratio ccl4 | kg kg-1 | 2 | real | kind_phys | in | F | -!! | icseed | seed_random_numbers_sw | seed for random number generation for shortwave radiation | none | 1 | integer | | in | F | -!! | tau_aer | aerosol_optical_depth_for_longwave_bands_01-16 | aerosol optical depth for shortwave bands 01-16 | none | 3 | real | kind_phys | in | F | -!! | ssa_aer | aerosol_single_scattering_albedo_for_longwave_bands_01-16 | aerosol single scattering albedo for shortwave bands 01-16 | frac | 3 | real | kind_phys | in | F | -!! | asy_aer | aerosol_asymmetry_parameter_for_shortwave_bands_01-16 | aerosol asymmetry paramter for shortwave bands 01-16 | none | 3 | real | kind_phys | in | F | -!! | sfcalb_nir_dir | surface_albedo_due_to_near_IR_direct | surface albedo due to near IR direct beam | frac | 1 | real | kind_phys | in | F | -!! | sfcalb_nir_dif | surface_albedo_due_to_near_IR_diffused | surface albedo due to near IR diffused beam | frac | 1 | real | kind_phys | in | F | -!! | sfcalb_uvis_dir | surface_albedo_due_to_UV_and_VIS_direct | surface albedo due to UV+VIS direct beam | frac | 1 | real | kind_phys | in | F | -!! | sfcalb_uvis_dif | surface_albedo_due_to_UV_and_VIS_diffused | surface albedo due to UV+VIS diffused beam | frac | 1 | real | kind_phys | in | F | -!! | dzlyr | layer_thickness_for_radiation | layer thickness | km | 2 | real | kind_phys | in | F | -!! | delpin | layer_pressure_thickness_for_radiation | layer pressure thickness | hPa | 2 | real | kind_phys | in | F | -!! | de_lgth | cloud_decorrelation_length | cloud decorrelation length | km | 1 | real | kind_phys | in | F | -!! | cossza | cosine_of_zenith_angle | cosine of the solar zenit angle | none | 1 | real | kind_phys | in | F | -!! | solcon | solar_constant | solar constant | W m-2 | 0 | real | kind_phys | in | F | -!! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | in | F | -!! | idxday | daytime_points | daytime points | index | 1 | integer | | in | F | -!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | -!! | nlay | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | -!! | lprint | flag_print | flag to print | flag | 0 | logical | | in | F | -!! | cldfrac | total_cloud_fraction | total cloud fraction | frac | 2 | real | kind_phys | in | F | -!! | lsswr | flag_to_calc_sw | flag to calculate SW irradiances | flag | 0 | logical | | in | F | -!! | hswc | tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step | shortwave total sky heating rate | K s-1 | 2 | real | kind_phys | inout | F | -!! | topflx | sw_fluxes_top_atmosphere | shortwave total sky fluxes at the top of the atm | W m-2 | 1 | topfsw_type | | inout | F | -!! | sfcflx | sw_fluxes_sfc | shortwave total sky fluxes at the Earth surface | W m-2 | 1 | sfcfsw_type | | inout | F | -!! | cldtau | cloud_optical_depth_layers_at_0.55mu_band | approx .55mu band layer cloud optical depth | none | 2 | real | kind_phys | inout | F | -!! | hsw0 | tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step | shortwave clear sky heating rate | K s-1 | 2 | real | kind_phys | inout | T | -!! | hswb | sw_heating_rate_spectral | shortwave total sky heating rate (spectral) | K s-1 | 3 | real | kind_phys | inout | T | -!! | flxprf | sw_fluxes | sw fluxes total sky / csk and up / down at levels | W m-2 | 2 | profsw_type | | inout | T | -!! | fdncmp | components_of_surface_downward_shortwave_fluxes | derived type for special components of surface downward shortwave fluxes | W m-2 | 1 | cmpfsw_type | | inout | T | -!! | cld_lwp | cloud_liquid_water_path | cloud liquid water path | g m-2 | 2 | real | kind_phys | in | T | -!! | cld_ref_liq | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | in | T | -!! | cld_iwp | cloud_ice_water_path | cloud ice water path | g m-2 | 2 | real | kind_phys | in | T | -!! | cld_ref_ice | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | in | T | -!! | cld_rwp | cloud_rain_water_path | cloud rain water path | g m-2 | 2 | real | kind_phys | in | T | -!! | cld_ref_rain | mean_effective_radius_for_rain_drop | mean effective radius for rain drop | micron | 2 | real | kind_phys | in | T | -!! | cld_swp | cloud_snow_water_path | cloud snow water path | g m-2 | 2 | real | kind_phys | in | T | -!! | cld_ref_snow | mean_effective_radius_for_snow_flake | mean effective radius for snow flake | micron | 2 | real | kind_phys | in | T | -!! | cld_od | cloud_optical_depth | cloud optical depth | none | 2 | real | kind_phys | in | T | -!! | cld_ssa | cloud_single_scattering_albedo | cloud single scattering albedo | frac | 2 | real | kind_phys | in | T | -!! | cld_asy | cloud_asymmetry_parameter | cloud asymmetry parameter | none | 2 | real | kind_phys | in | T | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp_type | | in | F | -!! | kdist_sw_cldy | K_distribution_file_for_cloudy_RRTMGP_SW_scheme | DDT containing spectral information for cloudy RRTMGP SW radiation scheme | DDT | 0 | ty_cloud_optics_type | | inout | F | +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |-----------------|------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------|---------|------|---------------------------|-----------|--------|----------| +!! | p_lay | air_pressure_at_layer_for_radiation_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | +!! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | +!! | t_lay | air_temperature_at_layer_for_radiation | air temperature layer | K | 2 | real | kind_phys | in | F | +!! | t_lev | air_temperature_at_interface_for_radiation | air temperature level | K | 2 | real | kind_phys | in | F | +!! | q_lay | water_vapor_specific_humidity_at_layer_for_radiation | specific humidity layer | kg kg-1 | 2 | real | kind_phys | in | F | +!! | o3_lay | ozone_concentration_at_layer_for_radiation | ozone concentration layer | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_co2 | volume_mixing_ratio_co2 | volume mixing ratio co2 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_n2o | volume_mixing_ratio_n2o | volume mixing ratio no2 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_ch4 | volume_mixing_ratio_ch4 | volume mixing ratio ch4 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_o2 | volume_mixing_ratio_o2 | volume mixing ratio o2 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_co | volume_mixing_ratio_co | volume mixing ratio co | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_cfc11 | volume_mixing_ratio_cfc11 | volume mixing ratio cfc11 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_cfc12 | volume_mixing_ratio_cfc12 | volume mixing ratio cfc12 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_cfc22 | volume_mixing_ratio_cfc22 | volume mixing ratio cfc22 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | vmr_ccl4 | volume_mixing_ratio_ccl4 | volume mixing ratio ccl4 | kg kg-1 | 2 | real | kind_phys | in | F | +!! | icseed | seed_random_numbers_sw | seed for random number generation for shortwave radiation | none | 1 | integer | | in | F | +!! | tau_aer | aerosol_optical_depth_for_longwave_bands_01-16 | aerosol optical depth for shortwave bands 01-16 | none | 3 | real | kind_phys | in | F | +!! | ssa_aer | aerosol_single_scattering_albedo_for_longwave_bands_01-16 | aerosol single scattering albedo for shortwave bands 01-16 | frac | 3 | real | kind_phys | in | F | +!! | asy_aer | aerosol_asymmetry_parameter_for_shortwave_bands_01-16 | aerosol asymmetry paramter for shortwave bands 01-16 | none | 3 | real | kind_phys | in | F | +!! | sfcalb_nir_dir | surface_albedo_due_to_near_IR_direct | surface albedo due to near IR direct beam | frac | 1 | real | kind_phys | in | F | +!! | sfcalb_nir_dif | surface_albedo_due_to_near_IR_diffused | surface albedo due to near IR diffused beam | frac | 1 | real | kind_phys | in | F | +!! | sfcalb_uvis_dir | surface_albedo_due_to_UV_and_VIS_direct | surface albedo due to UV+VIS direct beam | frac | 1 | real | kind_phys | in | F | +!! | sfcalb_uvis_dif | surface_albedo_due_to_UV_and_VIS_diffused | surface albedo due to UV+VIS diffused beam | frac | 1 | real | kind_phys | in | F | +!! | dzlyr | layer_thickness_for_radiation | layer thickness | km | 2 | real | kind_phys | in | F | +!! | delpin | layer_pressure_thickness_for_radiation | layer pressure thickness | hPa | 2 | real | kind_phys | in | F | +!! | de_lgth | cloud_decorrelation_length | cloud decorrelation length | km | 1 | real | kind_phys | in | F | +!! | cossza | cosine_of_zenith_angle | cosine of the solar zenit angle | none | 1 | real | kind_phys | in | F | +!! | solcon | solar_constant | solar constant | W m-2 | 0 | real | kind_phys | in | F | +!! | nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | in | F | +!! | idxday | daytime_points | daytime points | index | 1 | integer | | in | F | +!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | +!! | nlay | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | +!! | lprint | flag_print | flag to print | flag | 0 | logical | | in | F | +!! | cldfrac | total_cloud_fraction | total cloud fraction | frac | 2 | real | kind_phys | in | F | +!! | lsswr | flag_to_calc_sw | flag to calculate SW irradiances | flag | 0 | logical | | in | F | +!! | hswc | tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step | shortwave total sky heating rate | K s-1 | 2 | real | kind_phys | inout | F | +!! | topflx | sw_fluxes_top_atmosphere | shortwave total sky fluxes at the top of the atm | W m-2 | 1 | topfsw_type | | inout | F | +!! | sfcflx | sw_fluxes_sfc | shortwave total sky fluxes at the Earth surface | W m-2 | 1 | sfcfsw_type | | inout | F | +!! | cldtau | cloud_optical_depth_layers_at_0.55mu_band | approx .55mu band layer cloud optical depth | none | 2 | real | kind_phys | inout | F | +!! | hsw0 | tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step | shortwave clear sky heating rate | K s-1 | 2 | real | kind_phys | inout | T | +!! | hswb | sw_heating_rate_spectral | shortwave total sky heating rate (spectral) | K s-1 | 3 | real | kind_phys | inout | T | +!! | flxprf | sw_fluxes | sw fluxes total sky / csk and up / down at levels | W m-2 | 2 | profsw_type | | inout | T | +!! | fdncmp | components_of_surface_downward_shortwave_fluxes | derived type for special components of surface downward shortwave fluxes | W m-2 | 1 | cmpfsw_type | | inout | T | +!! | cld_lwp | cloud_liquid_water_path | cloud liquid water path | g m-2 | 2 | real | kind_phys | in | T | +!! | cld_ref_liq | mean_effective_radius_for_liquid_cloud | mean effective radius for liquid cloud | micron | 2 | real | kind_phys | in | T | +!! | cld_iwp | cloud_ice_water_path | cloud ice water path | g m-2 | 2 | real | kind_phys | in | T | +!! | cld_ref_ice | mean_effective_radius_for_ice_cloud | mean effective radius for ice cloud | micron | 2 | real | kind_phys | in | T | +!! | cld_rwp | cloud_rain_water_path | cloud rain water path | g m-2 | 2 | real | kind_phys | in | T | +!! | cld_ref_rain | mean_effective_radius_for_rain_drop | mean effective radius for rain drop | micron | 2 | real | kind_phys | in | T | +!! | cld_swp | cloud_snow_water_path | cloud snow water path | g m-2 | 2 | real | kind_phys | in | T | +!! | cld_ref_snow | mean_effective_radius_for_snow_flake | mean effective radius for snow flake | micron | 2 | real | kind_phys | in | T | +!! | cld_od | cloud_optical_depth | cloud optical depth | none | 2 | real | kind_phys | in | T | +!! | cld_ssa | cloud_single_scattering_albedo | cloud single scattering albedo | frac | 2 | real | kind_phys | in | T | +!! | cld_asy | cloud_asymmetry_parameter | cloud asymmetry parameter | none | 2 | real | kind_phys | in | T | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | kdist_sw | K_distribution_file_for_RRTMGP_SW_scheme | DDT containing spectral information for RRTMGP SW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | kdist_sw_cldy | K_distribution_file_for_cloudy_RRTMGP_SW_scheme | DDT containing spectral information for cloudy RRTMGP SW radiation scheme | DDT | 0 | ty_cloud_optics | | inout | F | !! subroutine GFS_rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, vmr_n2o, & ! IN vmr_ch4, vmr_o2, vmr_co, vmr_cfc11, vmr_cfc12, vmr_cfc22, vmr_ccl4, icseed, tau_aer, & ! IN @@ -814,9 +814,9 @@ subroutine GFS_rrtmgp_sw_run(p_lay, p_lev, t_lay, t_lev, q_lay, o3_lay, vmr_co2, logical, intent(in) :: & lprint, & ! Control flag for diagnostics lsswr ! Flag to calculate RRTMGP SW? - type(ty_gas_optics_rrtmgp_type),intent(in) :: & + type(ty_gas_optics_rrtmgp),intent(in) :: & kdist_sw ! DDT containing LW spectral information - type(ty_cloud_optics_type),intent(in) :: & + type(ty_cloud_optics),intent(in) :: & kdist_sw_cldy ! type(ty_gas_concs_type),intent(inout) :: & ! gas_concentrations diff --git a/physics/rrtmgp_lw_main.F90 b/physics/rrtmgp_lw_main.F90 new file mode 100644 index 000000000..cfb5da060 --- /dev/null +++ b/physics/rrtmgp_lw_main.F90 @@ -0,0 +1,68 @@ +! ########################################################################################### +! ########################################################################################### +module rrtmgp_lw_main + use machine, only: kind_phys + 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 + + public rrtmgp_lw_main_init, rrtmgp_lw_main_run, rrtmgp_lw_main_finalize +contains + + subroutine rrtmgp_lw_main_init() + end subroutine rrtmgp_lw_main_init + + ! ######################################################################################### + ! ######################################################################################### +!! \section arg_table_rrtmgp_lw_main_run Argument Table +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |--------------------|-------------------------------------------------|--------------------------------------------------------------------|-------|------|-----------------------|-----------|--------|----------| +!! | ncol | horizontal_loop_extent | horizontal dimension | count | 0 | integer | | in | F | +!! | nlay | adjusted_vertical_layer_dimension_for_radiation | number of vertical layers for radiation | count | 0 | integer | | in | F | +!! | p_lay | air_pressure_at_layer_for_radiation_in_hPa | air pressure layer | hPa | 2 | real | kind_phys | in | F | +!! | p_lev | air_pressure_at_interface_for_radiation_in_hPa | air pressure level | hPa | 2 | real | kind_phys | in | F | +!! | t_lay | air_temperature_at_layer_for_radiation | air temperature layer | K | 2 | real | kind_phys | in | F | +!! | skt | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | +!! | sfc_emiss | surface_longwave_emissivity_in_each_band | surface lw emissivity in fraction in each LW band | frac | 2 | real | kind_phys | in | F | +!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | optical_props_clds | optical_properties_for_cloudy_atmosphere | Fortran DDT containing RRTMGP optical properties | DDT | 0 | ty_optical_props_1scl | | in | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! + subroutine rrtmgp_lw_main_run(ncol, nlay, kdist_lw, p_lay, t_lay, & + p_lev, skt, sfc_emiss, optical_props_clds, errmsg, errflg) + + ! Inputs + integer, intent(in) :: & + ncol, & ! Number of horizontal gridpoints + nlay ! Number of vertical layers + real(kind_phys), dimension(ncol,nlay), intent(in) :: & + p_lay, & ! Pressure @ model layer-centers (hPa) + t_lay ! Temperature (K) + real(kind_phys), dimension(ncol,nlay+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) :: & + kdist_lw ! DDT containing LW spectral information + real(kind_phys), dimension(kdist_lw%get_nband(),ncol) :: & + sfc_emiss ! Surface emissivity (1) + type(ty_optical_props_1scl),intent(in) :: & + optical_props_clds + + ! Outputs + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + end subroutine rrtmgp_lw_main_run + + subroutine rrtmgp_lw_main_finalize() + end subroutine rrtmgp_lw_main_finalize + + + +end module rrtmgp_lw_main diff --git a/physics/rrtmgp_lw_pre.F90 b/physics/rrtmgp_lw_pre.F90 new file mode 100644 index 000000000..4a553b84b --- /dev/null +++ b/physics/rrtmgp_lw_pre.F90 @@ -0,0 +1,78 @@ +!>\file rrtmgp_lw_pre.f90 +!! This file contains a call to module_radiation_surface::setemis() to +!! setup surface emissivity for LW radiation. + module rrtmgp_lw_pre + contains + +!>\defgroup rrtmgp_lw_pre GFS RRTMGP scheme pre +!! @{ +!> \section arg_table_rrtmgp_lw_pre_init Argument Table +!! + subroutine rrtmgp_lw_pre_init () + end subroutine rrtmgp_lw_pre_init + +!> \section arg_table_rrtmgp_lw_pre_run Argument Table +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |------------------|-------------------------------------------|--------------------------------------------------------------------|----------|------|-----------------------|-----------|--------|----------| +!! | Model | GFS_control_type_instance | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F | +!! | Grid | GFS_grid_type_instance | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_grid_type | | in | F | +!! | Sfcprop | GFS_sfcprop_type_instance | Fortran DDT containing FV3-GFS surface fields | DDT | 0 | GFS_sfcprop_type | | in | F | +!! | Radtend | GFS_radtend_type_instance | Fortran DDT containing FV3-GFS radiation tendencies | DDT | 0 | GFS_radtend_type | | inout | F | +!! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | +!! | tsfg | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | in | F | +!! | tsfa | surface_air_temperature_for_radiation | lowest model layer air temperature for radiation | K | 1 | real | kind_phys | in | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! | kdist_lw | K_distribution_file_for_RRTMGP_LW_scheme | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F | +!! | sfc_emiss_byband | surface_longwave_emissivity_in_each_band | surface lw emissivity in fraction in each LW band | frac | 2 | real | kind_phys | out | F | +!! + + subroutine rrtmgp_lw_pre_run (Model, Grid, Sfcprop, Radtend, im, tsfg, tsfa, kdist_lw, sfc_emiss_byband, errmsg, errflg) + + use machine, only: kind_phys + + use GFS_typedefs, only: GFS_control_type, & + GFS_grid_type, & + GFS_radtend_type, & + GFS_sfcprop_type + use module_radiation_surface, only: setemis + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + + implicit none + type(GFS_control_type), intent(in) :: Model + type(GFS_radtend_type), intent(inout) :: Radtend + type(GFS_sfcprop_type), intent(in) :: Sfcprop + type(GFS_grid_type), intent(in) :: Grid + integer, intent(in) :: im + real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: tsfa, tsfg + type(ty_gas_optics_rrtmgp),intent(in) :: & + kdist_lw ! DDT containing LW spectral information + real(kind_phyd),dimension(kdist_lw%get_nband(),im),intent(out) :: sfc_emiss_byband + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + integer :: ij + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (Model%lslwr) then +!> - Call module_radiation_surface::setemis(),to setup surface +!! emissivity for LW radiation. + call setemis (Grid%xlon, Grid%xlat, Sfcprop%slmsk, & ! --- inputs + Sfcprop%snowd, Sfcprop%sncovr, Sfcprop%zorl, & + tsfg, tsfa, Sfcprop%hprim, IM, & + Radtend%semis) ! --- outputs + do ij=1,kdist_lw%get_nband() + sfc_emiss_byband(ij,:) = Radtend%semis + enddo + endif + + end subroutine rrtmgp_lw_pre_run + +!> \section arg_table_rrtmgp_lw_pre_finalize Argument Table +!! + subroutine rrtmgp_lw_pre_finalize () + end subroutine rrtmgp_lw_pre_finalize +!! @} + end module rrtmgp_lw_pre