ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
|
#include <ERF_ABLMost.H>
Public Types | |
enum class | FluxCalcType { MOENG = 0 , DONELAN , CUSTOM , ROTATE } |
enum class | ThetaCalcType { ADIABATIC = 0 , HEAT_FLUX , SURFACE_TEMPERATURE } |
enum class | RoughCalcType { CONSTANT = 0 , CHARNOCK , MODIFIED_CHARNOCK , DONELAN , WAVE_COUPLED } |
enum class | PBLHeightCalcType { None , MYNN25 , YSU } |
Public Member Functions | |
ABLMost (const amrex::Vector< amrex::Geometry > &geom, bool &use_exp_most, bool &use_rot_most, amrex::Vector< amrex::Vector< amrex::MultiFab >> &vars_old, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &Theta_prim, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &Qv_prim, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &Qr_prim, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &z_phys_nd, amrex::Vector< amrex::Vector< std::unique_ptr< amrex::MultiFab >>> &sst_lev, amrex::Vector< amrex::Vector< std::unique_ptr< amrex::iMultiFab >>> &lmask_lev, amrex::Vector< amrex::Vector< amrex::MultiFab * >> lsm_data, amrex::Vector< amrex::Vector< amrex::MultiFab * >> lsm_flux, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &Hwave, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &Lwave, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &eddyDiffs, amrex::Real start_bdy_time=0.0, amrex::Real bdy_time_interval=0.0) | |
void | update_fluxes (const int &lev, const amrex::Real &time, int max_iters=25) |
template<typename FluxIter > | |
void | compute_fluxes (const int &lev, const int &max_iters, const FluxIter &most_flux, bool is_land) |
void | impose_most_bcs (const int &lev, const amrex::Vector< amrex::MultiFab * > &mfs, amrex::MultiFab *xxmom_flux, amrex::MultiFab *yymom_flux, amrex::MultiFab *zzmom_flux, amrex::MultiFab *xymom_flux, amrex::MultiFab *yxmom_flux, amrex::MultiFab *xzmom_flux, amrex::MultiFab *zxmom_flux, amrex::MultiFab *yzmom_flux, amrex::MultiFab *zymom_flux, amrex::MultiFab *xheat_flux, amrex::MultiFab *yheat_flux, amrex::MultiFab *zheat_flux, amrex::MultiFab *xqv_flux, amrex::MultiFab *yqv_flux, amrex::MultiFab *zqv_flux, amrex::MultiFab *z_phys) |
template<typename FluxCalc > | |
void | compute_most_bcs (const int &lev, const amrex::Vector< amrex::MultiFab * > &mfs, amrex::MultiFab *xxmom_flux, amrex::MultiFab *yymom_flux, amrex::MultiFab *zzmom_flux, amrex::MultiFab *xymom_flux, amrex::MultiFab *yxmom_flux, amrex::MultiFab *xzmom_flux, amrex::MultiFab *zxmom_flux, amrex::MultiFab *yzmom_flux, amrex::MultiFab *zymom_flux, amrex::MultiFab *xheat_flux, amrex::MultiFab *yheat_flux, amrex::MultiFab *zheat_flux, amrex::MultiFab *xqv_flux, amrex::MultiFab *yqv_flux, amrex::MultiFab *zqv_flux, amrex::MultiFab *z_phys, const FluxCalc &flux_comp) |
void | time_interp_sst (const int &lev, const amrex::Real &time) |
void | get_lsm_tsurf (const int &lev) |
void | update_pblh (const int &lev, amrex::Vector< amrex::Vector< amrex::MultiFab >> &vars, amrex::MultiFab *z_phys_cc, const int RhoQv_comp, const int RhoQc_comp, const int RhoQr_comp) |
template<typename PBLHeightEstimator > | |
void | compute_pblh (const int &lev, amrex::Vector< amrex::Vector< amrex::MultiFab >> &vars, amrex::MultiFab *z_phys_cc, const PBLHeightEstimator &est, const int RhoQv_comp, const int RhoQc_comp, const int RhoQr_comp) |
void | read_custom_roughness (const int &lev, const std::string &fname) |
void | update_surf_temp (const amrex::Real &time) |
void | update_mac_ptrs (const int &lev, amrex::Vector< amrex::Vector< amrex::MultiFab >> &vars_old, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &Theta_prim, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &Qv_prim, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &Qr_prim) |
const amrex::MultiFab * | get_u_star (const int &lev) |
const amrex::MultiFab * | get_w_star (const int &lev) |
const amrex::MultiFab * | get_t_star (const int &lev) |
const amrex::MultiFab * | get_q_star (const int &lev) |
const amrex::MultiFab * | get_olen (const int &lev) |
const amrex::MultiFab * | get_pblh (const int &lev) |
const amrex::MultiFab * | get_mac_avg (const int &lev, int comp) |
const amrex::MultiFab * | get_t_surf (const int &lev) |
amrex::Real | get_zref () |
const amrex::FArrayBox * | get_z0 (const int &lev) |
bool | have_variable_sea_roughness () |
const amrex::iMultiFab * | get_lmask (const int &lev) |
int | lmask_min_reduce (amrex::iMultiFab &lmask, const int &nghost) |
template<typename FluxCalc > | |
void | compute_most_bcs (const int &lev, const Vector< MultiFab * > &mfs, MultiFab *xxmom_flux, MultiFab *yymom_flux, MultiFab *zzmom_flux, MultiFab *xymom_flux, MultiFab *yxmom_flux, MultiFab *xzmom_flux, MultiFab *zxmom_flux, MultiFab *yzmom_flux, MultiFab *zymom_flux, MultiFab *xheat_flux, MultiFab *yheat_flux, MultiFab *zheat_flux, MultiFab *xqv_flux, MultiFab *yqv_flux, MultiFab *zqv_flux, MultiFab *z_phys, const FluxCalc &flux_comp) |
template<typename PBLHeightEstimator > | |
void | compute_pblh (const int &lev, Vector< Vector< MultiFab >> &vars, MultiFab *z_phys_cc, const PBLHeightEstimator &est, int RhoQv_comp, int RhoQc_comp, int RhoQr_comp) |
Private Attributes | |
bool | use_moisture |
bool | m_exp_most = false |
bool | m_rotate = false |
bool | m_include_wstar = false |
amrex::Real | z0_const {0.1} |
amrex::Real | surf_temp |
amrex::Real | surf_heating_rate {0} |
amrex::Real | surf_temp_flux {0} |
amrex::Real | custom_ustar {0} |
amrex::Real | custom_tstar {0} |
amrex::Real | custom_qstar {0} |
amrex::Real | cnk_a {0.0185} |
bool | cnk_visc {false} |
amrex::Real | depth {30.0} |
amrex::Real | m_start_bdy_time |
amrex::Real | m_bdy_time_interval |
amrex::Vector< amrex::Geometry > | m_geom |
amrex::Vector< amrex::FArrayBox > | z_0 |
bool | m_var_z0 {false} |
MOSTAverage | m_ma |
amrex::Vector< std::unique_ptr< amrex::MultiFab > > | u_star |
amrex::Vector< std::unique_ptr< amrex::MultiFab > > | w_star |
amrex::Vector< std::unique_ptr< amrex::MultiFab > > | t_star |
amrex::Vector< std::unique_ptr< amrex::MultiFab > > | q_star |
amrex::Vector< std::unique_ptr< amrex::MultiFab > > | olen |
amrex::Vector< std::unique_ptr< amrex::MultiFab > > | pblh |
amrex::Vector< std::unique_ptr< amrex::MultiFab > > | t_surf |
amrex::Vector< amrex::Vector< amrex::MultiFab * > > | m_sst_lev |
amrex::Vector< amrex::Vector< amrex::iMultiFab * > > | m_lmask_lev |
amrex::Vector< amrex::Vector< amrex::MultiFab * > > | m_lsm_data_lev |
amrex::Vector< amrex::Vector< amrex::MultiFab * > > | m_lsm_flux_lev |
amrex::Vector< amrex::MultiFab * > | m_Hwave_lev |
amrex::Vector< amrex::MultiFab * > | m_Lwave_lev |
amrex::Vector< amrex::MultiFab * > | m_eddyDiffs_lev |
Monin-Obukhov surface layer profile
van der Laan, P., Kelly, M. C., & Sørensen, N. N. (2017). A new k-epsilon model consistent with Monin-Obukhov similarity theory. Wind Energy, 20(3), 479–489. https://doi.org/10.1002/we.2017
Consistent with Dyer (1974) formulation from page 57, Chapter 2, Modeling the vertical ABL structure in Modelling of Atmospheric Flow Fields, Demetri P Lalas and Corrado F Ratto, January 1996, https://doi.org/10.1142/2975.
|
strong |
|
strong |
|
strong |
|
strong |
|
inlineexplicit |
void ABLMost::compute_fluxes | ( | const int & | lev, |
const int & | max_iters, | ||
const FluxIter & | most_flux, | ||
bool | is_land | ||
) |
Function to compute the fluxes (u^star and t^star) for Monin Obukhov similarity theory
[in] | lev | Current level |
[in] | max_iters | maximum iterations to use |
[in] | most_flux | structure to iteratively compute ustar and tstar |
void ABLMost::compute_most_bcs | ( | const int & | lev, |
const amrex::Vector< amrex::MultiFab * > & | mfs, | ||
amrex::MultiFab * | xxmom_flux, | ||
amrex::MultiFab * | yymom_flux, | ||
amrex::MultiFab * | zzmom_flux, | ||
amrex::MultiFab * | xymom_flux, | ||
amrex::MultiFab * | yxmom_flux, | ||
amrex::MultiFab * | xzmom_flux, | ||
amrex::MultiFab * | zxmom_flux, | ||
amrex::MultiFab * | yzmom_flux, | ||
amrex::MultiFab * | zymom_flux, | ||
amrex::MultiFab * | xheat_flux, | ||
amrex::MultiFab * | yheat_flux, | ||
amrex::MultiFab * | zheat_flux, | ||
amrex::MultiFab * | xqv_flux, | ||
amrex::MultiFab * | yqv_flux, | ||
amrex::MultiFab * | zqv_flux, | ||
amrex::MultiFab * | z_phys, | ||
const FluxCalc & | flux_comp | ||
) |
void ABLMost::compute_most_bcs | ( | const int & | lev, |
const Vector< MultiFab * > & | mfs, | ||
MultiFab * | xxmom_flux, | ||
MultiFab * | yymom_flux, | ||
MultiFab * | zzmom_flux, | ||
MultiFab * | xymom_flux, | ||
MultiFab * | yxmom_flux, | ||
MultiFab * | xzmom_flux, | ||
MultiFab * | zxmom_flux, | ||
MultiFab * | yzmom_flux, | ||
MultiFab * | zymom_flux, | ||
MultiFab * | xheat_flux, | ||
MultiFab * | yheat_flux, | ||
MultiFab * | zheat_flux, | ||
MultiFab * | xqv_flux, | ||
MultiFab * | yqv_flux, | ||
MultiFab * | zqv_flux, | ||
MultiFab * | z_phys, | ||
const FluxCalc & | flux_comp | ||
) |
Function to calculate MOST fluxes for populating ghost cells.
[in] | lev | Current level |
[in,out] | mfs | Multifabs to populate |
[in] | eddyDiffs | Diffusion coefficients from turbulence model |
[in] | flux_comp | structure to compute fluxes |
void ABLMost::compute_pblh | ( | const int & | lev, |
amrex::Vector< amrex::Vector< amrex::MultiFab >> & | vars, | ||
amrex::MultiFab * | z_phys_cc, | ||
const PBLHeightEstimator & | est, | ||
const int | RhoQv_comp, | ||
const int | RhoQc_comp, | ||
const int | RhoQr_comp | ||
) |
void ABLMost::compute_pblh | ( | const int & | lev, |
Vector< Vector< MultiFab >> & | vars, | ||
MultiFab * | z_phys_cc, | ||
const PBLHeightEstimator & | est, | ||
int | RhoQv_comp, | ||
int | RhoQc_comp, | ||
int | RhoQr_comp | ||
) |
|
inline |
void ABLMost::get_lsm_tsurf | ( | const int & | lev | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void ABLMost::impose_most_bcs | ( | const int & | lev, |
const amrex::Vector< amrex::MultiFab * > & | mfs, | ||
amrex::MultiFab * | xxmom_flux, | ||
amrex::MultiFab * | yymom_flux, | ||
amrex::MultiFab * | zzmom_flux, | ||
amrex::MultiFab * | xymom_flux, | ||
amrex::MultiFab * | yxmom_flux, | ||
amrex::MultiFab * | xzmom_flux, | ||
amrex::MultiFab * | zxmom_flux, | ||
amrex::MultiFab * | yzmom_flux, | ||
amrex::MultiFab * | zymom_flux, | ||
amrex::MultiFab * | xheat_flux, | ||
amrex::MultiFab * | yheat_flux, | ||
amrex::MultiFab * | zheat_flux, | ||
amrex::MultiFab * | xqv_flux, | ||
amrex::MultiFab * | yqv_flux, | ||
amrex::MultiFab * | zqv_flux, | ||
amrex::MultiFab * | z_phys | ||
) |
Wrapper to impose Monin Obukhov similarity theory fluxes by populating ghost cells.
[in] | lev | Current level |
[in,out] | mfs | Multifabs to populate |
[in] | eddyDiffs | Diffusion coefficients from turbulence model |
|
inline |
void ABLMost::read_custom_roughness | ( | const int & | lev, |
const std::string & | fname | ||
) |
void ABLMost::time_interp_sst | ( | const int & | lev, |
const amrex::Real & | time | ||
) |
void ABLMost::update_fluxes | ( | const int & | lev, |
const amrex::Real & | time, | ||
int | max_iters = 25 |
||
) |
Wrapper to update ustar and tstar for Monin Obukhov similarity theory.
[in] | lev | Current level |
[in] | max_iters | maximum iterations to use |
|
inline |
void ABLMost::update_pblh | ( | const int & | lev, |
amrex::Vector< amrex::Vector< amrex::MultiFab >> & | vars, | ||
amrex::MultiFab * | z_phys_cc, | ||
const int | RhoQv_comp, | ||
const int | RhoQc_comp, | ||
const int | RhoQr_comp | ||
) |
|
inline |
|
private |
Referenced by ABLMost().
|
private |
Referenced by ABLMost().
|
private |
Referenced by ABLMost().
|
private |
Referenced by ABLMost().
|
private |
Referenced by ABLMost().
|
private |
Referenced by ABLMost().
FluxCalcType ABLMost::flux_type {FluxCalcType::MOENG} |
Referenced by ABLMost().
|
private |
|
private |
Referenced by ABLMost().
|
private |
|
private |
Referenced by ABLMost(), and update_surf_temp().
|
private |
Referenced by ABLMost().
|
private |
Referenced by ABLMost().
|
private |
Referenced by ABLMost(), and get_lmask().
|
private |
Referenced by ABLMost().
|
private |
Referenced by ABLMost().
|
private |
Referenced by ABLMost().
|
private |
Referenced by get_mac_avg(), get_zref(), and update_mac_ptrs().
|
private |
|
private |
Referenced by ABLMost().
|
private |
|
private |
Referenced by ABLMost(), and have_variable_sea_roughness().
|
private |
Referenced by ABLMost(), and get_olen().
|
private |
Referenced by ABLMost(), and get_pblh().
PBLHeightCalcType ABLMost::pblh_type {PBLHeightCalcType::None} |
Referenced by ABLMost().
|
private |
Referenced by ABLMost(), and get_q_star().
RoughCalcType ABLMost::rough_type_land {RoughCalcType::CONSTANT} |
Referenced by ABLMost().
RoughCalcType ABLMost::rough_type_sea {RoughCalcType::CHARNOCK} |
Referenced by ABLMost().
|
private |
Referenced by ABLMost(), and update_surf_temp().
|
private |
Referenced by ABLMost(), and update_surf_temp().
|
private |
Referenced by ABLMost().
|
private |
Referenced by ABLMost(), and get_t_star().
|
private |
Referenced by ABLMost(), get_t_surf(), and update_surf_temp().
ThetaCalcType ABLMost::theta_type {ThetaCalcType::ADIABATIC} |
Referenced by ABLMost().
|
private |
Referenced by ABLMost(), and get_u_star().
|
private |
Referenced by ABLMost().
|
private |
Referenced by ABLMost(), and get_w_star().
|
private |
Referenced by ABLMost().