From dc90c773f188fc8d7d5dbc889cc9d0d4789eae3d Mon Sep 17 00:00:00 2001 From: hannah barnes Date: Wed, 14 Sep 2022 14:50:01 -0600 Subject: [PATCH 01/10] - GF Updates: Enable use of AOD analysis in place of MERRA2, additional GF updates and bugs --- ccpp/data/GFS_typedefs.F90 | 17 ++++++++++++- ccpp/data/GFS_typedefs.meta | 40 +++++++++++++++++++++++++++++++ ccpp/physics | 2 +- io/FV3GFS_io.F90 | 48 ++++++++++++++++++++++++++++++++++--- 4 files changed, 102 insertions(+), 5 deletions(-) diff --git a/ccpp/data/GFS_typedefs.F90 b/ccpp/data/GFS_typedefs.F90 index c56b591ad..138b48828 100644 --- a/ccpp/data/GFS_typedefs.F90 +++ b/ccpp/data/GFS_typedefs.F90 @@ -244,6 +244,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: emis_ice (:) => null() !< surface emissivity over ice for LSM real (kind=kind_phys), pointer :: emis_wat (:) => null() !< surface emissivity over water real (kind=kind_phys), pointer :: sfalb_lnd_bck (:) => null() !< snow-free albedo over land + real (kind=kind_phys), pointer :: aod_in (:,:) => null() !< anthropogenic background input !--- In (radiation only) real (kind=kind_phys), pointer :: sncovr (:) => null() !< snow cover in fraction over land @@ -571,6 +572,8 @@ module GFS_typedefs !--- instantaneous quantities for chemistry coupling real (kind=kind_phys), pointer :: ushfsfci(:) => null() !< instantaneous upward sensible heat flux (w/m**2) real (kind=kind_phys), pointer :: qci_conv(:,:) => null() !< convective cloud condesate after rainout + real (kind=kind_phys), pointer :: qci_conv_accum(:,:) => null() !< accumulated cloud condesate after rainout + real (kind=kind_phys), pointer :: qci_conv_timeave(:,:) => null() !< time averaged cloud condesate after rainout real (kind=kind_phys), pointer :: pfi_lsan(:,:) => null() !< instantaneous 3D flux of ice nonconvective precipitation (kg m-2 s-1) real (kind=kind_phys), pointer :: pfl_lsan(:,:) => null() !< instantaneous 3D flux of liquid nonconvective precipitation (kg m-2 s-1) @@ -1512,6 +1515,8 @@ module GFS_typedefs !--- Diagnostic that needs to be carried over to the next time step (removed from diag_type) real (kind=kind_phys), pointer :: hpbl (:) => null() !< Planetary boundary layer height real (kind=kind_phys), pointer :: ud_mf (:,:) => null() !< updraft mass flux + real (kind=kind_phys), pointer :: ud_mf_accum (:,:) => null() !< accumulated updraft mass flux + real (kind=kind_phys), pointer :: ud_mf_timeave (:,:) => null() !< time averaged updraft mass flux !--- dynamical forcing variables for Grell-Freitas convection real (kind=kind_phys), pointer :: forcet (:,:) => null() !< @@ -2066,6 +2071,7 @@ subroutine sfcprop_create (Sfcprop, IM, Model) allocate (Sfcprop%emis_lnd (IM)) allocate (Sfcprop%emis_ice (IM)) allocate (Sfcprop%emis_wat (IM)) + allocate (Sfcprop%aod_in (IM,1)) Sfcprop%slmsk = clear_val Sfcprop%oceanfrac = clear_val @@ -2099,6 +2105,7 @@ subroutine sfcprop_create (Sfcprop, IM, Model) Sfcprop%emis_lnd = clear_val Sfcprop%emis_ice = clear_val Sfcprop%emis_wat = clear_val + Sfcprop%aod_in = clear_val !--- In (radiation only) allocate (Sfcprop%snoalb (IM)) @@ -2783,7 +2790,11 @@ subroutine coupling_create (Coupling, IM, Model) if (Model%imfdeepcnv == Model%imfdeepcnv_gf) then allocate (Coupling%qci_conv (IM,Model%levs)) + allocate (Coupling%qci_conv_accum (IM,Model%levs)) + allocate (Coupling%qci_conv_timeave (IM,Model%levs)) Coupling%qci_conv = clear_val + Coupling%qci_conv_accum = clear_val + Coupling%qci_conv_timeave = clear_val endif end subroutine coupling_create @@ -5278,7 +5289,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & endif if(Model%ras .or. Model%cscnv) Model%cnvcld = .false. - if(Model%do_shoc .or. Model%pdfcld .or. Model%do_mynnedmf .or. Model%imfdeepcnv == Model%imfdeepcnv_gf) Model%cnvcld = .false. + if(Model%do_shoc .or. Model%pdfcld .or. Model%do_mynnedmf) Model%cnvcld = .false. if(Model%cnvcld) Model%ncnvcld3d = 1 !--- get cnvwind index in phy_f2d; last entry in phy_f2d array @@ -6254,9 +6265,13 @@ subroutine tbd_create (Tbd, IM, Model) allocate(Tbd%cactiv(IM)) allocate(Tbd%cactiv_m(IM)) allocate(Tbd%aod_gf(IM)) + allocate(Tbd%ud_mf_accum(IM, Model%levs)) + allocate(Tbd%ud_mf_timeave(IM, Model%levs)) Tbd%cactiv = zero Tbd%cactiv_m = zero Tbd%aod_gf = zero + Tbd%ud_mf_accum = zero + Tbd%ud_mf_timeave = zero end if !--- MYNN variables: diff --git a/ccpp/data/GFS_typedefs.meta b/ccpp/data/GFS_typedefs.meta index 155b26d32..0e86ec4da 100644 --- a/ccpp/data/GFS_typedefs.meta +++ b/ccpp/data/GFS_typedefs.meta @@ -754,6 +754,14 @@ type = real kind = kind_phys active = (do_smoke_coupling) +[aod_in] + standard_name = assimilated_aod_input + long_name = assimilated aod input + units = none + dimensions = (horizontal_dimension,1) + type = real + kind = kind_phys + active = (control_for_deep_convection_scheme == identifier_for_grell_freitas_deep_convection) [z0base] standard_name = baseline_surface_roughness_length long_name = baseline surface roughness length for momentum in meter @@ -2593,6 +2601,22 @@ type = real kind = kind_phys active = (control_for_deep_convection_scheme == identifier_for_grell_freitas_deep_convection) +[qci_conv_timeave] + standard_name = time_averaged_convective_cloud_condesate_after_rainout + long_name = time averaged convective cloud condesate after rainout + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (control_for_deep_convection_scheme == identifier_for_grell_freitas_deep_convection) +[qci_conv_accum] + standard_name = accumulated_convective_cloud_condesate_after_rainout + long_name = accumulatedconvective cloud condesate after rainout + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (control_for_deep_convection_scheme == identifier_for_grell_freitas_deep_convection) [pfi_lsan] standard_name = ice_flux_due_to_large_scale_precipitation long_name = instantaneous 3D flux of ice from nonconvective precipitation @@ -6474,6 +6498,22 @@ type = real kind = kind_phys active = ( control_for_deep_convection_scheme .ge. 0 .or. control_for_shallow_convection_scheme .ge. 0 ) +[ud_mf_accum] + standard_name = accumulated_atmosphere_updraft_convective_mass_flux + long_name = accumulated (updraft mass flux) * delt + units = kg m-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (control_for_deep_convection_scheme == identifier_for_grell_freitas_deep_convection) +[ud_mf_timeave] + standard_name = time_average_atmosphere_updraft_convective_mass_flux + long_name = time averaged (updraft mass flux) * delt + units = kg m-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (control_for_deep_convection_scheme == identifier_for_grell_freitas_deep_convection) [in_nm] standard_name = ice_nucleation_number_from_climatology long_name = ice nucleation number in MG MP diff --git a/ccpp/physics b/ccpp/physics index 2f2504c83..d7e413b93 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 2f2504c837fb40537defe803cfaefb98c2e1c025 +Subproject commit d7e413b9301e3d49f0cdeccddb7daf6b713860e2 diff --git a/io/FV3GFS_io.F90 b/io/FV3GFS_io.F90 index ef7cbf008..2e3fa5699 100644 --- a/io/FV3GFS_io.F90 +++ b/io/FV3GFS_io.F90 @@ -62,10 +62,11 @@ module FV3GFS_io_mod character(len=32) :: fn_phy = 'phy_data.nc' character(len=32) :: fn_dust12m= 'dust12m_data.nc' character(len=32) :: fn_emi = 'emi_data.nc' + character(len=32) :: fn_aod = 'aod.nc' character(len=32) :: fn_gbbepx = 'SMOKE_GBBEPx_data.nc' !--- GFDL FMS netcdf restart data types defined in fms2_io - type(FmsNetcdfDomainFile_t) :: Oro_restart, Sfc_restart, Phy_restart, dust12m_restart, emi_restart, gbbepx_restart + type(FmsNetcdfDomainFile_t) :: Oro_restart, Sfc_restart, Phy_restart, dust12m_restart, emi_restart, aod_restart, gbbepx_restart type(FmsNetcdfDomainFile_t) :: Oro_ls_restart, Oro_ss_restart !--- GFDL FMS restart containers @@ -74,10 +75,11 @@ module FV3GFS_io_mod character(len=32), allocatable, dimension(:) :: oro_ls_ss_name real(kind=kind_phys), allocatable, target, dimension(:,:,:) :: oro_ls_var, oro_ss_var real(kind=kind_phys), allocatable, target, dimension(:,:,:,:) :: sfc_var3, phy_var3 - character(len=32), allocatable, dimension(:) :: dust12m_name, emi_name, gbbepx_name + character(len=32), allocatable, dimension(:) :: dust12m_name, emi_name, aod_name, gbbepx_name real(kind=kind_phys), allocatable, target, dimension(:,:,:,:) :: gbbepx_var real(kind=kind_phys), allocatable, target, dimension(:,:,:,:) :: dust12m_var real(kind=kind_phys), allocatable, target, dimension(:,:,:) :: emi_var + real(kind=kind_phys), allocatable, target, dimension(:,:,:) :: aod_var !--- Noah MP restart containers real(kind=kind_phys), allocatable, target, dimension(:,:,:,:) :: sfc_var3sn,sfc_var3eq,sfc_var3zn @@ -522,7 +524,7 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_sta integer :: nvar_o2, nvar_s2m, nvar_s2o, nvar_s3 integer :: nvar_oro_ls_ss integer :: nvar_s2r, nvar_s2mp, nvar_s3mp, isnow - integer :: nvar_emi, nvar_dust12m, nvar_gbbepx + integer :: nvar_emi, nvar_aod, nvar_dust12m, nvar_gbbepx real(kind=kind_phys), pointer, dimension(:,:) :: var2_p => NULL() real(kind=kind_phys), pointer, dimension(:,:,:) :: var3_p => NULL() real(kind=kind_phys), pointer, dimension(:,:,:) :: var3_p1 => NULL() @@ -551,6 +553,7 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_sta nvar_gbbepx = 0 nvar_emi = 0 endif + nvar_aod = 1 if (Model%lsm == Model%lsm_ruc .and. warm_start) then if(Model%rdlai) then @@ -836,6 +839,45 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_sta deallocate(gbbepx_name, gbbepx_var) endif if_smoke ! RRFS_Smoke + !--- open assimilated aod file + infile=trim(indir)//'/'//trim(fn_aod) + amiopen=open_file(aod_restart, trim(infile), 'read', domain=fv_domain, is_restart=.true., dont_add_res_to_filename=.true.) + if (.not.amiopen) call mpp_error( FATAL, 'Error with opening file'//trim(infile) ) + + if (.not. allocated(aod_name)) then + !--- allocate the various containers needed for DA AOD data + allocate(aod_name(nvar_aod)) + allocate(aod_var(nx,ny,nvar_aod)) + + aod_name(1) = 'aod' + !--- register axis + call register_axis( aod_restart, "x", 'X' ) + call register_axis( aod_restart, "y", 'Y' ) + !--- register the 2D fields + do num = 1,nvar_aod + var2_p => aod_var(:,:,num) + call register_restart_field(aod_restart, aod_name(num), var2_p, dimensions=(/'y','x'/)) + enddo + nullify(var2_p) + endif + + !--- read new GSL created aod restart/data + call mpp_error(NOTE,'reading aod information from INPUT/aod_data.tile*.nc') + call read_restart(aod_restart) + call close_file(aod_restart) + + do nb = 1, Atm_block%nblks + !--- 2D variables + do ix = 1, Atm_block%blksz(nb) + i = Atm_block%index(nb)%ii(ix) - isc + 1 + j = Atm_block%index(nb)%jj(ix) - jsc + 1 + Sfcprop(nb)%aod_in(ix,1) = aod_var(i,j,1) + enddo + enddo + + !--- deallocate containers and free restart container + deallocate(aod_name, aod_var) + !--- Modify/read-in additional orographic static fields for GSL drag suite if (Model%gwd_opt==3 .or. Model%gwd_opt==33 .or. & Model%gwd_opt==2 .or. Model%gwd_opt==22 ) then From 9c9812b22086006d30e62bc4474554ea7d5b95ab Mon Sep 17 00:00:00 2001 From: hannah barnes Date: Wed, 14 Sep 2022 15:16:37 -0600 Subject: [PATCH 02/10] Fix sgscloud_radpre --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index d7e413b93..4cecc5261 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit d7e413b9301e3d49f0cdeccddb7daf6b713860e2 +Subproject commit 4cecc526161f398cd93d5eaf281bb9837bc61cc6 From 339dbe116bd07493727dee2cf5e897c92a0d74bb Mon Sep 17 00:00:00 2001 From: hannah barnes Date: Wed, 14 Sep 2022 15:29:46 -0600 Subject: [PATCH 03/10] - Fix to cu_gf_driver meta file --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 4cecc5261..1c3160ba0 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 4cecc526161f398cd93d5eaf281bb9837bc61cc6 +Subproject commit 1c3160ba03b09225c2693d1207eaec87a0b1276b From 2ef43c48b77dbe50a30252a29787c1839bcf4073 Mon Sep 17 00:00:00 2001 From: hannah barnes Date: Fri, 21 Oct 2022 14:16:27 -0600 Subject: [PATCH 04/10] - Switch added - Minor fixes to pass regression tests --- ccpp/data/GFS_typedefs.F90 | 16 ++++++++++++---- ccpp/data/GFS_typedefs.meta | 10 ++++++++-- ccpp/physics | 2 +- io/FV3GFS_io.F90 | 4 +++- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/ccpp/data/GFS_typedefs.F90 b/ccpp/data/GFS_typedefs.F90 index 138b48828..4642f1ee8 100644 --- a/ccpp/data/GFS_typedefs.F90 +++ b/ccpp/data/GFS_typedefs.F90 @@ -244,7 +244,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: emis_ice (:) => null() !< surface emissivity over ice for LSM real (kind=kind_phys), pointer :: emis_wat (:) => null() !< surface emissivity over water real (kind=kind_phys), pointer :: sfalb_lnd_bck (:) => null() !< snow-free albedo over land - real (kind=kind_phys), pointer :: aod_in (:,:) => null() !< anthropogenic background input + real (kind=kind_phys), pointer :: aod_in (:) => null() !< anthropogenic background input !--- In (radiation only) real (kind=kind_phys), pointer :: sncovr (:) => null() !< snow cover in fraction over land @@ -1022,6 +1022,9 @@ module GFS_typedefs integer :: imfshalcnv_gf = 3 !< flag for scale- & aerosol-aware Grell-Freitas scheme (GSD) integer :: imfshalcnv_ntiedtke = 4 !< flag for new Tiedtke scheme (CAPS) logical :: hwrf_samfdeep !< flag for HWRF SAMF deepcnv scheme (HWRF) + integer :: gf_aeroic !< flag determining which initial conditions to use for aerosol-aware gf + !< 1: MERRA2 climatology + !< 2: Analysis from chemistry model (user provided) integer :: imfdeepcnv !< flag for mass-flux deep convection scheme !< 1: July 2010 version of SAS conv scheme !< current operational version as of 2016 @@ -2071,7 +2074,7 @@ subroutine sfcprop_create (Sfcprop, IM, Model) allocate (Sfcprop%emis_lnd (IM)) allocate (Sfcprop%emis_ice (IM)) allocate (Sfcprop%emis_wat (IM)) - allocate (Sfcprop%aod_in (IM,1)) + allocate (Sfcprop%aod_in (IM)) Sfcprop%slmsk = clear_val Sfcprop%oceanfrac = clear_val @@ -3163,6 +3166,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !< 2: scale- & aerosol-aware mass-flux deep conv scheme (2017) !< 3: scale- & aerosol-aware Grell-Freitas scheme (GSD) !< 4: New Tiedtke scheme (CAPS) + integer :: gf_aeroic = 1 !< flag determining which initial conditions to use for aerosol-aware gf + !< 1: MERRA2 climatology + !< 2: Analysis from chemistry model (user provided) integer :: isatmedmf = 0 !< flag for scale-aware TKE-based moist edmf scheme !< 0: initial version of satmedmf (Nov. 2018) !< 1: updated version of satmedmf (as of May 2019) @@ -3475,8 +3481,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & hwrf_samfdeep, hwrf_samfshal, & h2o_phys, pdfcld, shcnvcw, redrag, hybedmf, satmedmf, & shinhong, do_ysu, dspheat, lheatstrg, lseaspray, cnvcld, & - random_clds, shal_cnv, imfshalcnv, imfdeepcnv, isatmedmf, & - do_deep, jcap, & + random_clds, shal_cnv, imfshalcnv, imfdeepcnv, gf_aeroic, & + isatmedmf, do_deep, jcap, & cs_parm, flgmin, cgwf, ccwf, cdmbgwd, sup, ctei_rm, crtrh, & dlqf, rbcr, shoc_parm, psauras, prauras, wminras, & do_sppt, do_shum, do_skeb, & @@ -4162,6 +4168,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%shal_cnv = shal_cnv Model%imfshalcnv = imfshalcnv Model%imfdeepcnv = imfdeepcnv + Model%gf_aeroic = gf_aeroic Model%isatmedmf = isatmedmf Model%do_deep = do_deep Model%nmtvr = nmtvr @@ -5859,6 +5866,7 @@ subroutine control_print(Model) print *, ' shal_cnv : ', Model%shal_cnv print *, ' imfshalcnv : ', Model%imfshalcnv print *, ' imfdeepcnv : ', Model%imfdeepcnv + print *, ' gf_aeroic : ', Model%gf_aeroic print *, ' do_deep : ', Model%do_deep print *, ' nmtvr : ', Model%nmtvr print *, ' jcap : ', Model%jcap diff --git a/ccpp/data/GFS_typedefs.meta b/ccpp/data/GFS_typedefs.meta index 0e86ec4da..14661bdaf 100644 --- a/ccpp/data/GFS_typedefs.meta +++ b/ccpp/data/GFS_typedefs.meta @@ -758,7 +758,7 @@ standard_name = assimilated_aod_input long_name = assimilated aod input units = none - dimensions = (horizontal_dimension,1) + dimensions = (horizontal_dimension) type = real kind = kind_phys active = (control_for_deep_convection_scheme == identifier_for_grell_freitas_deep_convection) @@ -4533,6 +4533,12 @@ units = flag dimensions = () type = logical +[gf_aeroic] + standard_name = control_for_gf_aerosol_initial_conditions + long_name = flag for initial conditions used in aerosol-aware GF + units = flag + dimensions = () + type = integer [isatmedmf] standard_name = choice_of_scale_aware_TKE_moist_EDMF_PBL long_name = choice of scale-aware TKE moist EDMF PBL scheme @@ -6542,7 +6548,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (control_for_deep_convection_scheme == identifier_for_grell_freitas_deep_convection) + active = (control_for_gf_aerosol_initial_conditions == 2) [imap] standard_name = map_of_block_column_number_to_global_i_index long_name = map of local index ix to global index i for this block diff --git a/ccpp/physics b/ccpp/physics index 1c3160ba0..f60168572 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 1c3160ba03b09225c2693d1207eaec87a0b1276b +Subproject commit f601685721d728509dcbcf492bdccaf11d59f178 diff --git a/io/FV3GFS_io.F90 b/io/FV3GFS_io.F90 index 2e3fa5699..c0e3b6bee 100644 --- a/io/FV3GFS_io.F90 +++ b/io/FV3GFS_io.F90 @@ -839,6 +839,7 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_sta deallocate(gbbepx_name, gbbepx_var) endif if_smoke ! RRFS_Smoke + gf_aeroic: if(Model%gf_aeroic.eq.2) then ! for chemistry analysis used in GF aerosol-aware !--- open assimilated aod file infile=trim(indir)//'/'//trim(fn_aod) amiopen=open_file(aod_restart, trim(infile), 'read', domain=fv_domain, is_restart=.true., dont_add_res_to_filename=.true.) @@ -871,12 +872,13 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_sta do ix = 1, Atm_block%blksz(nb) i = Atm_block%index(nb)%ii(ix) - isc + 1 j = Atm_block%index(nb)%jj(ix) - jsc + 1 - Sfcprop(nb)%aod_in(ix,1) = aod_var(i,j,1) + Sfcprop(nb)%aod_in(ix) = aod_var(i,j,1) enddo enddo !--- deallocate containers and free restart container deallocate(aod_name, aod_var) + endif gf_aeroic ! chemistry analysis used in GF aerosol-aware !--- Modify/read-in additional orographic static fields for GSL drag suite if (Model%gwd_opt==3 .or. Model%gwd_opt==33 .or. & From 2943ca423478e07b191ae522343cb41167049bba Mon Sep 17 00:00:00 2001 From: hannah barnes Date: Fri, 21 Oct 2022 15:02:54 -0600 Subject: [PATCH 05/10] - Text fix --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index f60168572..4af5f3b79 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit f601685721d728509dcbcf492bdccaf11d59f178 +Subproject commit 4af5f3b790da7ed687099d39ba270938c299b0ca From 0bf8d6c54202a15227c7c6d1ff294554a6035140 Mon Sep 17 00:00:00 2001 From: hannah barnes Date: Sun, 20 Nov 2022 11:55:55 -0700 Subject: [PATCH 06/10] - Added new variable to restart file --- ccpp/driver/GFS_restart.F90 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ccpp/driver/GFS_restart.F90 b/ccpp/driver/GFS_restart.F90 index 73e181b5f..086b79995 100644 --- a/ccpp/driver/GFS_restart.F90 +++ b/ccpp/driver/GFS_restart.F90 @@ -234,6 +234,13 @@ subroutine GFS_restart_populate (Restart, Model, Statein, Stateout, Sfcprop, & do nb = 1,nblks Restart%data(nb,num)%var2p => Tbd(nb)%aod_gf(:) enddo + if (Model%gf_aeroic == 2) then + num = num + 1 + Restart%name2d(num) = 'aod_in' + do nb = 1,nblks + Restart%data(nb,num)%var2p => Sfcprop(nb)%aod_in(:) + enddo + endif endif ! NoahMP if (Model%lsm == Model%lsm_noahmp) then From 8ac0aa76760d865450b947aba3553d4232538cd6 Mon Sep 17 00:00:00 2001 From: hannah barnes Date: Tue, 22 Nov 2022 06:59:23 -0700 Subject: [PATCH 07/10] - Fix restart file --- ccpp/driver/GFS_restart.F90 | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/ccpp/driver/GFS_restart.F90 b/ccpp/driver/GFS_restart.F90 index 086b79995..cc86ba1b5 100644 --- a/ccpp/driver/GFS_restart.F90 +++ b/ccpp/driver/GFS_restart.F90 @@ -234,13 +234,11 @@ subroutine GFS_restart_populate (Restart, Model, Statein, Stateout, Sfcprop, & do nb = 1,nblks Restart%data(nb,num)%var2p => Tbd(nb)%aod_gf(:) enddo - if (Model%gf_aeroic == 2) then - num = num + 1 - Restart%name2d(num) = 'aod_in' - do nb = 1,nblks - Restart%data(nb,num)%var2p => Sfcprop(nb)%aod_in(:) - enddo - endif + num = num + 1 + Restart%name2d(num) = 'aod_in' + do nb = 1,nblks + Restart%data(nb,num)%var2p => Sfcprop(nb)%aod_in(:) + enddo endif ! NoahMP if (Model%lsm == Model%lsm_noahmp) then From e3a2065dd87e0de15a282727c4d6b451d3ff8ae7 Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Wed, 23 Nov 2022 16:01:55 +0000 Subject: [PATCH 08/10] simplify code and add missing variables --- ccpp/driver/GFS_restart.F90 | 42 ++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/ccpp/driver/GFS_restart.F90 b/ccpp/driver/GFS_restart.F90 index cc86ba1b5..921cd4688 100644 --- a/ccpp/driver/GFS_restart.F90 +++ b/ccpp/driver/GFS_restart.F90 @@ -100,6 +100,9 @@ subroutine GFS_restart_populate (Restart, Model, Statein, Stateout, Sfcprop, & ! GF if (Model%imfdeepcnv == Model%imfdeepcnv_gf) then Restart%num2d = Restart%num2d + 3 + if(Model%gf_aeroic == 2) then + Restart%num2d = Restart%num2d + 1 + endif endif ! CA if (Model%imfdeepcnv == 2 .and. Model%do_ca) then @@ -132,13 +135,9 @@ subroutine GFS_restart_populate (Restart, Model, Statein, Stateout, Sfcprop, & if(Model%lrefres) then Restart%num3d = Model%ntot3d+1 endif - ! General Convection - if (Model%imfdeepcnv == Model%imfdeepcnv_gf) then - Restart%num3d = Restart%num3d + 1 - endif ! GF - if (Model%imfdeepcnv == 3) then - Restart%num3d = Restart%num3d + 3 + if (Model%imfdeepcnv == Model%imfdeepcnv_gf) then + Restart%num3d = Restart%num3d + 8 endif ! MYNN PBL if (Model%do_mynnedmf) then @@ -442,18 +441,17 @@ subroutine GFS_restart_populate (Restart, Model, Statein, Stateout, Sfcprop, & num = Model%ntot3d endif - !--Convection variable used in CB cloud fraction. Presently this - !--is only needed in sgscloud_radpre for imfdeepcnv == imfdeepcnv_gf. + ! GF if (Model%imfdeepcnv == Model%imfdeepcnv_gf) then + !--Convection variable used in CB cloud fraction. Presently this + !--is only needed in sgscloud_radpre for imfdeepcnv == imfdeepcnv_gf. num = num + 1 Restart%name3d(num) = 'cnv_3d_ud_mf' do nb = 1,nblks Restart%data(nb,num)%var3p => Tbd(nb)%ud_mf(:,:) enddo - endif - !--- RAP/HRRR-specific variables, 3D - ! GF - if (Model%imfdeepcnv == Model%imfdeepcnv_gf) then + + !--- RAP/HRRR-specific variables, 3D num = num + 1 Restart%name3d(num) = 'gf_3d_prevst' do nb = 1,nblks @@ -469,6 +467,26 @@ subroutine GFS_restart_populate (Restart, Model, Statein, Stateout, Sfcprop, & do nb = 1,nblks Restart%data(nb,num)%var3p => Coupling(nb)%qci_conv(:,:) enddo + num = num + 1 + Restart%name3d(num) = 'gf_ud_mf_accum' + do nb = 1,nblks + Restart%data(nb,num)%var3p => Tbd(nb)%ud_mf_accum(:,:) + enddo + num = num + 1 + Restart%name3d(num) = 'gf_ud_mf_timeave' + do nb = 1,nblks + Restart%data(nb,num)%var3p => Tbd(nb)%ud_mf_timeave(:,:) + enddo + num = num + 1 + Restart%name3d(num) = 'gf_qci_conv_accum' + do nb = 1,nblks + Restart%data(nb,num)%var3p => Coupling(nb)%qci_conv_accum(:,:) + enddo + num = num + 1 + Restart%name3d(num) = 'qci_conv_timeave' + do nb = 1,nblks + Restart%data(nb,num)%var3p => Coupling(nb)%qci_conv_timeave(:,:) + enddo endif ! MYNN PBL if (Model%do_mynnedmf) then From 789b896dbfc0f3ff40dbdea564d51b0be5012dee Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Fri, 17 Feb 2023 22:29:15 +0000 Subject: [PATCH 09/10] correct number of 2D vars to write for GF --- ccpp/driver/GFS_restart.F90 | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ccpp/driver/GFS_restart.F90 b/ccpp/driver/GFS_restart.F90 index 921cd4688..232fab6d2 100644 --- a/ccpp/driver/GFS_restart.F90 +++ b/ccpp/driver/GFS_restart.F90 @@ -99,10 +99,7 @@ subroutine GFS_restart_populate (Restart, Model, Statein, Stateout, Sfcprop, & ! GF if (Model%imfdeepcnv == Model%imfdeepcnv_gf) then - Restart%num2d = Restart%num2d + 3 - if(Model%gf_aeroic == 2) then - Restart%num2d = Restart%num2d + 1 - endif + Restart%num2d = Restart%num2d + 4 endif ! CA if (Model%imfdeepcnv == 2 .and. Model%do_ca) then From 2b5c6d9baedbef1f0fd41f0a0b40e0d1f6f3837d Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Wed, 12 Apr 2023 23:37:16 +0000 Subject: [PATCH 10/10] fix bugs that broke rap_restart test --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 4af5f3b79..d56ab386e 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 4af5f3b790da7ed687099d39ba270938c299b0ca +Subproject commit d56ab386e40ef8a5ee01aa5992acb83b6efc2999