Skip to content

Commit

Permalink
Use reasonable lake_option default when not specified
Browse files Browse the repository at this point in the history
  • Loading branch information
rcabell authored and scrasmussen committed Dec 19, 2024
1 parent 5802eb8 commit 3ff3dbb
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/OrchestratorLayer/config.F90
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,7 @@ subroutine rt_nlst_check(self)
end if

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

Expand Down Expand Up @@ -669,7 +670,7 @@ subroutine init_namelist_rt_field(did)
compound_channel = .FALSE.
channel_loss_option = 0
bucket_loss = 0
lake_option = 1
lake_option = -99
reservoir_persistence_usgs = .FALSE.
reservoir_persistence_usace = .FALSE.
reservoir_observation_lookback_hours = 18
Expand Down Expand Up @@ -763,6 +764,15 @@ subroutine init_namelist_rt_field(did)
lake_option = 1
end if

if (lake_option == -99) then
if (route_lake_f /= "") then
print *, "WARNING: lake_option not specified, but route_lake_f specified. Setting lake_option to 1."
lake_option = 1
else
lake_option = 0
end if
end if

nlst(did)%lake_option = lake_option
nlst(did)%reservoir_persistence_usgs = reservoir_persistence_usgs
nlst(did)%reservoir_persistence_usace = reservoir_persistence_usace
Expand Down

0 comments on commit 3ff3dbb

Please sign in to comment.