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

RUC LSM update #708

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
branch = main
[submodule "ccpp/physics"]
path = ccpp/physics
url = https://github.com/ufs-community/ccpp-physics
branch = ufs/dev
url = https://github.com/tanyasmirnova/ccpp-physics
branch = ruclsm_lai
[submodule "upp"]
path = upp
url = https://github.com/NOAA-EMC/UPP
Expand Down
26 changes: 20 additions & 6 deletions ccpp/data/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,9 @@ module GFS_typedefs
!--- For fire diurnal cycle
real (kind=kind_phys), pointer :: fhist (:) => null() !< instantaneous fire coef_bb
real (kind=kind_phys), pointer :: coef_bb_dc (:) => null() !< instantaneous fire coef_bb
!--- wildfire heat flux
real (kind=kind_phys), pointer :: fire_heat_flux_out (:) => null() !< heat flux from wildfire
real (kind=kind_phys), pointer :: frac_grid_burned_out (:) => null() !< fraction of grid cell burning

!--- For smoke and dust auxiliary inputs
real (kind=kind_phys), pointer :: fire_in (:,:) => null() !< fire auxiliary inputs
Expand Down Expand Up @@ -1049,6 +1052,9 @@ module GFS_typedefs
integer :: isncond_opt=1 !< control for soil thermal conductivity option in RUC land surface model
integer :: isncovr_opt=1 !< control for snow cover fraction option in RUC land surface model

! -- Fire heat flux
logical :: add_fire_heat_flux=.false. !<control to add fireheat flux to RUC LSM

logical :: use_ufo !< flag for gcycle surface option

! GFDL Surface Layer options
Expand Down Expand Up @@ -2647,6 +2653,10 @@ subroutine sfcprop_create (Sfcprop, IM, Model)
allocate (Sfcprop%snowfallac_ice (IM))
allocate (Sfcprop%acsnow_land (IM))
allocate (Sfcprop%acsnow_ice (IM))
allocate (Sfcprop%xlaixy (IM))
allocate (Sfcprop%fire_heat_flux_out (IM))
allocate (Sfcprop%frac_grid_burned_out (IM))

!
Sfcprop%wetness = clear_val
Sfcprop%sh2o = clear_val
Expand All @@ -2665,13 +2675,12 @@ subroutine sfcprop_create (Sfcprop, IM, Model)
Sfcprop%snowfallac_ice = clear_val
Sfcprop%acsnow_land = clear_val
Sfcprop%acsnow_ice = clear_val
Sfcprop%xlaixy = clear_val
Sfcprop%fire_heat_flux_out = clear_val
Sfcprop%frac_grid_burned_out = clear_val
!
if (Model%rdlai) then
allocate (Sfcprop%xlaixy (IM))
Sfcprop%xlaixy = clear_val
end if

end if

allocate (Sfcprop%rmol (IM ))
allocate (Sfcprop%flhc (IM ))
allocate (Sfcprop%flqc (IM ))
Expand Down Expand Up @@ -3454,7 +3463,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
integer :: lsoil_lsm = -1 !< number of soil layers internal to land surface model; -1 use lsoil
integer :: lsnow_lsm = 3 !< maximum number of snow layers internal to land surface model
logical :: exticeden = .false. !< Use variable precip ice density for NOAH LSM if true or original formulation
logical :: rdlai = .false. !< read LAI from input file (for RUC LSM or NOAH LSM WRFv4)
logical :: rdlai = .false. !< read LAI from input file at cold start (for RUC LSM or NOAH LSM WRFv4)
logical :: ua_phys = .false. !< flag for using University of Arizona? extension to NOAH LSM WRFv4
logical :: usemonalb = .true. !< flag to read surface diffused shortwave albedo from input file for NOAH LSM WRFv4
real(kind=kind_phys) :: aoasis = 1.0 !< potential evaporation multiplication factor for NOAH LSM WRFv4
Expand Down Expand Up @@ -3497,6 +3506,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &

logical :: use_ufo = .false. !< flag for gcycle surface option

logical :: add_fire_heat_flux = .false. !< Flag for fire heat flux

logical :: lcurr_sf = .false. !< flag for taking ocean currents into account in GFDL surface layer
logical :: pert_cd = .false. !< flag for perturbing the surface drag coefficient for momentum in surface layer scheme
integer :: ntsflg = 0 !< flag for updating skin temperature in the GFDL surface layer scheme
Expand Down Expand Up @@ -3900,6 +3911,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
iopt_inf, iopt_rad,iopt_alb,iopt_snf,iopt_tbot,iopt_stc, &
iopt_trs, iopt_diag, &
! RUC lsm options
add_fire_heat_flux, &
mosaic_lu, mosaic_soil, isncond_opt, isncovr_opt, &
! GFDL surface layer options
lcurr_sf, pert_cd, ntsflg, sfenth, &
Expand Down Expand Up @@ -4672,6 +4684,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%mosaic_soil = mosaic_soil
Model%isncond_opt = isncond_opt
Model%isncovr_opt = isncovr_opt
Model%add_fire_heat_flux = add_fire_heat_flux ! JLS

!--- tuning parameters for physical parameterizations
Model%ras = ras
Expand Down Expand Up @@ -5613,6 +5626,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
print *,' mosaic_soil = ',mosaic_soil
print *,' isncond_opt = ',isncond_opt
print *,' isncovr_opt = ',isncovr_opt
print *,' add_fire_heat_flux = ',add_fire_heat_flux
else
print *,' Unsupported LSM type - job aborted - lsm=',Model%lsm
stop
Expand Down
24 changes: 23 additions & 1 deletion ccpp/data/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -923,6 +923,22 @@
type = real
kind = kind_phys
active = (control_for_land_surface_scheme == identifier_for_ruc_land_surface_scheme)
[fire_heat_flux_out]
standard_name = surface_fire_heat_flux
long_name = heat flux of fire at the surface
units = W m-2
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (control_for_land_surface_scheme == identifier_for_ruc_land_surface_scheme)
[frac_grid_burned_out]
standard_name = fraction_of_grid_cell_burning
long_name = ration of the burnt area to the grid cell area
units = frac
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (control_for_land_surface_scheme == identifier_for_ruc_land_surface_scheme)
[snoalb]
standard_name = upper_bound_of_max_albedo_assuming_deep_snow
long_name = maximum snow albedo
Expand Down Expand Up @@ -1582,7 +1598,7 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (control_for_land_surface_scheme == identifier_for_noah_land_surface_scheme .or. control_for_land_surface_scheme == identifier_for_noahmp_land_surface_scheme .or. (control_for_land_surface_scheme == identifier_for_ruc_land_surface_scheme .and. flag_for_reading_leaf_area_index_from_input))
active = (control_for_land_surface_scheme == identifier_for_noah_land_surface_scheme .or. control_for_land_surface_scheme == identifier_for_noahmp_land_surface_scheme .or. control_for_land_surface_scheme == identifier_for_ruc_land_surface_scheme)
[xsaixy]
standard_name = stem_area_index
long_name = stem area index
Expand Down Expand Up @@ -4594,6 +4610,12 @@
units = flag
dimensions = ()
type = integer
[add_fire_heat_flux]
standard_name = flag_for_fire_heat_flux
long_name = flag to add fire heat flux to LSM
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
69 changes: 45 additions & 24 deletions ccpp/driver/GFS_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2175,6 +2175,28 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%gfluxi(:)
enddo

idx = idx + 1
ExtDiag(idx)%axes = 2
ExtDiag(idx)%name = 'wilt'
ExtDiag(idx)%desc = 'wiltimg point (volumetric)'
ExtDiag(idx)%unit = 'Proportion'
ExtDiag(idx)%mod_name = 'gfs_phys'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%smcwlt2(:)
enddo

idx = idx + 1
ExtDiag(idx)%axes = 2
ExtDiag(idx)%name = 'fldcp'
ExtDiag(idx)%desc = 'Field Capacity (volumetric)'
ExtDiag(idx)%unit = 'fraction'
ExtDiag(idx)%mod_name = 'gfs_phys'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%smcref2(:)
enddo

if (Model%lsm == Model%lsm_noahmp) then
idx = idx + 1
ExtDiag(idx)%axes = 2
Expand All @@ -2199,28 +2221,6 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%epi(:)
enddo

idx = idx + 1
ExtDiag(idx)%axes = 2
ExtDiag(idx)%name = 'wilt'
ExtDiag(idx)%desc = 'wiltimg point (volumetric)'
ExtDiag(idx)%unit = 'Proportion'
ExtDiag(idx)%mod_name = 'gfs_phys'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%smcwlt2(:)
enddo

idx = idx + 1
ExtDiag(idx)%axes = 2
ExtDiag(idx)%name = 'fldcp'
ExtDiag(idx)%desc = 'Field Capacity (volumetric)'
ExtDiag(idx)%unit = 'fraction'
ExtDiag(idx)%mod_name = 'gfs_phys'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%smcref2(:)
enddo

idx = idx + 1
ExtDiag(idx)%axes = 2
ExtDiag(idx)%name = 'wet1'
Expand Down Expand Up @@ -4105,7 +4105,6 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%data(nb)%var2 => Coupling(nb)%visdfdi(:)
enddo

if (Model%rdlai) then
idx = idx + 1
ExtDiag(idx)%axes = 2
ExtDiag(idx)%name = 'xlaixy'
Expand All @@ -4116,7 +4115,6 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var2 => sfcprop(nb)%xlaixy(:)
enddo
endif

do num = 1,Model%nvegcat
write (xtra,'(i2)') num
Expand Down Expand Up @@ -4550,6 +4548,29 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
end if thompson_extended_diagnostics

if (Model%rrfs_sd .and. Model%ntsmoke>0) then

idx = idx + 1
ExtDiag(idx)%axes = 2
ExtDiag(idx)%name = 'fire_heat'
ExtDiag(idx)%desc = 'surface fire heat flux'
ExtDiag(idx)%unit = 'W m-2'
ExtDiag(idx)%mod_name = 'gfs_sfc'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%fire_heat_flux_out
enddo

idx = idx + 1
ExtDiag(idx)%axes = 2
ExtDiag(idx)%name = 'burned'
ExtDiag(idx)%desc = 'ration of the burnt area to the grid cell area'
ExtDiag(idx)%unit = 'frac'
ExtDiag(idx)%mod_name = 'gfs_sfc'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%frac_grid_burned_out
enddo

idx = idx + 1
ExtDiag(idx)%axes = 2
ExtDiag(idx)%name = 'emdust'
Expand Down
2 changes: 1 addition & 1 deletion upp
Submodule upp updated 52 files
+1 −5 jobs/J_NCEPPOST
+0 −58 modulefiles/gaea-c5.lua
+0 −56 modulefiles/gaea.lua
+48 −0 parm/AEROSOL_LUTS.dat
+9 −172 parm/fv3lam_rrfs.xml
+1,869 −0 parm/gtg.config.gfs
+19,132 −0 parm/gtg_imprintings.txt
+157 −63 parm/makefile
+0 −0 parm/optics_luts_DUST.dat
+0 −0 parm/optics_luts_DUST_nasa.dat
+0 −0 parm/optics_luts_NITR_nasa.dat
+0 −0 parm/optics_luts_SALT.dat
+0 −0 parm/optics_luts_SALT_nasa.dat
+0 −0 parm/optics_luts_SOOT.dat
+0 −0 parm/optics_luts_SOOT_nasa.dat
+0 −0 parm/optics_luts_SUSO.dat
+0 −0 parm/optics_luts_SUSO_nasa.dat
+0 −0 parm/optics_luts_WASO.dat
+0 −0 parm/optics_luts_WASO_nasa.dat
+79 −3 parm/post_avblflds.xml
+107 −975 parm/postcntrl_gefs_aerosol.xml
+0 −1,004 parm/postcntrl_gefs_aerosol_f00.xml
+0 −35 parm/postcntrl_gefs_wafs.xml
+0 −6,124 parm/postxconfig-NT-GEFS-F00-aerosol.txt
+0 −92 parm/postxconfig-NT-GEFS-WAFS.txt
+0 −7,752 parm/postxconfig-NT-GEFS-aerosol.txt
+64 −989 parm/postxconfig-NT-fv3lam_rrfs.txt
+0 −197 scripts/exwafs_atmos_nceppost.sh
+8 −22 sorc/ncep_post.fd/ALLOCATE_ALL.f
+1 −26 sorc/ncep_post.fd/CLDRAD.f
+2 −5 sorc/ncep_post.fd/CMakeLists.txt
+0 −2 sorc/ncep_post.fd/CTLBLK.f
+5 −8 sorc/ncep_post.fd/DEALLOCATE.f
+2 −13 sorc/ncep_post.fd/INITPOST_NETCDF.f
+91 −180 sorc/ncep_post.fd/MDL2P.f
+445 −0 sorc/ncep_post.fd/MDL2STD_P.f
+7 −11 sorc/ncep_post.fd/MDLFLD.f
+139 −138 sorc/ncep_post.fd/MISCLN.f
+9 −2 sorc/ncep_post.fd/PROCESS.f
+8 −18 sorc/ncep_post.fd/SURFCE.f
+3 −3 sorc/ncep_post.fd/UPP_PHYSICS.f
+1 −2 sorc/ncep_post.fd/VRBLS3D_mod.f
+2 −4 sorc/ncep_post.fd/WRFPOST.f
+0 −4 sorc/ncep_post.fd/gtg_ReadSetupParams.F90
+0 −4 sorc/ncep_post.fd/gtg_cdf_mod.F90
+2 −2 sorc/ncep_post.fd/gtg_config.F90
+0 −4 sorc/ncep_post.fd/gtg_mlmodel.F90
+0 −4 sorc/ncep_post.fd/gtg_prob.F90
+1 −1 sorc/ncep_post.fd/post_gtg.fd
+0 −18 tests/compile_upp.sh
+0 −2 tests/detect_machine.sh
+0 −45 ush/wafs_nceppost.sh