From b3022782466e72afe52341e7b8c18aff8baaeb35 Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Mon, 24 Jul 2023 15:05:32 +0000 Subject: [PATCH 1/7] 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. --- ccpp/data/GFS_typedefs.F90 | 8 ++++++-- ccpp/data/GFS_typedefs.meta | 6 ++++++ ccpp/physics | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ccpp/data/GFS_typedefs.F90 b/ccpp/data/GFS_typedefs.F90 index d0b19327c..80826ba42 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 64e7ae5b7..9b54e5c2c 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/physics b/ccpp/physics index 5dc968ef4..9e35de10a 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 5dc968ef4e0aa0c36ef980e39a44d58056d1cb2c +Subproject commit 9e35de10adecef6bdb21a53ea6d9e5350384c60c From 2a4e8a0b7b206e2970f784f1b5bc191e635078b4 Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Thu, 27 Jul 2023 21:09:23 +0000 Subject: [PATCH 2/7] changes missing from prior ccpp/physics commits --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 03dbaccd4..180c43b9c 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 03dbaccd4663cbb30520e3ed63241888e0d546fd +Subproject commit 180c43b9ccd6dc268d79fccfafcb83cf5b4917f6 From 391341a3bc2f9c15330ea0e69c6891fc76c503a1 Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Fri, 28 Jul 2023 03:12:55 +0000 Subject: [PATCH 3/7] t_grnd(i) should be t_grnd(c) --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 180c43b9c..ace56af85 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 180c43b9ccd6dc268d79fccfafcb83cf5b4917f6 +Subproject commit ace56af857fd760e29c50f67850f3620ed2bdda4 From 5a59950e5d5302d63fa546810cd55b9d12c7bb22 Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Fri, 28 Jul 2023 15:19:44 +0000 Subject: [PATCH 4/7] fix another typo in clm_lake.f90 --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index ace56af85..c0c253f9f 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit ace56af857fd760e29c50f67850f3620ed2bdda4 +Subproject commit c0c253f9fcec4c871b954533d912b1f3ec28b420 From c04842bf18a85b82f3f0b23d15ca2c0625baa03d Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Thu, 17 Aug 2023 20:04:05 +0000 Subject: [PATCH 5/7] correction to lake_q2m metadata --- ccpp/driver/GFS_diagnostics.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ccpp/driver/GFS_diagnostics.F90 b/ccpp/driver/GFS_diagnostics.F90 index f14773d34..71c125bfe 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)) From 0d9066e97ad44e4c318bc9f2bff0b82ec90cf93c Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Fri, 18 Aug 2023 19:52:41 +0000 Subject: [PATCH 6/7] merge ccpp-physics #91 (UFS-SRW v3.0.0 SciDoc updates) --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 725adbd17..f12b69f04 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 725adbd1791a4b6577b92859b3c53f9d1076961c +Subproject commit f12b69f0460b3adf13b45e703e8afe3f487b55a7 From 234af9924db5a68ebad202d6f11739f05dd148c0 Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Tue, 22 Aug 2023 13:25:36 +0000 Subject: [PATCH 7/7] point to upstream ufs/dev for ccpp/physics --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index f12b69f04..5b946850a 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit f12b69f0460b3adf13b45e703e8afe3f487b55a7 +Subproject commit 5b946850af58e1cea8c37661158b661df21e9390