ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
adiabatic_mod_charnock Struct Reference

#include <ERF_MOSTStress.H>

Collaboration diagram for adiabatic_mod_charnock:

Public Member Functions

 adiabatic_mod_charnock (amrex::Real zref, amrex::Real flux, amrex::Real depth)
 
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
 

Private Attributes

most_data mdata
 
similarity_funs sfuns
 
const amrex::Real tol = 1.0e-5
 
const amrex::Real WSMIN = 0.1
 

Detailed Description

Adiabatic with modified charnock roughness

Constructor & Destructor Documentation

◆ adiabatic_mod_charnock()

adiabatic_mod_charnock::adiabatic_mod_charnock ( amrex::Real  zref,
amrex::Real  flux,
amrex::Real  depth 
)
inline
211  {
212  mdata.zref = zref;
213  mdata.surf_temp_flux = flux;
214  mdata.Cnk_d = depth;
215  mdata.Cnk_b = mdata.Cnk_b1 * std::log(mdata.Cnk_b2 / mdata.Cnk_d);
216  }
most_data mdata
Definition: ERF_MOSTStress.H:259
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 Cnk_b1
Modified Charnock Eq (4) https://doi.org/10.1175/JAMC-D-17-0137.1.
Definition: ERF_MOSTStress.H:22
amrex::Real surf_temp_flux
Heat flux.
Definition: ERF_MOSTStress.H:19

Member Function Documentation

◆ iterate_flux()

AMREX_GPU_DEVICE AMREX_FORCE_INLINE void adiabatic_mod_charnock::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
inline
240  {
241  int iter = 0;
242  amrex::Real umm = std::max(umm_arr(i,j,k), WSMIN);
243  amrex::Real ustar = 0.0;
244  amrex::Real z0 = 0.0;
245  u_star_arr(i,j,k) = mdata.kappa * umm / std::log(mdata.zref / z0_arr(i,j,k));
246  do {
247  ustar = u_star_arr(i,j,k);
248  z0 = std::exp( (2.7*ustar - 1.8/mdata.Cnk_b) / (ustar + 0.17/mdata.Cnk_b) );
249  u_star_arr(i,j,k) = mdata.kappa * umm / std::log(mdata.zref / z0);
250  ++iter;
251  } while ((std::abs(u_star_arr(i,j,k) - ustar) > tol) && iter <= max_iters);
252 
253  t_star_arr(i,j,k) = 0.0;
254  olen_arr(i,j,k) = 1.0e16;
255  z0_arr(i,j,k) = z0;
256  }
const amrex::Real tol
Definition: ERF_MOSTStress.H:261
const amrex::Real WSMIN
Definition: ERF_MOSTStress.H:262
amrex::Real kappa
von Karman constant
Definition: ERF_MOSTStress.H:17

Member Data Documentation

◆ mdata

most_data adiabatic_mod_charnock::mdata
private

◆ sfuns

similarity_funs adiabatic_mod_charnock::sfuns
private

◆ tol

const amrex::Real adiabatic_mod_charnock::tol = 1.0e-5
private

Referenced by iterate_flux().

◆ WSMIN

const amrex::Real adiabatic_mod_charnock::WSMIN = 0.1
private

Referenced by iterate_flux().


The documentation for this struct was generated from the following file: