Skip to content

Commit

Permalink
Merge pull request NOAA-EMC#51 from climbfuji/ruclsm_rucinit_in_lsm_r…
Browse files Browse the repository at this point in the history
…uc_init

Move RUC LSM soil variables initialization to lsm_ruc_init
  • Loading branch information
DomHeinzeller authored Oct 15, 2020
2 parents 4a64b78 + e3919c2 commit bf64848
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 13 deletions.
2 changes: 1 addition & 1 deletion ccpp/framework
2 changes: 1 addition & 1 deletion ccpp/physics
33 changes: 30 additions & 3 deletions gfsphysics/GFS_layer/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,6 @@ module GFS_typedefs
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 :: zs(:) => null() !< depth of soil levels for land surface model
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
Expand Down Expand Up @@ -781,6 +780,7 @@ module GFS_typedefs
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
integer :: lsnow_lsm_lbound!< lower bound for snow arrays, depending on lsnow_lsm
real(kind=kind_phys), pointer :: zs(:) => null() !< depth of soil levels for land surface model
logical :: rdlai
#endif
integer :: ivegsrc !< ivegsrc = 0 => USGS,
Expand Down Expand Up @@ -2508,7 +2508,6 @@ subroutine sfcprop_create (Sfcprop, IM, Model)
allocate (Sfcprop%smois (IM,Model%lsoil_lsm))
allocate (Sfcprop%tslb (IM,Model%lsoil_lsm))
allocate (Sfcprop%flag_frsoil (IM,Model%lsoil_lsm))
allocate (Sfcprop%zs (Model%lsoil_lsm))
allocate (Sfcprop%clw_surf (IM))
allocate (Sfcprop%qwv_surf (IM))
allocate (Sfcprop%cndm_surf (IM))
Expand All @@ -2522,7 +2521,6 @@ subroutine sfcprop_create (Sfcprop, IM, Model)
Sfcprop%keepsmfr = clear_val
Sfcprop%smois = clear_val
Sfcprop%tslb = clear_val
Sfcprop%zs = clear_val
Sfcprop%clw_surf = clear_val
Sfcprop%qwv_surf = clear_val
Sfcprop%cndm_surf = clear_val
Expand Down Expand Up @@ -3805,6 +3803,12 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
else
Model%lsoil_lsm = lsoil_lsm
end if
! Allocate variable to store depth of soil layers
if (Model%lsm==Model%lsm_ruc) then
allocate (Model%zs(Model%lsoil_lsm))
Model%zs = clear_val
end if
!
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)'
stop
Expand Down Expand Up @@ -5934,6 +5938,29 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center)
Diag%toticeb = zero
Diag%totsnwb = zero
Diag%totgrpb = zero
!
#ifdef CCPP
!--- MYNN variables:
if (Model%do_mynnedmf) then
if (Model%bl_mynn_output .ne. 0) then
Diag%edmf_a = clear_val
Diag%edmf_w = clear_val
Diag%edmf_qt = clear_val
Diag%edmf_thl = clear_val
Diag%edmf_ent = clear_val
Diag%edmf_qc = clear_val
Diag%sub_thl = clear_val
Diag%sub_sqv = clear_val
Diag%det_thl = clear_val
Diag%det_sqv = clear_val
endif
Diag%nupdraft = 0
Diag%maxmf = clear_val
Diag%ktop_plume = 0
Diag%exch_h = clear_val
Diag%exch_m = clear_val
endif
#endif
!
if (Model%do_ca) then
Diag%ca1 = zero
Expand Down
16 changes: 8 additions & 8 deletions gfsphysics/GFS_layer/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -1245,14 +1245,6 @@
type = real
kind = kind_phys
active = (flag_for_land_surface_scheme == flag_for_ruc_land_surface_scheme)
[zs]
standard_name = depth_of_soil_levels_for_land_surface_model
long_name = depth of soil levels for land surface model
units = m
dimensions = (soil_vertical_dimension_for_land_surface_model)
type = real
kind = kind_phys
active = (flag_for_land_surface_scheme == flag_for_ruc_land_surface_scheme)
[clw_surf]
standard_name = cloud_condensed_water_mixing_ratio_at_surface
long_name = moist cloud water mixing ratio at surface
Expand Down Expand Up @@ -3087,6 +3079,14 @@
units = count
dimensions = ()
type = integer
[zs]
standard_name = depth_of_soil_levels_for_land_surface_model
long_name = depth of soil levels for land surface model
units = m
dimensions = (soil_vertical_dimension_for_land_surface_model)
type = real
kind = kind_phys
active = (flag_for_land_surface_scheme == flag_for_ruc_land_surface_scheme)
[rdlai]
standard_name = flag_for_reading_leaf_area_index_from_input
long_name = flag for reading leaf area index from initial conditions for RUC LSM
Expand Down

0 comments on commit bf64848

Please sign in to comment.