Skip to content

Commit 341357a

Browse files
committed
Addresses two bugs in the NGEE-Arctic IM3 code
Issues addressed: a. stocking density units passed through to VegStructUpdateMod.F90 were still stems/ha, they should be stems/m2 at this point. Fixed in pftvarcon.F90 b. a few remaining issues in the burial fraction equations for shrubs have been corrected.
1 parent fbdf77c commit 341357a

File tree

2 files changed

+25
-12
lines changed

2 files changed

+25
-12
lines changed

components/elm/src/biogeochem/VegStructUpdateMod.F90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,8 @@ subroutine VegStructUpdate(num_soilp, filter_soilp, &
240240
ol = min( max(snow_depth(c)-hbot(p), 0._r8), htop(p)-hbot(p))
241241
fb = (ol / max(1.e-06_r8, (htop(p)-hbot(p))))
242242
else if (woody(ivt(p)) == 2.0_r8) then
243-
ol = min( max(snow_depth(c)-hbot(p), 0._r8), bendresist*(htop(p)-hbot(p)))
244-
fb = (ol / max(1.e-06_r8, bendresist(ivt(p))*(htop(p)-hbot(p))))**vegshape(ivt(p))
243+
ol = min( max(snow_depth(c)-bendresist(ivt(p))*hbot(p), 0._r8), bendresist(ivt(p))*(htop(p)-hbot(p))**vegshape(ivt(p)))
244+
fb = (ol / max(1.e-06_r8, bendresist(ivt(p))*(htop(p)-hbot(p))**vegshape(ivt(p))))
245245
else
246246
fb = max(min(snow_depth(c),0.2_r8),0._r8)/0.2_r8 ! 0.2m is assumed
247247
!depth of snow required for complete burial of grasses

components/elm/src/main/pftvarcon.F90

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ module pftvarcon
315315
! NGEE Arctic snow-vegetation interactions
316316
real(r8), allocatable :: bendresist(:) ! vegetation resistance to bending under snow loading, 0 to 1 (e.g., Liston and Hiemstra 2011; Sturm et al. 2005)
317317
real(r8), allocatable :: vegshape(:) ! shape parameter to modify shrub burial by snow (1 = parabolic, 2 = hemispheric)
318-
real(r8), allocatable :: stocking(:) ! stocking density for pft (stems / hectare)
318+
real(r8), allocatable :: stocking(:) ! stocking density for pft (stems / hectare assumed on param file)
319319
real(r8), allocatable :: taper(:) ! ratio of height:radius_breast_height (woody vegetation allometry)
320320
logical :: taper_defaults ! set flag to use taper defaults if not on params file (necessary as import and set values are in different places)
321321

@@ -1094,24 +1094,33 @@ subroutine pftconrd
10941094
if (.not. readv ) bendresist(:) = 1._r8
10951095
call ncd_io('vegshape', vegshape, 'read', ncid, readvar=readv, posNOTonfile=.true.)
10961096
if (.not. readv ) vegshape(:) = 1._r8
1097-
! check validity
1097+
! check validity
10981098
do i = 0, npft-1
10991099
if (bendresist(i) .gt. 1.0_r8 .or. bendresist(i) .le. 0._r8) then
11001100
call endrun(msg="Non-physical selection of bendresist parameter, set between 0 and 1"//errMsg(__FILE__, __LINE__))
11011101
end if
1102-
if (vegshape(i) .gt. 2.0_r8 .or. vegshape(i) .le. 0._r8) then
1103-
call endrun(msg="Non-physical selection of vegshape parameter, set between 0 and 2"//errMsg(__FILE__, __LINE__))
1102+
if (vegshape(i) .gt. 2.0_r8 .or. vegshape(i) .lt. 1._r8) then
1103+
call endrun(msg="Non-physical selection of vegshape parameter, set as 1 or 2"//errMsg(__FILE__, __LINE__))
11041104
end if
1105-
end do
1105+
end do
1106+
11061107
call ncd_io('stocking', stocking, 'read', ncid, readvar=readv, posNOTonfile=.true.)
1107-
if (.not. readv ) stocking(:) = 0.1_r8 ! convert previous default of 1000 stems/ha to stems/m2 as had been done in VegStructUpdateMod.F90
1108-
taper_defaults = .false.
1108+
if (.not. readv ) then
1109+
stocking(:) = 0.1_r8 ! convert previous default of 1000 stems/ha to stems/m2 as had been done in VegStructUpdateMod.F90
1110+
else
1111+
stocking(:) = stocking(:)/10000._r8 ! conversion from stems/ha to stems/m2 done here now
1112+
endif
1113+
if (any(stocking(:) .ge. 1000._r8 )) then
1114+
call endrun(msg="Non-physical selection of stocking density parameter, implies >1000 plants/m2"//errMsg(__FILE__, __LINE__))
1115+
endif
1116+
1117+
taper_defaults = .false.
11091118
call ncd_io('taper', taper, 'read', ncid, readvar=readv, posNOTonfile=.true.)
11101119
if (.not. readv ) then
11111120
taper(:) = 200._r8 ! pftnames not set to integers yet, so reassign further down.
11121121
taper_defaults = .true.
11131122
end if
1114-
1123+
11151124
! NOTE: the following 5 PFT flags/options are addtions to 'woody', 'stress_decid', 'season_decid',
11161125
! 'evergreen', and 'crop', 'percop'. For default ELM, will be hard-coded; while for user-defined
11171126
! it must be included in physiology file.
@@ -1453,11 +1462,15 @@ subroutine pftconrd
14531462
if (masterproc) then
14541463
write(iulog,*)
14551464
write(iulog,*) 'Using PFT physiological parameters from: ', paramfile
1456-
write(iulog,*) ' -- index -- name -- climate zone -- -- woody -- -- needleleaf -- -- evergreen -- -- stress_decid -- -- season_decid -- -- graminoid-- -- iscft -- -- crop -- -- perennial crop -- -- nfixer --'
1465+
write(iulog,*) ' -- index -- name -- climate zone -- -- woody --', &
1466+
' -- needleleaf -- -- evergreen -- -- stress_decid -- -- season_decid -- -- graminoid--', &
1467+
' -- iscft -- -- crop -- -- perennial crop -- -- nfixer -- -- taper -- -- stocking --', &
1468+
' -- bendresist -- -- vegshape '
14571469
do i = 0, npft-1
14581470
write(iulog,*) i, pftname(i), int(climatezone(i)), int(woody(i)), int(needleleaf(i)), &
14591471
int(evergreen(i)), int(stress_decid(i)), int(season_decid(i)), &
1460-
int(graminoid(i)), int(temp_iscft(i)), int(crop(i)), int(percrop(i)), int(nfixer(i))
1472+
int(graminoid(i)), int(temp_iscft(i)), int(crop(i)), int(percrop(i)), int(nfixer(i)), &
1473+
taper(i), stocking(i), bendresist(i), int(vegshape(i))
14611474
end do
14621475
write(iulog,*)
14631476
end if

0 commit comments

Comments
 (0)