From 9b06a00863326875f25246ed3c4d070946104343 Mon Sep 17 00:00:00 2001 From: "James V. Geiger" Date: Thu, 16 Mar 2023 09:29:06 -0400 Subject: [PATCH] Correct intent error This patch fixes an intent(out) vs intent(inout) error that resulted in glaciers melting. In SFCDIF1_GLACIER, the variable FV was declared as intent(out). Technically, this means that FV was uninitialized. FV was initialized for the first iteration (ITER=1), but it was not initialized for subsequent calls (iterations 2 through 5). --- .../land/noahmp.4.0.1/phys/module_sf_noahmp_glacier_401.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lis/surfacemodels/land/noahmp.4.0.1/phys/module_sf_noahmp_glacier_401.F90 b/lis/surfacemodels/land/noahmp.4.0.1/phys/module_sf_noahmp_glacier_401.F90 index cc0dba5ae..2a36e31e7 100644 --- a/lis/surfacemodels/land/noahmp.4.0.1/phys/module_sf_noahmp_glacier_401.F90 +++ b/lis/surfacemodels/land/noahmp.4.0.1/phys/module_sf_noahmp_glacier_401.F90 @@ -1208,7 +1208,7 @@ SUBROUTINE SFCDIF1_GLACIER(ITER ,ZLVL ,ZPD ,Z0H ,Z0M , & !in REAL, INTENT(INOUT) :: FH2 !sen heat stability correction, weighted by prior iters ! outputs - REAL, INTENT(OUT) :: FV !friction velocity (m/s) + REAL, INTENT(INOUT) :: FV !friction velocity (m/s) REAL, INTENT(OUT) :: CM !drag coefficient for momentum REAL, INTENT(OUT) :: CH !drag coefficient for heat REAL, INTENT(OUT) :: CH2 !drag coefficient for heat