Skip to content

Commit 0faa13b

Browse files
rcabellscrasmussen
authored andcommitted
Use reasonable lake_option default when not specified
1 parent cfcc8bb commit 0faa13b

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/OrchestratorLayer/config.F90

+11-1
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,7 @@ subroutine rt_nlst_check(self)
476476
end if
477477

478478
if ((self%lake_option .lt. 0) .or. (self%lake_option .gt. 3)) then
479+
print *, self%lake_option
479480
call hydro_stop("Lake Option must be 0 [lakes off], 1 [level pool], or 2 [passthrough], or 3 [reservoir DA]")
480481
end if
481482

@@ -669,7 +670,7 @@ subroutine init_namelist_rt_field(did)
669670
compound_channel = .FALSE.
670671
channel_loss_option = 0
671672
bucket_loss = 0
672-
lake_option = 1
673+
lake_option = -99
673674
reservoir_persistence_usgs = .FALSE.
674675
reservoir_persistence_usace = .FALSE.
675676
reservoir_observation_lookback_hours = 18
@@ -763,6 +764,15 @@ subroutine init_namelist_rt_field(did)
763764
lake_option = 1
764765
end if
765766

767+
if (lake_option == -99) then
768+
if (route_lake_f /= "") then
769+
print *, "WARNING: lake_option not specified, but route_lake_f specified. Setting lake_option to 1."
770+
lake_option = 1
771+
else
772+
lake_option = 0
773+
end if
774+
end if
775+
766776
nlst(did)%lake_option = lake_option
767777
nlst(did)%reservoir_persistence_usgs = reservoir_persistence_usgs
768778
nlst(did)%reservoir_persistence_usace = reservoir_persistence_usace

0 commit comments

Comments
 (0)