Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fourth reconciliation PR from production/RRFS.v1 #883

Merged
merged 14 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -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/grantfirl/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
Expand Down
2 changes: 1 addition & 1 deletion atmos_cubed_sphere
24 changes: 21 additions & 3 deletions ccpp/data/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,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
Expand Down Expand Up @@ -1221,6 +1222,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
Expand Down Expand Up @@ -1565,6 +1569,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
Expand All @@ -1578,6 +1583,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
Expand Down Expand Up @@ -2371,7 +2377,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))
BrianCurtis-NOAA marked this conversation as resolved.
Show resolved Hide resolved
allocate(Sfcprop%albdirnir_lnd (IM))
Expand Down Expand Up @@ -3269,6 +3275,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))
Expand All @@ -3281,6 +3288,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
Expand Down Expand Up @@ -3747,6 +3755,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
Expand Down Expand Up @@ -3983,6 +3992,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
Expand All @@ -3993,10 +4003,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
Expand Down Expand Up @@ -4127,7 +4138,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, &
Expand Down Expand Up @@ -4187,6 +4198,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
Expand Down Expand Up @@ -4433,6 +4445,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
Expand All @@ -4445,6 +4458,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
Expand Down Expand Up @@ -4977,6 +4991,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
Expand Down Expand Up @@ -6581,6 +6596,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
Expand All @@ -6591,6 +6607,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
Expand Down Expand Up @@ -6868,6 +6885,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
Expand Down
35 changes: 31 additions & 4 deletions ccpp/data/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -2369,23 +2369,23 @@
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)
jkbk2004 marked this conversation as resolved.
Show resolved Hide resolved
dimensions = (horizontal_dimension)
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)
dimensions = (horizontal_dimension)
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)
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
active = (do_fire_coupling)
Expand Down Expand Up @@ -3244,6 +3244,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_dimension,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
Expand Down Expand Up @@ -4957,6 +4965,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
Expand Down Expand Up @@ -5659,6 +5673,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
Expand Down Expand Up @@ -6884,6 +6904,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
Expand Down
12 changes: 12 additions & 0 deletions ccpp/driver/GFS_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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%fluxr(Model%chunk_begin(nb):Model%chunk_end(nb),32)
enddo

idx = idx + 1
ExtDiag(idx)%axes = 2
ExtDiag(idx)%name = 'csulf_ave'
Expand Down
2 changes: 2 additions & 0 deletions ccpp/suites/suite_RRFSens_phy1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@
<group name="radiation">
<subcycle loop="1">
<scheme>GFS_suite_interstitial_rad_reset</scheme>
<scheme>sgscloud_radpre</scheme>
<scheme>GFS_rrtmg_pre</scheme>
<scheme>GFS_radiation_surface</scheme>
<scheme>rad_sw_pre</scheme>
<scheme>rrtmg_sw</scheme>
<scheme>rrtmg_sw_post</scheme>
<scheme>rrtmg_lw</scheme>
<scheme>sgscloud_radpost</scheme>
<scheme>rrtmg_lw_post</scheme>
<scheme>GFS_rrtmg_post</scheme>
</subcycle>
Expand Down
2 changes: 2 additions & 0 deletions ccpp/suites/suite_RRFSens_phy4.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@
<group name="radiation">
<subcycle loop="1">
<scheme>GFS_suite_interstitial_rad_reset</scheme>
<scheme>sgscloud_radpre</scheme>
<scheme>GFS_rrtmg_pre</scheme>
<scheme>GFS_radiation_surface</scheme>
<scheme>rad_sw_pre</scheme>
<scheme>rrtmg_sw</scheme>
<scheme>rrtmg_sw_post</scheme>
<scheme>rrtmg_lw</scheme>
<scheme>sgscloud_radpost</scheme>
<scheme>rrtmg_lw_post</scheme>
<scheme>GFS_rrtmg_post</scheme>
</subcycle>
Expand Down
4 changes: 3 additions & 1 deletion io/fv3atm_rrfs_sd_io.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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')
Expand Down Expand Up @@ -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
Expand Down
Loading