Skip to content

Commit

Permalink
updates to work with UFS/dev PR#102
Browse files Browse the repository at this point in the history
  • Loading branch information
grantfirl committed Dec 2, 2023
1 parent 4413483 commit f935528
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 95 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#url = https://github.com/NCAR/ccpp-physics
#branch = main
url = https://github.com/grantfirl/ccpp-physics
branch = ufs-dev-PR98
branch = ufs-dev-PR102
[submodule "CMakeModules"]
path = CMakeModules
url = https://github.com/noaa-emc/CMakeModules
Expand Down
43 changes: 16 additions & 27 deletions scm/src/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -424,13 +424,7 @@ module GFS_typedefs

! CLM Lake model internal variables:
real (kind=kind_phys), pointer :: lake_albedo(:) => null() !
real (kind=kind_phys), pointer :: lake_z3d(:,:) => null() !
real (kind=kind_phys), pointer :: lake_dz3d(:,:) => null() !
real (kind=kind_phys), pointer :: lake_soil_watsat3d(:,:) => null() !
real (kind=kind_phys), pointer :: lake_csol3d(:,:) => null() !
real (kind=kind_phys), pointer :: lake_soil_tkmg3d(:,:) => null() !
real (kind=kind_phys), pointer :: lake_soil_tkdry3d(:,:) => null() !
real (kind=kind_phys), pointer :: lake_soil_tksatu3d(:,:) => null() !
real (kind=kind_phys), pointer :: input_lakedepth(:) => null() !
real (kind=kind_phys), pointer :: lake_h2osno2d(:) => null() !
real (kind=kind_phys), pointer :: lake_sndpth2d(:) => null() !
real (kind=kind_phys), pointer :: lake_snl2d(:) => null() !
Expand All @@ -447,8 +441,6 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: lake_icefrac3d(:,:)=> null()
real (kind=kind_phys), pointer :: lake_rho0(:)=> null()
real (kind=kind_phys), pointer :: lake_ht(:)=> null()
real (kind=kind_phys), pointer :: lake_clay3d(:,:) => null()
real (kind=kind_phys), pointer :: lake_sand3d(:,:) => null()
integer, pointer :: lake_is_salty(:) => null()
integer, pointer :: lake_cannot_freeze(:) => null()
real (kind=kind_phys), pointer :: clm_lake_initialized(:) => null() !< lakeini was called
Expand Down Expand Up @@ -1495,6 +1487,9 @@ module GFS_typedefs
integer :: ncnvwind !< the index of surface wind enhancement due to convection for MYNN SFC and RAS CNV in phy f2d

!-- nml variables for RRFS-SD
real(kind=kind_phys) :: dust_drylimit_factor !< factor for drylimit parameterization in fengsha
real(kind=kind_phys) :: dust_moist_correction !< factor to tune volumetric soil moisture
integer :: dust_moist_opt !< dust moisture option 1:fecan 2:shao
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
Expand Down Expand Up @@ -2705,13 +2700,7 @@ subroutine sfcprop_create (Sfcprop, IM, Model)
allocate(Sfcprop%lake_t2m(IM))
allocate(Sfcprop%lake_q2m(IM))
allocate(Sfcprop%lake_albedo(IM))
allocate(Sfcprop%lake_z3d(IM,Model%nlevlake_clm_lake))
allocate(Sfcprop%lake_dz3d(IM,Model%nlevlake_clm_lake))
allocate(Sfcprop%lake_soil_watsat3d(IM,Model%nlevlake_clm_lake))
allocate(Sfcprop%lake_csol3d(IM,Model%nlevlake_clm_lake))
allocate(Sfcprop%lake_soil_tkmg3d(IM,Model%nlevlake_clm_lake))
allocate(Sfcprop%lake_soil_tkdry3d(IM,Model%nlevlake_clm_lake))
allocate(Sfcprop%lake_soil_tksatu3d(IM,Model%nlevlake_clm_lake))
allocate(Sfcprop%input_lakedepth(IM))
allocate(Sfcprop%lake_h2osno2d(IM))
allocate(Sfcprop%lake_sndpth2d(IM))
allocate(Sfcprop%lake_snl2d(IM))
Expand All @@ -2728,22 +2717,14 @@ subroutine sfcprop_create (Sfcprop, IM, Model)
allocate(Sfcprop%lake_icefrac3d(IM,Model%nlevlake_clm_lake))
allocate(Sfcprop%lake_rho0(IM))
allocate(Sfcprop%lake_ht(IM))
allocate(Sfcprop%lake_clay3d(IM,Model%nlevsoil_clm_lake))
allocate(Sfcprop%lake_sand3d(IM,Model%nlevsoil_clm_lake))
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
Sfcprop%lake_albedo = clear_val
Sfcprop%lake_z3d = clear_val
Sfcprop%lake_dz3d = clear_val
Sfcprop%lake_soil_watsat3d = clear_val
Sfcprop%lake_csol3d = clear_val
Sfcprop%lake_soil_tkmg3d = clear_val
Sfcprop%lake_soil_tkdry3d = clear_val
Sfcprop%lake_soil_tksatu3d = clear_val
Sfcprop%input_lakedepth = clear_val
Sfcprop%lake_h2osno2d = clear_val
Sfcprop%lake_sndpth2d = clear_val
Sfcprop%lake_snl2d = clear_val
Expand All @@ -2760,8 +2741,6 @@ subroutine sfcprop_create (Sfcprop, IM, Model)
Sfcprop%lake_icefrac3d = clear_val
Sfcprop%lake_rho0 = -111
Sfcprop%lake_ht = -111
Sfcprop%lake_clay3d = clear_val
Sfcprop%lake_sand3d = clear_val
Sfcprop%lake_is_salty = zero
Sfcprop%lake_cannot_freeze = zero
Sfcprop%clm_lake_initialized = zero
Expand Down Expand Up @@ -3821,9 +3800,12 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
integer :: ichoice_s = 3 !< flag for closure of C3/GF shallow convection

!-- chem nml variables for RRFS-SD
real(kind=kind_phys) :: dust_drylimit_factor = 1.0
real(kind=kind_phys) :: dust_moist_correction = 1.0
real(kind=kind_phys) :: dust_alpha = 0.
real(kind=kind_phys) :: dust_gamma = 0.
real(kind=kind_phys) :: wetdep_ls_alpha = 0.
integer :: dust_moist_opt = 1 ! fecan :1 else shao
integer :: seas_opt = 2
integer :: dust_opt = 5
integer :: drydep_opt = 1
Expand Down Expand Up @@ -4000,6 +3982,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
!--- aerosol scavenging factors ('name:value' string array)
fscav_aero, &
!--- RRFS-SD namelist
dust_drylimit_factor, dust_moist_correction, dust_moist_opt, &
dust_alpha, dust_gamma, wetdep_ls_alpha, &
seas_opt, dust_opt, drydep_opt, coarsepm_settling, &
wetdep_ls_opt, smoke_forecast, aero_ind_fdb, aero_dir_fdb, &
Expand Down Expand Up @@ -4268,6 +4251,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &

!--- RRFS-SD
Model%rrfs_sd = rrfs_sd
Model%dust_drylimit_factor = dust_drylimit_factor
Model%dust_moist_correction = dust_moist_correction
Model%dust_moist_opt = dust_moist_opt
Model%dust_alpha = dust_alpha
Model%dust_gamma = dust_gamma
Model%wetdep_ls_alpha = wetdep_ls_alpha
Expand Down Expand Up @@ -6368,6 +6354,9 @@ subroutine control_print(Model)
if(model%rrfs_sd) then
print *, ' '
print *, 'smoke parameters'
print *, 'dust_drylimit_factor: ',Model%dust_drylimit_factor
print *, 'dust_moist_correction: ',Model%dust_moist_correction
print *, 'dust_moist_opt : ',Model%dust_moist_opt
print *, 'dust_alpha : ',Model%dust_alpha
print *, 'dust_gamma : ',Model%dust_gamma
print *, 'wetdep_ls_alpha : ',Model%wetdep_ls_alpha
Expand Down
93 changes: 27 additions & 66 deletions scm/src/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -2048,59 +2048,11 @@
type = real
kind = kind_phys
active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0)
[lake_z3d]
standard_name = depth_of_lake_interface_layers
long_name = depth of lake interface layers
units = fraction
dimensions = (horizontal_loop_extent, lake_vertical_dimension_for_clm_lake_model)
type = real
kind = kind_phys
active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0)
[lake_dz3d]
standard_name = thickness_of_lake_layers
long_name = thickness of lake layers
units = fraction
dimensions = (horizontal_loop_extent, lake_vertical_dimension_for_clm_lake_model)
type = real
kind = kind_phys
active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0)
[lake_soil_watsat3d]
standard_name = saturated_volumetric_soil_water_in_lake_model
long_name = saturated volumetric soil water in lake model
units = m
dimensions = (horizontal_loop_extent, lake_vertical_dimension_for_clm_lake_model)
type = real
kind = kind_phys
active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0)
[lake_csol3d]
standard_name = soil_heat_capacity_in_lake_model
long_name = soil heat capacity in lake model
units = m
dimensions = (horizontal_loop_extent, lake_vertical_dimension_for_clm_lake_model)
type = real
kind = kind_phys
active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0)
[lake_soil_tkmg3d]
standard_name = soil_mineral_thermal_conductivity_in_lake_model
long_name = soil mineral thermal conductivity in lake model
[input_lakedepth]
standard_name = lake_depth_before_correction
long_name = lake depth_before_correction
units = m
dimensions = (horizontal_loop_extent, lake_vertical_dimension_for_clm_lake_model)
type = real
kind = kind_phys
active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0)
[lake_soil_tkdry3d]
standard_name = dry_soil_thermal_conductivity_in_lake_model
long_name = dry soil thermal conductivity in lake model
units = m
dimensions = (horizontal_loop_extent, lake_vertical_dimension_for_clm_lake_model)
type = real
kind = kind_phys
active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0)
[lake_soil_tksatu3d]
standard_name = saturated_soil_thermal_conductivity_in_lake_model
long_name = saturated soil thermal conductivity in lake model
units = m
dimensions = (horizontal_loop_extent, lake_vertical_dimension_for_clm_lake_model)
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0)
Expand Down Expand Up @@ -2232,20 +2184,6 @@
type = real
kind = kind_phys
active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0)
[lake_clay3d]
standard_name = clm_lake_percent_clay
long_name = percent clay in clm lake model
units = percent
dimensions = (horizontal_loop_extent,soil_vertical_dimension_for_clm_lake_model)
type = integer
active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0)
[lake_sand3d]
standard_name = clm_lake_percent_sand
long_name = percent sand in clm lake model
units = percent
dimensions = (horizontal_loop_extent,soil_vertical_dimension_for_clm_lake_model)
type = integer
active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0)
[lake_is_salty]
standard_name = clm_lake_is_salty
long_name = lake at this point is salty (1) or not (0)
Expand Down Expand Up @@ -6476,6 +6414,29 @@
type = real
kind = kind_phys
active = (do_smoke_coupling)
[dust_moist_correction]
standard_name = dust_moist_correction_fengsha_dust_scheme
long_name = moisture correction term for fengsha dust emission
units = none
dimensions = ()
type = real
kind = kind_phys
active = (do_smoke_coupling)
[dust_drylimit_factor]
standard_name = dust_drylimit_factor_fengsha_dust_scheme
long_name = moisture correction term for drylimit in fengsha dust emission
units = none
dimensions = ()
type = real
kind = kind_phys
active = (do_smoke_coupling)
[dust_moist_opt]
standard_name = control_for_dust_soil_moisture_option
long_name = smoke dust moisture parameterization 1 - fecan 2 - shao
units = index
dimensions = ()
type = integer
active = (do_smoke_coupling)
[dust_alpha]
standard_name = alpha_fengsha_dust_scheme
long_name = alpha paramter for fengsha dust scheme
Expand Down

0 comments on commit f935528

Please sign in to comment.