Skip to content

Commit 09420fe

Browse files
committed
More changes to identify lake columns
1 parent 8a358fd commit 09420fe

File tree

6 files changed

+14
-17
lines changed

6 files changed

+14
-17
lines changed

components/elm/src/biogeochem/DUSTMod.F90

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,15 +184,13 @@ subroutine InitCold(this, bounds)
184184
type(bounds_type), intent(in) :: bounds
185185
!
186186
! !LOCAL VARIABLES:
187-
integer :: c,l
187+
integer :: c
188188
!-----------------------------------------------------------------------
189189

190190
! Set basin factor to 1 for now
191191

192192
do c = bounds%begc, bounds%endc
193-
l = col_pp%landunit(c)
194-
195-
if (.not.lun_pp%lakpoi(l)) then
193+
if (.not.col_pp%is_lake(c)) then
196194
this%mbl_bsn_fct_col(c) = 1.0_r8
197195
end if
198196
end do

components/elm/src/biogeophys/LakeStateType.F90

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,7 @@ subroutine InitCold(this, bounds)
227227
!-------------------------------------------------
228228

229229
do c = bounds%begc, bounds%endc
230-
l = col_pp%landunit(c)
231-
if (lun_pp%lakpoi(l)) then
230+
if (col_pp%is_lake(c)) then
232231
! Set lake ice fraction and top eddy conductivity from previous timestep
233232
! Always initialize with no ice to prevent excessive ice sheets from forming when
234233
! starting with old lake model that has unrealistically cold lake conseratures.

components/elm/src/biogeophys/PhotosynthesisType.F90

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,8 @@ subroutine TimeStepInit (this, bounds)
426426

427427
do p = bounds%begp, bounds%endp
428428
l = veg_pp%landunit(p)
429-
if (.not. lun_pp%lakpoi(l)) then
429+
c = veg_pp%column(p)
430+
if (.not. col_pp%is_lake(c)) then
430431
this%psnsun_patch(p) = 0._r8
431432
this%psnsun_wc_patch(p) = 0._r8
432433
this%psnsun_wj_patch(p) = 0._r8
@@ -486,7 +487,8 @@ subroutine photosyns_vars_TimeStepInit (photosyns_vars, bounds)
486487

487488
do p = bounds%begp, bounds%endp
488489
l = veg_pp%landunit(p)
489-
if (.not. lun_pp%lakpoi(l)) then
490+
c = veg_pp%column(p)
491+
if (.not. col_pp%is_lake(c)) then
490492
photosyns_vars%psnsun_patch(p) = 0._r8
491493
photosyns_vars%psnsun_wc_patch(p) = 0._r8
492494
photosyns_vars%psnsun_wj_patch(p) = 0._r8

components/elm/src/biogeophys/SnowHydrologyMod.F90

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2148,7 +2148,7 @@ subroutine InitSnowLayers (bounds, snow_depth)
21482148
real(r8) , intent(in) :: snow_depth(bounds%begc:)
21492149
!
21502150
! LOCAL VARAIBLES:
2151-
integer :: c,l,j ! indices
2151+
integer :: c,j ! indices
21522152
real(r8) :: minbound, maxbound ! helper variables
21532153

21542154
!SHR_ASSERT_ALL((ubound(snow_depth) == (/bounds%endc/)), errMsg(sourcefile, __LINE__))
@@ -2160,14 +2160,13 @@ subroutine InitSnowLayers (bounds, snow_depth)
21602160
zi => col_pp%zi & ! Output: [real(r8) (:,:) ] interface level below a "z" level (m) (-nlevsno+0:nlevgrnd)
21612161
)
21622162
loop_columns: do c = bounds%begc,bounds%endc
2163-
l = col_pp%landunit(c)
21642163

21652164
dz(c,-nlevsno+1: 0) = spval
21662165
z (c,-nlevsno+1: 0) = spval
21672166
zi(c,-nlevsno :-1) = spval
21682167

21692168
! Special case: lake
2170-
if (lun_pp%lakpoi(l)) then
2169+
if (col_pp%is_lake(c)) then
21712170
snl(c) = 0
21722171
dz(c,-nlevsno+1:0) = 0._r8
21732172
z(c,-nlevsno+1:0) = 0._r8

components/elm/src/data_types/ColumnDataType.F90

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1234,7 +1234,7 @@ subroutine col_es_init(this, begc, endc)
12341234
end if
12351235

12361236
! Below snow temperatures - nonlake points (lake points are set below)
1237-
if (.not. lun_pp%lakpoi(l)) then
1237+
if (.not. col_pp%is_lake(c)) then
12381238

12391239
if (lun_pp%itype(l) == istice .or. lun_pp%itype(l) == istice_mec) then
12401240
this%t_soisno(c,1:nlevgrnd) = 250._r8
@@ -1292,7 +1292,7 @@ subroutine col_es_init(this, begc, endc)
12921292
this%t_grnd(c) = this%t_soisno(c,snl(c)+1)
12931293
endif
12941294

1295-
if (lun_pp%lakpoi(l)) then ! special handling for lake points
1295+
if (col_pp%is_lake(c)) then ! special handling for lake points
12961296
this%t_soisno(c,1:nlevgrnd) = 277._r8
12971297
this%t_lake(c,1:nlevlak) = 277._r8
12981298
this%t_grnd(c) = 277._r8
@@ -1733,7 +1733,7 @@ subroutine col_ws_init(this, begc, endc, h2osno_input, snow_depth_input, watsat_
17331733
this%h2osoi_liq(c,-nlevsno+1:) = spval
17341734
this%h2osoi_ice(c,-nlevsno+1:) = spval
17351735

1736-
if (.not. lun_pp%lakpoi(l)) then !not lake
1736+
if (.not. col_pp%is_lake(c)) then !not lake
17371737
nlevbed = col_pp%nlevbed(c)
17381738
! volumetric water
17391739
if (col_pp%is_soil(c) .or. col_pp%is_crop(c)) then
@@ -1823,7 +1823,7 @@ subroutine col_ws_init(this, begc, endc, h2osno_input, snow_depth_input, watsat_
18231823
!--------------------------------------------
18241824
! Set Lake water
18251825
!--------------------------------------------
1826-
if (lun_pp%lakpoi(l)) then
1826+
if (col_pp%is_lake(c)) then
18271827
do j = -nlevsno+1, 0
18281828
if (j > col_pp%snl(c)) then
18291829
this%h2osoi_ice(c,j) = col_pp%dz(c,j)*bdsno

components/elm/src/main/initVerticalMod.F90

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,13 +476,12 @@ subroutine initVertical(bounds, snow_depth, thick_wall, thick_roof)
476476
associate(snl => col_pp%snl) ! Output: [integer (:) ] number of snow layers
477477

478478
do c = bounds%begc,bounds%endc
479-
l = col_pp%landunit(c)
480479

481480
col_pp%dz(c,-nlevsno+1: 0) = spval
482481
col_pp%z (c,-nlevsno+1: 0) = spval
483482
col_pp%zi(c,-nlevsno :-1) = spval
484483

485-
if (.not. lun_pp%lakpoi(l)) then
484+
if (.not. col_pp%is_lake(c)) then
486485
if (snow_depth(c) < 0.01_r8) then
487486
snl(c) = 0
488487
col_pp%dz(c,-nlevsno+1:0) = 0._r8

0 commit comments

Comments
 (0)