From 3ff3dbbc6e3535d9cd381d992bce4d8027886122 Mon Sep 17 00:00:00 2001 From: Ryan Cabell Date: Wed, 6 Nov 2024 16:29:12 -0700 Subject: [PATCH] Use reasonable lake_option default when not specified --- src/OrchestratorLayer/config.F90 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/OrchestratorLayer/config.F90 b/src/OrchestratorLayer/config.F90 index f07109b7c..e600e1d28 100644 --- a/src/OrchestratorLayer/config.F90 +++ b/src/OrchestratorLayer/config.F90 @@ -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 @@ -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 @@ -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