From d1e30c2fec0f99ba37228a2425fa71d52fed4770 Mon Sep 17 00:00:00 2001 From: "Haiqin.Li" Date: Sat, 9 Mar 2024 00:04:38 +0000 Subject: [PATCH 01/12] "point to the mynn pbl, HAILCAST diagnostic updates" --- .gitmodules | 12 ++++++++---- atmos_cubed_sphere | 2 +- ccpp/driver/GFS_diagnostics.F90 | 12 ++++++++++++ ccpp/physics | 2 +- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/.gitmodules b/.gitmodules index 22c723ac1..9e649f087 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,15 +1,19 @@ [submodule "atmos_cubed_sphere"] path = atmos_cubed_sphere - url = https://github.com/NOAA-GFDL/GFDL_atmos_cubed_sphere - branch = dev/emc + #url = https://github.com/NOAA-GFDL/GFDL_atmos_cubed_sphere + #branch = dev/emc + url = https://github.com/grant-firl/GFDL_atmos_cubed_sphere + branch = rrfsv1-to-ufs/dev4 [submodule "ccpp/framework"] path = ccpp/framework url = https://github.com/NCAR/ccpp-framework branch = main [submodule "ccpp/physics"] path = ccpp/physics - url = https://github.com/ufs-community/ccpp-physics - branch = ufs/dev + #url = https://github.com/ufs-community/ccpp-physics + #branch = ufs/dev + url = https://github.com/grantfirl/ccpp-physics + branch = rrfsv1-to-ufs/dev4 [submodule "upp"] path = upp url = https://github.com/NOAA-EMC/UPP diff --git a/atmos_cubed_sphere b/atmos_cubed_sphere index 24686a256..a254cfe61 160000 --- a/atmos_cubed_sphere +++ b/atmos_cubed_sphere @@ -1 +1 @@ -Subproject commit 24686a2561f1414eb86c7b97c93960c36e4257b1 +Subproject commit a254cfe6163f2f10f1bbf4868ae6716770bfd08a diff --git a/ccpp/driver/GFS_diagnostics.F90 b/ccpp/driver/GFS_diagnostics.F90 index 4729819ea..20e8124b1 100644 --- a/ccpp/driver/GFS_diagnostics.F90 +++ b/ccpp/driver/GFS_diagnostics.F90 @@ -545,6 +545,18 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%data(nb)%var2 => IntDiag%fluxr(Model%chunk_begin(nb):Model%chunk_end(nb),32) enddo + idx = idx + 1 + ExtDiag(idx)%axes = 2 + ExtDiag(idx)%name = 'csdsf' + ExtDiag(idx)%desc = 'Clear Sky Instantateous Downward Short Wave Flux' + ExtDiag(idx)%unit = 'W/m**2' + ExtDiag(idx)%mod_name = 'gfs_phys' + ExtDiag(idx)%intpl_method = 'bilinear' + allocate (ExtDiag(idx)%data(nblks)) + do nb = 1,nblks + ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,32) + enddo + idx = idx + 1 ExtDiag(idx)%axes = 2 ExtDiag(idx)%name = 'csulf_ave' diff --git a/ccpp/physics b/ccpp/physics index f3eeb3442..dac2f23fa 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit f3eeb3442775b7239d98e3d09acc6d4f1d42233e +Subproject commit dac2f23faaa9d19609c9521ee6ca8d670b485002 From 6b98a779350ef1b6598a8a91509907fb2dc13fd4 Mon Sep 17 00:00:00 2001 From: "Haiqin.Li" Date: Wed, 13 Mar 2024 03:58:16 +0000 Subject: [PATCH 02/12] "point to the smoke updates for RRFS.v1" --- ccpp/data/GFS_typedefs.F90 | 16 ++++++++++++++-- ccpp/data/GFS_typedefs.meta | 23 ++++++++++++++++++++++- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/ccpp/data/GFS_typedefs.F90 b/ccpp/data/GFS_typedefs.F90 index 9e8bfc7d3..e0a38686b 100644 --- a/ccpp/data/GFS_typedefs.F90 +++ b/ccpp/data/GFS_typedefs.F90 @@ -655,6 +655,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: max_fplume (:) => null() !< maximum plume rise level real (kind=kind_phys), pointer :: uspdavg (:) => null() !< BL average wind speed real (kind=kind_phys), pointer :: hpbl_thetav (:) => null() !< BL depth parcel method + real (kind=kind_phys), pointer :: rho_dry (:,:) => null() !< dry air density 3D array !--- hourly fire potential index real (kind=kind_phys), pointer :: rrfs_hwp (:) => null() !< hourly fire potential index real (kind=kind_phys), pointer :: rrfs_hwp_ave (:) => null() !< *Average* hourly fire potential index @@ -1557,6 +1558,7 @@ module GFS_typedefs real(kind=kind_phys) :: dust_alpha !< alpha parameter for fengsha dust scheme real(kind=kind_phys) :: dust_gamma !< gamma parameter for fengsha dust scheme real(kind=kind_phys) :: wetdep_ls_alpha !< alpha parameter for wet deposition + real(kind=kind_phys) :: plume_alpha !< alpha parameter for plumerise scheme integer :: ebb_dcycle !< 1:retro; 2:forecast of fire emission integer :: seas_opt integer :: dust_opt @@ -1570,6 +1572,7 @@ module GFS_typedefs integer :: plumerisefire_frq integer :: n_dbg_lines integer :: smoke_forecast + logical :: add_fire_moist_flux ! Flag to add moisture fluxes based on PM2.5 emissions logical :: aero_ind_fdb ! WFA/IFA indirect logical :: aero_dir_fdb ! smoke/dust direct logical :: rrfs_smoke_debug @@ -2359,7 +2362,7 @@ subroutine sfcprop_create (Sfcprop, Model) allocate (Sfcprop%hprime (IM,Model%nmtvr)) allocate (Sfcprop%dust12m_in (IM,12,5)) allocate (Sfcprop%smoke_RRFS(IM,24,2)) - allocate (Sfcprop%smoke2d_RRFS(IM,4)) + allocate (Sfcprop%smoke2d_RRFS(IM,5)) allocate (Sfcprop%emi_in (IM,1)) allocate(Sfcprop%albdirvis_lnd (IM)) allocate(Sfcprop%albdirnir_lnd (IM)) @@ -3258,6 +3261,7 @@ subroutine coupling_create (Coupling, Model) allocate (Coupling%min_fplume(IM)) allocate (Coupling%max_fplume(IM)) allocate (Coupling%uspdavg(IM)) + allocate (Coupling%rho_dry (IM,Model%levs)) allocate (Coupling%hpbl_thetav(IM)) allocate (Coupling%rrfs_hwp (IM)) allocate (Coupling%rrfs_hwp_ave (IM)) @@ -3270,6 +3274,7 @@ subroutine coupling_create (Coupling, Model) Coupling%min_fplume = clear_val Coupling%max_fplume = clear_val Coupling%uspdavg = clear_val + Coupling%rho_dry = clear_val Coupling%hpbl_thetav = clear_val Coupling%rrfs_hwp = clear_val Coupling%rrfs_hwp_ave = clear_val @@ -3972,6 +3977,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & real(kind=kind_phys) :: dust_alpha = 0. real(kind=kind_phys) :: dust_gamma = 0. real(kind=kind_phys) :: wetdep_ls_alpha = 0.5 + real(kind=kind_phys) :: plume_alpha = 0.05 integer :: dust_moist_opt = 1 ! fecan :1 else shao integer :: ebb_dcycle = 1 ! 1:retro; 2:forecast integer :: seas_opt = 2 @@ -3982,10 +3988,11 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & logical :: extended_sd_diags = .false. integer :: wetdep_ls_opt = 1 logical :: do_plumerise = .false. + logical :: add_fire_moist_flux = .false. integer :: addsmoke_flag = 1 integer :: plumerisefire_frq = 60 integer :: n_dbg_lines = 3 - integer :: smoke_forecast = 0 ! RRFS-sd read in ebb_smoke + integer :: smoke_forecast = 2 ! RRFS-sd read in ebb_smoke logical :: aero_ind_fdb = .false. ! RRFS-sd wfa/ifa emission logical :: aero_dir_fdb = .false. ! RRFS-sd smoke/dust radiation feedback logical :: rrfs_smoke_debug = .false. ! RRFS-sd plumerise debug @@ -4164,6 +4171,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & rrfs_smoke_debug, do_plumerise, plumerisefire_frq, & addsmoke_flag, enh_mix, mix_chem, smoke_dir_fdb_coef, & do_smoke_transport,smoke_conv_wet_coef,n_dbg_lines, & + add_fire_moist_flux, plume_alpha, & !--- C3/GF closures ichoice,ichoicem,ichoice_s, & !--- (DFI) time ranges with radar-prescribed microphysics tendencies @@ -4404,6 +4412,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%dust_alpha = dust_alpha Model%dust_gamma = dust_gamma Model%wetdep_ls_alpha = wetdep_ls_alpha + Model%plume_alpha = plume_alpha Model%ebb_dcycle = ebb_dcycle Model%seas_opt = seas_opt Model%dust_opt = dust_opt @@ -4416,6 +4425,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%n_dbg_lines = n_dbg_lines Model%plumerisefire_frq = plumerisefire_frq Model%addsmoke_flag = addsmoke_flag + Model%add_fire_moist_flux = add_fire_moist_flux Model%smoke_forecast = smoke_forecast Model%aero_ind_fdb = aero_ind_fdb Model%aero_dir_fdb = aero_dir_fdb @@ -6542,6 +6552,7 @@ subroutine control_print(Model) print *, 'dust_alpha : ',Model%dust_alpha print *, 'dust_gamma : ',Model%dust_gamma print *, 'wetdep_ls_alpha : ',Model%wetdep_ls_alpha + print *, 'plume_alpha : ',Model%plume_alpha print *, 'ebb_dcycle : ',Model%ebb_dcycle print *, 'seas_opt : ',Model%seas_opt print *, 'dust_opt : ',Model%dust_opt @@ -6552,6 +6563,7 @@ subroutine control_print(Model) print *, 'wetdep_ls_opt : ',Model%wetdep_ls_opt print *, 'do_plumerise : ',Model%do_plumerise print *, 'plumerisefire_frq: ',Model%plumerisefire_frq + print *, 'add_fire_moist_flux: ',Model%add_fire_moist_flux print *, 'addsmoke_flag : ',Model%addsmoke_flag print *, 'smoke_forecast : ',Model%smoke_forecast print *, 'aero_ind_fdb : ',Model%aero_ind_fdb diff --git a/ccpp/data/GFS_typedefs.meta b/ccpp/data/GFS_typedefs.meta index 2fee7ba12..e789b6747 100644 --- a/ccpp/data/GFS_typedefs.meta +++ b/ccpp/data/GFS_typedefs.meta @@ -960,7 +960,7 @@ standard_name = emission_smoke_prvd_RRFS long_name = emission fire RRFS daily units = various - dimensions = (horizontal_dimension,4) + dimensions = (horizontal_dimension,5) type = real kind = kind_phys active = (do_smoke_coupling) @@ -3223,6 +3223,14 @@ type = real kind = kind_phys active = (do_smoke_coupling) +[rho_dry] + standard_name = dry_air_density + long_name = dry air density + units = kg m-3 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (do_smoke_coupling) [uspdavg] standard_name = mean_wind_speed_in_boundary_layer long_name = average wind speed within the boundary layer @@ -4936,6 +4944,12 @@ units = flag dimensions = () type = logical +[add_fire_moist_flux] + standard_name = flag_for_fire_moisture_flux + long_name = flag to add fire moisture flux + units = flag + dimensions = () + type = logical [isncond_opt] standard_name = control_for_soil_thermal_conductivity_option_in_ruc_lsm long_name = control for soil thermal conductivity option in RUC land surface model @@ -6863,6 +6877,13 @@ dimensions = () type = real kind = kind_phys +[plume_alpha] + standard_name = alpha_for_plumerise_scheme + long_name = alpha paramter for plumerise scheme + units = none + dimensions = () + type = real + kind = kind_phys [ebb_dcycle] standard_name = control_for_diurnal_cycle_of_biomass_burning_emissions long_name = rrfs smoke diurnal cycle option From e0ef2e853072ac4d259548ad4faabc438fdcb298 Mon Sep 17 00:00:00 2001 From: "Haiqin.Li" Date: Wed, 13 Mar 2024 04:00:59 +0000 Subject: [PATCH 03/12] "update input for smoke" --- io/fv3atm_rrfs_sd_io.F90 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/io/fv3atm_rrfs_sd_io.F90 b/io/fv3atm_rrfs_sd_io.F90 index 927607af9..0e515e4fc 100644 --- a/io/fv3atm_rrfs_sd_io.F90 +++ b/io/fv3atm_rrfs_sd_io.F90 @@ -63,7 +63,7 @@ module fv3atm_rrfs_sd_io integer, private :: nvar_dust12m = 5 integer, private :: nvar_emi = 1 integer, private :: nvar_fire = 2 - integer, private :: nvar_fire2d = 4 + integer, private :: nvar_fire2d = 5 character(len=32), pointer, dimension(:), private :: dust12m_name => null() character(len=32), pointer, dimension(:), private :: emi_name => null() @@ -578,6 +578,7 @@ subroutine rrfs_sd_emissions_register_fire(data, Model, restart, Atm_block) data%fire_name2d(2) = 'frp_davg' data%fire_name2d(3) = 'fire_end_hr' data%fire_name2d(4) = 'hwp_davg' + data%fire_name2d(5) = 'totprcp_24hrs' !--- register axis call register_axis(restart, 'lon', 'X') @@ -637,6 +638,7 @@ subroutine rrfs_sd_emissions_copy_fire(data, Model, Sfcprop, Atm_block) Sfcprop%smoke2d_RRFS(im,2) = data%fire_var2d(i,j,2) Sfcprop%smoke2d_RRFS(im,3) = data%fire_var2d(i,j,3) Sfcprop%smoke2d_RRFS(im,4) = data%fire_var2d(i,j,4) + Sfcprop%smoke2d_RRFS(im,5) = data%fire_var2d(i,j,5) else ! -- user define their own fire emission endif From 0a5def634ded9e1e1649cb7ebc29315f83404104 Mon Sep 17 00:00:00 2001 From: "Haiqin.Li" Date: Thu, 14 Mar 2024 14:46:55 +0000 Subject: [PATCH 04/12] "merge fv3atm PR #801 from Jili" --- ccpp/data/GFS_typedefs.F90 | 8 +++++++- ccpp/data/GFS_typedefs.meta | 6 ++++++ ccpp/suites/suite_RRFSens_phy1.xml | 2 ++ ccpp/suites/suite_RRFSens_phy4.xml | 2 ++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ccpp/data/GFS_typedefs.F90 b/ccpp/data/GFS_typedefs.F90 index e0a38686b..04fd7009a 100644 --- a/ccpp/data/GFS_typedefs.F90 +++ b/ccpp/data/GFS_typedefs.F90 @@ -1214,6 +1214,9 @@ module GFS_typedefs integer :: ichoice = 0 !< flag for closure of C3/GF deep convection integer :: ichoicem = 13!< flag for closure of C3/GF mid convection integer :: ichoice_s = 3 !< flag for closure of C3/GF shallow convection + integer :: conv_cf_opt !< option for convection scheme cloud fraction computation + !< 0: Chaboureau-Bechtold + !< 1: Xu-Randall integer :: nmtvr !< number of topographic variables such as variance etc !< used in the GWD parameterization - 10 more added if @@ -3741,6 +3744,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & logical :: hwrf_samfdeep = .false. !< flag for HWRF SAMF deepcnv scheme logical :: hwrf_samfshal = .false. !< flag for HWRF SAMF shalcnv scheme logical :: progsigma = .false. !< flag for prognostic updraft area fraction closure in saSAS or Unified conv. + integer :: conv_cf_opt = 0 !< option for convection scheme cloud fraction computation logical :: do_mynnedmf = .false. !< flag for MYNN-EDMF logical :: do_mynnsfclay = .false. !< flag for MYNN Surface Layer Scheme ! DH* TODO - move to MYNN namelist section @@ -4111,7 +4115,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & betadcu,h2o_phys, pdfcld, shcnvcw, redrag, hybedmf, satmedmf,& shinhong, do_ysu, dspheat, lheatstrg, lseaspray, cnvcld, & xr_cnvcld, random_clds, shal_cnv, imfshalcnv, imfdeepcnv, & - isatmedmf, do_deep, jcap, & + isatmedmf, conv_cf_opt, do_deep, jcap, & cs_parm, flgmin, cgwf, ccwf, cdmbgwd, alpha_fd, & psl_gwd_dx_factor, & sup, ctei_rm, crtrh, & @@ -4958,6 +4962,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%imfdeepcnv = imfdeepcnv Model%isatmedmf = isatmedmf Model%do_deep = do_deep + Model%conv_cf_opt = conv_cf_opt Model%nmtvr = nmtvr Model%jcap = jcap Model%flgmin = flgmin @@ -6841,6 +6846,7 @@ subroutine control_print(Model) print *, ' imfshalcnv : ', Model%imfshalcnv print *, ' imfdeepcnv : ', Model%imfdeepcnv print *, ' do_deep : ', Model%do_deep + print *, ' conv_cf_opt : ', Model%conv_cf_opt print *, ' nmtvr : ', Model%nmtvr print *, ' jcap : ', Model%jcap print *, ' cs_parm : ', Model%cs_parm diff --git a/ccpp/data/GFS_typedefs.meta b/ccpp/data/GFS_typedefs.meta index e789b6747..e9588be01 100644 --- a/ccpp/data/GFS_typedefs.meta +++ b/ccpp/data/GFS_typedefs.meta @@ -5652,6 +5652,12 @@ units = none dimensions = () type = integer +[conv_cf_opt] + standard_name = option_for_convection_scheme_cloud_fraction_computation + long_name = option for convection scheme cloud fraction computation + units = flag + dimensions = () + type = integer [nmtvr] standard_name = number_of_statistical_measures_of_subgrid_orography long_name = number of topographic variables in GWD diff --git a/ccpp/suites/suite_RRFSens_phy1.xml b/ccpp/suites/suite_RRFSens_phy1.xml index b7d007843..e5c6f7a91 100644 --- a/ccpp/suites/suite_RRFSens_phy1.xml +++ b/ccpp/suites/suite_RRFSens_phy1.xml @@ -13,12 +13,14 @@ GFS_suite_interstitial_rad_reset + sgscloud_radpre GFS_rrtmg_pre GFS_radiation_surface rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw + sgscloud_radpost rrtmg_lw_post GFS_rrtmg_post diff --git a/ccpp/suites/suite_RRFSens_phy4.xml b/ccpp/suites/suite_RRFSens_phy4.xml index 5b07083b9..5813576c8 100644 --- a/ccpp/suites/suite_RRFSens_phy4.xml +++ b/ccpp/suites/suite_RRFSens_phy4.xml @@ -13,12 +13,14 @@ GFS_suite_interstitial_rad_reset + sgscloud_radpre GFS_rrtmg_pre GFS_radiation_surface rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw + sgscloud_radpost rrtmg_lw_post GFS_rrtmg_post From 56621cb4fed14542336f0ac3284d324bfc386004 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Tue, 29 Oct 2024 16:09:22 -0400 Subject: [PATCH 05/12] fix horizontal_loop_extents in GFS_typedefs.meta --- ccpp/data/GFS_typedefs.meta | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ccpp/data/GFS_typedefs.meta b/ccpp/data/GFS_typedefs.meta index e9588be01..31e84f660 100644 --- a/ccpp/data/GFS_typedefs.meta +++ b/ccpp/data/GFS_typedefs.meta @@ -2367,7 +2367,7 @@ 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) + dimensions = (horizontal_dimension) type = real kind = kind_phys active = (do_fire_coupling) @@ -2375,7 +2375,7 @@ 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) + dimensions = (horizontal_dimension) type = real kind = kind_phys active = (do_fire_coupling) @@ -2383,7 +2383,7 @@ standard_name = smoke_emission_of_fire long_name = smoke emission of fire units = kg m-2 - dimensions = (horizontal_loop_extent) + dimensions = (horizontal_dimension) type = real kind = kind_phys active = (do_fire_coupling) @@ -3227,7 +3227,7 @@ standard_name = dry_air_density long_name = dry air density units = kg m-3 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) + dimensions = (horizontal_dimension,vertical_layer_dimension) type = real kind = kind_phys active = (do_smoke_coupling) From c06ba7f8584b1c9497d54275180bad9c54835764 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Fri, 8 Nov 2024 20:11:40 -0500 Subject: [PATCH 06/12] fix compilation error in GFS_diagnostics.F90 --- ccpp/driver/GFS_diagnostics.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/driver/GFS_diagnostics.F90 b/ccpp/driver/GFS_diagnostics.F90 index e769e90be..346662e3c 100644 --- a/ccpp/driver/GFS_diagnostics.F90 +++ b/ccpp/driver/GFS_diagnostics.F90 @@ -554,7 +554,7 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%intpl_method = 'bilinear' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks - ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,32) + ExtDiag(idx)%data(nb)%var2 => IntDiag%fluxr(Model%chunk_begin(nb):Model%chunk_end(nb),32) enddo idx = idx + 1 From 12f40191e7b97b60b29048d0a89feb9e638ff3fa Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Fri, 8 Nov 2024 21:18:03 -0500 Subject: [PATCH 07/12] update ccpp/physics submodule pointer --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index cf1bb8d67..ebc3fb310 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit cf1bb8d67a8dc709cf55233f2233ab32f808b35f +Subproject commit ebc3fb310429ba6017c4d27b297f80c8072bc110 From 812d158482729b827ffcb1a60df7a957f8a40ab1 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Mon, 2 Dec 2024 12:13:36 -0500 Subject: [PATCH 08/12] fix typo in .gitmodules --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 9e649f087..a20df6090 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,7 +2,7 @@ path = atmos_cubed_sphere #url = https://github.com/NOAA-GFDL/GFDL_atmos_cubed_sphere #branch = dev/emc - url = https://github.com/grant-firl/GFDL_atmos_cubed_sphere + url = https://github.com/grantfirl/GFDL_atmos_cubed_sphere branch = rrfsv1-to-ufs/dev4 [submodule "ccpp/framework"] path = ccpp/framework From d5c3a71050702d29b1257830ead1396fa7dcbc29 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Mon, 2 Dec 2024 13:13:03 -0500 Subject: [PATCH 09/12] update ccpp/framework commit hash --- ccpp/framework | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/framework b/ccpp/framework index b7d55fd07..9e1c3abe1 160000 --- a/ccpp/framework +++ b/ccpp/framework @@ -1 +1 @@ -Subproject commit b7d55fd07fa35c5de9b2292596d30784a800b276 +Subproject commit 9e1c3abe1048c0f18c53fdbb7113bc56a129bdf5 From 30345e8672d71e8f986c1cb4a3e5f98e1931b5cb Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Mon, 2 Dec 2024 14:34:01 -0500 Subject: [PATCH 10/12] make allocate spacing consistent --- ccpp/data/GFS_typedefs.F90 | 152 ++++++++++++++++++------------------- 1 file changed, 76 insertions(+), 76 deletions(-) diff --git a/ccpp/data/GFS_typedefs.F90 b/ccpp/data/GFS_typedefs.F90 index 5d027fa21..dd38035f7 100644 --- a/ccpp/data/GFS_typedefs.F90 +++ b/ccpp/data/GFS_typedefs.F90 @@ -2379,10 +2379,10 @@ subroutine sfcprop_create (Sfcprop, Model) allocate (Sfcprop%smoke_RRFS(IM,24,2)) allocate (Sfcprop%smoke2d_RRFS(IM,5)) allocate (Sfcprop%emi_in (IM,1)) - allocate(Sfcprop%albdirvis_lnd (IM)) - allocate(Sfcprop%albdirnir_lnd (IM)) - allocate(Sfcprop%albdifvis_lnd (IM)) - allocate(Sfcprop%albdifnir_lnd (IM)) + allocate (Sfcprop%albdirvis_lnd (IM)) + allocate (Sfcprop%albdirnir_lnd (IM)) + allocate (Sfcprop%albdifvis_lnd (IM)) + allocate (Sfcprop%albdifnir_lnd (IM)) allocate (Sfcprop%emis_lnd (IM)) allocate (Sfcprop%emis_ice (IM)) allocate (Sfcprop%emis_wat (IM)) @@ -2616,14 +2616,14 @@ subroutine sfcprop_create (Sfcprop, Model) end if if (Model%lsm == Model%lsm_ruc .or. Model%lsm == Model%lsm_noahmp .or. & (Model%lkm>0 .and. Model%iopt_lake==Model%iopt_lake_clm)) then - allocate(Sfcprop%raincprv (IM)) - allocate(Sfcprop%rainncprv (IM)) + allocate (Sfcprop%raincprv (IM)) + allocate (Sfcprop%rainncprv (IM)) Sfcprop%raincprv = clear_val Sfcprop%rainncprv = clear_val if (Model%lsm == Model%lsm_ruc .or. Model%lsm == Model%lsm_noahmp) then - allocate(Sfcprop%iceprv (IM)) - allocate(Sfcprop%snowprv (IM)) - allocate(Sfcprop%graupelprv(IM)) + allocate (Sfcprop%iceprv (IM)) + allocate (Sfcprop%snowprv (IM)) + allocate (Sfcprop%graupelprv(IM)) Sfcprop%iceprv = clear_val Sfcprop%snowprv = clear_val Sfcprop%graupelprv = clear_val @@ -2702,11 +2702,11 @@ subroutine sfcprop_create (Sfcprop, Model) Sfcprop%smoiseq = clear_val Sfcprop%zsnsoxy = clear_val - allocate(Sfcprop%draincprv (IM)) - allocate(Sfcprop%drainncprv (IM)) - allocate(Sfcprop%diceprv (IM)) - allocate(Sfcprop%dsnowprv (IM)) - allocate(Sfcprop%dgraupelprv(IM)) + allocate (Sfcprop%draincprv (IM)) + allocate (Sfcprop%drainncprv (IM)) + allocate (Sfcprop%diceprv (IM)) + allocate (Sfcprop%dsnowprv (IM)) + allocate (Sfcprop%dgraupelprv(IM)) Sfcprop%draincprv = clear_val Sfcprop%drainncprv = clear_val @@ -2717,11 +2717,11 @@ subroutine sfcprop_create (Sfcprop, Model) endif if (Model%do_myjsfc .or. Model%do_myjpbl) then - allocate(Sfcprop%z0base(IM)) + allocate (Sfcprop%z0base(IM)) Sfcprop%z0base = clear_val end if - allocate(Sfcprop%semisbase(IM)) + allocate (Sfcprop%semisbase(IM)) Sfcprop%semisbase = clear_val if (Model%lsm == Model%lsm_ruc) then @@ -2805,29 +2805,29 @@ subroutine sfcprop_create (Sfcprop, Model) ! CLM Lake Model variables if (Model%lkm/=0 .and. Model%iopt_lake==Model%iopt_lake_clm) then - allocate(Sfcprop%lake_t2m(IM)) - allocate(Sfcprop%lake_q2m(IM)) - allocate(Sfcprop%lake_albedo(IM)) - allocate(Sfcprop%input_lakedepth(IM)) - allocate(Sfcprop%lake_h2osno2d(IM)) - allocate(Sfcprop%lake_sndpth2d(IM)) - allocate(Sfcprop%lake_snl2d(IM)) - allocate(Sfcprop%lake_snow_z3d(IM,Model%nlevsnowsoil1_clm_lake)) - allocate(Sfcprop%lake_snow_dz3d(IM,Model%nlevsnowsoil1_clm_lake)) - allocate(Sfcprop%lake_snow_zi3d(IM,Model%nlevsnowsoil_clm_lake)) - allocate(Sfcprop%lake_h2osoi_vol3d(IM,Model%nlevsnowsoil1_clm_lake)) - allocate(Sfcprop%lake_h2osoi_liq3d(IM,Model%nlevsnowsoil1_clm_lake)) - allocate(Sfcprop%lake_h2osoi_ice3d(IM,Model%nlevsnowsoil1_clm_lake)) - allocate(Sfcprop%lake_tsfc(IM)) - allocate(Sfcprop%lake_t_soisno3d(IM,Model%nlevsnowsoil1_clm_lake)) - allocate(Sfcprop%lake_t_lake3d(IM,Model%nlevlake_clm_lake)) - allocate(Sfcprop%lake_savedtke12d(IM)) - allocate(Sfcprop%lake_icefrac3d(IM,Model%nlevlake_clm_lake)) - allocate(Sfcprop%lake_rho0(IM)) - allocate(Sfcprop%lake_ht(IM)) - allocate(Sfcprop%lake_is_salty(IM)) - allocate(Sfcprop%lake_cannot_freeze(IM)) - allocate(Sfcprop%clm_lake_initialized(IM)) + allocate (Sfcprop%lake_t2m(IM)) + allocate (Sfcprop%lake_q2m(IM)) + allocate (Sfcprop%lake_albedo(IM)) + allocate (Sfcprop%input_lakedepth(IM)) + allocate (Sfcprop%lake_h2osno2d(IM)) + allocate (Sfcprop%lake_sndpth2d(IM)) + allocate (Sfcprop%lake_snl2d(IM)) + allocate (Sfcprop%lake_snow_z3d(IM,Model%nlevsnowsoil1_clm_lake)) + allocate (Sfcprop%lake_snow_dz3d(IM,Model%nlevsnowsoil1_clm_lake)) + allocate (Sfcprop%lake_snow_zi3d(IM,Model%nlevsnowsoil_clm_lake)) + allocate (Sfcprop%lake_h2osoi_vol3d(IM,Model%nlevsnowsoil1_clm_lake)) + allocate (Sfcprop%lake_h2osoi_liq3d(IM,Model%nlevsnowsoil1_clm_lake)) + allocate (Sfcprop%lake_h2osoi_ice3d(IM,Model%nlevsnowsoil1_clm_lake)) + allocate (Sfcprop%lake_tsfc(IM)) + allocate (Sfcprop%lake_t_soisno3d(IM,Model%nlevsnowsoil1_clm_lake)) + allocate (Sfcprop%lake_t_lake3d(IM,Model%nlevlake_clm_lake)) + allocate (Sfcprop%lake_savedtke12d(IM)) + allocate (Sfcprop%lake_icefrac3d(IM,Model%nlevlake_clm_lake)) + allocate (Sfcprop%lake_rho0(IM)) + allocate (Sfcprop%lake_ht(IM)) + allocate (Sfcprop%lake_is_salty(IM)) + allocate (Sfcprop%lake_cannot_freeze(IM)) + allocate (Sfcprop%clm_lake_initialized(IM)) Sfcprop%lake_t2m = clear_val Sfcprop%lake_q2m = clear_val @@ -3209,7 +3209,7 @@ subroutine coupling_create (Coupling, Model) end if if(Model%progsigma)then - allocate(Coupling%dqdt_qmicro (IM,Model%levs)) + allocate (Coupling%dqdt_qmicro (IM,Model%levs)) Coupling%dqdt_qmicro = clear_val endif @@ -4241,7 +4241,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !--- read in the namelist #ifdef INTERNAL_FILE_NML ! allocate required to work around GNU compiler bug 100886 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100886 - allocate(Model%input_nml_file, mold=input_nml_file) + allocate (Model%input_nml_file, mold=input_nml_file) Model%input_nml_file => input_nml_file read(Model%input_nml_file, nml=gfs_physics_nml) ! Set length (number of lines) in namelist for internal reads @@ -4368,11 +4368,11 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%naux2d = naux2d Model%naux3d = naux3d if (Model%naux2d>0) then - allocate(Model%aux2d_time_avg(1:naux2d)) + allocate (Model%aux2d_time_avg(1:naux2d)) Model%aux2d_time_avg(1:naux2d) = aux2d_time_avg(1:naux2d) end if if (Model%naux3d>0) then - allocate(Model%aux3d_time_avg(1:naux3d)) + allocate (Model%aux3d_time_avg(1:naux3d)) Model%aux3d_time_avg(1:naux3d) = aux3d_time_avg(1:naux3d) end if ! @@ -4388,8 +4388,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%nx = nx Model%ny = ny Model%levs = levs - allocate(Model%ak(1:size(ak))) - allocate(Model%bk(1:size(bk))) + allocate (Model%ak(1:size(ak))) + allocate (Model%bk(1:size(bk))) Model%ak = ak Model%bk = bk Model%levsp1 = Model%levs + 1 @@ -4399,13 +4399,13 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%lonr = gnx ! number longitudinal points Model%latr = gny ! number of latitudinal points from pole to pole Model%nblks = size(blksz) - allocate(Model%blksz(1:Model%nblks)) + allocate (Model%blksz(1:Model%nblks)) Model%blksz = blksz Model%ncols = sum(Model%blksz) ! DH* Model%nchunks = size(blksz) - allocate(Model%chunk_begin(Model%nchunks)) - allocate(Model%chunk_end(Model%nchunks)) + allocate (Model%chunk_begin(Model%nchunks)) + allocate (Model%chunk_end(Model%nchunks)) Model%chunk_begin(1) = 1 Model%chunk_end(1) = Model%chunk_begin(1) + blksz(1) - 1 do i=2,Model%nchunks @@ -5155,16 +5155,16 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%n_var_spp = n_var_spp if (Model%lndp_type/=0) then - allocate(Model%lndp_var_list(Model%n_var_lndp)) - allocate(Model%lndp_prt_list(Model%n_var_lndp)) + allocate (Model%lndp_var_list(Model%n_var_lndp)) + allocate (Model%lndp_prt_list(Model%n_var_lndp)) Model%lndp_var_list(:) = '' Model%lndp_prt_list(:) = clear_val end if if (Model%do_spp) then - allocate(Model%spp_var_list(Model%n_var_spp)) - allocate(Model%spp_prt_list(Model%n_var_spp)) - allocate(Model%spp_stddev_cutoff(Model%n_var_spp)) + allocate (Model%spp_var_list(Model%n_var_spp)) + allocate (Model%spp_prt_list(Model%n_var_spp)) + allocate (Model%spp_stddev_cutoff(Model%n_var_spp)) Model%spp_var_list(:) = '' Model%spp_prt_list(:) = clear_val Model%spp_stddev_cutoff(:) = clear_val @@ -5172,7 +5172,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !--- cellular automata options ! force namelist constsitency - allocate(Model%vfact_ca(levs)) + allocate (Model%vfact_ca(levs)) if ( .not. ca_global ) nca_g=0 if ( .not. ca_sgs ) nca=0 @@ -5300,7 +5300,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%nprocess = Model%index_of_process_photochem ! List which processes should be summed as photochemical: - allocate(Model%is_photochem(Model%nprocess)) + allocate (Model%is_photochem(Model%nprocess)) Model%is_photochem = .false. Model%is_photochem(Model%index_of_process_prod_loss) = .true. Model%is_photochem(Model%index_of_process_ozmix) = .true. @@ -5314,7 +5314,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & ! Last index of outermost dimension of dtend Model%ndtend = 0 - allocate(Model%dtidx(Model%ntracp100,Model%nprocess)) + allocate (Model%dtidx(Model%ntracp100,Model%nprocess)) Model%dtidx = -99 if(Model%ntchm>0) then @@ -5736,7 +5736,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & endif Model%jdat(1:8) = jdat(1:8) - allocate(Model%si(Model%levs+1)) + allocate (Model%si(Model%levs+1)) !--- Define sigma level for radiation initialization !--- The formula converting hybrid sigma pressure coefficients to sigma coefficients follows Eckermann (2009, MWR) !--- ps is replaced with p0. The value of p0 uses that in http://www.emc.ncep.noaa.gov/officenotes/newernotes/on461.pdf @@ -6477,7 +6477,7 @@ subroutine control_scavenging_initialize(Model, fscav) real(kind=kind_phys) :: tem !--- begin - allocate(Model%fscav(Model%ntchm)) + allocate (Model%fscav(Model%ntchm)) if (Model%ntchm > 0) then !--- set default as no scavenging @@ -7244,11 +7244,11 @@ subroutine tbd_create (Tbd, Model) nullify(Tbd%dfi_radar_tten) nullify(Tbd%cap_suppress) if(Model%num_dfi_radar>0) then - allocate(Tbd%dfi_radar_tten(IM,Model%levs,Model%num_dfi_radar)) + allocate (Tbd%dfi_radar_tten(IM,Model%levs,Model%num_dfi_radar)) Tbd%dfi_radar_tten = -20.0 Tbd%dfi_radar_tten(:,1,:) = zero if(Model%do_cap_suppress) then - allocate(Tbd%cap_suppress(IM,Model%num_dfi_radar)) + allocate (Tbd%cap_suppress(IM,Model%num_dfi_radar)) Tbd%cap_suppress(:,:) = zero endif endif @@ -7324,28 +7324,28 @@ subroutine tbd_create (Tbd, Model) Tbd%hpbl = clear_val if (Model%imfdeepcnv == Model%imfdeepcnv_gf .or. Model%imfdeepcnv == Model%imfdeepcnv_ntiedtke .or. Model%imfdeepcnv == Model%imfdeepcnv_samf .or. Model%imfshalcnv == Model%imfshalcnv_samf .or. Model%imfdeepcnv == Model%imfdeepcnv_c3 .or. Model%imfshalcnv == Model%imfshalcnv_c3) then - allocate(Tbd%prevsq(IM, Model%levs)) + allocate (Tbd%prevsq(IM, Model%levs)) Tbd%prevsq = clear_val endif if (Model%imfdeepcnv .ge. 0 .or. Model%imfshalcnv .ge. 0) then - allocate(Tbd%ud_mf(IM, Model%levs)) + allocate (Tbd%ud_mf(IM, Model%levs)) Tbd%ud_mf = zero endif if (Model%imfdeepcnv == Model%imfdeepcnv_gf .or. Model%imfdeepcnv == Model%imfdeepcnv_ntiedtke .or. Model%imfdeepcnv == Model%imfdeepcnv_c3) then - allocate(Tbd%forcet(IM, Model%levs)) - allocate(Tbd%forceq(IM, Model%levs)) - allocate(Tbd%prevst(IM, Model%levs)) + allocate (Tbd%forcet(IM, Model%levs)) + allocate (Tbd%forceq(IM, Model%levs)) + allocate (Tbd%prevst(IM, Model%levs)) Tbd%forcet = clear_val Tbd%forceq = clear_val Tbd%prevst = clear_val end if if (Model%imfdeepcnv == Model%imfdeepcnv_gf .or. Model%imfdeepcnv == Model%imfdeepcnv_c3) then - allocate(Tbd%cactiv(IM)) - allocate(Tbd%cactiv_m(IM)) - allocate(Tbd%aod_gf(IM)) + allocate (Tbd%cactiv(IM)) + allocate (Tbd%cactiv_m(IM)) + allocate (Tbd%aod_gf(IM)) Tbd%cactiv = zero Tbd%cactiv_m = zero Tbd%aod_gf = zero @@ -7655,8 +7655,8 @@ subroutine allocate_dtend_labels_and_causes(Model) type(GFS_control_type), intent(inout) :: Model integer :: i - allocate(Model%dtend_var_labels(Model%ntracp100)) - allocate(Model%dtend_process_labels(Model%nprocess)) + allocate (Model%dtend_var_labels(Model%ntracp100)) + allocate (Model%dtend_process_labels(Model%nprocess)) Model%dtend_var_labels(1)%name = 'unallocated' Model%dtend_var_labels(1)%desc = 'unallocated tracer' @@ -7728,7 +7728,7 @@ subroutine diag_create (Diag, Model) IM = Model%ncols if(Model%print_diff_pgr) then - allocate(Diag%old_pgr(IM)) + allocate (Diag%old_pgr(IM)) Diag%old_pgr = clear_val endif @@ -7865,7 +7865,7 @@ subroutine diag_create (Diag, Model) !--- 3D diagnostics if (Model%ldiag3d) then - allocate(Diag%dtend(IM,Model%levs,Model%ndtend)) + allocate (Diag%dtend(IM,Model%levs,Model%ndtend)) Diag%dtend = clear_val if (Model%qdiag3d) then allocate (Diag%upd_mf (IM,Model%levs)) @@ -7873,10 +7873,10 @@ subroutine diag_create (Diag, Model) allocate (Diag%det_mf (IM,Model%levs)) endif if (Model%oz_phys_2015) then - allocate(Diag%do3_dt_prd( IM, Model%levs)) - allocate(Diag%do3_dt_ozmx(IM, Model%levs)) - allocate(Diag%do3_dt_temp(IM, Model%levs)) - allocate(Diag%do3_dt_ohoz(IM, Model%levs)) + allocate (Diag%do3_dt_prd( IM, Model%levs)) + allocate (Diag%do3_dt_ozmx(IM, Model%levs)) + allocate (Diag%do3_dt_temp(IM, Model%levs)) + allocate (Diag%do3_dt_ohoz(IM, Model%levs)) endif endif From 7e7719927a80104d1bb4badf790e509f1e4d39b8 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Mon, 2 Dec 2024 14:35:19 -0500 Subject: [PATCH 11/12] make allocate spacing consistent --- ccpp/data/CCPP_typedefs.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ccpp/data/CCPP_typedefs.F90 b/ccpp/data/CCPP_typedefs.F90 index 2a0355264..1f5deaec2 100644 --- a/ccpp/data/CCPP_typedefs.F90 +++ b/ccpp/data/CCPP_typedefs.F90 @@ -1620,8 +1620,8 @@ subroutine gfdl_interstitial_create (Interstitial, is, ie, isd, ied, js, je, jsd else Interstitial%ngas = 0 end if - allocate(Interstitial%rilist(0:Interstitial%ngas)) - allocate(Interstitial%cpilist(0:Interstitial%ngas)) + allocate (Interstitial%rilist(0:Interstitial%ngas)) + allocate (Interstitial%cpilist(0:Interstitial%ngas)) if (present(rilist)) then Interstitial%rilist = rilist(0:Interstitial%ngas) Interstitial%cpilist = cpilist(0:Interstitial%ngas) From 8e5aa719f8c6d2e55de2769662c908986c9f1470 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Thu, 5 Dec 2024 20:23:18 -0500 Subject: [PATCH 12/12] update ccpp/physics and atmos_cubed_sphere --- .gitmodules | 12 ++++-------- atmos_cubed_sphere | 2 +- ccpp/physics | 2 +- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.gitmodules b/.gitmodules index a20df6090..22c723ac1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,19 +1,15 @@ [submodule "atmos_cubed_sphere"] path = atmos_cubed_sphere - #url = https://github.com/NOAA-GFDL/GFDL_atmos_cubed_sphere - #branch = dev/emc - url = https://github.com/grantfirl/GFDL_atmos_cubed_sphere - branch = rrfsv1-to-ufs/dev4 + url = https://github.com/NOAA-GFDL/GFDL_atmos_cubed_sphere + branch = dev/emc [submodule "ccpp/framework"] path = ccpp/framework url = https://github.com/NCAR/ccpp-framework branch = main [submodule "ccpp/physics"] path = ccpp/physics - #url = https://github.com/ufs-community/ccpp-physics - #branch = ufs/dev - url = https://github.com/grantfirl/ccpp-physics - branch = rrfsv1-to-ufs/dev4 + url = https://github.com/ufs-community/ccpp-physics + branch = ufs/dev [submodule "upp"] path = upp url = https://github.com/NOAA-EMC/UPP diff --git a/atmos_cubed_sphere b/atmos_cubed_sphere index f28be0e88..9490871a6 160000 --- a/atmos_cubed_sphere +++ b/atmos_cubed_sphere @@ -1 +1 @@ -Subproject commit f28be0e882fe53886d23076f56908588eac676c2 +Subproject commit 9490871a616604efe9dd75608214081eef557ad6 diff --git a/ccpp/physics b/ccpp/physics index c2fb52eac..dab57fcce 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit c2fb52eacb4e0402b2c307241c0c3acb0ea81b1c +Subproject commit dab57fcce3f1abf16eb01f22469ea84279f67b19