From 94a49f8e74c59851473b5f0bde9d97e7f6afc33f Mon Sep 17 00:00:00 2001 From: "Samuel Trahan (NOAA contractor)" <39415369+SamuelTrahanNOAA@users.noreply.github.com> Date: Tue, 22 Aug 2023 09:42:43 -0400 Subject: [PATCH] Changes to Logging and Initialization of the CLM Lake Model (#681) * Changes to logging and initialization of the CLM Lake Model. 1. Use ice thickness hice(i) to find the level in the lake where ice is zero. 2. Do not allow lake temperature to be below freezing point if there is no ice. 3. If there is no snow or ice, do not allow surface lake temperature to be below freezing point. These changes fixed the problem with large errors in the energy budget at the beginning of the cold-start run with lakes. 4. Added flag to turn on debug print statements in the CLM lake model. * merge ccpp-physics #91 (UFS-SRW v3.0.0 SciDoc updates) --- ccpp/data/GFS_typedefs.F90 | 8 ++++++-- ccpp/data/GFS_typedefs.meta | 6 ++++++ ccpp/driver/GFS_diagnostics.F90 | 4 ++-- ccpp/physics | 2 +- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/ccpp/data/GFS_typedefs.F90 b/ccpp/data/GFS_typedefs.F90 index d0b19327cf..80826ba428 100644 --- a/ccpp/data/GFS_typedefs.F90 +++ b/ccpp/data/GFS_typedefs.F90 @@ -1082,6 +1082,7 @@ module GFS_typedefs real(kind_phys) :: clm_lake_depth_default !< minimum lake elevation in clm lake model logical :: clm_lake_use_lakedepth !< initialize lake from lakedepth logical :: clm_lake_debug !< verbose debugging in clm_lake + logical :: clm_debug_print !< enables prints in clm_lakedebugging in clm_laki !--- tuning parameters for physical parameterizations logical :: ras !< flag for ras convection scheme @@ -3461,6 +3462,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & real(kind_phys) :: clm_lake_depth_default = 50 !< default lake depth in clm lake model logical :: clm_lake_use_lakedepth = .true. !< initialize depth from lakedepth logical :: clm_lake_debug = .false. !< verbose debugging in clm_lake + logical :: clm_debug_print = .false. !< enables prints in clm_lake !--- land/surface model parameters integer :: lsm = 1 !< flag for land surface model to use =0 for osu lsm; =1 for noah lsm; =2 for noah mp lsm; =3 for RUC lsm @@ -3706,7 +3708,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !< nstf_name(5) : zsea2 in mm !--- fractional grid logical :: frac_grid = .false. !< flag for fractional grid - logical :: frac_ice = .false. !< flag for fractional ice when fractional grid is not in use + logical :: frac_ice = .true. !< flag for lake fractional ice when fractional grid is not in use logical :: ignore_lake = .true. !< flag for ignoring lakes real(kind=kind_phys) :: min_lakeice = 0.15d0 !< minimum lake ice value real(kind=kind_phys) :: min_seaice = 1.0d-11 !< minimum sea ice value @@ -3915,7 +3917,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !--- lake model control lkm, iopt_lake, lakedepth_threshold, lakefrac_threshold, & clm_lake_depth_default, clm_lake_use_lakedepth, & - clm_lake_debug, use_lake2m, & + clm_lake_debug, clm_debug_print, use_lake2m, & !--- physical parameterizations ras, trans_trac, old_monin, cnvgwd, mstrat, moist_adj, & cscnv, cal_pre, do_aw, do_shoc, shocaftcnv, shoc_cld, & @@ -4649,6 +4651,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%clm_lake_depth_default = clm_lake_depth_default Model%clm_lake_use_lakedepth = clm_lake_use_lakedepth Model%clm_lake_debug = clm_lake_debug + Model%clm_debug_print = clm_debug_print ! Noah MP options from namelist ! @@ -5640,6 +5643,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & print *,' clm_lake_use_lakedepth = ',Model%clm_lake_use_lakedepth print *,' clm_lake_depth_default = ',Model%clm_lake_depth_default print *,' clm_lake_debug = ',Model%clm_lake_debug + print *,' clm_debug_print = ',Model%clm_debug_print print *,' nlevlake_clm_lake = ',Model%nlevlake_clm_lake print *,' nlevsoil_clm_lake = ',Model%nlevsoil_clm_lake print *,' nlevsnow_clm_lake = ',Model%nlevsnow_clm_lake diff --git a/ccpp/data/GFS_typedefs.meta b/ccpp/data/GFS_typedefs.meta index 64e7ae5b7d..9b54e5c2cb 100644 --- a/ccpp/data/GFS_typedefs.meta +++ b/ccpp/data/GFS_typedefs.meta @@ -7147,6 +7147,12 @@ units = flag dimensions = () type = logical +[clm_debug_print] + standard_name = flag_for_printing_in_clm_lake_model + long_name = flag for printing in clm lake model + units = flag + dimensions = () + type = logical [fire_aux_data_levels] standard_name = fire_auxiliary_data_extent long_name = number of levels of fire auxiliary data diff --git a/ccpp/driver/GFS_diagnostics.F90 b/ccpp/driver/GFS_diagnostics.F90 index f14773d347..71c125bfeb 100644 --- a/ccpp/driver/GFS_diagnostics.F90 +++ b/ccpp/driver/GFS_diagnostics.F90 @@ -2696,8 +2696,8 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop idx = idx + 1 ExtDiag(idx)%axes = 2 ExtDiag(idx)%name = 'lake_q2m' - ExtDiag(idx)%desc = 'Humidity at 2 m from Lake Model' - ExtDiag(idx)%unit = '%' + ExtDiag(idx)%desc = '2m specific humidity from Lake Model' + ExtDiag(idx)%unit = 'kg/kg' ExtDiag(idx)%mod_name = 'gfs_sfc' ExtDiag(idx)%intpl_method = 'nearest_stod' allocate (ExtDiag(idx)%data(nblks)) diff --git a/ccpp/physics b/ccpp/physics index af890d4ee1..5b946850af 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit af890d4ee181c503b09dc0e035820a2af040b14b +Subproject commit 5b946850af58e1cea8c37661158b661df21e9390