1 #ifndef ERF_MOSTStress_H
2 #define ERF_MOSTStress_H
45 amrex::Real
x = std::sqrt(std::sqrt(1.0 -
gamma_m * zeta));
46 return 2.0 * std::log(0.5 * (1.0 +
x)) + log(0.5 * (1.0 +
x *
x)) -
59 amrex::Real
x = std::sqrt(1.0 -
gamma_h * zeta);
60 return 2.0 * std::log(0.5 * (1.0 +
x));
81 amrex::Real TC = T_degK - 273.15;
82 return 1.326e-5*(1. + 6.542e-3*TC + 8.301e-6*TC*TC - 4.84e-9*TC*TC*TC);
105 const amrex::Array4<const amrex::Real>& z0_arr,
106 const amrex::Array4<const amrex::Real>& umm_arr,
107 const amrex::Array4<const amrex::Real>& ,
108 const amrex::Array4<const amrex::Real>& ,
109 const amrex::Array4<const amrex::Real>& ,
110 const amrex::Array4<amrex::Real>& u_star_arr,
111 const amrex::Array4<amrex::Real>& ,
112 const amrex::Array4<amrex::Real>& t_star_arr,
113 const amrex::Array4<amrex::Real>& ,
114 const amrex::Array4<amrex::Real>& ,
115 const amrex::Array4<amrex::Real>& olen_arr,
116 const amrex::Array4<amrex::Real>& ,
117 const amrex::Array4<amrex::Real>& ,
118 const amrex::Array4<amrex::Real>& ,
119 const amrex::Array4<amrex::Real>& )
const
122 t_star_arr(i,j,k) = 0.0;
123 olen_arr(i,j,k) = 1.0e16;
154 const int& max_iters,
155 const amrex::Array4<amrex::Real>& z0_arr,
156 const amrex::Array4<const amrex::Real>& umm_arr,
157 const amrex::Array4<const amrex::Real>& tm_arr,
158 const amrex::Array4<const amrex::Real>& ,
159 const amrex::Array4<const amrex::Real>& ,
160 const amrex::Array4<amrex::Real>& u_star_arr,
161 const amrex::Array4<amrex::Real>& ,
162 const amrex::Array4<amrex::Real>& t_star_arr,
163 const amrex::Array4<amrex::Real>& ,
164 const amrex::Array4<amrex::Real>& ,
165 const amrex::Array4<amrex::Real>& olen_arr,
166 const amrex::Array4<amrex::Real>& ,
167 const amrex::Array4<amrex::Real>& ,
168 const amrex::Array4<amrex::Real>& ,
169 const amrex::Array4<amrex::Real>& )
const
172 amrex::Real umm = std::max(umm_arr(i,j,k),
WSMIN);
173 amrex::Real ustar = 0.0;
174 amrex::Real z0 = 0.0;
177 ustar = u_star_arr(i,j,k);
188 }
while ((std::abs(u_star_arr(i,j,k) - ustar) >
tol) && iter <= max_iters);
190 t_star_arr(i,j,k) = 0.0;
191 olen_arr(i,j,k) = 1.0e16;
198 const amrex::Real
tol = 1.0e-5;
224 const int& max_iters,
225 const amrex::Array4<amrex::Real>& z0_arr,
226 const amrex::Array4<const amrex::Real>& umm_arr,
227 const amrex::Array4<const amrex::Real>& ,
228 const amrex::Array4<const amrex::Real>& ,
229 const amrex::Array4<const amrex::Real>& ,
230 const amrex::Array4<amrex::Real>& u_star_arr,
231 const amrex::Array4<amrex::Real>& ,
232 const amrex::Array4<amrex::Real>& t_star_arr,
233 const amrex::Array4<amrex::Real>& ,
234 const amrex::Array4<amrex::Real>& ,
235 const amrex::Array4<amrex::Real>& olen_arr,
236 const amrex::Array4<amrex::Real>& ,
237 const amrex::Array4<amrex::Real>& ,
238 const amrex::Array4<amrex::Real>& ,
239 const amrex::Array4<amrex::Real>& )
const
242 amrex::Real umm = std::max(umm_arr(i,j,k),
WSMIN);
243 amrex::Real ustar = 0.0;
244 amrex::Real z0 = 0.0;
247 ustar = u_star_arr(i,j,k);
251 }
while ((std::abs(u_star_arr(i,j,k) - ustar) >
tol) && iter <= max_iters);
253 t_star_arr(i,j,k) = 0.0;
254 olen_arr(i,j,k) = 1.0e16;
261 const amrex::Real
tol = 1.0e-5;
284 const int& max_iters,
285 const amrex::Array4<amrex::Real>& z0_arr,
286 const amrex::Array4<const amrex::Real>& umm_arr,
287 const amrex::Array4<const amrex::Real>& ,
288 const amrex::Array4<const amrex::Real>& ,
289 const amrex::Array4<const amrex::Real>& ,
290 const amrex::Array4<amrex::Real>& u_star_arr,
291 const amrex::Array4<amrex::Real>& ,
292 const amrex::Array4<amrex::Real>& t_star_arr,
293 const amrex::Array4<amrex::Real>& ,
294 const amrex::Array4<amrex::Real>& ,
295 const amrex::Array4<amrex::Real>& olen_arr,
296 const amrex::Array4<amrex::Real>& ,
297 const amrex::Array4<amrex::Real>& ,
298 const amrex::Array4<amrex::Real>& ,
299 const amrex::Array4<amrex::Real>& )
const
302 amrex::Real umm = std::max(umm_arr(i,j,k),
WSMIN);
303 amrex::Real ustar = 0.0;
304 amrex::Real z0 = 0.0;
307 ustar = u_star_arr(i,j,k);
311 }
while ((std::abs(u_star_arr(i,j,k) - ustar) >
tol) && iter <= max_iters);
313 t_star_arr(i,j,k) = 0.0;
314 olen_arr(i,j,k) = 1.0e16;
321 const amrex::Real
tol = 1.0e-5;
344 const int& max_iters,
345 const amrex::Array4<amrex::Real>& z0_arr,
346 const amrex::Array4<const amrex::Real>& umm_arr,
347 const amrex::Array4<const amrex::Real>& ,
348 const amrex::Array4<const amrex::Real>& ,
349 const amrex::Array4<const amrex::Real>& ,
350 const amrex::Array4<amrex::Real>& u_star_arr,
351 const amrex::Array4<amrex::Real>& ,
352 const amrex::Array4<amrex::Real>& t_star_arr,
353 const amrex::Array4<amrex::Real>& ,
354 const amrex::Array4<amrex::Real>& ,
355 const amrex::Array4<amrex::Real>& olen_arr,
356 const amrex::Array4<amrex::Real>& ,
357 const amrex::Array4<amrex::Real>& Hwave_arr,
358 const amrex::Array4<amrex::Real>& Lwave_arr,
359 const amrex::Array4<amrex::Real>& eta_arr)
const
362 amrex::Real umm = std::max(umm_arr(i,j,k),
WSMIN);
363 amrex::Real ustar = 0.0;
364 amrex::Real z0 = 0.0;
366 ie = i < lbound(eta_arr).x ? lbound(eta_arr).x : i;
367 je = j < lbound(eta_arr).y ? lbound(eta_arr).y : j;
368 ie = ie > ubound(eta_arr).x ? ubound(eta_arr).x : ie;
369 je = je > ubound(eta_arr).y ? ubound(eta_arr).y : je;
372 ustar = u_star_arr(i,j,k);
373 z0 = std::min( std::max(1200.0 * Hwave_arr(i,j,k) * std::pow( Hwave_arr(i,j,k)/(Lwave_arr(i,j,k)+
eps), 4.5 )
377 }
while ((std::abs(u_star_arr(i,j,k) - ustar) >
tol) && iter <= max_iters);
379 t_star_arr(i,j,k) = 0.0;
380 olen_arr(i,j,k) = 1.0e16;
387 const amrex::Real
tol = 1.0e-5;
388 const amrex::Real
eps = 1e-15;
413 const int& max_iters,
414 const amrex::Array4<const amrex::Real>& z0_arr,
415 const amrex::Array4<const amrex::Real>& umm_arr,
416 const amrex::Array4<const amrex::Real>& tm_arr,
417 const amrex::Array4<const amrex::Real>& tvm_arr,
418 const amrex::Array4<const amrex::Real>& qvm_arr,
419 const amrex::Array4<amrex::Real>& u_star_arr,
420 const amrex::Array4<amrex::Real>& w_star_arr,
421 const amrex::Array4<amrex::Real>& t_star_arr,
422 const amrex::Array4<amrex::Real>& q_star_arr,
423 const amrex::Array4<amrex::Real>& t_surf_arr,
424 const amrex::Array4<amrex::Real>& olen_arr,
425 const amrex::Array4<amrex::Real>& pblh_arr,
426 const amrex::Array4<amrex::Real>& ,
427 const amrex::Array4<amrex::Real>& ,
428 const amrex::Array4<amrex::Real>& )
const
431 amrex::Real ustar = 0.0;
432 amrex::Real wstar = 0.0;
433 amrex::Real tflux = 0.0;
434 amrex::Real zeta = 0.0;
435 amrex::Real psi_m = 0.0;
436 amrex::Real psi_h = 0.0;
437 amrex::Real Olen = 0.0;
438 amrex::Real umm = std::max(umm_arr(i,j,k),
WSMIN);
441 ustar = u_star_arr(i,j,k);
442 tflux =
mdata.
surf_temp_flux*(1 + 0.61*qvm_arr(i,j,k)) - 0.61*tm_arr(i,j,k)*ustar*q_star_arr(i,j,k);
445 w_star_arr(i,j,k) =
calc_wstar(tflux, pblh_arr(i,j,k), tvm_arr(i,j,k));
447 umm = std::sqrt(umm_arr(i,j,k)*umm_arr(i,j,k) + wstar*wstar);
448 umm = std::max(umm,
WSMIN);
456 }
while ((std::abs(u_star_arr(i,j,k) - ustar) >
tol) && iter <= max_iters);
457 AMREX_ASSERT_WITH_MESSAGE(iter < max_iters,
"Maximum number of MOST iterations reached.");
460 (u_star_arr(i,j,k) *
mdata.
kappa) + tm_arr(i,j,k);
462 olen_arr(i,j,k) = Olen;
468 const amrex::Real
tol = 1.0e-5;
495 const int& max_iters,
496 const amrex::Array4<amrex::Real>& z0_arr,
497 const amrex::Array4<const amrex::Real>& umm_arr,
498 const amrex::Array4<const amrex::Real>& tm_arr,
499 const amrex::Array4<const amrex::Real>& tvm_arr,
500 const amrex::Array4<const amrex::Real>& qvm_arr,
501 const amrex::Array4<amrex::Real>& u_star_arr,
502 const amrex::Array4<amrex::Real>& w_star_arr,
503 const amrex::Array4<amrex::Real>& t_star_arr,
504 const amrex::Array4<amrex::Real>& q_star_arr,
505 const amrex::Array4<amrex::Real>& t_surf_arr,
506 const amrex::Array4<amrex::Real>& olen_arr,
507 const amrex::Array4<amrex::Real>& pblh_arr,
508 const amrex::Array4<amrex::Real>& ,
509 const amrex::Array4<amrex::Real>& ,
510 const amrex::Array4<amrex::Real>& )
const
513 amrex::Real ustar = 0.0;
514 amrex::Real wstar = 0.0;
515 amrex::Real tflux = 0.0;
516 amrex::Real z0 = 0.0;
517 amrex::Real zeta = 0.0;
518 amrex::Real psi_m = 0.0;
519 amrex::Real psi_h = 0.0;
520 amrex::Real Olen = 0.0;
521 amrex::Real umm = std::max(umm_arr(i,j,k),
WSMIN);
524 ustar = u_star_arr(i,j,k);
533 tflux =
mdata.
surf_temp_flux*(1 + 0.61*qvm_arr(i,j,k)) - 0.61*tm_arr(i,j,k)*ustar*q_star_arr(i,j,k);
536 w_star_arr(i,j,k) =
calc_wstar(tflux, pblh_arr(i,j,k), tvm_arr(i,j,k));
538 umm = std::sqrt(umm_arr(i,j,k)*umm_arr(i,j,k) + wstar*wstar);
539 umm = std::max(umm,
WSMIN);
547 }
while ((std::abs(u_star_arr(i,j,k) - ustar) >
tol) && iter <= max_iters);
548 AMREX_ASSERT_WITH_MESSAGE(iter < max_iters,
"Maximum number of MOST iterations reached.");
551 (u_star_arr(i,j,k) *
mdata.
kappa) + tm_arr(i,j,k);
553 olen_arr(i,j,k) = Olen;
560 const amrex::Real
tol = 1.0e-5;
586 const int& max_iters,
587 const amrex::Array4<amrex::Real>& z0_arr,
588 const amrex::Array4<const amrex::Real>& umm_arr,
589 const amrex::Array4<const amrex::Real>& tm_arr,
590 const amrex::Array4<const amrex::Real>& tvm_arr,
591 const amrex::Array4<const amrex::Real>& qvm_arr,
592 const amrex::Array4<amrex::Real>& u_star_arr,
593 const amrex::Array4<amrex::Real>& w_star_arr,
594 const amrex::Array4<amrex::Real>& t_star_arr,
595 const amrex::Array4<amrex::Real>& q_star_arr,
596 const amrex::Array4<amrex::Real>& t_surf_arr,
597 const amrex::Array4<amrex::Real>& olen_arr,
598 const amrex::Array4<amrex::Real>& pblh_arr,
599 const amrex::Array4<amrex::Real>& ,
600 const amrex::Array4<amrex::Real>& ,
601 const amrex::Array4<amrex::Real>& )
const
604 amrex::Real ustar = 0.0;
605 amrex::Real wstar = 0.0;
606 amrex::Real tflux = 0.0;
607 amrex::Real z0 = 0.0;
608 amrex::Real zeta = 0.0;
609 amrex::Real psi_m = 0.0;
610 amrex::Real psi_h = 0.0;
611 amrex::Real Olen = 0.0;
612 amrex::Real umm = std::max(umm_arr(i,j,k),
WSMIN);
615 ustar = u_star_arr(i,j,k);
617 tflux =
mdata.
surf_temp_flux*(1 + 0.61*qvm_arr(i,j,k)) - 0.61*tm_arr(i,j,k)*ustar*q_star_arr(i,j,k);
620 w_star_arr(i,j,k) =
calc_wstar(tflux, pblh_arr(i,j,k), tvm_arr(i,j,k));
622 umm = std::sqrt(umm_arr(i,j,k)*umm_arr(i,j,k) + wstar*wstar);
623 umm = std::max(umm,
WSMIN);
631 }
while ((std::abs(u_star_arr(i,j,k) - ustar) >
tol) && iter <= max_iters);
632 AMREX_ASSERT_WITH_MESSAGE(iter < max_iters,
"Maximum number of MOST iterations reached.");
635 (u_star_arr(i,j,k) *
mdata.
kappa) + tm_arr(i,j,k);
637 olen_arr(i,j,k) = Olen;
644 const amrex::Real
tol = 1.0e-5;
667 const int& max_iters,
668 const amrex::Array4<amrex::Real>& z0_arr,
669 const amrex::Array4<const amrex::Real>& umm_arr,
670 const amrex::Array4<const amrex::Real>& tm_arr,
671 const amrex::Array4<const amrex::Real>& tvm_arr,
672 const amrex::Array4<const amrex::Real>& qvm_arr,
673 const amrex::Array4<amrex::Real>& u_star_arr,
674 const amrex::Array4<amrex::Real>& w_star_arr,
675 const amrex::Array4<amrex::Real>& t_star_arr,
676 const amrex::Array4<amrex::Real>& q_star_arr,
677 const amrex::Array4<amrex::Real>& t_surf_arr,
678 const amrex::Array4<amrex::Real>& olen_arr,
679 const amrex::Array4<amrex::Real>& pblh_arr,
680 const amrex::Array4<amrex::Real>& ,
681 const amrex::Array4<amrex::Real>& ,
682 const amrex::Array4<amrex::Real>& )
const
685 amrex::Real ustar = 0.0;
686 amrex::Real wstar = 0.0;
687 amrex::Real tflux = 0.0;
688 amrex::Real z0 = 0.0;
689 amrex::Real zeta = 0.0;
690 amrex::Real psi_m = 0.0;
691 amrex::Real psi_h = 0.0;
692 amrex::Real Olen = 0.0;
693 amrex::Real umm = std::max(umm_arr(i,j,k),
WSMIN);
696 ustar = u_star_arr(i,j,k);
698 tflux =
mdata.
surf_temp_flux*(1 + 0.61*qvm_arr(i,j,k)) - 0.61*tm_arr(i,j,k)*ustar*q_star_arr(i,j,k);
701 w_star_arr(i,j,k) =
calc_wstar(tflux, pblh_arr(i,j,k), tvm_arr(i,j,k));
703 umm = std::sqrt(umm_arr(i,j,k)*umm_arr(i,j,k) + wstar*wstar);
704 umm = std::max(umm,
WSMIN);
712 }
while ((std::abs(u_star_arr(i,j,k) - ustar) >
tol) && iter <= max_iters);
713 AMREX_ASSERT_WITH_MESSAGE(iter < max_iters,
"Maximum number of MOST iterations reached.");
716 (u_star_arr(i,j,k) *
mdata.
kappa) + tm_arr(i,j,k);
718 olen_arr(i,j,k) = Olen;
725 const amrex::Real
tol = 1.0e-5;
748 const int& max_iters,
749 const amrex::Array4<amrex::Real>& z0_arr,
750 const amrex::Array4<const amrex::Real>& umm_arr,
751 const amrex::Array4<const amrex::Real>& tm_arr,
752 const amrex::Array4<const amrex::Real>& tvm_arr,
753 const amrex::Array4<const amrex::Real>& qvm_arr,
754 const amrex::Array4<amrex::Real>& u_star_arr,
755 const amrex::Array4<amrex::Real>& w_star_arr,
756 const amrex::Array4<amrex::Real>& t_star_arr,
757 const amrex::Array4<amrex::Real>& q_star_arr,
758 const amrex::Array4<amrex::Real>& t_surf_arr,
759 const amrex::Array4<amrex::Real>& olen_arr,
760 const amrex::Array4<amrex::Real>& pblh_arr,
761 const amrex::Array4<amrex::Real>& Hwave_arr,
762 const amrex::Array4<amrex::Real>& Lwave_arr,
763 const amrex::Array4<amrex::Real>& eta_arr)
const
766 amrex::Real ustar = 0.0;
767 amrex::Real wstar = 0.0;
768 amrex::Real tflux = 0.0;
769 amrex::Real z0 = 0.0;
770 amrex::Real zeta = 0.0;
771 amrex::Real psi_m = 0.0;
772 amrex::Real psi_h = 0.0;
773 amrex::Real Olen = 0.0;
775 ie = i < lbound(eta_arr).x ? lbound(eta_arr).x : i;
776 je = j < lbound(eta_arr).y ? lbound(eta_arr).y : j;
777 ie = ie > ubound(eta_arr).x ? ubound(eta_arr).x : ie;
778 je = je > ubound(eta_arr).y ? ubound(eta_arr).y : je;
779 amrex::Real umm = std::max(umm_arr(i,j,k),
WSMIN);
782 ustar = u_star_arr(i,j,k);
783 z0 = std::min( std::max(1200.0 * Hwave_arr(i,j,k) * std::pow( Hwave_arr(i,j,k)/(Lwave_arr(i,j,k)+
eps), 4.5 )
785 tflux =
mdata.
surf_temp_flux*(1 + 0.61*qvm_arr(i,j,k)) - 0.61*tm_arr(i,j,k)*ustar*q_star_arr(i,j,k);
788 w_star_arr(i,j,k) =
calc_wstar(tflux, pblh_arr(i,j,k), tvm_arr(i,j,k));
790 umm = std::sqrt(umm_arr(i,j,k)*umm_arr(i,j,k) + wstar*wstar);
791 umm = std::max(umm,
WSMIN);
799 }
while ((std::abs(u_star_arr(i,j,k) - ustar) >
tol) && iter <= max_iters);
800 AMREX_ASSERT_WITH_MESSAGE(iter < max_iters,
"Maximum number of MOST iterations reached.");
803 (u_star_arr(i,j,k) *
mdata.
kappa) + tm_arr(i,j,k);
805 olen_arr(i,j,k) = Olen;
812 const amrex::Real
tol = 1.0e-5;
813 const amrex::Real
eps = 1e-15;
838 const int& max_iters,
839 const amrex::Array4<const amrex::Real>& z0_arr,
840 const amrex::Array4<const amrex::Real>& umm_arr,
841 const amrex::Array4<const amrex::Real>& tm_arr,
842 const amrex::Array4<const amrex::Real>& tvm_arr,
843 const amrex::Array4<const amrex::Real>& qvm_arr,
844 const amrex::Array4<amrex::Real>& u_star_arr,
845 const amrex::Array4<amrex::Real>& w_star_arr,
846 const amrex::Array4<amrex::Real>& t_star_arr,
847 const amrex::Array4<amrex::Real>& q_star_arr,
848 const amrex::Array4<amrex::Real>& t_surf_arr,
849 const amrex::Array4<amrex::Real>& olen_arr,
850 const amrex::Array4<amrex::Real>& pblh_arr,
851 const amrex::Array4<amrex::Real>& ,
852 const amrex::Array4<amrex::Real>& ,
853 const amrex::Array4<amrex::Real>& )
const
856 amrex::Real ustar = 0.0;
857 amrex::Real wstar = 0.0;
858 amrex::Real tflux = 0.0;
859 amrex::Real zeta = 0.0;
860 amrex::Real psi_m = 0.0;
861 amrex::Real psi_h = 0.0;
862 amrex::Real Olen = 0.0;
863 amrex::Real umm = std::max(umm_arr(i,j,k),
WSMIN);
866 ustar = u_star_arr(i,j,k);
867 tflux = -(tm_arr(i,j,k) - t_surf_arr(i,j,k)) * ustar *
mdata.
kappa /
868 (std::log(
mdata.
zref / z0_arr(i,j,k)) - psi_h);
869 tflux *= (1 + 0.61*qvm_arr(i,j,k));
870 tflux += 0.61*tm_arr(i,j,k) * -ustar*q_star_arr(i,j,k);
873 w_star_arr(i,j,k) =
calc_wstar(tflux, pblh_arr(i,j,k), tvm_arr(i,j,k));
875 umm = std::sqrt(umm_arr(i,j,k)*umm_arr(i,j,k) + wstar*wstar);
876 umm = std::max(umm,
WSMIN);
884 }
while ((std::abs(u_star_arr(i,j,k) - ustar) >
tol) && iter <= max_iters);
885 AMREX_ASSERT_WITH_MESSAGE(iter < max_iters,
"Maximum number of MOST iterations reached.");
887 t_star_arr(i,j,k) =
mdata.
kappa * (tm_arr(i,j,k) - t_surf_arr(i,j,k)) /
888 (std::log(
mdata.
zref / z0_arr(i,j,k)) - psi_h);
889 olen_arr(i,j,k) = Olen;
895 const amrex::Real
tol = 1.0e-5;
922 const int& max_iters,
923 const amrex::Array4<amrex::Real>& z0_arr,
924 const amrex::Array4<const amrex::Real>& umm_arr,
925 const amrex::Array4<const amrex::Real>& tm_arr,
926 const amrex::Array4<const amrex::Real>& tvm_arr,
927 const amrex::Array4<const amrex::Real>& qvm_arr,
928 const amrex::Array4<amrex::Real>& u_star_arr,
929 const amrex::Array4<amrex::Real>& w_star_arr,
930 const amrex::Array4<amrex::Real>& t_star_arr,
931 const amrex::Array4<amrex::Real>& q_star_arr,
932 const amrex::Array4<amrex::Real>& t_surf_arr,
933 const amrex::Array4<amrex::Real>& olen_arr,
934 const amrex::Array4<amrex::Real>& pblh_arr,
935 const amrex::Array4<amrex::Real>& ,
936 const amrex::Array4<amrex::Real>& ,
937 const amrex::Array4<amrex::Real>& )
const
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;
989 const amrex::Real
tol = 1.0e-5;
1015 const int& max_iters,
1016 const amrex::Array4<amrex::Real>& z0_arr,
1017 const amrex::Array4<const amrex::Real>& umm_arr,
1018 const amrex::Array4<const amrex::Real>& tm_arr,
1019 const amrex::Array4<const amrex::Real>& tvm_arr,
1020 const amrex::Array4<const amrex::Real>& qvm_arr,
1021 const amrex::Array4<amrex::Real>& u_star_arr,
1022 const amrex::Array4<amrex::Real>& w_star_arr,
1023 const amrex::Array4<amrex::Real>& t_star_arr,
1024 const amrex::Array4<amrex::Real>& q_star_arr,
1025 const amrex::Array4<amrex::Real>& t_surf_arr,
1026 const amrex::Array4<amrex::Real>& olen_arr,
1027 const amrex::Array4<amrex::Real>& pblh_arr,
1028 const amrex::Array4<amrex::Real>& ,
1029 const amrex::Array4<amrex::Real>& ,
1030 const amrex::Array4<amrex::Real>& )
const
1033 amrex::Real ustar = 0.0;
1034 amrex::Real wstar = 0.0;
1035 amrex::Real z0 = 0.0;
1036 amrex::Real tflux = 0.0;
1037 amrex::Real zeta = 0.0;
1038 amrex::Real psi_m = 0.0;
1039 amrex::Real psi_h = 0.0;
1040 amrex::Real Olen = 0.0;
1041 amrex::Real umm = std::max(umm_arr(i,j,k),
WSMIN);
1044 ustar = u_star_arr(i,j,k);
1046 tflux = -(tm_arr(i,j,k) - t_surf_arr(i,j,k)) * ustar *
mdata.
kappa /
1048 tflux *= (1 + 0.61*qvm_arr(i,j,k));
1049 tflux += 0.61*tm_arr(i,j,k) * -ustar*q_star_arr(i,j,k);
1052 w_star_arr(i,j,k) =
calc_wstar(tflux, pblh_arr(i,j,k), tvm_arr(i,j,k));
1054 umm = std::sqrt(umm_arr(i,j,k)*umm_arr(i,j,k) + wstar*wstar);
1055 umm = std::max(umm,
WSMIN);
1063 }
while ((std::abs(u_star_arr(i,j,k) - ustar) >
tol) && iter <= max_iters);
1064 AMREX_ASSERT_WITH_MESSAGE(iter < max_iters,
"Maximum number of MOST iterations reached.");
1066 t_star_arr(i,j,k) =
mdata.
kappa * (tm_arr(i,j,k) - t_surf_arr(i,j,k)) /
1068 olen_arr(i,j,k) = Olen;
1075 const amrex::Real
tol = 1.0e-5;
1098 const int& max_iters,
1099 const amrex::Array4<amrex::Real>& z0_arr,
1100 const amrex::Array4<const amrex::Real>& umm_arr,
1101 const amrex::Array4<const amrex::Real>& tm_arr,
1102 const amrex::Array4<const amrex::Real>& tvm_arr,
1103 const amrex::Array4<const amrex::Real>& qvm_arr,
1104 const amrex::Array4<amrex::Real>& u_star_arr,
1105 const amrex::Array4<amrex::Real>& w_star_arr,
1106 const amrex::Array4<amrex::Real>& t_star_arr,
1107 const amrex::Array4<amrex::Real>& q_star_arr,
1108 const amrex::Array4<amrex::Real>& t_surf_arr,
1109 const amrex::Array4<amrex::Real>& olen_arr,
1110 const amrex::Array4<amrex::Real>& pblh_arr,
1111 const amrex::Array4<amrex::Real>& ,
1112 const amrex::Array4<amrex::Real>& ,
1113 const amrex::Array4<amrex::Real>& )
const
1116 amrex::Real ustar = 0.0;
1117 amrex::Real wstar = 0.0;
1118 amrex::Real z0 = 0.0;
1119 amrex::Real tflux = 0.0;
1120 amrex::Real zeta = 0.0;
1121 amrex::Real psi_m = 0.0;
1122 amrex::Real psi_h = 0.0;
1123 amrex::Real Olen = 0.0;
1124 amrex::Real umm = std::max(umm_arr(i,j,k),
WSMIN);
1127 ustar = u_star_arr(i,j,k);
1129 tflux = -(tm_arr(i,j,k) - t_surf_arr(i,j,k)) * ustar *
mdata.
kappa /
1131 tflux *= (1 + 0.61*qvm_arr(i,j,k));
1132 tflux += 0.61*tm_arr(i,j,k) * -ustar*q_star_arr(i,j,k);
1135 w_star_arr(i,j,k) =
calc_wstar(tflux, pblh_arr(i,j,k), tvm_arr(i,j,k));
1137 umm = std::sqrt(umm_arr(i,j,k)*umm_arr(i,j,k) + wstar*wstar);
1138 umm = std::max(umm,
WSMIN);
1146 }
while ((std::abs(u_star_arr(i,j,k) - ustar) >
tol) && iter <= max_iters);
1147 AMREX_ASSERT_WITH_MESSAGE(iter < max_iters,
"Maximum number of MOST iterations reached.");
1149 t_star_arr(i,j,k) =
mdata.
kappa * (tm_arr(i,j,k) - t_surf_arr(i,j,k)) /
1151 olen_arr(i,j,k) = Olen;
1158 const amrex::Real
tol = 1.0e-5;
1181 const int& max_iters,
1182 const amrex::Array4<amrex::Real>& z0_arr,
1183 const amrex::Array4<const amrex::Real>& umm_arr,
1184 const amrex::Array4<const amrex::Real>& tm_arr,
1185 const amrex::Array4<const amrex::Real>& tvm_arr,
1186 const amrex::Array4<const amrex::Real>& qvm_arr,
1187 const amrex::Array4<amrex::Real>& u_star_arr,
1188 const amrex::Array4<amrex::Real>& w_star_arr,
1189 const amrex::Array4<amrex::Real>& t_star_arr,
1190 const amrex::Array4<amrex::Real>& q_star_arr,
1191 const amrex::Array4<amrex::Real>& t_surf_arr,
1192 const amrex::Array4<amrex::Real>& olen_arr,
1193 const amrex::Array4<amrex::Real>& pblh_arr,
1194 const amrex::Array4<amrex::Real>& Hwave_arr,
1195 const amrex::Array4<amrex::Real>& Lwave_arr,
1196 const amrex::Array4<amrex::Real>& eta_arr)
const
1199 amrex::Real ustar = 0.0;
1200 amrex::Real wstar = 0.0;
1201 amrex::Real z0 = 0.0;
1202 amrex::Real tflux = 0.0;
1203 amrex::Real zeta = 0.0;
1204 amrex::Real psi_m = 0.0;
1205 amrex::Real psi_h = 0.0;
1206 amrex::Real Olen = 0.0;
1208 ie = i < lbound(eta_arr).x ? lbound(eta_arr).x : i;
1209 je = j < lbound(eta_arr).y ? lbound(eta_arr).y : j;
1210 ie = ie > ubound(eta_arr).x ? ubound(eta_arr).x : ie;
1211 je = je > ubound(eta_arr).y ? ubound(eta_arr).y : je;
1212 amrex::Real umm = std::max(umm_arr(i,j,k),
WSMIN);
1215 ustar = u_star_arr(i,j,k);
1216 z0 = std::min( std::max(1200.0 * Hwave_arr(i,j,k) * std::pow( Hwave_arr(i,j,k)/(Lwave_arr(i,j,k)+
eps), 4.5 )
1218 tflux = -(tm_arr(i,j,k) - t_surf_arr(i,j,k)) * ustar *
mdata.
kappa /
1220 tflux *= (1 + 0.61*qvm_arr(i,j,k));
1221 tflux += 0.61*tm_arr(i,j,k) * -ustar*q_star_arr(i,j,k);
1224 w_star_arr(i,j,k) =
calc_wstar(tflux, pblh_arr(i,j,k), tvm_arr(i,j,k));
1226 umm = std::sqrt(umm_arr(i,j,k)*umm_arr(i,j,k) + wstar*wstar);
1227 umm = std::max(umm,
WSMIN);
1235 }
while ((std::abs(u_star_arr(i,j,k) - ustar) >
tol) && iter <= max_iters);
1236 AMREX_ASSERT_WITH_MESSAGE(iter < max_iters,
"Maximum number of MOST iterations reached.");
1238 t_star_arr(i,j,k) =
mdata.
kappa * (tm_arr(i,j,k) - t_surf_arr(i,j,k)) /
1240 olen_arr(i,j,k) = Olen;
1247 const amrex::Real
tol = 1.0e-5;
1248 const amrex::Real
eps = 1e-15;
1272 const amrex::Real& dz,
1273 const amrex::Real& dz1,
1274 const bool& exp_most,
1275 const amrex::Array4<const amrex::Real>& eta_arr,
1276 const amrex::Array4<const amrex::Real>& cons_arr,
1277 const amrex::Array4<const amrex::Real>& ,
1278 const amrex::Array4<const amrex::Real>& ,
1279 const amrex::Array4<const amrex::Real>& ,
1280 const amrex::Array4<const amrex::Real>& ,
1281 const amrex::Array4<const amrex::Real>& ,
1282 const amrex::Array4<const amrex::Real>& ,
1283 const amrex::Array4<const amrex::Real>& ,
1284 const amrex::Array4<amrex::Real>& dest_arr)
const
1286 amrex::Real
rho, eta;
1289 ic = i < lbound(cons_arr).x ? lbound(cons_arr).x : i;
1290 jc = j < lbound(cons_arr).y ? lbound(cons_arr).y : j;
1291 ic = ic > ubound(cons_arr).x ? ubound(cons_arr).x : ic;
1292 jc = jc > ubound(cons_arr).y ? ubound(cons_arr).y : jc;
1297 amrex::Real deltaz = dz * (
zlo - k);
1300 amrex::Real moflux = 0.0;
1305 dest_arr(i,j,k,icomp+n) = cons_arr(ic,jc,
zlo,
RhoQ1_comp) - rqvgrad * deltaz;
1308 ie = i < lbound(eta_arr).x ? lbound(eta_arr).x : i;
1309 je = j < lbound(eta_arr).y ? lbound(eta_arr).y : j;
1310 ie = ie > ubound(eta_arr).x ? ubound(eta_arr).x : ie;
1311 je = je > ubound(eta_arr).y ? ubound(eta_arr).y : je;
1313 eta = amrex::max(eta,
eta_eps);
1314 dest_arr(i,j,k,icomp+n) = dest_arr(i,j,
zlo,icomp+n) + moflux*
rho/eta*deltaz;
1328 const amrex::Real& dz,
1329 const amrex::Real& dz1,
1330 const bool& exp_most,
1331 const amrex::Array4<const amrex::Real>& eta_arr,
1332 const amrex::Array4<const amrex::Real>& cons_arr,
1333 const amrex::Array4<const amrex::Real>& velx_arr,
1334 const amrex::Array4<const amrex::Real>& vely_arr,
1335 const amrex::Array4<const amrex::Real>& umm_arr,
1336 const amrex::Array4<const amrex::Real>& tm_arr,
1337 const amrex::Array4<const amrex::Real>& u_star_arr,
1338 const amrex::Array4<const amrex::Real>& t_star_arr,
1339 const amrex::Array4<const amrex::Real>& t_surf_arr,
1340 const amrex::Array4<amrex::Real>& dest_arr)
const
1342 amrex::Real velx, vely,
rho,
theta, eta;
1343 int ix, jx, iy, jy, ic, jc;
1345 ix = i < lbound(velx_arr).x ? lbound(velx_arr).x : i;
1346 jx = j < lbound(velx_arr).y ? lbound(velx_arr).y : j;
1347 ix = ix > ubound(velx_arr).x-1 ? ubound(velx_arr).x-1 : ix;
1348 jx = jx > ubound(velx_arr).y ? ubound(velx_arr).y : jx;
1350 iy = i < lbound(vely_arr).x ? lbound(vely_arr).x : i;
1351 jy = j < lbound(vely_arr).y ? lbound(vely_arr).y : j;
1352 iy = iy > ubound(vely_arr).x ? ubound(vely_arr).x : iy;
1353 jy = jy > ubound(vely_arr).y-1 ? ubound(vely_arr).y-1 : jy;
1355 ic = i < lbound(cons_arr).x ? lbound(cons_arr).x : i;
1356 jc = j < lbound(cons_arr).y ? lbound(cons_arr).y : j;
1357 ic = ic > ubound(cons_arr).x ? ubound(cons_arr).x : ic;
1358 jc = jc > ubound(cons_arr).y ? ubound(cons_arr).y : jc;
1360 velx = 0.5 *( velx_arr(ix,jx,
zlo) + velx_arr(ix+1,jx ,
zlo) );
1361 vely = 0.5 *( vely_arr(iy,jy,
zlo) + vely_arr(iy ,jy+1,
zlo) );
1365 amrex::Real theta_mean = tm_arr(ic,jc,
zlo);
1366 amrex::Real wsp_mean = umm_arr(ic,jc,
zlo);
1367 amrex::Real ustar = u_star_arr(ic,jc,
zlo);
1368 amrex::Real tstar = t_star_arr(ic,jc,
zlo);
1369 amrex::Real theta_surf = t_surf_arr(ic,jc,
zlo);
1371 amrex::Real wsp = sqrt(velx*velx+vely*vely);
1372 amrex::Real num1 = wsp * (theta_mean-theta_surf);
1373 amrex::Real num2 = wsp_mean * (
theta-theta_mean);
1374 amrex::Real deltaz = dz * (
zlo - k);
1376 wsp_mean = std::max(wsp_mean,
WSMIN);
1379 amrex::Real moflux = (std::abs(tstar) >
eps) ?
1380 -
rho*tstar*ustar*(num1+num2)/((theta_mean-theta_surf)*wsp_mean) : 0.0;
1385 dest_arr(i,j,k,icomp+n) = cons_arr(ic,jc,
zlo,
RhoTheta_comp) - rthetagrad * deltaz;
1388 ie = i < lbound(eta_arr).x ? lbound(eta_arr).x : i;
1389 je = j < lbound(eta_arr).y ? lbound(eta_arr).y : j;
1390 ie = ie > ubound(eta_arr).x ? ubound(eta_arr).x : ie;
1391 je = je > ubound(eta_arr).y ? ubound(eta_arr).y : je;
1393 eta = amrex::max(eta,
eta_eps);
1397 dest_arr(i,j,k,icomp+n) = dest_arr(i,j,
zlo,icomp+n) + moflux*
rho/eta*deltaz;
1410 const amrex::Real& dz,
1411 const amrex::Real& dz1,
1412 const bool& exp_most,
1413 const amrex::Array4<const amrex::Real>& eta_arr,
1414 const amrex::Array4<const amrex::Real>& cons_arr,
1415 const amrex::Array4<const amrex::Real>& velx_arr,
1416 const amrex::Array4<const amrex::Real>& vely_arr,
1417 const amrex::Array4<const amrex::Real>& umm_arr,
1418 const amrex::Array4<const amrex::Real>& um_arr,
1419 const amrex::Array4<const amrex::Real>& u_star_arr,
1420 const amrex::Array4<amrex::Real>& dest_arr)
const
1422 amrex::Real velx, vely,
rho, eta;
1425 int iylo = i <= lbound(vely_arr).x ? lbound(vely_arr).x : i-1;
1426 int iyhi = i > ubound(vely_arr).x ? ubound(vely_arr).x : i;
1428 jy = j < lbound(vely_arr).y ? lbound(vely_arr).y : j;
1429 jy = jy > ubound(vely_arr).y-1 ? ubound(vely_arr).y-1 : jy;
1431 ic = i < lbound(cons_arr).x+1 ? lbound(cons_arr).x+1 : i;
1432 jc = j < lbound(cons_arr).y ? lbound(cons_arr).y : j;
1433 ic = ic > ubound(cons_arr).x ? ubound(cons_arr).x : ic;
1434 jc = jc > ubound(cons_arr).y ? ubound(cons_arr).y : jc;
1436 velx = velx_arr(i,j,
zlo);
1437 vely = 0.25*( vely_arr(iyhi,jy,
zlo)+vely_arr(iyhi,jy+1,
zlo)
1438 + vely_arr(iylo,jy,
zlo)+vely_arr(iylo,jy+1,
zlo) );
1442 amrex::Real umean = um_arr(i,j,
zlo);
1443 amrex::Real wsp_mean = 0.5 * ( umm_arr(ic-1,jc,
zlo) + umm_arr(ic,jc,
zlo) );
1444 amrex::Real ustar = 0.5 * ( u_star_arr(ic-1,jc,
zlo) + u_star_arr(ic,jc,
zlo) );
1450 amrex::Real wsp = sqrt(velx*velx+vely*vely);
1451 amrex::Real num1 = wsp * umean;
1452 amrex::Real num2 = wsp_mean * (velx-umean);
1453 amrex::Real deltaz = dz * (
zlo - k);
1455 wsp_mean = std::max(wsp_mean,
WSMIN);
1458 amrex::Real stressx = -
rho*ustar*ustar * (num1+num2)/(wsp_mean*wsp_mean);
1462 amrex::Real ugrad = (velx_arr(i,j,
zlo+1) - velx) / (0.5*(dz+dz1));
1463 dest_arr(i,j,k,icomp) = velx - ugrad * deltaz;
1466 ie = i < lbound(eta_arr).x+1 ? lbound(eta_arr).x+1 : i;
1467 je = j < lbound(eta_arr).y ? lbound(eta_arr).y : j;
1468 ie = ie > ubound(eta_arr).x ? ubound(eta_arr).x : ie;
1469 je = je > ubound(eta_arr).y ? ubound(eta_arr).y : je;
1472 eta = amrex::max(eta,
eta_eps);
1473 dest_arr(i,j,k,icomp) = dest_arr(i,j,
zlo,icomp) + stressx/eta*deltaz;
1486 const amrex::Real& dz,
1487 const amrex::Real& dz1,
1488 const bool& exp_most,
1489 const amrex::Array4<const amrex::Real>& eta_arr,
1490 const amrex::Array4<const amrex::Real>& cons_arr,
1491 const amrex::Array4<const amrex::Real>& velx_arr,
1492 const amrex::Array4<const amrex::Real>& vely_arr,
1493 const amrex::Array4<const amrex::Real>& umm_arr,
1494 const amrex::Array4<const amrex::Real>& vm_arr,
1495 const amrex::Array4<const amrex::Real>& u_star_arr,
1496 const amrex::Array4<amrex::Real>& dest_arr)
const
1498 amrex::Real velx, vely,
rho, eta;
1501 ix = i < lbound(velx_arr).x ? lbound(velx_arr).x : i;
1502 ix = ix > ubound(velx_arr).x ? ubound(velx_arr).x : ix;
1504 int jxlo = j <= lbound(velx_arr).y ? lbound(velx_arr).y : j-1;
1505 int jxhi = j > ubound(velx_arr).y ? ubound(velx_arr).y : j;
1507 ic = i < lbound(cons_arr).x ? lbound(cons_arr).x : i;
1508 jc = j < lbound(cons_arr).y+1 ? lbound(cons_arr).y+1 : j;
1509 ic = ic > ubound(cons_arr).x ? ubound(cons_arr).x : ic;
1510 jc = jc > ubound(cons_arr).y ? ubound(cons_arr).y : jc;
1512 velx = 0.25*( velx_arr(ix,jxhi,
zlo)+velx_arr(ix+1,jxhi,
zlo)
1513 + velx_arr(ix,jxlo,
zlo)+velx_arr(ix+1,jxlo,
zlo) );
1514 vely = vely_arr(i,j,
zlo);
1518 amrex::Real vmean = vm_arr(i,j,
zlo);
1519 amrex::Real wsp_mean = 0.5 * ( umm_arr(ic,jc-1,
zlo) + umm_arr(ic,jc,
zlo) );
1520 amrex::Real ustar = 0.5 * ( u_star_arr(ic,jc-1,
zlo) + u_star_arr(ic,jc,
zlo) );
1526 amrex::Real wsp = sqrt(velx*velx+vely*vely);
1527 amrex::Real num1 = wsp * vmean;
1528 amrex::Real num2 = wsp_mean * (vely-vmean);
1529 amrex::Real deltaz = dz * (
zlo - k);
1531 wsp_mean = std::max(wsp_mean,
WSMIN);
1534 amrex::Real stressy = -
rho*ustar*ustar * (num1+num2)/(wsp_mean*wsp_mean);
1538 amrex::Real vgrad = (vely_arr(i,j,
zlo+1) - vely) / (0.5*(dz+dz1));
1539 dest_arr(i,j,k,icomp) = vely - vgrad * deltaz;
1542 ie = i < lbound(eta_arr).x ? lbound(eta_arr).x : i;
1543 je = j < lbound(eta_arr).y+1 ? lbound(eta_arr).y+1 : j;
1544 ie = ie > ubound(eta_arr).x ? ubound(eta_arr).x : ie;
1545 je = je > ubound(eta_arr).y ? ubound(eta_arr).y : je;
1548 eta = amrex::max(eta,
eta_eps);
1549 dest_arr(i,j,k,icomp) = dest_arr(i,j,
zlo,icomp) + stressy/eta*deltaz;
1557 const amrex::Real
eps = 1e-15;
1580 const amrex::Real& dz,
1581 const amrex::Real& dz1,
1582 const bool& exp_most,
1583 const amrex::Array4<const amrex::Real>& eta_arr,
1584 const amrex::Array4<const amrex::Real>& cons_arr,
1585 const amrex::Array4<const amrex::Real>& ,
1586 const amrex::Array4<const amrex::Real>& ,
1587 const amrex::Array4<const amrex::Real>& ,
1588 const amrex::Array4<const amrex::Real>& ,
1589 const amrex::Array4<const amrex::Real>& ,
1590 const amrex::Array4<const amrex::Real>& ,
1591 const amrex::Array4<const amrex::Real>& ,
1592 const amrex::Array4<amrex::Real>& dest_arr)
const
1594 amrex::Real
rho, eta;
1597 ic = i < lbound(cons_arr).x ? lbound(cons_arr).x : i;
1598 jc = j < lbound(cons_arr).y ? lbound(cons_arr).y : j;
1599 ic = ic > ubound(cons_arr).x ? ubound(cons_arr).x : ic;
1600 jc = jc > ubound(cons_arr).y ? ubound(cons_arr).y : jc;
1605 amrex::Real deltaz = dz * (
zlo - k);
1608 amrex::Real moflux = 0.0;
1613 dest_arr(i,j,k,icomp+n) = cons_arr(ic,jc,
zlo,
RhoQ1_comp) - rqvgrad * deltaz;
1616 ie = i < lbound(eta_arr).x ? lbound(eta_arr).x : i;
1617 je = j < lbound(eta_arr).y ? lbound(eta_arr).y : j;
1618 ie = ie > ubound(eta_arr).x ? ubound(eta_arr).x : ie;
1619 je = je > ubound(eta_arr).y ? ubound(eta_arr).y : je;
1621 eta = amrex::max(eta,
eta_eps);
1622 dest_arr(i,j,k,icomp+n) = dest_arr(i,j,
zlo,icomp+n) + moflux*
rho/eta*deltaz;
1636 const amrex::Real& dz,
1637 const amrex::Real& dz1,
1638 const bool& exp_most,
1639 const amrex::Array4<const amrex::Real>& eta_arr,
1640 const amrex::Array4<const amrex::Real>& cons_arr,
1641 const amrex::Array4<const amrex::Real>& ,
1642 const amrex::Array4<const amrex::Real>& ,
1643 const amrex::Array4<const amrex::Real>& umm_arr,
1644 const amrex::Array4<const amrex::Real>& tm_arr,
1645 const amrex::Array4<const amrex::Real>& ,
1646 const amrex::Array4<const amrex::Real>& ,
1647 const amrex::Array4<const amrex::Real>& t_surf_arr,
1648 const amrex::Array4<amrex::Real>& dest_arr)
const
1650 amrex::Real
rho, eta;
1653 ic = i < lbound(cons_arr).x ? lbound(cons_arr).x : i;
1654 jc = j < lbound(cons_arr).y ? lbound(cons_arr).y : j;
1655 ic = ic > ubound(cons_arr).x ? ubound(cons_arr).x : ic;
1656 jc = jc > ubound(cons_arr).y ? ubound(cons_arr).y : jc;
1660 amrex::Real Ch = 0.0012;
1661 amrex::Real wsp_mean = umm_arr(ic,jc,
zlo);
1662 amrex::Real theta_surf = t_surf_arr(ic,jc,
zlo);
1663 amrex::Real theta_mean = tm_arr(ic,jc,
zlo);
1664 amrex::Real deltaz = dz * (
zlo - k);
1667 amrex::Real moflux = -
rho * Ch * wsp_mean * (theta_mean - theta_surf);
1672 dest_arr(i,j,k,icomp+n) = cons_arr(ic,jc,
zlo,
RhoTheta_comp) - rthetagrad * deltaz;
1675 ie = i < lbound(eta_arr).x ? lbound(eta_arr).x : i;
1676 je = j < lbound(eta_arr).y ? lbound(eta_arr).y : j;
1677 ie = ie > ubound(eta_arr).x ? ubound(eta_arr).x : ie;
1678 je = je > ubound(eta_arr).y ? ubound(eta_arr).y : je;
1680 eta = amrex::max(eta,
eta_eps);
1684 dest_arr(i,j,k,icomp+n) = dest_arr(i,j,
zlo,icomp+n) + moflux*
rho/eta*deltaz;
1697 const amrex::Real& dz,
1698 const amrex::Real& dz1,
1699 const bool& exp_most,
1700 const amrex::Array4<const amrex::Real>& eta_arr,
1701 const amrex::Array4<const amrex::Real>& cons_arr,
1702 const amrex::Array4<const amrex::Real>& velx_arr,
1703 const amrex::Array4<const amrex::Real>& vely_arr,
1704 const amrex::Array4<const amrex::Real>& umm_arr,
1705 const amrex::Array4<const amrex::Real>& ,
1706 const amrex::Array4<const amrex::Real>& ,
1707 const amrex::Array4<amrex::Real>& dest_arr)
const
1709 amrex::Real velx, vely,
rho, eta;
1712 int iylo = i <= lbound(vely_arr).x ? lbound(vely_arr).x : i-1;
1713 int iyhi = i > ubound(vely_arr).x ? ubound(vely_arr).x : i;
1715 jy = j < lbound(vely_arr).y ? lbound(vely_arr).y : j;
1716 jy = jy > ubound(vely_arr).y-1 ? ubound(vely_arr).y-1 : jy;
1718 ic = i < lbound(cons_arr).x+1 ? lbound(cons_arr).x+1 : i;
1719 jc = j < lbound(cons_arr).y ? lbound(cons_arr).y : j;
1720 ic = ic > ubound(cons_arr).x ? ubound(cons_arr).x : ic;
1721 jc = jc > ubound(cons_arr).y ? ubound(cons_arr).y : jc;
1723 velx = velx_arr(i,j,
zlo);
1724 vely = 0.25*( vely_arr(iyhi,jy,
zlo)+vely_arr(iyhi,jy+1,
zlo)
1725 + vely_arr(iylo,jy,
zlo)+vely_arr(iylo,jy+1,
zlo) );
1729 amrex::Real Cd = 0.001;
1730 const amrex::Real c = 7e-5;
1731 amrex::Real wsp = sqrt(velx*velx+vely*vely);
1732 amrex::Real wsp_mean = 0.5 * ( umm_arr(ic-1,jc,
zlo) + umm_arr(ic,jc,
zlo) );
1733 if (wsp_mean <= 5.0) {
1735 }
else if (wsp_mean < 25.0 && wsp_mean > 5.0) {
1736 Cd = 0.001 + c * (wsp_mean - 5.0);
1740 amrex::Real deltaz = dz * (
zlo - k);
1743 amrex::Real stressx = -
rho * Cd * velx * wsp;
1747 amrex::Real ugrad = (velx_arr(i,j,
zlo+1) - velx) / (0.5*(dz+dz1));
1748 dest_arr(i,j,k,icomp) = velx - ugrad * deltaz;
1751 ie = i < lbound(eta_arr).x+1 ? lbound(eta_arr).x+1 : i;
1752 je = j < lbound(eta_arr).y ? lbound(eta_arr).y : j;
1753 ie = ie > ubound(eta_arr).x ? ubound(eta_arr).x : ie;
1754 je = je > ubound(eta_arr).y ? ubound(eta_arr).y : je;
1757 eta = amrex::max(eta,
eta_eps);
1758 dest_arr(i,j,k,icomp) = dest_arr(i,j,
zlo,icomp) + stressx/eta*deltaz;
1771 const amrex::Real& dz,
1772 const amrex::Real& dz1,
1773 const bool& exp_most,
1774 const amrex::Array4<const amrex::Real>& eta_arr,
1775 const amrex::Array4<const amrex::Real>& cons_arr,
1776 const amrex::Array4<const amrex::Real>& velx_arr,
1777 const amrex::Array4<const amrex::Real>& vely_arr,
1778 const amrex::Array4<const amrex::Real>& umm_arr,
1779 const amrex::Array4<const amrex::Real>& ,
1780 const amrex::Array4<const amrex::Real>& ,
1781 const amrex::Array4<amrex::Real>& dest_arr)
const
1783 amrex::Real velx, vely,
rho, eta;
1786 ix = i < lbound(velx_arr).x ? lbound(velx_arr).x : i;
1787 ix = ix > ubound(velx_arr).x ? ubound(velx_arr).x : ix;
1789 int jxlo = j <= lbound(velx_arr).y ? lbound(velx_arr).y : j-1;
1790 int jxhi = j > ubound(velx_arr).y ? ubound(velx_arr).y : j;
1792 ic = i < lbound(cons_arr).x ? lbound(cons_arr).x : i;
1793 jc = j < lbound(cons_arr).y+1 ? lbound(cons_arr).y+1 : j;
1794 ic = ic > ubound(cons_arr).x ? ubound(cons_arr).x : ic;
1795 jc = jc > ubound(cons_arr).y ? ubound(cons_arr).y : jc;
1797 velx = 0.25*( velx_arr(ix,jxhi,
zlo)+velx_arr(ix+1,jxhi,
zlo)
1798 + velx_arr(ix,jxlo,
zlo)+velx_arr(ix+1,jxlo,
zlo) );
1799 vely = vely_arr(i,j,
zlo);
1803 amrex::Real Cd = 0.001;
1804 const amrex::Real c = 7e-5;
1805 amrex::Real wsp = sqrt(velx*velx+vely*vely);
1806 amrex::Real wsp_mean = 0.5 * ( umm_arr(ic,jc-1,
zlo) + umm_arr(ic,jc,
zlo) );
1807 if (wsp_mean <= 5.0) {
1809 }
else if (wsp_mean < 25.0 && wsp_mean > 5.0) {
1810 Cd = 0.001 + c * (wsp_mean - 5.0);
1814 amrex::Real deltaz = dz * (
zlo - k);
1817 amrex::Real stressy = -
rho * Cd * vely * wsp;
1821 amrex::Real vgrad = (vely_arr(i,j,
zlo+1) - vely) / (0.5*(dz+dz1));
1822 dest_arr(i,j,k,icomp) = vely - vgrad * deltaz;
1825 ie = i < lbound(eta_arr).x ? lbound(eta_arr).x : i;
1826 je = j < lbound(eta_arr).y+1 ? lbound(eta_arr).y+1 : j;
1827 ie = ie > ubound(eta_arr).x ? ubound(eta_arr).x : ie;
1828 je = je > ubound(eta_arr).y ? ubound(eta_arr).y : je;
1831 eta = amrex::max(eta,
eta_eps);
1832 dest_arr(i,j,k,icomp) = dest_arr(i,j,
zlo,icomp) + stressy/eta*deltaz;
1861 const amrex::Real& dz,
1862 const amrex::Real& dz1,
1863 const bool& exp_most,
1864 const amrex::Array4<const amrex::Real>& eta_arr,
1865 const amrex::Array4<const amrex::Real>& cons_arr,
1866 const amrex::Array4<const amrex::Real>& ,
1867 const amrex::Array4<const amrex::Real>& ,
1868 const amrex::Array4<const amrex::Real>& ,
1869 const amrex::Array4<const amrex::Real>& ,
1870 const amrex::Array4<const amrex::Real>& ,
1871 const amrex::Array4<const amrex::Real>& q_star_arr,
1872 const amrex::Array4<const amrex::Real>& ,
1873 const amrex::Array4<amrex::Real>& dest_arr)
const
1875 amrex::Real
rho, eta;
1878 ic = i < lbound(cons_arr).x ? lbound(cons_arr).x : i;
1879 jc = j < lbound(cons_arr).y ? lbound(cons_arr).y : j;
1880 ic = ic > ubound(cons_arr).x ? ubound(cons_arr).x : ic;
1881 jc = jc > ubound(cons_arr).y ? ubound(cons_arr).y : jc;
1885 amrex::Real qstar = q_star_arr(ic,jc,
zlo);
1886 amrex::Real deltaz = dz * (
zlo - k);
1889 amrex::Real moflux = (std::abs(qstar) >
eps) ?
rho * qstar : 0.0;
1894 dest_arr(i,j,k,icomp+n) = cons_arr(ic,jc,
zlo,
RhoQ1_comp) - rqvgrad * deltaz;
1897 ie = i < lbound(eta_arr).x ? lbound(eta_arr).x : i;
1898 je = j < lbound(eta_arr).y ? lbound(eta_arr).y : j;
1899 ie = ie > ubound(eta_arr).x ? ubound(eta_arr).x : ie;
1900 je = je > ubound(eta_arr).y ? ubound(eta_arr).y : je;
1902 eta = amrex::max(eta,
eta_eps);
1903 dest_arr(i,j,k,icomp+n) = dest_arr(i,j,
zlo,icomp+n) + moflux*
rho/eta*deltaz;
1917 const amrex::Real& dz,
1918 const amrex::Real& dz1,
1919 const bool& exp_most,
1920 const amrex::Array4<const amrex::Real>& eta_arr,
1921 const amrex::Array4<const amrex::Real>& cons_arr,
1922 const amrex::Array4<const amrex::Real>& ,
1923 const amrex::Array4<const amrex::Real>& ,
1924 const amrex::Array4<const amrex::Real>& ,
1925 const amrex::Array4<const amrex::Real>& ,
1926 const amrex::Array4<const amrex::Real>& ,
1927 const amrex::Array4<const amrex::Real>& t_star_arr,
1928 const amrex::Array4<const amrex::Real>& ,
1929 const amrex::Array4<amrex::Real>& dest_arr)
const
1931 amrex::Real
rho, eta;
1934 ic = i < lbound(cons_arr).x ? lbound(cons_arr).x : i;
1935 jc = j < lbound(cons_arr).y ? lbound(cons_arr).y : j;
1936 ic = ic > ubound(cons_arr).x ? ubound(cons_arr).x : ic;
1937 jc = jc > ubound(cons_arr).y ? ubound(cons_arr).y : jc;
1941 amrex::Real tstar = t_star_arr(ic,jc,
zlo);
1942 amrex::Real deltaz = dz * (
zlo - k);
1945 amrex::Real moflux = (std::abs(tstar) >
eps) ?
rho * tstar : 0.0;
1950 dest_arr(i,j,k,icomp+n) = cons_arr(ic,jc,
zlo,
RhoTheta_comp) - rthetagrad * deltaz;
1953 ie = i < lbound(eta_arr).x ? lbound(eta_arr).x : i;
1954 je = j < lbound(eta_arr).y ? lbound(eta_arr).y : j;
1955 ie = ie > ubound(eta_arr).x ? ubound(eta_arr).x : ie;
1956 je = je > ubound(eta_arr).y ? ubound(eta_arr).y : je;
1958 eta = amrex::max(eta,
eta_eps);
1959 dest_arr(i,j,k,icomp+n) = dest_arr(i,j,
zlo,icomp+n) + moflux*
rho/eta*deltaz;
1972 const amrex::Real& dz,
1973 const amrex::Real& dz1,
1974 const bool& exp_most,
1975 const amrex::Array4<const amrex::Real>& eta_arr,
1976 const amrex::Array4<const amrex::Real>& cons_arr,
1977 const amrex::Array4<const amrex::Real>& velx_arr,
1978 const amrex::Array4<const amrex::Real>& vely_arr,
1979 const amrex::Array4<const amrex::Real>& ,
1980 const amrex::Array4<const amrex::Real>& ,
1981 const amrex::Array4<const amrex::Real>& u_star_arr,
1982 const amrex::Array4<amrex::Real>& dest_arr)
const
1984 amrex::Real velx, vely,
rho, eta;
1987 int iylo = i <= lbound(vely_arr).x ? lbound(vely_arr).x : i-1;
1988 int iyhi = i > ubound(vely_arr).x ? ubound(vely_arr).x : i;
1990 jy = j < lbound(vely_arr).y ? lbound(vely_arr).y : j;
1991 jy = jy > ubound(vely_arr).y-1 ? ubound(vely_arr).y-1 : jy;
1993 ic = i < lbound(cons_arr).x+1 ? lbound(cons_arr).x+1 : i;
1994 jc = j < lbound(cons_arr).y ? lbound(cons_arr).y : j;
1995 ic = ic > ubound(cons_arr).x ? ubound(cons_arr).x : ic;
1996 jc = jc > ubound(cons_arr).y ? ubound(cons_arr).y : jc;
1998 velx = velx_arr(i,j,
zlo);
1999 vely = 0.25*( vely_arr(iyhi,jy,
zlo)+vely_arr(iyhi,jy+1,
zlo)
2000 + vely_arr(iylo,jy,
zlo)+vely_arr(iylo,jy+1,
zlo) );
2004 amrex::Real ustar = 0.5 * ( u_star_arr(ic-1,jc,
zlo) + u_star_arr(ic,jc,
zlo) );
2005 amrex::Real wsp = sqrt(velx*velx+vely*vely);
2006 amrex::Real deltaz = dz * (
zlo - k);
2009 amrex::Real stressx = -
rho * ustar * ustar * velx / wsp;
2013 amrex::Real ugrad = (velx_arr(i,j,
zlo+1) - velx) / (0.5*(dz+dz1));
2014 dest_arr(i,j,k,icomp) = velx - ugrad * deltaz;
2017 ie = i < lbound(eta_arr).x+1 ? lbound(eta_arr).x+1 : i;
2018 je = j < lbound(eta_arr).y ? lbound(eta_arr).y : j;
2019 ie = ie > ubound(eta_arr).x ? ubound(eta_arr).x : ie;
2020 je = je > ubound(eta_arr).y ? ubound(eta_arr).y : je;
2023 eta = amrex::max(eta,
eta_eps);
2024 dest_arr(i,j,k,icomp) = dest_arr(i,j,
zlo,icomp) + stressx/eta*deltaz;
2037 const amrex::Real& dz,
2038 const amrex::Real& dz1,
2039 const bool& exp_most,
2040 const amrex::Array4<const amrex::Real>& eta_arr,
2041 const amrex::Array4<const amrex::Real>& cons_arr,
2042 const amrex::Array4<const amrex::Real>& velx_arr,
2043 const amrex::Array4<const amrex::Real>& vely_arr,
2044 const amrex::Array4<const amrex::Real>& ,
2045 const amrex::Array4<const amrex::Real>& ,
2046 const amrex::Array4<const amrex::Real>& u_star_arr,
2047 const amrex::Array4<amrex::Real>& dest_arr)
const
2049 amrex::Real velx, vely,
rho, eta;
2052 ix = i < lbound(velx_arr).x ? lbound(velx_arr).x : i;
2053 ix = ix > ubound(velx_arr).x ? ubound(velx_arr).x : ix;
2055 int jxlo = j <= lbound(velx_arr).y ? lbound(velx_arr).y : j-1;
2056 int jxhi = j > ubound(velx_arr).y ? ubound(velx_arr).y : j;
2058 ic = i < lbound(cons_arr).x ? lbound(cons_arr).x : i;
2059 jc = j < lbound(cons_arr).y+1 ? lbound(cons_arr).y+1 : j;
2060 ic = ic > ubound(cons_arr).x ? ubound(cons_arr).x : ic;
2061 jc = jc > ubound(cons_arr).y ? ubound(cons_arr).y : jc;
2063 velx = 0.25*( velx_arr(ix,jxhi,
zlo)+velx_arr(ix+1,jxhi,
zlo)
2064 + velx_arr(ix,jxlo,
zlo)+velx_arr(ix+1,jxlo,
zlo) );
2065 vely = vely_arr(i,j,
zlo);
2069 amrex::Real ustar = 0.5 * ( u_star_arr(ic,jc-1,
zlo) + u_star_arr(ic,jc,
zlo) );
2070 amrex::Real wsp = sqrt(velx*velx+vely*vely);
2071 amrex::Real deltaz = dz * (
zlo - k);
2074 amrex::Real stressy = -
rho * ustar * ustar * vely / wsp;
2078 amrex::Real vgrad = (vely_arr(i,j,
zlo+1) - vely) / (0.5*(dz+dz1));
2079 dest_arr(i,j,k,icomp) = vely - vgrad * deltaz;
2082 ie = i < lbound(eta_arr).x ? lbound(eta_arr).x : i;
2083 je = j < lbound(eta_arr).y+1 ? lbound(eta_arr).y+1 : j;
2084 ie = ie > ubound(eta_arr).x ? ubound(eta_arr).x : ie;
2085 je = je > ubound(eta_arr).y ? ubound(eta_arr).y : je;
2088 eta = amrex::max(eta,
eta_eps);
2089 dest_arr(i,j,k,icomp) = dest_arr(i,j,
zlo,icomp) + stressy/eta*deltaz;
2097 const amrex::Real
eps = 1e-15;
2118 const amrex::Real& dz,
2119 const amrex::Real& dz1,
2121 const amrex::Array4<const amrex::Real>& ,
2122 const amrex::Array4<const amrex::Real>& cons_arr,
2123 const amrex::Array4<const amrex::Real>& ,
2124 const amrex::Array4<const amrex::Real>& ,
2125 const amrex::Array4<const amrex::Real>& ,
2126 const amrex::Array4<const amrex::Real>& ,
2127 const amrex::Array4<const amrex::Real>& ,
2128 const amrex::Array4<const amrex::Real>& ,
2129 const amrex::Array4<const amrex::Real>& ,
2130 const amrex::Array4<amrex::Real>& dest_arr)
const
2133 ic = i < lbound(cons_arr).x ? lbound(cons_arr).x : i;
2134 jc = j < lbound(cons_arr).y ? lbound(cons_arr).y : j;
2135 ic = ic > ubound(cons_arr).x ? ubound(cons_arr).x : ic;
2136 jc = jc > ubound(cons_arr).y ? ubound(cons_arr).y : jc;
2139 amrex::Real deltaz = dz * (
zlo - k);
2142 dest_arr(i,j,k,icomp+n) = cons_arr(ic,jc,
zlo,
RhoQ1_comp) - rqvgrad * deltaz;
2146 amrex::Real qstar = 0.0;
2147 amrex::Real moflux = (std::abs(qstar) >
eps) ? -
rho * qstar : 0.0;
2160 const amrex::Real& dz,
2161 const amrex::Real& dz1,
2163 const amrex::Array4<const amrex::Real>& ,
2164 const amrex::Array4<const amrex::Real>& cons_arr,
2165 const amrex::Array4<const amrex::Real>& ,
2166 const amrex::Array4<const amrex::Real>& ,
2167 const amrex::Array4<const amrex::Real>& ,
2168 const amrex::Array4<const amrex::Real>& tm_arr,
2169 const amrex::Array4<const amrex::Real>& ,
2170 const amrex::Array4<const amrex::Real>& t_star_arr,
2171 const amrex::Array4<const amrex::Real>& t_surf_arr,
2172 const amrex::Array4<amrex::Real>& dest_arr)
const
2175 ic = i < lbound(cons_arr).x ? lbound(cons_arr).x : i;
2176 jc = j < lbound(cons_arr).y ? lbound(cons_arr).y : j;
2177 ic = ic > ubound(cons_arr).x ? ubound(cons_arr).x : ic;
2178 jc = jc > ubound(cons_arr).y ? ubound(cons_arr).y : jc;
2181 amrex::Real deltaz = dz * (
zlo - k);
2184 dest_arr(i,j,k,icomp+n) = cons_arr(ic,jc,
zlo,
RhoTheta_comp) - rthetagrad * deltaz;
2187 amrex::Real theta_mean = tm_arr(ic,jc,
zlo);
2188 amrex::Real theta_surf = t_surf_arr(ic,jc,
zlo);
2190 amrex::Real tstar = t_star_arr(ic,jc,
zlo);
2191 amrex::Real moflux = (std::abs(tstar) >
eps) ? -
rho * tstar * (theta_mean-theta_surf) : 0.0;
2203 const amrex::Real& dz,
2204 const amrex::Real& dz1,
2206 const amrex::Array4<const amrex::Real>& ,
2207 const amrex::Array4<const amrex::Real>& cons_arr,
2208 const amrex::Array4<const amrex::Real>& velx_arr,
2209 const amrex::Array4<const amrex::Real>& ,
2210 const amrex::Array4<const amrex::Real>& ,
2211 const amrex::Array4<const amrex::Real>& ,
2212 const amrex::Array4<const amrex::Real>& u_star_arr,
2213 const amrex::Array4<amrex::Real>& dest_arr)
const
2216 ic = i < lbound(cons_arr).x+1 ? lbound(cons_arr).x+1 : i;
2217 jc = j < lbound(cons_arr).y ? lbound(cons_arr).y : j;
2218 ic = ic > ubound(cons_arr).x ? ubound(cons_arr).x : ic;
2219 jc = jc > ubound(cons_arr).y ? ubound(cons_arr).y : jc;
2222 amrex::Real deltaz = dz * (
zlo - k);
2223 amrex::Real ugrad = (velx_arr(i,j,
zlo+1) - velx_arr(i,j,
zlo)) / (0.5*(dz+dz1));
2224 dest_arr(i,j,k,icomp) = velx_arr(i,j,
zlo) - ugrad * deltaz;
2229 amrex::Real ustar = 0.5 * ( u_star_arr(ic-1,jc,
zlo) + u_star_arr(ic,jc,
zlo) );
2230 amrex::Real stressx = -
rho * ustar * ustar;
2242 const amrex::Real& dz,
2243 const amrex::Real& dz1,
2245 const amrex::Array4<const amrex::Real>& ,
2246 const amrex::Array4<const amrex::Real>& ,
2247 const amrex::Array4<const amrex::Real>& ,
2248 const amrex::Array4<const amrex::Real>& vely_arr,
2249 const amrex::Array4<const amrex::Real>& ,
2250 const amrex::Array4<const amrex::Real>& ,
2251 const amrex::Array4<const amrex::Real>& ,
2252 const amrex::Array4<amrex::Real>& dest_arr)
const
2255 amrex::Real deltaz = dz * (
zlo - k);
2256 amrex::Real vgrad = (vely_arr(i,j,
zlo+1) - vely_arr(i,j,
zlo)) / (0.5*(dz+dz1));
2257 dest_arr(i,j,k,icomp) = vely_arr(i,j,
zlo) - vgrad * deltaz;
2260 amrex::Real stressy = 0.0;
2267 const amrex::Real
eps = 1e-15;
constexpr amrex::Real KAPPA
Definition: ERF_Constants.H:20
constexpr amrex::Real CONST_GRAV
Definition: ERF_Constants.H:21
constexpr amrex::Real PIoTwo
Definition: ERF_Constants.H:7
#define Rho_comp
Definition: ERF_IndexDefines.H:36
#define RhoTheta_comp
Definition: ERF_IndexDefines.H:37
#define RhoQ1_comp
Definition: ERF_IndexDefines.H:42
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real Donelan_roughness(amrex::Real ustar)
Definition: ERF_MOSTRoughness.H:29
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
@ Theta_v
Definition: ERF_IndexDefines.H:157
@ Q_v
Definition: ERF_IndexDefines.H:160
@ Mom_v
Definition: ERF_IndexDefines.H:156
@ theta
Definition: ERF_MM5.H:20
@ rho
Definition: ERF_Kessler.H:30
Definition: ERF_MOSTStress.H:136
const amrex::Real WSMIN
Definition: ERF_MOSTStress.H:199
adiabatic_charnock(amrex::Real zref, amrex::Real flux, amrex::Real cnk_a, bool cnk_visc)
Definition: ERF_MOSTStress.H:137
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void iterate_flux(const int &i, const int &j, const int &k, const int &max_iters, const amrex::Array4< amrex::Real > &z0_arr, const amrex::Array4< const amrex::Real > &umm_arr, const amrex::Array4< const amrex::Real > &tm_arr, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< amrex::Real > &u_star_arr, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &t_star_arr, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &olen_arr, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &) const
Definition: ERF_MOSTStress.H:151
most_data mdata
Definition: ERF_MOSTStress.H:196
const amrex::Real tol
Definition: ERF_MOSTStress.H:198
similarity_funs sfuns
Definition: ERF_MOSTStress.H:197
Definition: ERF_MOSTStress.H:270
similarity_funs sfuns
Definition: ERF_MOSTStress.H:320
const amrex::Real WSMIN
Definition: ERF_MOSTStress.H:322
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void iterate_flux(const int &i, const int &j, const int &k, const int &max_iters, const amrex::Array4< amrex::Real > &z0_arr, const amrex::Array4< const amrex::Real > &umm_arr, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< amrex::Real > &u_star_arr, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &t_star_arr, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &olen_arr, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &) const
Definition: ERF_MOSTStress.H:281
adiabatic_donelan(amrex::Real zref, amrex::Real flux)
Definition: ERF_MOSTStress.H:271
most_data mdata
Definition: ERF_MOSTStress.H:319
const amrex::Real tol
Definition: ERF_MOSTStress.H:321
Definition: ERF_MOSTStress.H:207
adiabatic_mod_charnock(amrex::Real zref, amrex::Real flux, amrex::Real depth)
Definition: ERF_MOSTStress.H:208
similarity_funs sfuns
Definition: ERF_MOSTStress.H:260
const amrex::Real tol
Definition: ERF_MOSTStress.H:261
const amrex::Real WSMIN
Definition: ERF_MOSTStress.H:262
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void iterate_flux(const int &i, const int &j, const int &k, const int &max_iters, const amrex::Array4< amrex::Real > &z0_arr, const amrex::Array4< const amrex::Real > &umm_arr, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< amrex::Real > &u_star_arr, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &t_star_arr, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &olen_arr, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &) const
Definition: ERF_MOSTStress.H:221
most_data mdata
Definition: ERF_MOSTStress.H:259
Definition: ERF_MOSTStress.H:330
const amrex::Real eps
Definition: ERF_MOSTStress.H:388
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void iterate_flux(const int &i, const int &j, const int &k, const int &max_iters, const amrex::Array4< amrex::Real > &z0_arr, const amrex::Array4< const amrex::Real > &umm_arr, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< amrex::Real > &u_star_arr, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &t_star_arr, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &olen_arr, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &Hwave_arr, const amrex::Array4< amrex::Real > &Lwave_arr, const amrex::Array4< amrex::Real > &eta_arr) const
Definition: ERF_MOSTStress.H:341
const amrex::Real z0_eps
Definition: ERF_MOSTStress.H:389
most_data mdata
Definition: ERF_MOSTStress.H:385
const amrex::Real WSMIN
Definition: ERF_MOSTStress.H:391
adiabatic_wave_coupled(amrex::Real zref, amrex::Real flux)
Definition: ERF_MOSTStress.H:331
similarity_funs sfuns
Definition: ERF_MOSTStress.H:386
const amrex::Real tol
Definition: ERF_MOSTStress.H:387
const amrex::Real z0_max
Definition: ERF_MOSTStress.H:390
Definition: ERF_MOSTStress.H:90
adiabatic(amrex::Real zref, amrex::Real flux)
Definition: ERF_MOSTStress.H:91
similarity_funs sfuns
Definition: ERF_MOSTStress.H:128
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void iterate_flux(const int &i, const int &j, const int &k, const int &, const amrex::Array4< const amrex::Real > &z0_arr, const amrex::Array4< const amrex::Real > &umm_arr, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< amrex::Real > &u_star_arr, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &t_star_arr, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &olen_arr, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &) const
Definition: ERF_MOSTStress.H:101
most_data mdata
Definition: ERF_MOSTStress.H:127
Definition: ERF_MOSTStress.H:1848
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real compute_v_flux(const int &i, const int &j, const int &k, const int &icomp, const amrex::Real &dz, const amrex::Real &dz1, const bool &exp_most, const amrex::Array4< const amrex::Real > &eta_arr, const amrex::Array4< const amrex::Real > &cons_arr, const amrex::Array4< const amrex::Real > &velx_arr, const amrex::Array4< const amrex::Real > &vely_arr, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &u_star_arr, const amrex::Array4< amrex::Real > &dest_arr) const
Definition: ERF_MOSTStress.H:2033
int zlo
Definition: ERF_MOSTStress.H:2096
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real compute_u_flux(const int &i, const int &j, const int &k, const int &icomp, const amrex::Real &dz, const amrex::Real &dz1, const bool &exp_most, const amrex::Array4< const amrex::Real > &eta_arr, const amrex::Array4< const amrex::Real > &cons_arr, const amrex::Array4< const amrex::Real > &velx_arr, const amrex::Array4< const amrex::Real > &vely_arr, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &u_star_arr, const amrex::Array4< amrex::Real > &dest_arr) const
Definition: ERF_MOSTStress.H:1968
const amrex::Real eta_eps
Definition: ERF_MOSTStress.H:2098
custom_flux(int l_zlo)
Definition: ERF_MOSTStress.H:1849
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real compute_t_flux(const int &i, const int &j, const int &k, const int &n, const int &icomp, const amrex::Real &dz, const amrex::Real &dz1, const bool &exp_most, const amrex::Array4< const amrex::Real > &eta_arr, const amrex::Array4< const amrex::Real > &cons_arr, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &t_star_arr, const amrex::Array4< const amrex::Real > &, const amrex::Array4< amrex::Real > &dest_arr) const
Definition: ERF_MOSTStress.H:1912
const amrex::Real eps
Definition: ERF_MOSTStress.H:2097
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real compute_q_flux(const int &i, const int &j, const int &k, const int &n, const int &icomp, const amrex::Real &dz, const amrex::Real &dz1, const bool &exp_most, const amrex::Array4< const amrex::Real > &eta_arr, const amrex::Array4< const amrex::Real > &cons_arr, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &q_star_arr, const amrex::Array4< const amrex::Real > &, const amrex::Array4< amrex::Real > &dest_arr) const
Definition: ERF_MOSTStress.H:1856
Definition: ERF_MOSTStress.H:1567
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real compute_u_flux(const int &i, const int &j, const int &k, const int &icomp, const amrex::Real &dz, const amrex::Real &dz1, const bool &exp_most, const amrex::Array4< const amrex::Real > &eta_arr, const amrex::Array4< const amrex::Real > &cons_arr, const amrex::Array4< const amrex::Real > &velx_arr, const amrex::Array4< const amrex::Real > &vely_arr, const amrex::Array4< const amrex::Real > &umm_arr, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< amrex::Real > &dest_arr) const
Definition: ERF_MOSTStress.H:1693
donelan_flux(int l_zlo)
Definition: ERF_MOSTStress.H:1568
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real compute_t_flux(const int &i, const int &j, const int &k, const int &n, const int &icomp, const amrex::Real &dz, const amrex::Real &dz1, const bool &exp_most, const amrex::Array4< const amrex::Real > &eta_arr, const amrex::Array4< const amrex::Real > &cons_arr, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &umm_arr, const amrex::Array4< const amrex::Real > &tm_arr, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &t_surf_arr, const amrex::Array4< amrex::Real > &dest_arr) const
Definition: ERF_MOSTStress.H:1631
const amrex::Real eta_eps
Definition: ERF_MOSTStress.H:1840
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real compute_v_flux(const int &i, const int &j, const int &k, const int &icomp, const amrex::Real &dz, const amrex::Real &dz1, const bool &exp_most, const amrex::Array4< const amrex::Real > &eta_arr, const amrex::Array4< const amrex::Real > &cons_arr, const amrex::Array4< const amrex::Real > &velx_arr, const amrex::Array4< const amrex::Real > &vely_arr, const amrex::Array4< const amrex::Real > &umm_arr, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< amrex::Real > &dest_arr) const
Definition: ERF_MOSTStress.H:1767
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real compute_q_flux(const int &i, const int &j, const int &k, const int &n, const int &icomp, const amrex::Real &dz, const amrex::Real &dz1, const bool &exp_most, const amrex::Array4< const amrex::Real > &eta_arr, const amrex::Array4< const amrex::Real > &cons_arr, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< amrex::Real > &dest_arr) const
Definition: ERF_MOSTStress.H:1575
int zlo
Definition: ERF_MOSTStress.H:1839
Definition: ERF_MOSTStress.H:1259
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real compute_u_flux(const int &i, const int &j, const int &k, const int &icomp, const amrex::Real &dz, const amrex::Real &dz1, const bool &exp_most, const amrex::Array4< const amrex::Real > &eta_arr, const amrex::Array4< const amrex::Real > &cons_arr, const amrex::Array4< const amrex::Real > &velx_arr, const amrex::Array4< const amrex::Real > &vely_arr, const amrex::Array4< const amrex::Real > &umm_arr, const amrex::Array4< const amrex::Real > &um_arr, const amrex::Array4< const amrex::Real > &u_star_arr, const amrex::Array4< amrex::Real > &dest_arr) const
Definition: ERF_MOSTStress.H:1406
moeng_flux(int l_zlo)
Definition: ERF_MOSTStress.H:1260
int zlo
Definition: ERF_MOSTStress.H:1556
const amrex::Real eps
Definition: ERF_MOSTStress.H:1557
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real compute_q_flux(const int &i, const int &j, const int &k, const int &n, const int &icomp, const amrex::Real &dz, const amrex::Real &dz1, const bool &exp_most, const amrex::Array4< const amrex::Real > &eta_arr, const amrex::Array4< const amrex::Real > &cons_arr, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< amrex::Real > &dest_arr) const
Definition: ERF_MOSTStress.H:1267
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real compute_v_flux(const int &i, const int &j, const int &k, const int &icomp, const amrex::Real &dz, const amrex::Real &dz1, const bool &exp_most, const amrex::Array4< const amrex::Real > &eta_arr, const amrex::Array4< const amrex::Real > &cons_arr, const amrex::Array4< const amrex::Real > &velx_arr, const amrex::Array4< const amrex::Real > &vely_arr, const amrex::Array4< const amrex::Real > &umm_arr, const amrex::Array4< const amrex::Real > &vm_arr, const amrex::Array4< const amrex::Real > &u_star_arr, const amrex::Array4< amrex::Real > &dest_arr) const
Definition: ERF_MOSTStress.H:1482
const amrex::Real eta_eps
Definition: ERF_MOSTStress.H:1558
const amrex::Real WSMIN
Definition: ERF_MOSTStress.H:1559
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real compute_t_flux(const int &i, const int &j, const int &k, const int &n, const int &icomp, const amrex::Real &dz, const amrex::Real &dz1, const bool &exp_most, const amrex::Array4< const amrex::Real > &eta_arr, const amrex::Array4< const amrex::Real > &cons_arr, const amrex::Array4< const amrex::Real > &velx_arr, const amrex::Array4< const amrex::Real > &vely_arr, const amrex::Array4< const amrex::Real > &umm_arr, const amrex::Array4< const amrex::Real > &tm_arr, const amrex::Array4< const amrex::Real > &u_star_arr, const amrex::Array4< const amrex::Real > &t_star_arr, const amrex::Array4< const amrex::Real > &t_surf_arr, const amrex::Array4< amrex::Real > &dest_arr) const
Definition: ERF_MOSTStress.H:1323
Definition: ERF_MOSTStress.H:13
amrex::Real zref
Reference height (m)
Definition: ERF_MOSTStress.H:15
amrex::Real Cnk_b2
Modified Charnock Eq (4) https://doi.org/10.1175/JAMC-D-17-0137.1.
Definition: ERF_MOSTStress.H:23
amrex::Real Cnk_b
Definition: ERF_MOSTStress.H:25
amrex::Real Cnk_d
Modified Charnock Eq (4) https://doi.org/10.1175/JAMC-D-17-0137.1.
Definition: ERF_MOSTStress.H:24
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
amrex::Real Cnk_a
Standard Charnock constant https://doi.org/10.1175/JAMC-D-17-0137.1.
Definition: ERF_MOSTStress.H:21
const amrex::Real Bjr_beta
Definition: ERF_MOSTStress.H:28
amrex::Real Cnk_b1
Modified Charnock Eq (4) https://doi.org/10.1175/JAMC-D-17-0137.1.
Definition: ERF_MOSTStress.H:22
amrex::Real z0_const
Roughness height – default constant value(m)
Definition: ERF_MOSTStress.H:16
bool visc
Use viscous Charnock formulation.
Definition: ERF_MOSTStress.H:26
amrex::Real surf_temp_flux
Heat flux.
Definition: ERF_MOSTStress.H:19
Definition: ERF_MOSTStress.H:2105
int zlo
Definition: ERF_MOSTStress.H:2266
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real compute_q_flux(const int &i, const int &j, const int &k, const int &n, const int &icomp, const amrex::Real &dz, const amrex::Real &dz1, const bool &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &cons_arr, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< amrex::Real > &dest_arr) const
Definition: ERF_MOSTStress.H:2113
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real compute_t_flux(const int &i, const int &j, const int &k, const int &n, const int &icomp, const amrex::Real &dz, const amrex::Real &dz1, const bool &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &cons_arr, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &tm_arr, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &t_star_arr, const amrex::Array4< const amrex::Real > &t_surf_arr, const amrex::Array4< amrex::Real > &dest_arr) const
Definition: ERF_MOSTStress.H:2155
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real compute_u_flux(const int &i, const int &j, const int &k, const int &icomp, const amrex::Real &dz, const amrex::Real &dz1, const bool &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &cons_arr, const amrex::Array4< const amrex::Real > &velx_arr, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &u_star_arr, const amrex::Array4< amrex::Real > &dest_arr) const
Definition: ERF_MOSTStress.H:2199
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real compute_v_flux(const int &i, const int &j, const int &k, const int &icomp, const amrex::Real &dz, const amrex::Real &dz1, const bool &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &vely_arr, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< const amrex::Real > &, const amrex::Array4< amrex::Real > &dest_arr) const
Definition: ERF_MOSTStress.H:2238
const amrex::Real eps
Definition: ERF_MOSTStress.H:2267
rotate_flux(int l_zlo)
Definition: ERF_MOSTStress.H:2106
Definition: ERF_MOSTStress.H:36
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real calc_psi_m(amrex::Real zeta) const
Definition: ERF_MOSTStress.H:40
amrex::Real beta_m
Constants from Dyer, BLM, 1974.
Definition: ERF_MOSTStress.H:65
amrex::Real beta_h
https://doi.org/10.1007/BF00240838
Definition: ERF_MOSTStress.H:66
amrex::Real gamma_h
Definition: ERF_MOSTStress.H:68
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real calc_psi_h(amrex::Real zeta) const
Definition: ERF_MOSTStress.H:54
amrex::Real gamma_m
Definition: ERF_MOSTStress.H:67
Definition: ERF_MOSTStress.H:477
const amrex::Real tol
Definition: ERF_MOSTStress.H:560
similarity_funs sfuns
Definition: ERF_MOSTStress.H:559
most_data mdata
Definition: ERF_MOSTStress.H:558
surface_flux_charnock(amrex::Real zref, amrex::Real flux, amrex::Real cnk_a, bool cnk_visc)
Definition: ERF_MOSTStress.H:478
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void iterate_flux(const int &i, const int &j, const int &k, const int &max_iters, const amrex::Array4< amrex::Real > &z0_arr, const amrex::Array4< const amrex::Real > &umm_arr, const amrex::Array4< const amrex::Real > &tm_arr, const amrex::Array4< const amrex::Real > &tvm_arr, const amrex::Array4< const amrex::Real > &qvm_arr, const amrex::Array4< amrex::Real > &u_star_arr, const amrex::Array4< amrex::Real > &w_star_arr, const amrex::Array4< amrex::Real > &t_star_arr, const amrex::Array4< amrex::Real > &q_star_arr, const amrex::Array4< amrex::Real > &t_surf_arr, const amrex::Array4< amrex::Real > &olen_arr, const amrex::Array4< amrex::Real > &pblh_arr, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &) const
Definition: ERF_MOSTStress.H:492
const amrex::Real WSMIN
Definition: ERF_MOSTStress.H:561
Definition: ERF_MOSTStress.H:653
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void iterate_flux(const int &i, const int &j, const int &k, const int &max_iters, const amrex::Array4< amrex::Real > &z0_arr, const amrex::Array4< const amrex::Real > &umm_arr, const amrex::Array4< const amrex::Real > &tm_arr, const amrex::Array4< const amrex::Real > &tvm_arr, const amrex::Array4< const amrex::Real > &qvm_arr, const amrex::Array4< amrex::Real > &u_star_arr, const amrex::Array4< amrex::Real > &w_star_arr, const amrex::Array4< amrex::Real > &t_star_arr, const amrex::Array4< amrex::Real > &q_star_arr, const amrex::Array4< amrex::Real > &t_surf_arr, const amrex::Array4< amrex::Real > &olen_arr, const amrex::Array4< amrex::Real > &pblh_arr, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &) const
Definition: ERF_MOSTStress.H:664
const amrex::Real tol
Definition: ERF_MOSTStress.H:725
const amrex::Real WSMIN
Definition: ERF_MOSTStress.H:726
most_data mdata
Definition: ERF_MOSTStress.H:723
similarity_funs sfuns
Definition: ERF_MOSTStress.H:724
surface_flux_donelan(amrex::Real zref, amrex::Real flux)
Definition: ERF_MOSTStress.H:654
Definition: ERF_MOSTStress.H:569
const amrex::Real WSMIN
Definition: ERF_MOSTStress.H:645
most_data mdata
Definition: ERF_MOSTStress.H:642
surface_flux_mod_charnock(amrex::Real zref, amrex::Real flux, amrex::Real depth)
Definition: ERF_MOSTStress.H:570
const amrex::Real tol
Definition: ERF_MOSTStress.H:644
similarity_funs sfuns
Definition: ERF_MOSTStress.H:643
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void iterate_flux(const int &i, const int &j, const int &k, const int &max_iters, const amrex::Array4< amrex::Real > &z0_arr, const amrex::Array4< const amrex::Real > &umm_arr, const amrex::Array4< const amrex::Real > &tm_arr, const amrex::Array4< const amrex::Real > &tvm_arr, const amrex::Array4< const amrex::Real > &qvm_arr, const amrex::Array4< amrex::Real > &u_star_arr, const amrex::Array4< amrex::Real > &w_star_arr, const amrex::Array4< amrex::Real > &t_star_arr, const amrex::Array4< amrex::Real > &q_star_arr, const amrex::Array4< amrex::Real > &t_surf_arr, const amrex::Array4< amrex::Real > &olen_arr, const amrex::Array4< amrex::Real > &pblh_arr, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &) const
Definition: ERF_MOSTStress.H:583
Definition: ERF_MOSTStress.H:734
const amrex::Real WSMIN
Definition: ERF_MOSTStress.H:816
surface_flux_wave_coupled(amrex::Real zref, amrex::Real flux)
Definition: ERF_MOSTStress.H:735
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void iterate_flux(const int &i, const int &j, const int &k, const int &max_iters, const amrex::Array4< amrex::Real > &z0_arr, const amrex::Array4< const amrex::Real > &umm_arr, const amrex::Array4< const amrex::Real > &tm_arr, const amrex::Array4< const amrex::Real > &tvm_arr, const amrex::Array4< const amrex::Real > &qvm_arr, const amrex::Array4< amrex::Real > &u_star_arr, const amrex::Array4< amrex::Real > &w_star_arr, const amrex::Array4< amrex::Real > &t_star_arr, const amrex::Array4< amrex::Real > &q_star_arr, const amrex::Array4< amrex::Real > &t_surf_arr, const amrex::Array4< amrex::Real > &olen_arr, const amrex::Array4< amrex::Real > &pblh_arr, const amrex::Array4< amrex::Real > &Hwave_arr, const amrex::Array4< amrex::Real > &Lwave_arr, const amrex::Array4< amrex::Real > &eta_arr) const
Definition: ERF_MOSTStress.H:745
const amrex::Real z0_max
Definition: ERF_MOSTStress.H:815
const amrex::Real z0_eps
Definition: ERF_MOSTStress.H:814
most_data mdata
Definition: ERF_MOSTStress.H:810
similarity_funs sfuns
Definition: ERF_MOSTStress.H:811
const amrex::Real tol
Definition: ERF_MOSTStress.H:812
const amrex::Real eps
Definition: ERF_MOSTStress.H:813
Definition: ERF_MOSTStress.H:399
similarity_funs sfuns
Definition: ERF_MOSTStress.H:467
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void iterate_flux(const int &i, const int &j, const int &k, const int &max_iters, const amrex::Array4< const amrex::Real > &z0_arr, const amrex::Array4< const amrex::Real > &umm_arr, const amrex::Array4< const amrex::Real > &tm_arr, const amrex::Array4< const amrex::Real > &tvm_arr, const amrex::Array4< const amrex::Real > &qvm_arr, const amrex::Array4< amrex::Real > &u_star_arr, const amrex::Array4< amrex::Real > &w_star_arr, const amrex::Array4< amrex::Real > &t_star_arr, const amrex::Array4< amrex::Real > &q_star_arr, const amrex::Array4< amrex::Real > &t_surf_arr, const amrex::Array4< amrex::Real > &olen_arr, const amrex::Array4< amrex::Real > &pblh_arr, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &) const
Definition: ERF_MOSTStress.H:410
const amrex::Real WSMIN
Definition: ERF_MOSTStress.H:469
most_data mdata
Definition: ERF_MOSTStress.H:466
surface_flux(amrex::Real zref, amrex::Real flux)
Definition: ERF_MOSTStress.H:400
const amrex::Real tol
Definition: ERF_MOSTStress.H:468
Definition: ERF_MOSTStress.H:904
most_data mdata
Definition: ERF_MOSTStress.H:987
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void iterate_flux(const int &i, const int &j, const int &k, const int &max_iters, const amrex::Array4< amrex::Real > &z0_arr, const amrex::Array4< const amrex::Real > &umm_arr, const amrex::Array4< const amrex::Real > &tm_arr, const amrex::Array4< const amrex::Real > &tvm_arr, const amrex::Array4< const amrex::Real > &qvm_arr, const amrex::Array4< amrex::Real > &u_star_arr, const amrex::Array4< amrex::Real > &w_star_arr, const amrex::Array4< amrex::Real > &t_star_arr, const amrex::Array4< amrex::Real > &q_star_arr, const amrex::Array4< amrex::Real > &t_surf_arr, const amrex::Array4< amrex::Real > &olen_arr, const amrex::Array4< amrex::Real > &pblh_arr, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &) const
Definition: ERF_MOSTStress.H:919
const amrex::Real WSMIN
Definition: ERF_MOSTStress.H:990
const amrex::Real tol
Definition: ERF_MOSTStress.H:989
surface_temp_charnock(amrex::Real zref, amrex::Real flux, amrex::Real cnk_a, bool cnk_visc)
Definition: ERF_MOSTStress.H:905
similarity_funs sfuns
Definition: ERF_MOSTStress.H:988
Definition: ERF_MOSTStress.H:1084
similarity_funs sfuns
Definition: ERF_MOSTStress.H:1157
most_data mdata
Definition: ERF_MOSTStress.H:1156
surface_temp_donelan(amrex::Real zref, amrex::Real flux)
Definition: ERF_MOSTStress.H:1085
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void iterate_flux(const int &i, const int &j, const int &k, const int &max_iters, const amrex::Array4< amrex::Real > &z0_arr, const amrex::Array4< const amrex::Real > &umm_arr, const amrex::Array4< const amrex::Real > &tm_arr, const amrex::Array4< const amrex::Real > &tvm_arr, const amrex::Array4< const amrex::Real > &qvm_arr, const amrex::Array4< amrex::Real > &u_star_arr, const amrex::Array4< amrex::Real > &w_star_arr, const amrex::Array4< amrex::Real > &t_star_arr, const amrex::Array4< amrex::Real > &q_star_arr, const amrex::Array4< amrex::Real > &t_surf_arr, const amrex::Array4< amrex::Real > &olen_arr, const amrex::Array4< amrex::Real > &pblh_arr, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &) const
Definition: ERF_MOSTStress.H:1095
const amrex::Real tol
Definition: ERF_MOSTStress.H:1158
const amrex::Real WSMIN
Definition: ERF_MOSTStress.H:1159
Definition: ERF_MOSTStress.H:998
similarity_funs sfuns
Definition: ERF_MOSTStress.H:1074
surface_temp_mod_charnock(amrex::Real zref, amrex::Real flux, amrex::Real depth)
Definition: ERF_MOSTStress.H:999
const amrex::Real tol
Definition: ERF_MOSTStress.H:1075
const amrex::Real WSMIN
Definition: ERF_MOSTStress.H:1076
most_data mdata
Definition: ERF_MOSTStress.H:1073
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void iterate_flux(const int &i, const int &j, const int &k, const int &max_iters, const amrex::Array4< amrex::Real > &z0_arr, const amrex::Array4< const amrex::Real > &umm_arr, const amrex::Array4< const amrex::Real > &tm_arr, const amrex::Array4< const amrex::Real > &tvm_arr, const amrex::Array4< const amrex::Real > &qvm_arr, const amrex::Array4< amrex::Real > &u_star_arr, const amrex::Array4< amrex::Real > &w_star_arr, const amrex::Array4< amrex::Real > &t_star_arr, const amrex::Array4< amrex::Real > &q_star_arr, const amrex::Array4< amrex::Real > &t_surf_arr, const amrex::Array4< amrex::Real > &olen_arr, const amrex::Array4< amrex::Real > &pblh_arr, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &) const
Definition: ERF_MOSTStress.H:1012
Definition: ERF_MOSTStress.H:1167
const amrex::Real eps
Definition: ERF_MOSTStress.H:1248
const amrex::Real tol
Definition: ERF_MOSTStress.H:1247
most_data mdata
Definition: ERF_MOSTStress.H:1245
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void iterate_flux(const int &i, const int &j, const int &k, const int &max_iters, const amrex::Array4< amrex::Real > &z0_arr, const amrex::Array4< const amrex::Real > &umm_arr, const amrex::Array4< const amrex::Real > &tm_arr, const amrex::Array4< const amrex::Real > &tvm_arr, const amrex::Array4< const amrex::Real > &qvm_arr, const amrex::Array4< amrex::Real > &u_star_arr, const amrex::Array4< amrex::Real > &w_star_arr, const amrex::Array4< amrex::Real > &t_star_arr, const amrex::Array4< amrex::Real > &q_star_arr, const amrex::Array4< amrex::Real > &t_surf_arr, const amrex::Array4< amrex::Real > &olen_arr, const amrex::Array4< amrex::Real > &pblh_arr, const amrex::Array4< amrex::Real > &Hwave_arr, const amrex::Array4< amrex::Real > &Lwave_arr, const amrex::Array4< amrex::Real > &eta_arr) const
Definition: ERF_MOSTStress.H:1178
const amrex::Real z0_eps
Definition: ERF_MOSTStress.H:1249
similarity_funs sfuns
Definition: ERF_MOSTStress.H:1246
const amrex::Real z0_max
Definition: ERF_MOSTStress.H:1250
const amrex::Real WSMIN
Definition: ERF_MOSTStress.H:1251
surface_temp_wave_coupled(amrex::Real zref, amrex::Real flux)
Definition: ERF_MOSTStress.H:1168
Definition: ERF_MOSTStress.H:824
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void iterate_flux(const int &i, const int &j, const int &k, const int &max_iters, const amrex::Array4< const amrex::Real > &z0_arr, const amrex::Array4< const amrex::Real > &umm_arr, const amrex::Array4< const amrex::Real > &tm_arr, const amrex::Array4< const amrex::Real > &tvm_arr, const amrex::Array4< const amrex::Real > &qvm_arr, const amrex::Array4< amrex::Real > &u_star_arr, const amrex::Array4< amrex::Real > &w_star_arr, const amrex::Array4< amrex::Real > &t_star_arr, const amrex::Array4< amrex::Real > &q_star_arr, const amrex::Array4< amrex::Real > &t_surf_arr, const amrex::Array4< amrex::Real > &olen_arr, const amrex::Array4< amrex::Real > &pblh_arr, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &, const amrex::Array4< amrex::Real > &) const
Definition: ERF_MOSTStress.H:835
similarity_funs sfuns
Definition: ERF_MOSTStress.H:894
surface_temp(amrex::Real zref, amrex::Real flux)
Definition: ERF_MOSTStress.H:825
const amrex::Real tol
Definition: ERF_MOSTStress.H:895
const amrex::Real WSMIN
Definition: ERF_MOSTStress.H:896
most_data mdata
Definition: ERF_MOSTStress.H:893