Skip to content

Commit

Permalink
RUC ice for gsl/develop (replaces NCAR#54 and NCAR#56) (NCAR#60)
Browse files Browse the repository at this point in the history
Implementation of RUC LSM ice model in CCPP

* Squash-merge climbfuji:rucice_gfsv16dzmin into gsl/develop

* Fix bug in gfsphysics/GFS_layer/GFS_typedefs.F90 from merge

* Remove lsm_ruc_sfc_sice from suite FV3_GSD_v0_unified_ugwp_suite and update submodule pointer for ccpp-physics

* Remove sfc_sice from ccpp/suites/suite_FV3_GSD_v0_unified_ugwp_suite.xml

* Update submodule pointer for ccpp-physics

* Revert change to .gitmodules and update submodule pointer for ccpp-physics

Co-authored-by: Dom Heinzeller <climbfuji@ymail.com>
  • Loading branch information
DomHeinzeller and climbfuji authored Dec 1, 2020
1 parent 478d348 commit bd71c2a
Show file tree
Hide file tree
Showing 13 changed files with 168 additions and 129 deletions.
1 change: 0 additions & 1 deletion ccpp/config/ccpp_prebuild_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@
'ccpp/physics/physics/sfc_diag.f',
'ccpp/physics/physics/sfc_diag_post.F90',
'ccpp/physics/physics/sfc_drv_ruc.F90',
'ccpp/physics/physics/lsm_ruc_sfc_sice_interstitial.F90',
'ccpp/physics/physics/sfc_cice.f',
'ccpp/physics/physics/sfc_diff.f',
'ccpp/physics/physics/sfc_drv.f',
Expand Down
3 changes: 0 additions & 3 deletions ccpp/suites/suite_FV3_GSD_SAR.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@
<scheme>sfc_nst</scheme>
<scheme>sfc_nst_post</scheme>
<scheme>lsm_ruc</scheme>
<scheme>lsm_ruc_sfc_sice_pre</scheme>
<scheme>sfc_sice</scheme>
<scheme>lsm_ruc_sfc_sice_post</scheme>
<scheme>GFS_surface_loop_control_part2</scheme>
</subcycle>
<!-- End of surface iteration loop -->
Expand Down
3 changes: 0 additions & 3 deletions ccpp/suites/suite_FV3_GSD_v0.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@
<scheme>sfc_nst</scheme>
<scheme>sfc_nst_post</scheme>
<scheme>lsm_ruc</scheme>
<scheme>lsm_ruc_sfc_sice_pre</scheme>
<scheme>sfc_sice</scheme>
<scheme>lsm_ruc_sfc_sice_post</scheme>
<scheme>GFS_surface_loop_control_part2</scheme>
</subcycle>
<!-- End of surface iteration loop -->
Expand Down
3 changes: 0 additions & 3 deletions ccpp/suites/suite_FV3_GSD_v0_drag_suite.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@
<scheme>sfc_nst</scheme>
<scheme>sfc_nst_post</scheme>
<scheme>lsm_ruc</scheme>
<scheme>lsm_ruc_sfc_sice_pre</scheme>
<scheme>sfc_sice</scheme>
<scheme>lsm_ruc_sfc_sice_post</scheme>
<scheme>GFS_surface_loop_control_part2</scheme>
</subcycle>
<!-- End of surface iteration loop -->
Expand Down
3 changes: 0 additions & 3 deletions ccpp/suites/suite_FV3_GSD_v0_mynnsfc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@
<scheme>sfc_nst</scheme>
<scheme>sfc_nst_post</scheme>
<scheme>lsm_ruc</scheme>
<scheme>lsm_ruc_sfc_sice_pre</scheme>
<scheme>sfc_sice</scheme>
<scheme>lsm_ruc_sfc_sice_post</scheme>
<scheme>GFS_surface_loop_control_part2</scheme>
</subcycle>
<!-- End of surface iteration loop -->
Expand Down
3 changes: 0 additions & 3 deletions ccpp/suites/suite_FV3_GSD_v0_unified_ugwp_suite.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@
<scheme>sfc_nst</scheme>
<scheme>sfc_nst_post</scheme>
<scheme>lsm_ruc</scheme>
<scheme>lsm_ruc_sfc_sice_pre</scheme>
<scheme>sfc_sice</scheme>
<scheme>lsm_ruc_sfc_sice_post</scheme>
<scheme>GFS_surface_loop_control_part2</scheme>
</subcycle>
<!-- End of surface iteration loop -->
Expand Down
3 changes: 0 additions & 3 deletions ccpp/suites/suite_FV3_HRRR.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@
<scheme>sfc_nst</scheme>
<scheme>sfc_nst_post</scheme>
<scheme>lsm_ruc</scheme>
<scheme>lsm_ruc_sfc_sice_pre</scheme>
<scheme>sfc_sice</scheme>
<scheme>lsm_ruc_sfc_sice_post</scheme>
<scheme>GFS_surface_loop_control_part2</scheme>
</subcycle>
<!-- End of surface iteration loop -->
Expand Down
3 changes: 0 additions & 3 deletions ccpp/suites/suite_FV3_RAP.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@
<scheme>sfc_nst</scheme>
<scheme>sfc_nst_post</scheme>
<scheme>lsm_ruc</scheme>
<scheme>lsm_ruc_sfc_sice_pre</scheme>
<scheme>sfc_sice</scheme>
<scheme>lsm_ruc_sfc_sice_post</scheme>
<scheme>GFS_surface_loop_control_part2</scheme>
</subcycle>
<!-- End of surface iteration loop -->
Expand Down
12 changes: 6 additions & 6 deletions gfsphysics/GFS_layer/GFS_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3030,24 +3030,24 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
if (Model%lsm == Model%lsm_ruc) then
idx = idx + 1
ExtDiag(idx)%axes = 2
ExtDiag(idx)%name = 'snowfall_acc'
ExtDiag(idx)%desc = 'total accumulated frozen precipitation'
ExtDiag(idx)%name = 'snowfall_acc_land'
ExtDiag(idx)%desc = 'total accumulated frozen precipitation over land'
ExtDiag(idx)%unit = 'kg m-2'
ExtDiag(idx)%mod_name = 'gfs_sfc'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%snowfallac(:)
ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%snowfallac_land(:)
enddo

idx = idx + 1
ExtDiag(idx)%axes = 2
ExtDiag(idx)%name = 'swe_snowfall_acc'
ExtDiag(idx)%desc = 'accumulated water equivalent of frozen precipitation'
ExtDiag(idx)%name = 'snowfall_acc_ice'
ExtDiag(idx)%desc = 'total accumulated frozen precipitation over ice'
ExtDiag(idx)%unit = 'kg m-2'
ExtDiag(idx)%mod_name = 'gfs_sfc'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%acsnow(:)
ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%snowfallac_ice(:)
enddo
endif
#endif
Expand Down
110 changes: 62 additions & 48 deletions gfsphysics/GFS_layer/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,8 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: semisbase(:) => null() !< background surface emissivity

!--- In (radiation only)
real (kind=kind_phys), pointer :: sncovr (:) => null() !< snow cover in fraction
real (kind=kind_phys), pointer :: sncovr (:) => null() !< snow cover in fraction over land
real (kind=kind_phys), pointer :: sncovr_ice (:) => null() !< snow cover in fraction over ice (RUC LSM only)
real (kind=kind_phys), pointer :: snoalb (:) => null() !< maximum snow albedo in fraction
real (kind=kind_phys), pointer :: alvsf (:) => null() !< mean vis albedo with strong cosz dependency
real (kind=kind_phys), pointer :: alnsf (:) => null() !< mean nir albedo with strong cosz dependency
Expand Down Expand Up @@ -365,20 +366,22 @@ module GFS_typedefs

#ifdef CCPP
! Soil properties for RUC LSM (number of levels different from NOAH 4-layer model)
real (kind=kind_phys), pointer :: wetness(:) => null() !< normalized soil wetness for lsm
real (kind=kind_phys), pointer :: sh2o(:,:) => null() !< volume fraction of unfrozen soil moisture for lsm
real (kind=kind_phys), pointer :: keepsmfr(:,:) => null() !< RUC LSM: frozen moisture in soil
real (kind=kind_phys), pointer :: smois(:,:) => null() !< volumetric fraction of soil moisture for lsm
real (kind=kind_phys), pointer :: tslb(:,:) => null() !< soil temperature for land surface model
real (kind=kind_phys), pointer :: flag_frsoil(:,:) => null() !< RUC LSM: flag for frozen soil physics
real (kind=kind_phys), pointer :: wetness(:) => null() !< normalized soil wetness for lsm
real (kind=kind_phys), pointer :: sh2o(:,:) => null() !< volume fraction of unfrozen soil moisture for lsm
real (kind=kind_phys), pointer :: keepsmfr(:,:) => null() !< RUC LSM: frozen moisture in soil
real (kind=kind_phys), pointer :: smois(:,:) => null() !< volumetric fraction of soil moisture for lsm
real (kind=kind_phys), pointer :: tslb(:,:) => null() !< soil temperature for land surface model
real (kind=kind_phys), pointer :: flag_frsoil(:,:) => null() !< RUC LSM: flag for frozen soil physics
!
real (kind=kind_phys), pointer :: clw_surf(:) => null() !< RUC LSM: moist cloud water mixing ratio at surface
real (kind=kind_phys), pointer :: qwv_surf(:) => null() !< RUC LSM: water vapor mixing ratio at surface
real (kind=kind_phys), pointer :: cndm_surf(:) => null() !< RUC LSM: surface condensation mass
real (kind=kind_phys), pointer :: rhofr(:) => null() !< RUC LSM: density of frozen precipitation
real (kind=kind_phys), pointer :: tsnow(:) => null() !< RUC LSM: snow temperature at the bottom of the first soil layer
real (kind=kind_phys), pointer :: snowfallac(:) => null() !< ruc lsm diagnostics
real (kind=kind_phys), pointer :: acsnow(:) => null() !< ruc lsm diagnostics
real (kind=kind_phys), pointer :: clw_surf_land(:) => null() !< RUC LSM: moist cloud water mixing ratio at surface over land
real (kind=kind_phys), pointer :: clw_surf_ice(:) => null() !< RUC LSM: moist cloud water mixing ratio at surface over ice
real (kind=kind_phys), pointer :: qwv_surf_land(:) => null() !< RUC LSM: water vapor mixing ratio at surface over land
real (kind=kind_phys), pointer :: qwv_surf_ice(:) => null() !< RUC LSM: water vapor mixing ratio at surface over ice
real (kind=kind_phys), pointer :: rhofr(:) => null() !< RUC LSM: density of frozen precipitation
real (kind=kind_phys), pointer :: tsnow_land(:) => null() !< RUC LSM: snow temperature at the bottom of the first snow layer over land
real (kind=kind_phys), pointer :: tsnow_ice(:) => null() !< RUC LSM: snow temperature at the bottom of the first snow layer over ice
real (kind=kind_phys), pointer :: snowfallac_land(:) => null() !< ruc lsm diagnostics over land
real (kind=kind_phys), pointer :: snowfallac_ice(:) => null() !< ruc lsm diagnostics over ice

! MYNN surface layer
real (kind=kind_phys), pointer :: ustm (:) => null() !u* including drag
Expand Down Expand Up @@ -804,7 +807,6 @@ module GFS_typedefs
integer :: isot !< isot = 0 => Zobler soil type ( 9 category)
!< isot = 1 => STATSGO soil type (19 category, AKA 'STAS'(?))
!< isot = 2 => STAS-RUC soil type (19 category, NOAH WRFv4 only)
integer :: kice=2 !< number of layers in sice
#ifdef CCPP
integer :: lsoil_lsm !< number of soil layers internal to land surface model
integer :: lsnow_lsm !< maximum number of snow layers internal to land surface model
Expand All @@ -821,6 +823,9 @@ module GFS_typedefs
integer :: iopt_thcnd !< option to treat thermal conductivity in Noah LSM (new in 3.8)
!< = 1, original (default)
!< = 2, McCumber and Pielke for silt loam and sandy loam
integer :: kice !< number of layers in ice model
#else
integer :: kice=2 !< number of layers in sice
#endif
! -- the Noah MP options

Expand Down Expand Up @@ -1422,7 +1427,7 @@ module GFS_typedefs
!--- Out (radiation only)
real (kind=kind_phys), pointer :: htrsw (:,:) => null() !< swh total sky sw heating rate in k/sec
real (kind=kind_phys), pointer :: htrlw (:,:) => null() !< hlw total sky lw heating rate in k/sec
real (kind=kind_phys), pointer :: sfalb (:) => null() !< mean surface diffused sw albedo
real (kind=kind_phys), pointer :: sfalb (:) => null() !< mean surface diffused sw albedo

real (kind=kind_phys), pointer :: coszen(:) => null() !< mean cos of zenith angle over rad call period
real (kind=kind_phys), pointer :: tsflw (:) => null() !< surface air temp during lw calculation in k
Expand Down Expand Up @@ -1768,13 +1773,11 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: cld1d(:) => null() !<
real (kind=kind_phys), pointer :: clouds(:,:,:) => null() !<
real (kind=kind_phys), pointer :: clw(:,:,:) => null() !<
real (kind=kind_phys), pointer :: clw_surf(:) => null() !<
real (kind=kind_phys), pointer :: clx(:,:) => null() !<
real (kind=kind_phys), pointer :: cmc(:) => null() !<
real (kind=kind_phys), pointer :: cmm_ice(:) => null() !<
real (kind=kind_phys), pointer :: cmm_land(:) => null() !<
real (kind=kind_phys), pointer :: cmm_ocean(:) => null() !<
real (kind=kind_phys), pointer :: cndm_surf(:) => null() !<
real (kind=kind_phys), pointer :: cnv_dqldt(:,:) => null() !<
real (kind=kind_phys), pointer :: cnv_fice(:,:) => null() !<
real (kind=kind_phys), pointer :: cnv_mfd(:,:) => null() !<
Expand Down Expand Up @@ -2025,7 +2028,6 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: tsfc_land_save(:) => null() !<
real (kind=kind_phys), pointer :: tsfc_ocean(:) => null() !<
real (kind=kind_phys), pointer :: tsfg(:) => null() !<
real (kind=kind_phys), pointer :: tsnow(:) => null() !<
real (kind=kind_phys), pointer :: tsurf(:) => null() !<
real (kind=kind_phys), pointer :: tsurf_ice(:) => null() !<
real (kind=kind_phys), pointer :: tsurf_land(:) => null() !<
Expand Down Expand Up @@ -2349,7 +2351,6 @@ subroutine sfcprop_create (Sfcprop, IM, Model)
Sfcprop%hprime = clear_val

!--- In (radiation only)
allocate (Sfcprop%sncovr (IM))
allocate (Sfcprop%snoalb (IM))
allocate (Sfcprop%alvsf (IM))
allocate (Sfcprop%alnsf (IM))
Expand All @@ -2358,7 +2359,6 @@ subroutine sfcprop_create (Sfcprop, IM, Model)
allocate (Sfcprop%facsf (IM))
allocate (Sfcprop%facwf (IM))

Sfcprop%sncovr = clear_val
Sfcprop%snoalb = clear_val
Sfcprop%alvsf = clear_val
Sfcprop%alnsf = clear_val
Expand Down Expand Up @@ -2403,6 +2403,9 @@ subroutine sfcprop_create (Sfcprop, IM, Model)
allocate (Sfcprop%hice (IM))
allocate (Sfcprop%weasd (IM))
allocate (Sfcprop%sncovr (IM))
if (Model%lsm == Model%lsm_ruc) then
allocate (Sfcprop%sncovr_ice (IM))
end if
allocate (Sfcprop%canopy (IM))
allocate (Sfcprop%ffmm (IM))
allocate (Sfcprop%ffhh (IM))
Expand All @@ -2416,6 +2419,9 @@ subroutine sfcprop_create (Sfcprop, IM, Model)
Sfcprop%hice = clear_val
Sfcprop%weasd = clear_val
Sfcprop%sncovr = clear_val
if (Model%lsm == Model%lsm_ruc) then
Sfcprop%sncovr_ice = clear_val
end if
Sfcprop%canopy = clear_val
Sfcprop%ffmm = clear_val
Sfcprop%ffhh = clear_val
Expand Down Expand Up @@ -2606,33 +2612,37 @@ subroutine sfcprop_create (Sfcprop, IM, Model)

if (Model%lsm == Model%lsm_ruc) then
! For land surface models with different numbers of levels than the four NOAH levels
allocate (Sfcprop%wetness (IM))
allocate (Sfcprop%sh2o (IM,Model%lsoil_lsm))
allocate (Sfcprop%keepsmfr (IM,Model%lsoil_lsm))
allocate (Sfcprop%smois (IM,Model%lsoil_lsm))
allocate (Sfcprop%tslb (IM,Model%lsoil_lsm))
allocate (Sfcprop%flag_frsoil (IM,Model%lsoil_lsm))
allocate (Sfcprop%clw_surf (IM))
allocate (Sfcprop%qwv_surf (IM))
allocate (Sfcprop%cndm_surf (IM))
allocate (Sfcprop%rhofr (IM))
allocate (Sfcprop%tsnow (IM))
allocate (Sfcprop%snowfallac (IM))
allocate (Sfcprop%acsnow (IM))
allocate (Sfcprop%wetness (IM))
allocate (Sfcprop%sh2o (IM,Model%lsoil_lsm))
allocate (Sfcprop%keepsmfr (IM,Model%lsoil_lsm))
allocate (Sfcprop%smois (IM,Model%lsoil_lsm))
allocate (Sfcprop%tslb (IM,Model%lsoil_lsm))
allocate (Sfcprop%flag_frsoil (IM,Model%lsoil_lsm))
allocate (Sfcprop%clw_surf_land (IM))
allocate (Sfcprop%clw_surf_ice (IM))
allocate (Sfcprop%qwv_surf_land (IM))
allocate (Sfcprop%qwv_surf_ice (IM))
allocate (Sfcprop%rhofr (IM))
allocate (Sfcprop%tsnow_land (IM))
allocate (Sfcprop%tsnow_ice (IM))
allocate (Sfcprop%snowfallac_land (IM))
allocate (Sfcprop%snowfallac_ice (IM))
!
Sfcprop%wetness = clear_val
Sfcprop%sh2o = clear_val
Sfcprop%keepsmfr = clear_val
Sfcprop%smois = clear_val
Sfcprop%tslb = clear_val
Sfcprop%clw_surf = clear_val
Sfcprop%qwv_surf = clear_val
Sfcprop%cndm_surf = clear_val
Sfcprop%flag_frsoil = clear_val
Sfcprop%rhofr = clear_val
Sfcprop%tsnow = clear_val
Sfcprop%snowfallac = clear_val
Sfcprop%acsnow = clear_val
Sfcprop%wetness = clear_val
Sfcprop%sh2o = clear_val
Sfcprop%keepsmfr = clear_val
Sfcprop%smois = clear_val
Sfcprop%tslb = clear_val
Sfcprop%clw_surf_land = clear_val
Sfcprop%clw_surf_ice = clear_val
Sfcprop%qwv_surf_land = clear_val
Sfcprop%qwv_surf_ice = clear_val
Sfcprop%flag_frsoil = clear_val
Sfcprop%rhofr = clear_val
Sfcprop%tsnow_land = clear_val
Sfcprop%tsnow_ice = clear_val
Sfcprop%snowfallac_land = clear_val
Sfcprop%snowfallac_ice = clear_val
!
if (Model%rdlai) then
allocate (Sfcprop%xlaixy (IM))
Expand Down Expand Up @@ -3173,6 +3183,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
integer :: iopt_thcnd = 1 !< option to treat thermal conductivity in Noah LSM (new in 3.8)
!< = 1, original (default)
!< = 2, McCumber and Pielke for silt loam and sandy loam
integer :: kice = 2 !< number of layers in ice; default is 2 (GFS sice)
#endif
integer :: ivegsrc = 2 !< ivegsrc = 0 => USGS,
!< ivegsrc = 1 => IGBP (20 category)
Expand Down Expand Up @@ -3503,7 +3514,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
avg_max_length, &
!--- land/surface model control
#ifdef CCPP
lsm, lsoil, lsoil_lsm, lsnow_lsm, rdlai, &
lsm, lsoil, lsoil_lsm, lsnow_lsm, kice, rdlai, &
nmtvr, ivegsrc, use_ufo, iopt_thcnd, ua_phys, usemonalb, &
aoasis, fasdas, &
#else
Expand Down Expand Up @@ -3968,6 +3979,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
allocate (Model%zs(Model%lsoil_lsm))
Model%zs = clear_val
end if
! Set number of ice model layers
Model%kice = kice
!
if (lsnow_lsm /= 3) then
write(0,*) 'Logic error: NoahMP expects the maximum number of snow layers to be exactly 3 (see sfc_noahmp_drv.f)'
Expand Down Expand Up @@ -5145,6 +5158,7 @@ subroutine control_print(Model)
print *, ' usemonalb : ', Model%usemonalb
print *, ' aoasis : ', Model%aoasis
print *, ' fasdas : ', Model%fasdas
print *, ' kice : ', Model%kice
#endif
print *, ' ivegsrc : ', Model%ivegsrc
print *, ' isot : ', Model%isot
Expand Down
Loading

0 comments on commit bd71c2a

Please sign in to comment.