From 44e124bd73bb34bc4d97be4ca2883be6ccbb5e53 Mon Sep 17 00:00:00 2001 From: Rich Fiorella Date: Thu, 9 May 2024 12:32:35 -0600 Subject: [PATCH] syntax fix for CanopyHydrologyMod --- .../elm/src/biogeophys/CanopyHydrologyMod.F90 | 43 +++++++++---------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/components/elm/src/biogeophys/CanopyHydrologyMod.F90 b/components/elm/src/biogeophys/CanopyHydrologyMod.F90 index 16b1fe333c63..90be5a7dc81b 100755 --- a/components/elm/src/biogeophys/CanopyHydrologyMod.F90 +++ b/components/elm/src/biogeophys/CanopyHydrologyMod.F90 @@ -801,20 +801,20 @@ subroutine FracH2OSfc(bounds, num_h2osfc, filter_h2osfc, & real(r8):: min_h2osfc !----------------------------------------------------------------------- - associate( & - micro_sigma => col_pp%micro_sigma , & ! Input: [real(r8) (:) ] microtopography pdf sigma (m) - - iwp_microrel => col_pp%iwp_microrel , & ! Input: [real(r8) (:) ] ice wedge polygon microtopographic relief (m) - iwp_exclvol => col_pp%iwp_exclvol , & ! Input: [real(r8) (:) ] microtopography pdf sigma (m) - iwp_ddep => col_pp%iwp_ddep , & ! Input: [real(r8) (:) ] microtopography pdf sigma (m) - - h2osno => col_ws%h2osno , & ! Input: [real(r8) (:) ] snow water (mm H2O) - - h2osoi_liq => col_ws%h2osoi_liq , & ! Output: [real(r8) (:,:) ] liquid water (col,lyr) [kg/m2] - h2osfc => col_ws%h2osfc , & ! Output: [real(r8) (:) ] surface water (mm) - frac_sno => col_ws%frac_sno , & ! Output: [real(r8) (:) ] fraction of ground covered by snow (0 to 1) - frac_sno_eff => col_ws%frac_sno_eff , & ! Output: [real(r8) (:) ] eff. fraction of ground covered by snow (0 to 1) - frac_h2osfc => col_ws%frac_h2osfc , & ! Output: [real(r8) (:) ] col fractional area with surface water greater than zero + associate( & + micro_sigma => col_pp%micro_sigma , & ! Input: [real(r8) (:) ] microtopography pdf sigma (m) + + iwp_microrel => col_pp%iwp_microrel , & ! Input: [real(r8) (:) ] ice wedge polygon microtopographic relief (m) + iwp_exclvol => col_pp%iwp_exclvol , & ! Input: [real(r8) (:) ] microtopography pdf sigma (m) + iwp_ddep => col_pp%iwp_ddep , & ! Input: [real(r8) (:) ] microtopography pdf sigma (m) + + h2osno => col_ws%h2osno , & ! Input: [real(r8) (:) ] snow water (mm H2O) + + h2osoi_liq => col_ws%h2osoi_liq , & ! Output: [real(r8) (:,:) ] liquid water (col,lyr) [kg/m2] + h2osfc => col_ws%h2osfc , & ! Output: [real(r8) (:) ] surface water (mm) + frac_sno => col_ws%frac_sno , & ! Output: [real(r8) (:) ] fraction of ground covered by snow (0 to 1) + frac_sno_eff => col_ws%frac_sno_eff , & ! Output: [real(r8) (:) ] eff. fraction of ground covered by snow (0 to 1) + frac_h2osfc => col_ws%frac_h2osfc , & ! Output: [real(r8) (:) ] col fractional area with surface water greater than zero frac_h2osfc_act => col_ws%frac_h2osfc_act & ! Output: [real(r8) (:) ] col fractional area with surface water greater than zero ) @@ -829,19 +829,19 @@ subroutine FracH2OSfc(bounds, num_h2osfc, filter_h2osfc, & if (lun_pp%itype(l) == istsoil .or. lun_pp%itype(l) == istcrop) then ! Use newton-raphson method to iteratively determine frac_h20sfc - ! based on amount of surface water storage (h2osfc) and + ! based on amount of surface water storage (h2osfc) and ! microtopography variability (micro_sigma) if nonpolygonal, or ! amount of surface water (h2osfc) and microtopographic attributes ! (iwp_microrel, iwp_exclvol) if polygonal tundra if (h2osfc(c) > min_h2osfc) then ! a cutoff is needed for numerical reasons...(nonconvergence after 5 iterations) - + if lun_pp%ispolygon(l) then ! calculate water depth and inundation fraction if column is polygonal swc = h2osfc(c)/1000 ! convert to m - - if swc > iwp_microrel - iwp_exclvol then + + if (swc > iwp_microrel - iwp_exclvol) then d = swc + iwp_exclvol else d = 0.0 @@ -857,10 +857,9 @@ subroutine FracH2OSfc(bounds, num_h2osfc, filter_h2osfc, & !-- update the submerged areal fraction using the new d value frac_h2osfc(c) = (3_r8/iwp_microrel) * (2_r8*iwp_exclvol - iwp_microrel) * (d/iwp_microrel)**2_r8 & - + (2_r8/iwp_microrel) * (2_r8*iwp_microrel - 3_r8*iwp_exclvol) * (d/iwp_microrel) - endif - - else + + (2_r8/iwp_microrel) * (2_r8*iwp_microrel - 3_r8*iwp_exclvol) * (d/iwp_microrel) + + else ! calculate water depth and inudation fraction if column is non-polygonal d=0.0 sigma=1.0e3 * micro_sigma(c) ! convert to mm