From df4b7ceb2ae1ff234382140f8074e76a9a84696a Mon Sep 17 00:00:00 2001 From: Mahesh Natarajan Date: Tue, 26 Nov 2024 18:36:25 -0800 Subject: [PATCH] Making terrain as static if zlevels are used and terrain is not set in the inputs (#1985) Co-authored-by: Mahesh Natarajan --- Source/DataStructs/ERF_DataStruct.H | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/DataStructs/ERF_DataStruct.H b/Source/DataStructs/ERF_DataStruct.H index 41707c247..872025b54 100644 --- a/Source/DataStructs/ERF_DataStruct.H +++ b/Source/DataStructs/ERF_DataStruct.H @@ -143,6 +143,11 @@ struct SolverChoice { // Is the terrain none, static or moving? pp.query_enum_case_insensitive("terrain_type",terrain_type); + int n_zlevels = pp.countval("terrain_z_levels"); + if (n_zlevels > 0 and terrain_type == TerrainType::None) + { + terrain_type = TerrainType::Static; + } // Use lagged_delta_rt in the fast integrator? pp.query("use_lagged_delta_rt", use_lagged_delta_rt);