940 amrex::Real ustar = 0.0;
941 amrex::Real wstar = 0.0;
942 amrex::Real z0 = 0.0;
943 amrex::Real tflux = 0.0;
944 amrex::Real zeta = 0.0;
945 amrex::Real psi_m = 0.0;
946 amrex::Real psi_h = 0.0;
947 amrex::Real Olen = 0.0;
948 amrex::Real umm = std::max(umm_arr(i,j,k),
WSMIN);
951 ustar = u_star_arr(i,j,k);
960 tflux = -(tm_arr(i,j,k) - t_surf_arr(i,j,k)) * ustar *
mdata.
kappa /
962 tflux *= (1 + 0.61*qvm_arr(i,j,k));
963 tflux += 0.61*tm_arr(i,j,k) * -ustar*q_star_arr(i,j,k);
966 w_star_arr(i,j,k) =
calc_wstar(tflux, pblh_arr(i,j,k), tvm_arr(i,j,k));
968 umm = std::sqrt(umm_arr(i,j,k)*umm_arr(i,j,k) + wstar*wstar);
969 umm = std::max(umm,
WSMIN);
977 }
while ((std::abs(u_star_arr(i,j,k) - ustar) >
tol) && iter <= max_iters);
978 AMREX_ASSERT_WITH_MESSAGE(iter < max_iters,
"Maximum number of MOST iterations reached.");
980 t_star_arr(i,j,k) =
mdata.
kappa * (tm_arr(i,j,k) - t_surf_arr(i,j,k)) /
982 olen_arr(i,j,k) = Olen;
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real COARE3_roughness(amrex::Real zref, amrex::Real umm, amrex::Real ustar)
Definition: ERF_MOSTRoughness.H:9
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real air_viscosity(amrex::Real T_degK)
Definition: ERF_MOSTStress.H:79
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real calc_wstar(const amrex::Real &ust, const amrex::Real &tst, const amrex::Real &qst, const amrex::Real &pblh, const amrex::Real &th, const amrex::Real &thv, const amrex::Real &qv=0.0)
Definition: ERF_Wstar.H:13
amrex::Real kappa
von Karman constant
Definition: ERF_MOSTStress.H:17
amrex::Real gravity
Acceleration due to gravity (m/s^2)
Definition: ERF_MOSTStress.H:18
const amrex::Real Bjr_beta
Definition: ERF_MOSTStress.H:28
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real calc_psi_m(amrex::Real zeta) const
Definition: ERF_MOSTStress.H:40
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real calc_psi_h(amrex::Real zeta) const
Definition: ERF_MOSTStress.H:54
const amrex::Real WSMIN
Definition: ERF_MOSTStress.H:990
const amrex::Real tol
Definition: ERF_MOSTStress.H:989
similarity_funs sfuns
Definition: ERF_MOSTStress.H:988