|
ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
|
#include <AMReX_REAL.H>#include <AMReX_GpuQualifiers.H>#include <AMReX_Algorithm.H>

Go to the source code of this file.
Classes | |
| struct | RibCrossing |
Functions | |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real | pblh_floor (amrex::Real zl1, amrex::Real dz1) noexcept |
| template<typename RibAt , typename ZAt > | |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE RibCrossing | find_rib_crossing (int ksrf, int khi, amrex::Real Ribcr, RibAt const &rib_at, ZAt const &z_at, amrex::Real pblh_min, amrex::Real pblh_max) noexcept |
|
noexcept |
Find the PBL height where the bulk Richardson number first reaches Ribcr, scanning one column from its surface cell ksrf up to the top cell khi (YSU, Hong et al. 2006; WRF bl_ysu.F90, the "brint" interpolation).
Every height is then kept in [pblh_min, pblh_max] in that order, so pblh_min wins when a shallow column has pblh_max < pblh_min.
| [in] | ksrf | first fluid cell of the column |
| [in] | khi | top cell of the scan |
| [in] | Ribcr | critical bulk Richardson number |
| [in] | rib_at | callable, rib_at(k) gives the bulk Richardson number at level k |
| [in] | z_at | callable, z_at(k) gives the height of level k |
| [in] | pblh_min | lower bound on the height |
| [in] | pblh_max | upper bound on the height |
Referenced by ComputeDiffusivityYSU().

|
noexcept |
Lower bound of the YSU and MRF PBL heights: the top face of the column's first fluid cell, and at least 10 m.
The top face of the first cell is WRF's zq(i,2) (bl_ysu.F90; ZQ(I,KL) in module_bl_mrf.F), the height below which WRF sets its PBL index to the first level. It lies half a cell above zl1, the first level of the K profile, so the profile's depth pblh - zl1 stays positive. In YSU, with pblh at the floor the profile is zero at that face, and the first cell keeps the background diffusivity. The same expression is used on every mesh type. With erf.pbl_ib_aware the two schemes pass zl1 in their own frame: YSU from the domain bottom, MRF from the top of the immersed column.
| [in] | zl1 | height of the center of the column's first fluid cell |
| [in] | dz1 | thickness of that cell |
Referenced by ComputeDiffusivityMRF(), and ComputeDiffusivityYSU().
