Skip to content

Commit 1969634

Browse files
committed
Remove redundant re-initialization of variables
For many HRUs it takes noticeably long to reset hhsedy while it is not used for ievent<3. Other variables are also being initialized in other places.
1 parent e55c78a commit 1969634

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/varinit.f

+5-4
Original file line numberDiff line numberDiff line change
@@ -321,12 +321,13 @@ subroutine varinit
321321
wetsedo = 0.
322322
wetsep = 0.
323323

324+
if (ievent < 3) return
324325
!! urban modeling by J.Jeong
325-
sedprev = 0.
326-
ubnrunoff = 0.
327-
irmmdt = 0.
326+
! sedprev = 0. ! initialized in surfstor.f
327+
! ubnrunoff = 0. ! reset in sim_initday.f
328+
! irmmdt = 0. ! reset in surface.f
328329
hhsedy = 0.
329-
ubntss = 0.
330+
!ubntss = 0. ! reset in sim_initday.f
330331

331332
return
332333
end

src/zero_urbn.f

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ subroutine zero_urbn
1717
iabstr = 0.
1818

1919
!! subdaily sediment modeling by J.Jeong
20-
hhsedy=0.
20+
! hhsedy=0. ! reset in varinit.f
2121
spl_eros = 0.
2222
rill_mult = 0.
2323
eros_expo = 0.

0 commit comments

Comments
 (0)