From c9ad75ea4cce3ee662ab2e4ae96d527619b50270 Mon Sep 17 00:00:00 2001 From: AMLattanzi Date: Tue, 19 Dec 2023 11:08:33 -0800 Subject: [PATCH] It was an index issue on pert press, caused negative density. --- Source/TimeIntegration/ERF_slow_rhs_pre.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/TimeIntegration/ERF_slow_rhs_pre.cpp b/Source/TimeIntegration/ERF_slow_rhs_pre.cpp index 0feb0ccf2..496623354 100644 --- a/Source/TimeIntegration/ERF_slow_rhs_pre.cpp +++ b/Source/TimeIntegration/ERF_slow_rhs_pre.cpp @@ -549,7 +549,7 @@ void erf_slow_rhs_pre (int level, int finest_level, //if (cell_data(i,j,k,RhoTheta_comp) < 0.) printf("BAD THETA AT %d %d %d %e %e \n", // i,j,k,cell_data(i,j,k,RhoTheta_comp),cell_data(i,j,k+1,RhoTheta_comp)); AMREX_ASSERT(cell_data(i,j,k,RhoTheta_comp) > 0.); - Real qv_for_p = (use_moisture) ? cell_data(i,j,k,RhoTheta_comp) : 0.0; + Real qv_for_p = (use_moisture) ? cell_data(i,j,k,RhoQ1_comp) : 0.0; pp_arr(i,j,k) = getPgivenRTh(cell_data(i,j,k,RhoTheta_comp),qv_for_p) - p0_arr(i,j,k); }); } // end profile