From 70b306581b24ab5e6b21e0a2b16b95f3a980660c Mon Sep 17 00:00:00 2001 From: DavidNew-NOAA <134300700+DavidNew-NOAA@users.noreply.github.com> Date: Tue, 27 Aug 2024 09:32:46 -0400 Subject: [PATCH 1/5] Add ability to read increment files on native cubed sphere grid (#837) * Add namelist parameter, ncrement_file_on_native_grid --- atmos_cubed_sphere | 2 +- atmos_model.F90 | 4 ++-- ccpp/data/GFS_typedefs.F90 | 8 ++++++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/atmos_cubed_sphere b/atmos_cubed_sphere index 3f8153364..ac3055eff 160000 --- a/atmos_cubed_sphere +++ b/atmos_cubed_sphere @@ -1 +1 @@ -Subproject commit 3f81533642be6060e1ac382ac99ce1481892dddd +Subproject commit ac3055eff06099d61cd65e18bc4f0353ffd83f46 diff --git a/atmos_model.F90 b/atmos_model.F90 index 4b3b87d20..6938ee4ce 100644 --- a/atmos_model.F90 +++ b/atmos_model.F90 @@ -407,7 +407,7 @@ subroutine update_atmos_radiation_physics (Atmos) if (mpp_pe() == mpp_root_pe()) print *,'PHYSICS STEP2 ', GFS_control%kdt, GFS_control%fhour call fv3atm_checksum(GFS_control, GFS_Statein, GFS_Stateout, GFS_Grid, GFS_Tbd, GFS_Cldprop, GFS_Sfcprop, GFS_Radtend, GFS_Coupling, Atm_block) endif - call getiauforcing(GFS_control,IAU_data) + call getiauforcing(GFS_control,IAU_data,Atm(mygrid)) if (mpp_pe() == mpp_root_pe() .and. debug) write(6,*) "end of radiation and physics step" !--- execute the atmospheric timestep finalize step @@ -725,7 +725,7 @@ subroutine atmos_model_init (Atmos, Time_init, Time, Time_step) Atm(mygrid)%flagstruct%do_skeb = GFS_control%do_skeb ! initialize the IAU module - call iau_initialize (GFS_control,IAU_data,Init_parm) + call iau_initialize (GFS_control,IAU_data,Init_parm,Atm(mygrid)) Init_parm%blksz => null() Init_parm%ak => null() diff --git a/ccpp/data/GFS_typedefs.F90 b/ccpp/data/GFS_typedefs.F90 index 5a25f0c36..05eb48679 100644 --- a/ccpp/data/GFS_typedefs.F90 +++ b/ccpp/data/GFS_typedefs.F90 @@ -1606,6 +1606,9 @@ module GFS_typedefs real(kind=kind_phys), pointer :: si(:) !< vertical sigma coordinate for model initialization real(kind=kind_phys) :: sec !< seconds since model initialization +!--- Increment grid + logical :: increment_file_on_native_grid ! increment on native grid else Gaussian grid + !--- IAU integer :: iau_offset real(kind=kind_phys) :: iau_delthrs ! iau time interval (to scale increments) in hours @@ -3889,6 +3892,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & logical :: ca_entr = .false. logical :: ca_trigger = .false. +!--- Increment grid + logical :: increment_file_on_native_grid = .false. ! increment on native grid else Gaussian grid + !--- IAU options real(kind=kind_phys) :: iau_delthrs = 0 !< iau time interval (to scale increments) character(len=240) :: iau_inc_files(7) = '' !< list of increment files @@ -4110,6 +4116,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & nseed, nseed_g, nthresh, do_ca, ca_advect, & ca_sgs, ca_global,iseed_ca,ca_smooth, & nspinup,ca_amplitude,nsmooth,ca_closure,ca_entr,ca_trigger, & + !--- Increment grid + increment_file_on_native_grid, & !--- IAU iau_delthrs,iaufhrs,iau_inc_files,iau_filter_increments, & iau_drymassfixer, & From 40e014f3ec805fc10399b53ad6810bc57a79ce9e Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Thu, 29 Aug 2024 11:11:43 -0400 Subject: [PATCH 2/5] Combination for CCPP-physics #213 and #218 (H2O scheme refactor and C3/SAS/MYNN fix) (#865) * Host side changes for h2o photochemistry scheme * A fix for the issue to run C3 or SAS convection with the prognostic area fraction closure, and MYNN PBL: tendency_of_vertically_diffused_tracer_concentration from MYNN PBL --------- Co-authored-by: Dustin Swales Co-authored-by: Lisa Bengtsson --- ccpp/config/ccpp_prebuild_config.py | 9 ++++- ccpp/data/GFS_typedefs.F90 | 38 +++++++++++-------- ccpp/data/GFS_typedefs.meta | 26 ++++++++++++- ccpp/physics | 2 +- ...suite_FV3_GFS_v15_thompson_mynn_lam3km.xml | 2 +- ccpp/suites/suite_FV3_GFS_v15p2.xml | 2 +- ccpp/suites/suite_FV3_GFS_v16.xml | 2 +- ccpp/suites/suite_FV3_GFS_v16_csawmg.xml | 2 +- ccpp/suites/suite_FV3_GFS_v16_flake.xml | 2 +- ccpp/suites/suite_FV3_GFS_v16_fv3wam.xml | 2 +- ccpp/suites/suite_FV3_GFS_v16_ras.xml | 2 +- ccpp/suites/suite_FV3_GFS_v17_coupled_p8.xml | 2 +- .../suite_FV3_GFS_v17_coupled_p8_c3.xml | 2 +- .../suite_FV3_GFS_v17_coupled_p8_sfcocn.xml | 2 +- .../suite_FV3_GFS_v17_coupled_p8_ugwpv1.xml | 2 +- ccpp/suites/suite_FV3_GFS_v17_p8.xml | 2 +- ccpp/suites/suite_FV3_GFS_v17_p8_c3.xml | 2 +- ccpp/suites/suite_FV3_GFS_v17_p8_mynn.xml | 2 +- ccpp/suites/suite_FV3_GFS_v17_p8_rrtmgp.xml | 2 +- ccpp/suites/suite_FV3_GFS_v17_p8_ugwpv1.xml | 2 +- .../suites/suite_FV3_HAFS_v1_gfdlmp_tedmf.xml | 2 +- .../suite_FV3_HAFS_v1_gfdlmp_tedmf_nonsst.xml | 2 +- ccpp/suites/suite_FV3_HAFS_v1_thompson.xml | 2 +- .../suite_FV3_HAFS_v1_thompson_nonsst.xml | 2 +- ...uite_FV3_HAFS_v1_thompson_tedmf_gfdlsf.xml | 2 +- ccpp/suites/suite_FV3_HRRR.xml | 2 +- ccpp/suites/suite_FV3_HRRR_c3.xml | 2 +- ccpp/suites/suite_FV3_HRRR_gf.xml | 2 +- ccpp/suites/suite_FV3_HRRR_gf_nogwd.xml | 2 +- ccpp/suites/suite_FV3_RAP.xml | 2 +- ccpp/suites/suite_FV3_RAP_cires_ugwp.xml | 2 +- ccpp/suites/suite_FV3_RAP_clm_lake.xml | 2 +- ccpp/suites/suite_FV3_RAP_flake.xml | 2 +- ccpp/suites/suite_FV3_RAP_noah.xml | 2 +- .../suite_FV3_RAP_noah_sfcdiff_cires_ugwp.xml | 2 +- ccpp/suites/suite_FV3_RAP_sfcdiff.xml | 2 +- ccpp/suites/suite_FV3_RAP_unified_ugwp.xml | 2 +- ccpp/suites/suite_FV3_RRFS_v1beta.xml | 2 +- ccpp/suites/suite_FV3_RRFS_v1nssl.xml | 2 +- ccpp/suites/suite_FV3_WoFS_v0.xml | 2 +- ccpp/suites/suite_FV3_global_nest_v1.xml | 2 +- ccpp/suites/suite_RRFSens_phy1.xml | 2 +- ccpp/suites/suite_RRFSens_phy2.xml | 2 +- ccpp/suites/suite_RRFSens_phy3.xml | 2 +- ccpp/suites/suite_RRFSens_phy4.xml | 2 +- ccpp/suites/suite_RRFSens_phy5.xml | 2 +- 46 files changed, 98 insertions(+), 61 deletions(-) diff --git a/ccpp/config/ccpp_prebuild_config.py b/ccpp/config/ccpp_prebuild_config.py index 824c6d665..7714774fb 100755 --- a/ccpp/config/ccpp_prebuild_config.py +++ b/ccpp/config/ccpp_prebuild_config.py @@ -19,8 +19,8 @@ 'physics/physics/hooks/machine.F', 'physics/physics/Radiation/RRTMG/radsw_param.f', 'physics/physics/Radiation/RRTMG/radlw_param.f', - 'physics/physics/photochem/h2o_def.f', 'physics/physics/photochem/module_ozphys.F90', + 'physics/physics/photochem/module_h2ophys.F90', 'data/CCPP_typedefs.F90', 'data/GFS_typedefs.F90', 'data/CCPP_data.F90', @@ -45,6 +45,10 @@ 'module_ozphys' : '', 'ty_ozphys' : '', }, + 'module_h2ophys' : { + 'module_h2ophys' : '', + 'ty_h2ophys' : '', + }, 'CCPP_typedefs' : { 'GFS_interstitial_type' : 'GFS_Interstitial(cdata%thrd_no)', 'GFDL_interstitial_type' : 'GFDL_interstitial', @@ -85,6 +89,7 @@ 'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_SCNV_generic_post.F90', 'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_debug.F90', 'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.F90', + 'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_photochemistry.F90', 'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rad_time_vary.fv3.F90', 'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_surface.F90', 'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_post.F90', @@ -150,7 +155,7 @@ 'physics/physics/GWD/gwdc_post.f', 'physics/physics/GWD/gwdps.f', 'physics/physics/GWD/rayleigh_damp.f', - 'physics/physics/photochem/h2ophys.f', + 'physics/physics/photochem/module_h2ophys.F90', 'physics/physics/photochem/module_ozphys.F90', 'physics/physics/MP/Ferrier_Aligo/mp_fer_hires.F90', 'physics/physics/MP/GFDL/gfdl_cloud_microphys.F90', diff --git a/ccpp/data/GFS_typedefs.F90 b/ccpp/data/GFS_typedefs.F90 index 05eb48679..a35ce3c13 100644 --- a/ccpp/data/GFS_typedefs.F90 +++ b/ccpp/data/GFS_typedefs.F90 @@ -14,8 +14,8 @@ module GFS_typedefs use module_radsw_parameters, only: topfsw_type, sfcfsw_type use module_radlw_parameters, only: topflw_type, sfcflw_type - use h2o_def, only: levh2o, h2o_coeff use module_ozphys, only: ty_ozphys + use module_h2ophys, only: ty_h2ophys implicit none @@ -1018,6 +1018,7 @@ module GFS_typedefs real(kind=kind_phys) :: dt_inner !< time step for the inner loop in s logical :: sedi_semi !< flag for semi Lagrangian sedi of rain integer :: decfl !< deformed CFL factor + logical :: thpsnmp_is_init !< Local scheme initialization flag !--- GFDL microphysical paramters logical :: lgfdlmprad !< flag for GFDL mp scheme and radiation consistency @@ -1632,7 +1633,11 @@ module GFS_typedefs type(ty_ozphys) :: ozphys !< DDT with data needed by ozone physics integer :: levozp !< Number of vertical layers in ozone forcing data integer :: oz_coeff !< Number of coefficients in ozone forcing data - +!--- NRL h2o photchemistry physics + type(ty_h2ophys) :: h2ophys !< DDT with data needed by h2o photchemistry physics. + integer :: levh2o !< Number of vertical layers in stratospheric h2o data. + integer :: h2o_coeff !< Number of coefficients in stratospheric h2o data. + contains procedure :: init => control_initialize procedure :: init_chemistry => control_chemistry_initialize @@ -3549,6 +3554,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & real(kind=kind_phys) :: dt_inner = -999.0 !< time step for the inner loop logical :: sedi_semi = .false. !< flag for semi Lagrangian sedi of rain integer :: decfl = 8 !< deformed CFL factor + logical :: thpsnmp_is_init = .false. !< Local scheme initialization flag !--- GFDL microphysical parameters logical :: lgfdlmprad = .false. !< flag for GFDLMP radiation interaction @@ -3980,6 +3986,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & integer :: kozpl = 28 !< File identifier for ozone forcing data integer :: kozc = 48 !< File identifier for ozone climotology data +!--- NRL h2o photochemistry physics + integer :: kh2oc = 29 !< File identifier for h2o photochemistry data. + !--- aerosol scavenging factors integer, parameter :: max_scav_factors = 183 character(len=40) :: fscav_aero(max_scav_factors) = '' @@ -4901,18 +4910,6 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%oz_phys_2015 = oz_phys_2015 Model%h2o_phys = h2o_phys - ! To ensure that these values match what's in the physics, - ! array sizes are compared during model init in GFS_phys_time_vary_init() - ! - ! from module h2ointerp - if (h2o_phys) then - levh2o = 72 - h2o_coeff = 3 - else - levh2o = 1 - h2o_coeff = 1 - end if - Model%pdfcld = pdfcld Model%shcnvcw = shcnvcw Model%redrag = redrag @@ -5626,6 +5623,17 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & err_message = Model%ozphys%load_o3clim('global_o3prdlos.f77',kozc) end if + !--- NRL h2o photochemistry physics. + if (Model%h2o_phys) then + ! Load data for h2o photochemistry physics. + err_message = Model%h2ophys%load('global_h2oprdlos.f77',kh2oc) + Model%levh2o = Model%h2ophys%nlev + Model%h2o_coeff = Model%h2ophys%ncf + else + Model%levh2o = 1 + Model%h2o_coeff = 1 + end if + !--- quantities to be used to derive phy_f*d totals Model%nshoc_2d = nshoc_2d Model%nshoc_3d = nshoc_3d @@ -7167,7 +7175,7 @@ subroutine tbd_create (Tbd, Model) !--- ozone and stratosphere h2o needs allocate (Tbd%ozpl (IM,Model%levozp,Model%oz_coeff)) - allocate (Tbd%h2opl (IM,levh2o,h2o_coeff)) + allocate (Tbd%h2opl (IM,Model%levh2o,Model%h2o_coeff)) Tbd%h2opl = clear_val Tbd%ozpl = clear_val diff --git a/ccpp/data/GFS_typedefs.meta b/ccpp/data/GFS_typedefs.meta index 51b4706ec..9e4b3f25c 100644 --- a/ccpp/data/GFS_typedefs.meta +++ b/ccpp/data/GFS_typedefs.meta @@ -4852,6 +4852,12 @@ units = count dimensions = () type = integer +[thpsnmp_is_init] + standard_name = flag_for_thompson_mp_scheme_initialization + long_name = flag carrying scheme initialization status + units = flag + dimensions = () + type = logical [lgfdlmprad] standard_name = flag_for_GFDL_microphysics_radiation_interaction long_name = flag for GFDL microphysics-radiation interaction @@ -5365,6 +5371,12 @@ units = mixed dimensions = () type = ty_ozphys +[h2ophys] + standard_name = dataset_for_h2o_photochemistry_physics + long_name = dataset for NRL h2o photochemistry physics + units = mixed + dimensions = () + type = ty_h2ophys [h2o_phys] standard_name = flag_for_stratospheric_water_vapor_physics long_name = flag for stratospheric water vapor physics @@ -7049,6 +7061,18 @@ units = count dimensions = () type = integer +[levh2o] + standard_name = vertical_dimension_of_h2o_forcing_data + long_name = number of vertical layers in h2o forcing data + units = count + dimensions = () + type = integer +[h2o_coeff] + standard_name = number_of_coefficients_in_h2o_forcing_data + long_name = number of coefficients in h2o forcing data + units = index + dimensions = () + type = integer [ipt] standard_name = index_of_horizontal_gridpoint_for_debug_output long_name = horizontal index for point used for diagnostic printout @@ -10012,7 +10036,7 @@ relative_path = ../physics/physics/ dependencies = hooks/machine.F,hooks/physcons.F90 dependencies = Radiation/RRTMG/radlw_param.f,Radiation/RRTMG/radsw_param.f - dependencies = photochem/h2o_def.f,photochem/module_ozphys.F90 + dependencies = photochem/module_ozphys.F90,photochem/module_h2ophys.F90 dependencies = MP/GFDL/GFDL_parse_tracers.F90 [ccpp-arg-table] diff --git a/ccpp/physics b/ccpp/physics index 1d9b07650..44700d5e9 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 1d9b076503c27cd4cfa8b22a977a71e889cbb149 +Subproject commit 44700d5e92f00524ade276062e1f7c50e554c0fb diff --git a/ccpp/suites/suite_FV3_GFS_v15_thompson_mynn_lam3km.xml b/ccpp/suites/suite_FV3_GFS_v15_thompson_mynn_lam3km.xml index 922f7f305..3b93422b5 100644 --- a/ccpp/suites/suite_FV3_GFS_v15_thompson_mynn_lam3km.xml +++ b/ccpp/suites/suite_FV3_GFS_v15_thompson_mynn_lam3km.xml @@ -59,7 +59,7 @@ cires_ugwp_post GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_suite_interstitial_4 diff --git a/ccpp/suites/suite_FV3_GFS_v15p2.xml b/ccpp/suites/suite_FV3_GFS_v15p2.xml index c164a1c7e..bd7225019 100644 --- a/ccpp/suites/suite_FV3_GFS_v15p2.xml +++ b/ccpp/suites/suite_FV3_GFS_v15p2.xml @@ -65,7 +65,7 @@ cires_ugwp_post GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre diff --git a/ccpp/suites/suite_FV3_GFS_v16.xml b/ccpp/suites/suite_FV3_GFS_v16.xml index bc5540ce1..37de8fbc5 100644 --- a/ccpp/suites/suite_FV3_GFS_v16.xml +++ b/ccpp/suites/suite_FV3_GFS_v16.xml @@ -65,7 +65,7 @@ cires_ugwp_post GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre diff --git a/ccpp/suites/suite_FV3_GFS_v16_csawmg.xml b/ccpp/suites/suite_FV3_GFS_v16_csawmg.xml index 3f972d784..907a0234c 100644 --- a/ccpp/suites/suite_FV3_GFS_v16_csawmg.xml +++ b/ccpp/suites/suite_FV3_GFS_v16_csawmg.xml @@ -60,7 +60,7 @@ cires_ugwp_post GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre diff --git a/ccpp/suites/suite_FV3_GFS_v16_flake.xml b/ccpp/suites/suite_FV3_GFS_v16_flake.xml index 4f09779a2..c11b2afdf 100644 --- a/ccpp/suites/suite_FV3_GFS_v16_flake.xml +++ b/ccpp/suites/suite_FV3_GFS_v16_flake.xml @@ -66,7 +66,7 @@ cires_ugwp_post GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre diff --git a/ccpp/suites/suite_FV3_GFS_v16_fv3wam.xml b/ccpp/suites/suite_FV3_GFS_v16_fv3wam.xml index 4de8927b1..e10022121 100644 --- a/ccpp/suites/suite_FV3_GFS_v16_fv3wam.xml +++ b/ccpp/suites/suite_FV3_GFS_v16_fv3wam.xml @@ -58,7 +58,7 @@ cires_ugwp_post GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre diff --git a/ccpp/suites/suite_FV3_GFS_v16_ras.xml b/ccpp/suites/suite_FV3_GFS_v16_ras.xml index d27a4887c..0545de59a 100644 --- a/ccpp/suites/suite_FV3_GFS_v16_ras.xml +++ b/ccpp/suites/suite_FV3_GFS_v16_ras.xml @@ -65,7 +65,7 @@ cires_ugwp_post GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre diff --git a/ccpp/suites/suite_FV3_GFS_v17_coupled_p8.xml b/ccpp/suites/suite_FV3_GFS_v17_coupled_p8.xml index 53007131f..0cf5f40af 100644 --- a/ccpp/suites/suite_FV3_GFS_v17_coupled_p8.xml +++ b/ccpp/suites/suite_FV3_GFS_v17_coupled_p8.xml @@ -61,7 +61,7 @@ unified_ugwp_post GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre diff --git a/ccpp/suites/suite_FV3_GFS_v17_coupled_p8_c3.xml b/ccpp/suites/suite_FV3_GFS_v17_coupled_p8_c3.xml index 64200955b..bba0f5b78 100644 --- a/ccpp/suites/suite_FV3_GFS_v17_coupled_p8_c3.xml +++ b/ccpp/suites/suite_FV3_GFS_v17_coupled_p8_c3.xml @@ -61,7 +61,7 @@ unified_ugwp_post GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre diff --git a/ccpp/suites/suite_FV3_GFS_v17_coupled_p8_sfcocn.xml b/ccpp/suites/suite_FV3_GFS_v17_coupled_p8_sfcocn.xml index 8b495a18f..3d25ec17b 100644 --- a/ccpp/suites/suite_FV3_GFS_v17_coupled_p8_sfcocn.xml +++ b/ccpp/suites/suite_FV3_GFS_v17_coupled_p8_sfcocn.xml @@ -59,7 +59,7 @@ unified_ugwp_post GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre diff --git a/ccpp/suites/suite_FV3_GFS_v17_coupled_p8_ugwpv1.xml b/ccpp/suites/suite_FV3_GFS_v17_coupled_p8_ugwpv1.xml index b63190e65..e7bb03710 100644 --- a/ccpp/suites/suite_FV3_GFS_v17_coupled_p8_ugwpv1.xml +++ b/ccpp/suites/suite_FV3_GFS_v17_coupled_p8_ugwpv1.xml @@ -61,7 +61,7 @@ ugwpv1_gsldrag_post GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre diff --git a/ccpp/suites/suite_FV3_GFS_v17_p8.xml b/ccpp/suites/suite_FV3_GFS_v17_p8.xml index e90d0c42b..58f9431a8 100644 --- a/ccpp/suites/suite_FV3_GFS_v17_p8.xml +++ b/ccpp/suites/suite_FV3_GFS_v17_p8.xml @@ -61,7 +61,7 @@ unified_ugwp_post GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre diff --git a/ccpp/suites/suite_FV3_GFS_v17_p8_c3.xml b/ccpp/suites/suite_FV3_GFS_v17_p8_c3.xml index e9257a7f3..54258c15e 100644 --- a/ccpp/suites/suite_FV3_GFS_v17_p8_c3.xml +++ b/ccpp/suites/suite_FV3_GFS_v17_p8_c3.xml @@ -62,7 +62,7 @@ unified_ugwp_post GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre diff --git a/ccpp/suites/suite_FV3_GFS_v17_p8_mynn.xml b/ccpp/suites/suite_FV3_GFS_v17_p8_mynn.xml index fb7672ac3..e54c3ab06 100644 --- a/ccpp/suites/suite_FV3_GFS_v17_p8_mynn.xml +++ b/ccpp/suites/suite_FV3_GFS_v17_p8_mynn.xml @@ -63,7 +63,7 @@ unified_ugwp_post GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre diff --git a/ccpp/suites/suite_FV3_GFS_v17_p8_rrtmgp.xml b/ccpp/suites/suite_FV3_GFS_v17_p8_rrtmgp.xml index 57aa71179..1bbd34def 100644 --- a/ccpp/suites/suite_FV3_GFS_v17_p8_rrtmgp.xml +++ b/ccpp/suites/suite_FV3_GFS_v17_p8_rrtmgp.xml @@ -61,7 +61,7 @@ unified_ugwp_post GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre diff --git a/ccpp/suites/suite_FV3_GFS_v17_p8_ugwpv1.xml b/ccpp/suites/suite_FV3_GFS_v17_p8_ugwpv1.xml index 2a5034035..c94396454 100644 --- a/ccpp/suites/suite_FV3_GFS_v17_p8_ugwpv1.xml +++ b/ccpp/suites/suite_FV3_GFS_v17_p8_ugwpv1.xml @@ -60,7 +60,7 @@ ugwpv1_gsldrag_post GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre diff --git a/ccpp/suites/suite_FV3_HAFS_v1_gfdlmp_tedmf.xml b/ccpp/suites/suite_FV3_HAFS_v1_gfdlmp_tedmf.xml index 0a08ee576..db918c643 100644 --- a/ccpp/suites/suite_FV3_HAFS_v1_gfdlmp_tedmf.xml +++ b/ccpp/suites/suite_FV3_HAFS_v1_gfdlmp_tedmf.xml @@ -65,7 +65,7 @@ unified_ugwp_post GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre diff --git a/ccpp/suites/suite_FV3_HAFS_v1_gfdlmp_tedmf_nonsst.xml b/ccpp/suites/suite_FV3_HAFS_v1_gfdlmp_tedmf_nonsst.xml index 3fc78efad..f2a02001e 100644 --- a/ccpp/suites/suite_FV3_HAFS_v1_gfdlmp_tedmf_nonsst.xml +++ b/ccpp/suites/suite_FV3_HAFS_v1_gfdlmp_tedmf_nonsst.xml @@ -63,7 +63,7 @@ unified_ugwp_post GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre diff --git a/ccpp/suites/suite_FV3_HAFS_v1_thompson.xml b/ccpp/suites/suite_FV3_HAFS_v1_thompson.xml index 0e9dc6e5f..6a043e897 100644 --- a/ccpp/suites/suite_FV3_HAFS_v1_thompson.xml +++ b/ccpp/suites/suite_FV3_HAFS_v1_thompson.xml @@ -60,7 +60,7 @@ unified_ugwp_post GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre diff --git a/ccpp/suites/suite_FV3_HAFS_v1_thompson_nonsst.xml b/ccpp/suites/suite_FV3_HAFS_v1_thompson_nonsst.xml index fe83ee91d..5408b3898 100644 --- a/ccpp/suites/suite_FV3_HAFS_v1_thompson_nonsst.xml +++ b/ccpp/suites/suite_FV3_HAFS_v1_thompson_nonsst.xml @@ -58,7 +58,7 @@ unified_ugwp_post GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre diff --git a/ccpp/suites/suite_FV3_HAFS_v1_thompson_tedmf_gfdlsf.xml b/ccpp/suites/suite_FV3_HAFS_v1_thompson_tedmf_gfdlsf.xml index 70018e7cc..6283e3a3f 100644 --- a/ccpp/suites/suite_FV3_HAFS_v1_thompson_tedmf_gfdlsf.xml +++ b/ccpp/suites/suite_FV3_HAFS_v1_thompson_tedmf_gfdlsf.xml @@ -60,7 +60,7 @@ unified_ugwp_post GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre diff --git a/ccpp/suites/suite_FV3_HRRR.xml b/ccpp/suites/suite_FV3_HRRR.xml index 2177dc078..fabe94665 100644 --- a/ccpp/suites/suite_FV3_HRRR.xml +++ b/ccpp/suites/suite_FV3_HRRR.xml @@ -58,7 +58,7 @@ drag_suite GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_suite_interstitial_4 diff --git a/ccpp/suites/suite_FV3_HRRR_c3.xml b/ccpp/suites/suite_FV3_HRRR_c3.xml index e3ad50a8a..c0f3ec1f5 100644 --- a/ccpp/suites/suite_FV3_HRRR_c3.xml +++ b/ccpp/suites/suite_FV3_HRRR_c3.xml @@ -58,7 +58,7 @@ drag_suite GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre diff --git a/ccpp/suites/suite_FV3_HRRR_gf.xml b/ccpp/suites/suite_FV3_HRRR_gf.xml index 48260ce9f..f3f227106 100644 --- a/ccpp/suites/suite_FV3_HRRR_gf.xml +++ b/ccpp/suites/suite_FV3_HRRR_gf.xml @@ -58,7 +58,7 @@ drag_suite GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre diff --git a/ccpp/suites/suite_FV3_HRRR_gf_nogwd.xml b/ccpp/suites/suite_FV3_HRRR_gf_nogwd.xml index 0f0022d1c..6b01cbd79 100644 --- a/ccpp/suites/suite_FV3_HRRR_gf_nogwd.xml +++ b/ccpp/suites/suite_FV3_HRRR_gf_nogwd.xml @@ -55,7 +55,7 @@ mynnedmf_wrapper rrfs_smoke_postpbl GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre diff --git a/ccpp/suites/suite_FV3_RAP.xml b/ccpp/suites/suite_FV3_RAP.xml index b5a2117f6..c2243e3fa 100644 --- a/ccpp/suites/suite_FV3_RAP.xml +++ b/ccpp/suites/suite_FV3_RAP.xml @@ -58,7 +58,7 @@ drag_suite GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre diff --git a/ccpp/suites/suite_FV3_RAP_cires_ugwp.xml b/ccpp/suites/suite_FV3_RAP_cires_ugwp.xml index e6294028c..7760b059c 100644 --- a/ccpp/suites/suite_FV3_RAP_cires_ugwp.xml +++ b/ccpp/suites/suite_FV3_RAP_cires_ugwp.xml @@ -59,7 +59,7 @@ cires_ugwp_post GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre diff --git a/ccpp/suites/suite_FV3_RAP_clm_lake.xml b/ccpp/suites/suite_FV3_RAP_clm_lake.xml index e7fef4461..d794cd74a 100644 --- a/ccpp/suites/suite_FV3_RAP_clm_lake.xml +++ b/ccpp/suites/suite_FV3_RAP_clm_lake.xml @@ -59,7 +59,7 @@ drag_suite GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre diff --git a/ccpp/suites/suite_FV3_RAP_flake.xml b/ccpp/suites/suite_FV3_RAP_flake.xml index 3239355fa..652071989 100644 --- a/ccpp/suites/suite_FV3_RAP_flake.xml +++ b/ccpp/suites/suite_FV3_RAP_flake.xml @@ -59,7 +59,7 @@ drag_suite GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre diff --git a/ccpp/suites/suite_FV3_RAP_noah.xml b/ccpp/suites/suite_FV3_RAP_noah.xml index 80a515356..7311eb989 100644 --- a/ccpp/suites/suite_FV3_RAP_noah.xml +++ b/ccpp/suites/suite_FV3_RAP_noah.xml @@ -59,7 +59,7 @@ drag_suite GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre diff --git a/ccpp/suites/suite_FV3_RAP_noah_sfcdiff_cires_ugwp.xml b/ccpp/suites/suite_FV3_RAP_noah_sfcdiff_cires_ugwp.xml index 2d6d0377b..229ebc08f 100644 --- a/ccpp/suites/suite_FV3_RAP_noah_sfcdiff_cires_ugwp.xml +++ b/ccpp/suites/suite_FV3_RAP_noah_sfcdiff_cires_ugwp.xml @@ -60,7 +60,7 @@ cires_ugwp_post GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre diff --git a/ccpp/suites/suite_FV3_RAP_sfcdiff.xml b/ccpp/suites/suite_FV3_RAP_sfcdiff.xml index 23bbf1f54..7c2908a25 100644 --- a/ccpp/suites/suite_FV3_RAP_sfcdiff.xml +++ b/ccpp/suites/suite_FV3_RAP_sfcdiff.xml @@ -58,7 +58,7 @@ drag_suite GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre diff --git a/ccpp/suites/suite_FV3_RAP_unified_ugwp.xml b/ccpp/suites/suite_FV3_RAP_unified_ugwp.xml index 509ffea89..6913b8e4a 100644 --- a/ccpp/suites/suite_FV3_RAP_unified_ugwp.xml +++ b/ccpp/suites/suite_FV3_RAP_unified_ugwp.xml @@ -59,7 +59,7 @@ unified_ugwp_post GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre diff --git a/ccpp/suites/suite_FV3_RRFS_v1beta.xml b/ccpp/suites/suite_FV3_RRFS_v1beta.xml index 90165d880..01589e271 100644 --- a/ccpp/suites/suite_FV3_RRFS_v1beta.xml +++ b/ccpp/suites/suite_FV3_RRFS_v1beta.xml @@ -60,7 +60,7 @@ cires_ugwp_post GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_suite_interstitial_4 diff --git a/ccpp/suites/suite_FV3_RRFS_v1nssl.xml b/ccpp/suites/suite_FV3_RRFS_v1nssl.xml index e24d2c6f2..107254b18 100644 --- a/ccpp/suites/suite_FV3_RRFS_v1nssl.xml +++ b/ccpp/suites/suite_FV3_RRFS_v1nssl.xml @@ -60,7 +60,7 @@ cires_ugwp_post GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_MP_generic_pre mp_nssl diff --git a/ccpp/suites/suite_FV3_WoFS_v0.xml b/ccpp/suites/suite_FV3_WoFS_v0.xml index 140ba9023..6e68a9773 100644 --- a/ccpp/suites/suite_FV3_WoFS_v0.xml +++ b/ccpp/suites/suite_FV3_WoFS_v0.xml @@ -60,7 +60,7 @@ cires_ugwp_post GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_MP_generic_pre mp_nssl diff --git a/ccpp/suites/suite_FV3_global_nest_v1.xml b/ccpp/suites/suite_FV3_global_nest_v1.xml index 6f55e56f7..79ef5545f 100644 --- a/ccpp/suites/suite_FV3_global_nest_v1.xml +++ b/ccpp/suites/suite_FV3_global_nest_v1.xml @@ -60,7 +60,7 @@ ugwpv1_gsldrag_post GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre diff --git a/ccpp/suites/suite_RRFSens_phy1.xml b/ccpp/suites/suite_RRFSens_phy1.xml index f0de1ebf4..b7d007843 100644 --- a/ccpp/suites/suite_RRFSens_phy1.xml +++ b/ccpp/suites/suite_RRFSens_phy1.xml @@ -57,7 +57,7 @@ drag_suite GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre diff --git a/ccpp/suites/suite_RRFSens_phy2.xml b/ccpp/suites/suite_RRFSens_phy2.xml index 44cafb249..e2f730833 100644 --- a/ccpp/suites/suite_RRFSens_phy2.xml +++ b/ccpp/suites/suite_RRFSens_phy2.xml @@ -56,7 +56,7 @@ drag_suite GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre diff --git a/ccpp/suites/suite_RRFSens_phy3.xml b/ccpp/suites/suite_RRFSens_phy3.xml index da442619d..470f5d15d 100644 --- a/ccpp/suites/suite_RRFSens_phy3.xml +++ b/ccpp/suites/suite_RRFSens_phy3.xml @@ -56,7 +56,7 @@ drag_suite GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre diff --git a/ccpp/suites/suite_RRFSens_phy4.xml b/ccpp/suites/suite_RRFSens_phy4.xml index 74a1e8972..5b07083b9 100644 --- a/ccpp/suites/suite_RRFSens_phy4.xml +++ b/ccpp/suites/suite_RRFSens_phy4.xml @@ -57,7 +57,7 @@ drag_suite GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre diff --git a/ccpp/suites/suite_RRFSens_phy5.xml b/ccpp/suites/suite_RRFSens_phy5.xml index 0321e64e9..c06338056 100644 --- a/ccpp/suites/suite_RRFSens_phy5.xml +++ b/ccpp/suites/suite_RRFSens_phy5.xml @@ -56,7 +56,7 @@ drag_suite GFS_GWD_generic_post GFS_suite_stateout_update - h2ophys + GFS_photochemistry get_phi_fv3 GFS_suite_interstitial_3 GFS_DCNV_generic_pre From a9364591091c836984a40107729720705847c195 Mon Sep 17 00:00:00 2001 From: Daniel Rosen Date: Tue, 17 Sep 2024 08:51:53 -0600 Subject: [PATCH 3/5] Add two way fire coupling to fv3atm (#815) * add fire_behavior smoke coupling and flags and export variables for fire behavior * added: inst_pres_levels, inst_geop_levels, inst_zonal_wind_levels, inst_merid_wind_levels, inst_surface_roughness, inst_temp_height2m, inst_spec_humid_height2m, inst_pres_height_surface, mean_prec_rate, inst_rainfall_amount * add fire behavior tendencies to physics * add hflx_fire and evap_fire to FV3 imports * added surface emissions fire_smoke imports and initialized the variables and fsmoke tracer index --------- Co-authored-by: masih Co-authored-by: Grant Firl --- atmos_model.F90 | 75 +++++++++++++++++++++++++++++++++ ccpp/data/GFS_typedefs.F90 | 35 ++++++++++++--- ccpp/data/GFS_typedefs.meta | 46 +++++++++++++++++--- ccpp/driver/GFS_diagnostics.F90 | 13 ++++++ ccpp/physics | 2 +- cpl/module_cplfields.F90 | 12 ++++-- 6 files changed, 168 insertions(+), 15 deletions(-) diff --git a/atmos_model.F90 b/atmos_model.F90 index 6938ee4ce..5525b5b58 100644 --- a/atmos_model.F90 +++ b/atmos_model.F90 @@ -3121,6 +3121,54 @@ subroutine assign_importdata(jdat, rc) endif endif + fldname = 'hflx_fire' + if (trim(impfield_name) == trim(fldname)) then + findex = queryImportFields(fldname) + if (importFieldsValid(findex)) then +!$omp parallel do default(shared) private(i,j,nb,ix) + do j=jsc,jec + do i=isc,iec + nb = Atm_block%blkno(i,j) + ix = Atm_block%ixp(i,j) + im = GFS_control%chunk_begin(nb)+ix-1 + GFS_sfcprop%hflx_fire(im) = datar82d(i-isc+1,j-jsc+1) + enddo + enddo + endif + endif + + fldname = 'evap_fire' + if (trim(impfield_name) == trim(fldname)) then + findex = queryImportFields(fldname) + if (importFieldsValid(findex)) then +!$omp parallel do default(shared) private(i,j,nb,ix) + do j=jsc,jec + do i=isc,iec + nb = Atm_block%blkno(i,j) + ix = Atm_block%ixp(i,j) + im = GFS_control%chunk_begin(nb)+ix-1 + GFS_sfcprop%evap_fire(im) = datar82d(i-isc+1,j-jsc+1) + enddo + enddo + endif + endif + + fldname = 'smoke_fire' + if (trim(impfield_name) == trim(fldname)) then + findex = queryImportFields(fldname) + if (importFieldsValid(findex)) then +!$omp parallel do default(shared) private(i,j,nb,ix) + do j=jsc,jec + do i=isc,iec + nb = Atm_block%blkno(i,j) + ix = Atm_block%ixp(i,j) + im = GFS_control%chunk_begin(nb)+ix-1 + GFS_sfcprop%smoke_fire(im) = datar82d(i-isc+1,j-jsc+1) + enddo + enddo + endif + endif + ! write post merge import data to NetCDF file. if (GFS_control%cpl_imp_dbg) then call ESMF_FieldGet(importFields(n), grid=grid, rc=rc) @@ -3294,6 +3342,21 @@ subroutine setup_exportdata(rc) do nb = 1, Atm_block%nblks select case (trim(fieldname)) !--- Instantaneous quantities + ! Instantaneous mean layer pressure (Pa) + case ('inst_pres_levels') + call block_data_copy_or_fill(datar83d, GFS_statein%prsl, zeror8, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc) + ! Instantaneous geopotential at model layer centers (m2 s-2) + case ('inst_geop_levels') + call block_data_copy_or_fill(datar83d, GFS_statein%phil, zeror8, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc) + ! Instantaneous zonal wind (m s-1) + case ('inst_zonal_wind_levels') + call block_data_copy_or_fill(datar83d, GFS_statein%ugrs, zeror8, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc) + ! Instantaneous meridional wind (m s-1) + case ('inst_merid_wind_levels') + call block_data_copy_or_fill(datar83d, GFS_statein%vgrs, zeror8, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc) + ! Instantaneous surface roughness length (cm) + case ('inst_surface_roughness') + call block_data_copy(datar82d, GFS_sfcprop%zorl, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc) ! Instantaneous u wind (m/s) 10 m above ground case ('inst_zonal_wind_height10m') call block_data_copy(datar82d, GFS_coupling%u10mi_cpl, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc) @@ -3378,6 +3441,9 @@ subroutine setup_exportdata(rc) ! Land/Sea mask (sea:0,land:1) case ('inst_land_sea_mask', 'slmsk') call block_data_copy(datar82d, GFS_sfcprop%slmsk, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc) + ! Total precipitation amount in each time step + case ('inst_rainfall_amount') + call block_data_copy(datar82d, GFS_sfcprop%tprcp, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc) !--- Mean quantities ! MEAN Zonal compt of momentum flux (N/m**2) case ('mean_zonal_moment_flx_atm') @@ -3430,6 +3496,15 @@ subroutine setup_exportdata(rc) ! MEAN NET sfc uv+vis diffused flux (W/m**2) case ('mean_net_sw_vis_dif_flx') call block_data_copy(datar82d, GFS_coupling%nvisdf_cpl, Atm_block, nb, rtime, spval, offset=GFS_Control%chunk_begin(nb), rc=localrc) + ! MEAN precipitation rate (kg/m2/s) + case ('mean_prec_rate') + call block_data_copy(datar82d, GFS_sfcprop%tprcp, Atm_block, nb, rtimek, spval, offset=GFS_Control%chunk_begin(nb), rc=localrc) + ! MEAN convective precipitation rate (kg/m2/s) + case ('mean_prec_rate_conv') + call block_data_copy(datar82d, GFS_coupling%rainc_cpl, Atm_block, nb, rtimek, spval, offset=GFS_Control%chunk_begin(nb), rc=localrc) + ! MEAN snow precipitation rate (kg/m2/s) + case ('mean_fprec_rate') + call block_data_copy(datar82d, GFS_coupling%snow_cpl, Atm_block, nb, rtimek, spval, offset=GFS_Control%chunk_begin(nb), rc=localrc) ! oceanfrac used by atm to calculate fluxes case ('openwater_frac_in_atm') call block_data_combine_fractions(datar82d, GFS_sfcprop%oceanfrac, GFS_sfcprop%fice, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc) diff --git a/ccpp/data/GFS_typedefs.F90 b/ccpp/data/GFS_typedefs.F90 index a35ce3c13..9e8bfc7d3 100644 --- a/ccpp/data/GFS_typedefs.F90 +++ b/ccpp/data/GFS_typedefs.F90 @@ -297,6 +297,11 @@ module GFS_typedefs real (kind=kind_phys), pointer :: hflx (:) => null() !< real (kind=kind_phys), pointer :: qss (:) => null() !< +!--- fire_behavior + real (kind=kind_phys), pointer :: hflx_fire (:) => null() !< kinematic surface upward sensible heat flux of fire + real (kind=kind_phys), pointer :: evap_fire (:) => null() !< kinematic surface upward latent heat flux of fire + real (kind=kind_phys), pointer :: smoke_fire (:) => null() !< smoke emission of fire + !-- In/Out real (kind=kind_phys), pointer :: maxupmf(:) => null() !< maximum up draft mass flux for Grell-Freitas real (kind=kind_phys), pointer :: conv_act(:) => null() !< convective activity counter for Grell-Freitas @@ -766,6 +771,7 @@ module GFS_typedefs logical :: cpllnd !< default no cpllnd collection logical :: cpllnd2atm !< default no lnd->atm coupling logical :: rrfs_sd !< default no rrfs_sd collection + logical :: cpl_fire !< default no fire_behavior collection logical :: use_cice_alb !< default .false. - i.e. don't use albedo imported from the ice model logical :: cpl_imp_mrg !< default no merge import with internal forcings logical :: cpl_imp_dbg !< default no write import data to file post merge @@ -1485,6 +1491,7 @@ module GFS_typedefs integer :: nto2 !< tracer index for oxygen integer :: ntwa !< tracer index for water friendly aerosol integer :: ntia !< tracer index for ice friendly aerosol + integer :: ntfsmoke !< tracer index for fire smoke integer :: ntsmoke !< tracer index for smoke integer :: ntdust !< tracer index for dust integer :: ntcoarsepm !< tracer index for coarse PM @@ -2864,6 +2871,16 @@ subroutine sfcprop_create (Sfcprop, Model) Sfcprop%lu_qfire = clear_val endif + !--- if fire_behavior is on + if(Model%cpl_fire) then + allocate (Sfcprop%hflx_fire (IM)) + allocate (Sfcprop%evap_fire (IM)) + allocate (Sfcprop%smoke_fire (IM)) + Sfcprop%hflx_fire = zero + Sfcprop%evap_fire = zero + Sfcprop%smoke_fire = zero + endif + end subroutine sfcprop_create @@ -2923,7 +2940,7 @@ subroutine coupling_create (Coupling, Model) Coupling%tsfc_radtime = clear_val endif - if (Model%cplflx .or. Model%do_sppt .or. Model%cplchm .or. Model%ca_global .or. Model%cpllnd) then + if (Model%cplflx .or. Model%do_sppt .or. Model%cplchm .or. Model%ca_global .or. Model%cpllnd .or. Model%cpl_fire) then allocate (Coupling%rain_cpl (IM)) allocate (Coupling%snow_cpl (IM)) Coupling%rain_cpl = clear_val @@ -2952,7 +2969,7 @@ subroutine coupling_create (Coupling, Model) ! Coupling%zorlwav_cpl = clear_val ! endif - if (Model%cplflx .or. Model%cpllnd) then + if (Model%cplflx .or. Model%cpllnd .or. Model%cpl_fire) then allocate (Coupling%dlwsfci_cpl (IM)) allocate (Coupling%dswsfci_cpl (IM)) allocate (Coupling%dlwsfc_cpl (IM)) @@ -2986,7 +3003,7 @@ subroutine coupling_create (Coupling, Model) Coupling%nvisdf_cpl = clear_val end if - if (Model%cplflx) then + if (Model%cplflx .or. Model%cpl_fire) then !--- incoming quantities allocate (Coupling%slimskin_cpl (IM)) allocate (Coupling%dusfcin_cpl (IM)) @@ -3151,7 +3168,7 @@ subroutine coupling_create (Coupling, Model) Coupling%pfl_lsan = clear_val endif - if (Model%cplchm .or. Model%cplflx .or. Model%cpllnd) then + if (Model%cplchm .or. Model%cplflx .or. Model%cpllnd .or. Model%cpl_fire) then !--- accumulated convective rainfall allocate (Coupling%rainc_cpl (IM)) Coupling%rainc_cpl = clear_val @@ -3359,6 +3376,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & logical :: cpllnd = .false. !< default no cpllnd collection logical :: cpllnd2atm = .false. !< default no cpllnd2atm coupling logical :: rrfs_sd = .false. !< default no rrfs_sd collection + logical :: cpl_fire = .false. !< default no fire behavior colleciton logical :: use_cice_alb = .false. !< default no cice albedo logical :: cpl_imp_mrg = .false. !< default no merge import with internal forcings logical :: cpl_imp_dbg = .false. !< default no write import data to file post merge @@ -4006,7 +4024,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !--- coupling parameters cplflx, cplice, cplocn2atm, cplwav, cplwav2atm, cplaqm, & cplchm, cpllnd, cpllnd2atm, cpl_imp_mrg, cpl_imp_dbg, & - rrfs_sd, use_cice_alb, & + cpl_fire, rrfs_sd, use_cice_alb, & #ifdef IDEA_PHYS lsidea, weimer_model, f107_kp_size, f107_kp_interval, & f107_kp_skip_size, f107_kp_data_size, f107_kp_read_in_start, & @@ -4379,6 +4397,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !--- RRFS-SD Model%rrfs_sd = rrfs_sd + Model%cpl_fire = cpl_fire Model%dust_drylimit_factor = dust_drylimit_factor Model%dust_moist_correction = dust_moist_correction Model%dust_moist_opt = dust_moist_opt @@ -5191,12 +5210,14 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%nqrimef = get_tracer_index(Model%tracer_names, 'q_rimef', Model%me, Model%master, Model%debug) Model%ntwa = get_tracer_index(Model%tracer_names, 'liq_aero', Model%me, Model%master, Model%debug) Model%ntia = get_tracer_index(Model%tracer_names, 'ice_aero', Model%me, Model%master, Model%debug) + if (Model%cpl_fire) then + Model%ntfsmoke = get_tracer_index(Model%tracer_names, 'fsmoke', Model%me, Model%master, Model%debug) + endif if (Model%rrfs_sd) then Model%ntsmoke = get_tracer_index(Model%tracer_names, 'smoke', Model%me, Model%master, Model%debug) Model%ntdust = get_tracer_index(Model%tracer_names, 'dust', Model%me, Model%master, Model%debug) Model%ntcoarsepm = get_tracer_index(Model%tracer_names, 'coarsepm', Model%me, Model%master, Model%debug) endif - !--- initialize parameters for atmospheric chemistry tracers call Model%init_chemistry(tracer_types) @@ -6502,6 +6523,7 @@ subroutine control_print(Model) print *, ' cpllnd : ', Model%cpllnd print *, ' cpllnd2atm : ', Model%cpllnd2atm print *, ' rrfs_sd : ', Model%rrfs_sd + print *, ' cpl_fire : ', Model%cpl_fire print *, ' use_cice_alb : ', Model%use_cice_alb print *, ' cpl_imp_mrg : ', Model%cpl_imp_mrg print *, ' cpl_imp_dbg : ', Model%cpl_imp_dbg @@ -6973,6 +6995,7 @@ subroutine control_print(Model) print *, ' nto2 : ', Model%nto2 print *, ' ntwa : ', Model%ntwa print *, ' ntia : ', Model%ntia + print *, ' ntfsmoke : ', Model%ntfsmoke print *, ' ntsmoke : ', Model%ntsmoke print *, ' ntdust : ', Model%ntdust print *, ' ntcoarsepm : ', Model%ntcoarsepm diff --git a/ccpp/data/GFS_typedefs.meta b/ccpp/data/GFS_typedefs.meta index 9e4b3f25c..2fee7ba12 100644 --- a/ccpp/data/GFS_typedefs.meta +++ b/ccpp/data/GFS_typedefs.meta @@ -2363,6 +2363,30 @@ type = real kind = kind_phys active = (do_smoke_coupling) +[hflx_fire] + standard_name = kinematic_surface_upward_sensible_heat_flux_of_fire + long_name = kinematic surface upward sensible heat flux of fire + units = K m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + active = (do_fire_coupling) +[evap_fire] + standard_name = surface_upward_specific_humidity_flux_of_fire + long_name = kinematic surface upward latent heat flux of fire + units = kg kg-1 m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + active = (do_fire_coupling) +[smoke_fire] + standard_name = smoke_emission_of_fire + long_name = smoke emission of fire + units = kg m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + active = (do_fire_coupling) ######################################################################## [ccpp-table-properties] @@ -2472,7 +2496,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling .or. flag_for_chemistry_coupling .or. flag_for_land_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_chemistry_coupling .or. flag_for_land_coupling .or. do_fire_coupling) [snow_cpl] standard_name = cumulative_lwe_thickness_of_snow_amount_for_coupling long_name = total snow precipitation @@ -2480,7 +2504,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling .or. flag_for_stochastic_physics_perturbations .or. flag_for_chemistry_coupling .or. flag_for_global_cellular_automata .or. flag_for_land_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_stochastic_physics_perturbations .or. flag_for_chemistry_coupling .or. flag_for_global_cellular_automata .or. flag_for_land_coupling .or. do_fire_coupling) [dusfc_cpl] standard_name = cumulative_surface_x_momentum_flux_for_coupling_multiplied_by_timestep long_name = cumulative sfc x momentum flux multiplied by timestep @@ -2744,7 +2768,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling .or. do_fire_coupling) [q2mi_cpl] standard_name = specific_humidity_at_2m_for_coupling long_name = instantaneous Q2m @@ -2752,7 +2776,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling .or. do_fire_coupling) [u10mi_cpl] standard_name = x_wind_at_10m_for_coupling long_name = instantaneous U10m @@ -2784,7 +2808,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling .or. flag_for_land_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling .or. flag_for_land_coupling .or. do_fire_coupling) [ulwsfcin_cpl] standard_name = surface_upwelling_longwave_flux_from_coupled_process long_name = surface upwelling LW flux for coupling @@ -3634,6 +3658,12 @@ units = flag dimensions = () type = logical +[cpl_fire] + standard_name = do_fire_coupling + long_name = flag controlling fire_behavior collection (default off) + units = flag + dimensions = () + type = logical [cpl_imp_mrg] standard_name = flag_for_merging_imported_data long_name = flag controlling cpl_imp_mrg for imported data (default off) @@ -6549,6 +6579,12 @@ units = index dimensions = () type = integer +[ntfsmoke] + standard_name = index_for_fire_smoke_in_tracer_concentration_array + long_name = tracer index for fire smoke + units = index + dimensions = () + type = integer [ntdust] standard_name = index_for_dust_in_tracer_concentration_array long_name = tracer index for dust diff --git a/ccpp/driver/GFS_diagnostics.F90 b/ccpp/driver/GFS_diagnostics.F90 index 942db0175..4729819ea 100644 --- a/ccpp/driver/GFS_diagnostics.F90 +++ b/ccpp/driver/GFS_diagnostics.F90 @@ -4653,6 +4653,19 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop enddo end if thompson_extended_diagnostics + if (Model%cpl_fire .and. Model%ntfsmoke>0) then + idx = idx + 1 + ExtDiag(idx)%axes = 3 + ExtDiag(idx)%name = 'fsmoke' + ExtDiag(idx)%desc = 'smoke concentration' + ExtDiag(idx)%unit = 'kg kg-1' + ExtDiag(idx)%mod_name = 'gfs_phys' + allocate (ExtDiag(idx)%data(nblks)) + do nb = 1,nblks + ExtDiag(idx)%data(nb)%var3 => Statein%qgrs(Model%chunk_begin(nb):Model%chunk_end(nb),:,Model%ntfsmoke) + enddo + endif + if (Model%rrfs_sd .and. Model%ntsmoke>0) then idx = idx + 1 diff --git a/ccpp/physics b/ccpp/physics index 44700d5e9..b6c433354 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 44700d5e92f00524ade276062e1f7c50e554c0fb +Subproject commit b6c433354394bd8ed5e46692a81149441ff4ae38 diff --git a/cpl/module_cplfields.F90 b/cpl/module_cplfields.F90 index 524db0208..5266807a5 100644 --- a/cpl/module_cplfields.F90 +++ b/cpl/module_cplfields.F90 @@ -26,7 +26,7 @@ module module_cplfields ! l : model levels (3D) ! s : surface (2D) ! t : tracers (4D) - integer, public, parameter :: NexportFields = 120 + integer, public, parameter :: NexportFields = 121 type(ESMF_Field), target, public :: exportFields(NexportFields) type(FieldInfo), dimension(NexportFields), public, parameter :: exportFieldsInfo = [ & @@ -64,6 +64,7 @@ module module_cplfields FieldInfo("mean_evap_rate ", "s"), & FieldInfo("mean_down_lw_flx ", "s"), & FieldInfo("mean_down_sw_flx ", "s"), & + FieldInfo("mean_prec_rate ", "s"), & FieldInfo("inst_prec_rate ", "s"), & FieldInfo("inst_zonal_moment_flx ", "s"), & FieldInfo("inst_merid_moment_flx ", "s"), & @@ -157,7 +158,7 @@ module module_cplfields FieldInfo("cpl_scalars ", "s")] ! Import Fields ---------------------------------------- - integer, public, parameter :: NimportFields = 64 + integer, public, parameter :: NimportFields = 67 logical, public :: importFieldsValid(NimportFields) type(ESMF_Field), target, public :: importFields(NimportFields) @@ -233,7 +234,12 @@ module module_cplfields FieldInfo("snwdph ", "s"), & FieldInfo("f10m ", "s"), & FieldInfo("zorl ", "s"), & - FieldInfo("t2m ", "s") ] + FieldInfo("t2m ", "s"), & + + ! For FIRE + FieldInfo("hflx_fire ", "s"), & + FieldInfo("evap_fire ", "s"), & + FieldInfo("smoke_fire ", "s") ] ! Fields exported exclusively for coupling with chemistry character(*), public, parameter :: chemistryFieldNames(*) = [ & From 1aba87cb308fb52912e7fe6dd6b53d0ce7077554 Mon Sep 17 00:00:00 2001 From: Dusan Jovic <48258889+DusanJovic-NOAA@users.noreply.github.com> Date: Tue, 1 Oct 2024 11:55:48 -0400 Subject: [PATCH 4/5] Support IntelLLVM compiler (#861) * Add support for IntelLLVM compiler: only sub modules (atmos_cubed_sphere, ccpp/physics and upp) are updated. * Update atmos_cubed_sphere, ccpp/physics and upp --- atmos_cubed_sphere | 2 +- ccpp/physics | 2 +- upp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/atmos_cubed_sphere b/atmos_cubed_sphere index ac3055eff..24686a256 160000 --- a/atmos_cubed_sphere +++ b/atmos_cubed_sphere @@ -1 +1 @@ -Subproject commit ac3055eff06099d61cd65e18bc4f0353ffd83f46 +Subproject commit 24686a2561f1414eb86c7b97c93960c36e4257b1 diff --git a/ccpp/physics b/ccpp/physics index b6c433354..5a363134a 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit b6c433354394bd8ed5e46692a81149441ff4ae38 +Subproject commit 5a363134a77535f35594e56b58ba1e6141a23d2b diff --git a/upp b/upp index 81b38a88d..6f5dd627d 160000 --- a/upp +++ b/upp @@ -1 +1 @@ -Subproject commit 81b38a88d860ce7e34e8507c2246151a54d96a39 +Subproject commit 6f5dd627d124ae94bb5ed7f5afd22f82c470b1b7 From 1e10d62a971e4114faea90ae2f134664f3a9ef02 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Fri, 18 Oct 2024 11:08:04 -0400 Subject: [PATCH 5/5] First reconciliation PR from production/RRFS.v1 (#872) * Identical to #785, but it is directed at moving the changes from production/RRFS.v1 to the develop branch --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 5a363134a..f3eeb3442 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 5a363134a77535f35594e56b58ba1e6141a23d2b +Subproject commit f3eeb3442775b7239d98e3d09acc6d4f1d42233e