From f2184e1a5f20df26d5028925456cd4da5ba6dbaf Mon Sep 17 00:00:00 2001 From: "Aaron M. Lattanzi" <103702284+AMLattanzi@users.noreply.github.com> Date: Thu, 1 Feb 2024 08:53:54 -0700 Subject: [PATCH] Only write into lsm flux if we have a valid array4. (#1416) --- Source/BoundaryConditions/ABLMost.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/BoundaryConditions/ABLMost.cpp b/Source/BoundaryConditions/ABLMost.cpp index 2bb8778aa..adf96859f 100644 --- a/Source/BoundaryConditions/ABLMost.cpp +++ b/Source/BoundaryConditions/ABLMost.cpp @@ -204,7 +204,7 @@ ABLMost::compute_most_bcs (const int& lev, dest_arr); int is_land = (lmask_arr) ? lmask_arr(i,j,zlo) : 1; - if (is_land && vbx.contains(i,j,k)) { + if (is_land && lsm_flux_arr && vbx.contains(i,j,k)) { lsm_flux_arr(i,j,zlo) = Tflux; } });