diff --git a/ERF__ComputeTurbulentViscosity_8cpp.html b/ERF__ComputeTurbulentViscosity_8cpp.html index 9c565c227..423347d54 100644 --- a/ERF__ComputeTurbulentViscosity_8cpp.html +++ b/ERF__ComputeTurbulentViscosity_8cpp.html @@ -735,12 +735,12 @@

189  - cell_data(i,j,k-1,RhoTheta_comp)/cell_data(i,j,k-1,Rho_comp) )*dzInv;
190  }
191  Real E = amrex::max(cell_data(i,j,k,RhoKE_comp)/cell_data(i,j,k,Rho_comp),Real(0.0));
-
192  volatile Real stratification = l_abs_g * dtheta_dz * l_inv_theta0;
+
192  Real stratification = l_abs_g * dtheta_dz * l_inv_theta0;
193  Real length;
194  if (stratification <= eps) {
195  length = DeltaMsf;
196  } else {
-
197  length = 0.76 * std::sqrt(E / stratification);
+
197  length = 0.76 * std::sqrt(E / amrex::max(stratification,eps));
198  // mixing length should be _reduced_ for stable stratification
199  length = amrex::min(length, DeltaMsf);
200  // following WRF, make sure the mixing length isn't too small