ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_MOSTRoughness.H
Go to the documentation of this file.
1 #include <ERF_Constants.H>
2 
3 /**
4  * COARE3.0, following WRF phys/module_sf_mynn.F
5  */
6 AMREX_GPU_DEVICE
7 AMREX_FORCE_INLINE
8 amrex::Real
9 COARE3_roughness (amrex::Real zref,
10  amrex::Real umm,
11  amrex::Real ustar)
12 {
13  amrex::Real ws10m = umm*std::log(10./1e-4) / std::log(zref/1e-4);
14  amrex::Real Czc = 0.011 + 0.007*std::min(std::max((ws10m-10.)/8., 0.), 1.0);
15  amrex::Real z0 = (Czc / CONST_GRAV) * ustar * ustar;
16  // From Davis et al 2008 MWR, but their lower limit is 0.125e-6 -- WRF typo?
17  return std::min(std::max(z0, 1.27e-7), 2.85e-3);
18 }
19 
20 /**
21  * Updated Donelan 2004 as found in AHW
22  *
23  * Matches implementations in WRF phys/physics_mmm/sf_sfclayrev.F90 and
24  * phys/module_sf_mynn.F
25  */
26 AMREX_GPU_DEVICE
27 AMREX_FORCE_INLINE
28 amrex::Real
29 Donelan_roughness (amrex::Real ustar)
30 {
31  constexpr amrex::Real ozo{1.59e-5};
32  amrex::Real zw = std::min(std::pow(ustar/1.06, 0.3),1.0);
33  amrex::Real zn1 = 0.011*ustar*ustar/CONST_GRAV + ozo;
34  amrex::Real zn2 = 10.*std::exp(-9.5*std::pow(ustar, -.3333))
35  + 0.11*1.5e-5/std::max(ustar,0.01);
36  amrex::Real z0 = (1.0-zw) * zn1 + zw * zn2;
37  // From Davis et al 2008 MWR, but their lower limit is 0.125e-6 -- WRF typo?
38  return std::min(std::max(z0, 1.27e-7), 2.85e-3);
39 }
constexpr amrex::Real CONST_GRAV
Definition: ERF_Constants.H:21
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