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

Public Types | |
| enum class | FluxCalcType { MOENG = 0 , DONELAN , CUSTOM , BULK_COEFF , ROTATE , RICO } |
| enum class | ThetaCalcType { ADIABATIC = 0 , HEAT_FLUX , SURFACE_TEMPERATURE } |
| enum class | MoistCalcType { ADIABATIC = 0 , MOISTURE_FLUX , SURFACE_MOISTURE } |
| enum class | RoughCalcType { CONSTANT = 0 , CHARNOCK , MODIFIED_CHARNOCK , DONELAN , WAVE_COUPLED } |
| enum class | PBLHeightCalcType { None , MYNN25 , YSU , MRF , YSUNew } |
Public Member Functions | |
| SurfaceLayer (const amrex::Vector< amrex::Geometry > &geom, bool &use_rot_surface_flux, std::string a_pp_prefix, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &Qv_prim, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &z_phys_nd, const MeshType &a_mesh_type, const TerrainType &a_terrain_type, const TurbChoice &a_turb_choice, double start_low_time, double final_low_time, double low_time_interval=0.0, const amrex::Vector< const eb_ * > &eb_vec={}) | |
| void | make_SurfaceLayer_at_level (const int &lev, int nlevs, const amrex::Vector< amrex::MultiFab * > &mfv, std::unique_ptr< amrex::MultiFab > &Theta_prim, std::unique_ptr< amrex::MultiFab > &Qv_prim, std::unique_ptr< amrex::MultiFab > &Qr_prim, std::unique_ptr< amrex::MultiFab > &z_phys_nd, amrex::MultiFab *Hwave, amrex::MultiFab *Lwave, amrex::MultiFab *eddyDiffs, amrex::Vector< amrex::MultiFab * > lsm_data, amrex::Vector< std::string > lsm_data_name, amrex::Vector< amrex::MultiFab * > lsm_flux, amrex::Vector< std::string > lsm_flux_name, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &sst_lev, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &tsk_lev, amrex::Vector< std::unique_ptr< amrex::iMultiFab >> &lmask_lev) |
| void | update_fluxes (const int &lev, const double &elapsed_time, const double &elapsed_time_since_start_low, amrex::MultiFab &cons_in, const std::unique_ptr< amrex::MultiFab > &z_phys_nd, const std::unique_ptr< amrex::MultiFab > &walldist, int max_iters=100) |
| template<typename FluxIter > | |
| void | compute_fluxes (const int &lev, const int &max_iters, amrex::MultiFab &cons_in, const FluxIter &most_flux, bool is_land) |
| void | init_tke_from_ustar (const int &lev, amrex::MultiFab &cons, const std::unique_ptr< amrex::MultiFab > &z_phys_nd, const amrex::Real tkefac=one, const amrex::Real zscale=amrex::Real(700.0)) |
| void | impose_SurfaceLayer_bcs (const int &lev, amrex::Vector< const amrex::MultiFab * > mfs, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &Tau_lev, amrex::MultiFab *xheat_flux, amrex::MultiFab *yheat_flux, amrex::MultiFab *zheat_flux, amrex::MultiFab *xqv_flux, amrex::MultiFab *yqv_flux, amrex::MultiFab *zqv_flux, const amrex::MultiFab *z_phys) |
| void | impose_SurfaceLayer_bcs_EB (const int &lev, amrex::Vector< const amrex::MultiFab * > mfs, amrex::Vector< amrex::Vector< std::unique_ptr< amrex::MultiFab >>> &Tau_lev, amrex::MultiFab *xheat_flux, amrex::MultiFab *yheat_flux, amrex::MultiFab *zheat_flux, amrex::MultiFab *xqv_flux, amrex::MultiFab *yqv_flux, amrex::MultiFab *zqv_flux) |
| template<typename FluxCalc > | |
| void | compute_SurfaceLayer_bcs (const int &lev, amrex::Vector< const amrex::MultiFab * > mfs, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &Tau_lev, amrex::MultiFab *xheat_flux, amrex::MultiFab *yheat_flux, amrex::MultiFab *zheat_flux, amrex::MultiFab *xqv_flux, amrex::MultiFab *yqv_flux, amrex::MultiFab *zqv_flux, const amrex::MultiFab *z_phys, const FluxCalc &flux_comp) |
| template<typename FluxCalc > | |
| void | compute_SurfaceLayer_bcs_EB (const int &lev, amrex::Vector< const amrex::MultiFab * > mfs, amrex::Vector< amrex::Vector< std::unique_ptr< amrex::MultiFab >>> &Tau_lev, amrex::MultiFab *xheat_flux, amrex::MultiFab *yheat_flux, amrex::MultiFab *zheat_flux, amrex::MultiFab *xqv_flux, amrex::MultiFab *yqv_flux, amrex::MultiFab *zqv_flux, const FluxCalc &flux_comp) |
| void | compute_sfc_params_from_lsm_fluxes (const int &lev, amrex::MultiFab &cons_in) |
| void | fill_tsurf_with_sst_and_tsk (const int &lev, const double &time) |
| void | fill_qsurf_with_qsat (const int &lev, const amrex::MultiFab &cons_in, const std::unique_ptr< amrex::MultiFab > &z_phys_nd) |
| 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 MoistureComponentIndices &moisture_indices) |
| 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 MoistureComponentIndices &moisture_indice) |
| void | read_custom_roughness (const int &lev, const std::string &fname) |
| void | update_surf_temp (const double &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) |
| amrex::MultiFab * | get_u_star (const int &lev) |
| amrex::MultiFab * | get_w_star (const int &lev) |
| amrex::MultiFab * | get_t_star (const int &lev) |
| amrex::MultiFab * | get_q_star (const int &lev) |
| amrex::MultiFab * | get_olen (const int &lev) |
| amrex::MultiFab * | get_pblh (const int &lev) |
| const amrex::MultiFab * | get_mac_avg (const int &lev, int comp) |
| amrex::MultiFab * | get_t_surf (const int &lev) |
| void | set_t_surf (const int &lev, const amrex::Real tsurf) |
| amrex::MultiFab * | get_q_surf (const int &lev) |
| void | set_q_surf (const int &lev, const amrex::Real qsurf) |
| amrex::MultiFab * | get_surface_diagnostic_source (const int &lev) |
| amrex::Real | get_zref (const int &lev) |
| amrex::MultiFab * | get_z0 (const int &lev) |
| bool | have_variable_sea_roughness () |
| amrex::iMultiFab * | get_lmask (const int &lev) |
| int | lmask_min_reduce (amrex::iMultiFab &lmask, const int &nghost) |
| void | update_sst_ptr (const int lev, const int itime, amrex::MultiFab *sst_ptr) |
| void | update_tsk_ptr (const int lev, const int itime, amrex::MultiFab *tsk_ptr) |
| template<typename FluxIter > | |
| void | compute_fluxes (const int &lev, const int &max_iters, MultiFab &cons_in, const FluxIter &most_flux, bool is_land) |
| template<typename FluxCalc > | |
| void | compute_SurfaceLayer_bcs (const int &lev, Vector< const MultiFab * > mfs, Vector< std::unique_ptr< MultiFab >> &Tau_lev, MultiFab *xheat_flux, MultiFab *yheat_flux, MultiFab *zheat_flux, MultiFab *xqv_flux, MultiFab *yqv_flux, MultiFab *zqv_flux, const MultiFab *z_phys, const FluxCalc &flux_comp) |
| template<typename FluxCalc > | |
| void | compute_SurfaceLayer_bcs_EB (const int &lev, Vector< const MultiFab * > mfs, Vector< Vector< std::unique_ptr< MultiFab >>> &Tau_EB, [[maybe_unused]] MultiFab *xheat_flux, [[maybe_unused]] MultiFab *yheat_flux, MultiFab *Hfx3_EB, [[maybe_unused]] MultiFab *xqv_flux, [[maybe_unused]] MultiFab *yqv_flux, [[maybe_unused]] MultiFab *zqv_flux, const FluxCalc &flux_comp) |
| template<typename PBLHeightEstimator > | |
| void | compute_pblh (const int &lev, Vector< Vector< MultiFab >> &vars, MultiFab *z_phys_cc, const PBLHeightEstimator &est, const MoistureComponentIndices &moisture_indices) |
Private Attributes | |
| amrex::Vector< amrex::Geometry > | m_geom |
| bool | m_rotate = false |
| double | m_start_low_time |
| double | m_final_low_time |
| double | m_low_time_interval |
| bool | m_include_wstar = false |
| amrex::Real | z0_const {amrex::Real(0.1)} |
| amrex::Real | default_land_surf_temp {amrex::Real(300.)} |
| amrex::Real | surf_temp |
| amrex::Real | surf_heating_rate {0} |
| amrex::Real | surf_temp_flux {0} |
| amrex::Real | default_land_surf_moist {zero} |
| amrex::Real | surf_moist |
| amrex::Real | surf_moist_flux {0} |
| amrex::Real | custom_ustar {0} |
| amrex::Real | custom_tstar {0} |
| amrex::Real | custom_qstar {0} |
| amrex::Real | custom_rhosurf {0} |
| bool | specified_rho_surf {false} |
| amrex::Real | cnk_a {amrex::Real(0.0185)} |
| bool | cnk_visc {false} |
| amrex::Real | depth {amrex::Real(30.0)} |
| amrex::Vector< amrex::MultiFab > | z_0 |
| bool | m_var_z0 {false} |
| amrex::Real | rico_theta_z0 {amrex::Real(298.0)} |
| amrex::Real | rico_qsat_z0 {amrex::Real(0.001)} |
| bool | use_moisture |
| bool | m_has_lsm_fluxes = false |
| bool | m_has_lsm_tsurf = false |
| bool | m_has_ocean_lsm_tsurf = false |
| int | m_lsm_tsurf_indx = -1 |
| amrex::Real | m_Cd = zero |
| amrex::Real | m_Ch = zero |
| amrex::Real | m_Cq = zero |
| bool | m_ignore_sst = false |
| amrex::Vector< const eb_ * > | m_eb_vec |
| TerrainType | m_terrain_type |
| 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< std::unique_ptr< amrex::MultiFab > > | q_surf |
| amrex::Vector< std::unique_ptr< amrex::MultiFab > > | surface_diagnostic_source |
| amrex::Vector< amrex::Vector< amrex::MultiFab * > > | m_sst_lev |
| amrex::Vector< amrex::Vector< amrex::MultiFab * > > | m_tsk_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< std::string > | m_lsm_data_name |
| amrex::Vector< std::string > | m_lsm_flux_name |
| amrex::Vector< amrex::MultiFab * > | m_Hwave_lev |
| amrex::Vector< amrex::MultiFab * > | m_Lwave_lev |
| amrex::Vector< amrex::MultiFab * > | m_eddyDiffs_lev |
| bool | m_update_k_rans = false |
| amrex::Real | inv_Cmu2 = zero |
| amrex::Real | theta_ref = zero |
Abstraction layer for different surface layer schemes (e.g. MOST, Cd)
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–amrex::Real(489.) https://doi.org/amrex::Real(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/amrex::Real(10.1142)/amrex::Real(2975.)
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
inlineexplicit |
Construct the surface-layer interface.
| [in] | geom | geometry for all AMR levels |
| [in,out] | use_rot_surface_flux | whether to use rotated surface fluxes |
| [in] | a_pp_prefix | ParmParse prefix used by MOST averages |
| [in] | Qv_prim | primitive water-vapor fields by level |
| [in] | z_phys_nd | nodal physical-height fields by level |
| [in] | a_mesh_type | mesh type |
| [in] | a_terrain_type | terrain representation |
| [in] | a_turb_choice | turbulence-model options |
| [in] | start_low_time | first available low-boundary-data time |
| [in] | final_low_time | final available low-boundary-data time |
| [in] | low_time_interval | low-boundary-data time interval |
| [in] | eb_vec | optional embedded-boundary geometry data |
| void SurfaceLayer::compute_fluxes | ( | const int & | lev, |
| const int & | max_iters, | ||
| amrex::MultiFab & | cons_in, | ||
| const FluxIter & | most_flux, | ||
| bool | is_land | ||
| ) |
Compute MOST fluxes with a selected flux-iteration functor.
| [in] | lev | level index |
| [in] | max_iters | maximum MOST iteration count |
| [in,out] | cons_in | conserved state used by the flux computation |
| [in] | most_flux | flux-iteration functor |
| [in] | is_land | whether the land-surface branch is active |
| void SurfaceLayer::compute_fluxes | ( | const int & | lev, |
| const int & | max_iters, | ||
| MultiFab & | cons_in, | ||
| 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] | cons_in | Conserved state whose grids define the surface iteration |
| [in] | most_flux | Flux-iteration functor used to compute ustar, tstar, qstar, and related fields |
| [in] | is_land | Selects whether land or sea cells are updated |

| void SurfaceLayer::compute_pblh | ( | const int & | lev, |
| amrex::Vector< amrex::Vector< amrex::MultiFab >> & | vars, | ||
| amrex::MultiFab * | z_phys_cc, | ||
| const PBLHeightEstimator & | est, | ||
| const MoistureComponentIndices & | moisture_indice | ||
| ) |
Compute planetary-boundary-layer height with the selected estimator.
| [in] | lev | level index |
| [in,out] | vars | state variables used by the PBL-height calculation |
| [in] | z_phys_cc | cell-centered physical-height field |
| [in] | est | PBL-height estimator functor |
| [in] | moisture_indice | indices for moisture components |
| void SurfaceLayer::compute_pblh | ( | const int & | lev, |
| Vector< Vector< MultiFab >> & | vars, | ||
| MultiFab * | z_phys_cc, | ||
| const PBLHeightEstimator & | est, | ||
| const MoistureComponentIndices & | moisture_indices | ||
| ) |
Compute PBL height with the supplied estimator.
| [in] | lev | Current level |
| [in] | vars | Level-indexed state MultiFabs passed to the estimator |
| [in] | z_phys_cc | Cell-centered physical height used by the estimator |
| [in] | est | PBL height estimator functor |
| [in] | moisture_indices | Moisture component indices used by the estimator |

| void SurfaceLayer::compute_sfc_params_from_lsm_fluxes | ( | const int & | lev, |
| amrex::MultiFab & | cons_in | ||
| ) |
Derive MOST surface parameters from LSM fluxes.
| [in] | lev | level index |
| [in,out] | cons_in | conserved state used by the surface-parameter computation |
Compute surface-layer parameters from land-surface-model fluxes.
| [in] | lev | Current level |
| [in] | cons_in | Conserved state used to derive density, theta, and moisture at the surface |

| void SurfaceLayer::compute_SurfaceLayer_bcs | ( | const int & | lev, |
| amrex::Vector< const amrex::MultiFab * > | mfs, | ||
| amrex::Vector< std::unique_ptr< amrex::MultiFab >> & | Tau_lev, | ||
| amrex::MultiFab * | xheat_flux, | ||
| amrex::MultiFab * | yheat_flux, | ||
| amrex::MultiFab * | zheat_flux, | ||
| amrex::MultiFab * | xqv_flux, | ||
| amrex::MultiFab * | yqv_flux, | ||
| amrex::MultiFab * | zqv_flux, | ||
| const amrex::MultiFab * | z_phys, | ||
| const FluxCalc & | flux_comp | ||
| ) |
Compute planar-terrain surface-layer flux boundary conditions.
| [in] | lev | level index |
| [in] | mfs | state and velocity fields used by the BC computation |
| [in,out] | Tau_lev | stress fields to fill |
| [in,out] | xheat_flux | x-face heat flux field |
| [in,out] | yheat_flux | y-face heat flux field |
| [in,out] | zheat_flux | z-face heat flux field |
| [in,out] | xqv_flux | x-face moisture flux field |
| [in,out] | yqv_flux | y-face moisture flux field |
| [in,out] | zqv_flux | z-face moisture flux field |
| [in] | z_phys | physical-height field |
| [in] | flux_comp | flux-computation functor |
| void SurfaceLayer::compute_SurfaceLayer_bcs | ( | const int & | lev, |
| Vector< const MultiFab * > | mfs, | ||
| Vector< std::unique_ptr< MultiFab >> & | Tau_lev, | ||
| MultiFab * | xheat_flux, | ||
| MultiFab * | yheat_flux, | ||
| MultiFab * | zheat_flux, | ||
| MultiFab * | xqv_flux, | ||
| MultiFab * | yqv_flux, | ||
| MultiFab * | zqv_flux, | ||
| const MultiFab * | z_phys, | ||
| const FluxCalc & | flux_comp | ||
| ) |
Function to calculate MOST fluxes for populating ghost cells.
| [in] | lev | Current level |
| [in] | mfs | State MultiFabs used to compute the boundary fluxes |
| [in,out] | Tau_lev | Diffusive stress MultiFabs populated with surface stresses |
| [in,out] | xheat_flux | x-face heat-flux MultiFab, used when rotated fluxes are enabled |
| [in,out] | yheat_flux | y-face heat-flux MultiFab, used when rotated fluxes are enabled |
| [in,out] | zheat_flux | z-face heat-flux MultiFab populated with vertical surface heat flux |
| [in,out] | xqv_flux | x-face moisture-flux MultiFab, used when rotated fluxes and moisture are enabled |
| [in,out] | yqv_flux | y-face moisture-flux MultiFab, used when rotated fluxes and moisture are enabled |
| [in,out] | zqv_flux | z-face moisture-flux MultiFab populated when moisture is enabled |
| [in] | z_phys | Nodal physical height used to rotate terrain-following fluxes |
| [in] | flux_comp | Flux-calculation functor used to compute scalar and momentum fluxes |

| void SurfaceLayer::compute_SurfaceLayer_bcs_EB | ( | const int & | lev, |
| amrex::Vector< const amrex::MultiFab * > | mfs, | ||
| amrex::Vector< amrex::Vector< std::unique_ptr< amrex::MultiFab >>> & | Tau_lev, | ||
| amrex::MultiFab * | xheat_flux, | ||
| amrex::MultiFab * | yheat_flux, | ||
| amrex::MultiFab * | zheat_flux, | ||
| amrex::MultiFab * | xqv_flux, | ||
| amrex::MultiFab * | yqv_flux, | ||
| amrex::MultiFab * | zqv_flux, | ||
| const FluxCalc & | flux_comp | ||
| ) |
Compute embedded-boundary surface-layer flux boundary conditions.
| [in] | lev | level index |
| [in] | mfs | state and velocity fields used by the BC computation |
| [in,out] | Tau_lev | EB stress fields to fill |
| [in,out] | xheat_flux | x-face heat flux field |
| [in,out] | yheat_flux | y-face heat flux field |
| [in,out] | zheat_flux | z-face heat flux field |
| [in,out] | xqv_flux | x-face moisture flux field |
| [in,out] | yqv_flux | y-face moisture flux field |
| [in,out] | zqv_flux | z-face moisture flux field |
| [in] | flux_comp | flux-computation functor |
| void SurfaceLayer::compute_SurfaceLayer_bcs_EB | ( | const int & | lev, |
| Vector< const MultiFab * > | mfs, | ||
| Vector< Vector< std::unique_ptr< MultiFab >>> & | Tau_EB, | ||
| [[maybe_unused] ] MultiFab * | xheat_flux, | ||
| [[maybe_unused] ] MultiFab * | yheat_flux, | ||
| MultiFab * | Hfx3_EB, | ||
| [[maybe_unused] ] MultiFab * | xqv_flux, | ||
| [[maybe_unused] ] MultiFab * | yqv_flux, | ||
| [[maybe_unused] ] MultiFab * | zqv_flux, | ||
| const FluxCalc & | flux_comp | ||
| ) |
Function to calculate MOST fluxes for EB.
| [in] | lev | Current level |
| [in] | mfs | State MultiFabs used to compute the EB boundary fluxes |
| [in,out] | Tau_EB | EB diffusive stress MultiFabs populated with surface stresses |
| [in,out] | xheat_flux | x-face EB heat-flux MultiFab, currently unused |
| [in,out] | yheat_flux | y-face EB heat-flux MultiFab, currently unused |
| [in,out] | Hfx3_EB | EB heat-flux MultiFab populated with scalar surface flux |
| [in,out] | xqv_flux | x-face EB moisture-flux MultiFab, currently unused |
| [in,out] | yqv_flux | y-face EB moisture-flux MultiFab, currently unused |
| [in,out] | zqv_flux | z-face EB moisture-flux MultiFab, currently unused |
| [in] | flux_comp | EB flux-calculation functor used to compute scalar and momentum fluxes |

| void SurfaceLayer::fill_qsurf_with_qsat | ( | const int & | lev, |
| const amrex::MultiFab & | cons_in, | ||
| const std::unique_ptr< amrex::MultiFab > & | z_phys_nd | ||
| ) |
Fill surface moisture from saturation specific humidity.
| [in] | lev | level index |
| [in] | cons_in | conserved state used to evaluate surface pressure |
| [in] | z_phys_nd | nodal physical-height field |
Fill sea-surface moisture with saturation specific humidity.
| [in] | lev | Current level |
| [in] | cons_in | Conserved state used to derive pressure at the surface |
| [in] | z_phys_nd | Nodal physical height used to compute terrain-relative surface height |

| void SurfaceLayer::fill_tsurf_with_sst_and_tsk | ( | const int & | lev, |
| const double & | elapsed_time_since_start_low | ||
| ) |
Fill surface temperature from available SST and TSK data.
| [in] | lev | level index |
| [in] | time | interpolation time |
Fill surface temperature from SST/TSK lower-boundary data.
| [in] | lev | Current level |
| [in] | elapsed_time_since_start_low | Time since the start of the lower-boundary data |

|
inline |
| void SurfaceLayer::get_lsm_tsurf | ( | const int & | lev | ) |
Fill surface temperature from the LSM surface-temperature field.
| [in] | lev | level index |
Fill surface temperature from land-surface-model data.
| [in] | lev | Current level |

|
inline |
Return a MOST-average field.
| [in] | lev | level index |
| [in] | comp | component index |

|
inline |
|
inline |
Return the planetary-boundary-layer-height field.
| [in] | lev | level index |
|
inline |
|
inline |
|
inline |
Return the surface-diagnostic provenance field.
| [in] | lev | level index |
|
inline |
|
inline |
Return the surface-temperature field.
| [in] | lev | level index |
|
inline |
|
inline |
Return the convective velocity scale field.
| [in] | lev | level index |
|
inline |
|
inline |
|
inline |
Return whether variable sea roughness is active.
| void SurfaceLayer::impose_SurfaceLayer_bcs | ( | const int & | lev, |
| amrex::Vector< const amrex::MultiFab * > | mfs, | ||
| amrex::Vector< std::unique_ptr< amrex::MultiFab >> & | Tau_lev, | ||
| amrex::MultiFab * | xheat_flux, | ||
| amrex::MultiFab * | yheat_flux, | ||
| amrex::MultiFab * | zheat_flux, | ||
| amrex::MultiFab * | xqv_flux, | ||
| amrex::MultiFab * | yqv_flux, | ||
| amrex::MultiFab * | zqv_flux, | ||
| const amrex::MultiFab * | z_phys | ||
| ) |
Impose surface-layer boundary conditions for planar terrain.
| [in] | lev | level index |
| [in] | mfs | state and velocity fields used by the BC computation |
| [in,out] | Tau_lev | stress fields to fill |
| [in,out] | xheat_flux | x-face heat flux field |
| [in,out] | yheat_flux | y-face heat flux field |
| [in,out] | zheat_flux | z-face heat flux field |
| [in,out] | xqv_flux | x-face moisture flux field |
| [in,out] | yqv_flux | y-face moisture flux field |
| [in,out] | zqv_flux | z-face moisture flux field |
| [in] | z_phys | physical-height field |
Wrapper to impose Monin Obukhov similarity theory fluxes by populating ghost cells.
| [in] | lev | Current level |
| [in] | mfs | State MultiFabs used to compute the boundary fluxes |
| [in,out] | Tau_lev | Diffusive stress MultiFabs populated with surface stresses |
| [in,out] | xheat_flux | x-face heat-flux MultiFab, used when rotated fluxes are enabled |
| [in,out] | yheat_flux | y-face heat-flux MultiFab, used when rotated fluxes are enabled |
| [in,out] | zheat_flux | z-face heat-flux MultiFab populated with vertical surface heat flux |
| [in,out] | xqv_flux | x-face moisture-flux MultiFab, used when rotated fluxes and moisture are enabled |
| [in,out] | yqv_flux | y-face moisture-flux MultiFab, used when rotated fluxes and moisture are enabled |
| [in,out] | zqv_flux | z-face moisture-flux MultiFab populated when moisture is enabled |
| [in] | z_phys | Nodal physical height used to rotate terrain-following fluxes |
| void SurfaceLayer::impose_SurfaceLayer_bcs_EB | ( | const int & | lev, |
| amrex::Vector< const amrex::MultiFab * > | mfs, | ||
| amrex::Vector< amrex::Vector< std::unique_ptr< amrex::MultiFab >>> & | Tau_lev, | ||
| amrex::MultiFab * | xheat_flux, | ||
| amrex::MultiFab * | yheat_flux, | ||
| amrex::MultiFab * | zheat_flux, | ||
| amrex::MultiFab * | xqv_flux, | ||
| amrex::MultiFab * | yqv_flux, | ||
| amrex::MultiFab * | zqv_flux | ||
| ) |
Impose surface-layer boundary conditions for embedded-boundary terrain.
| [in] | lev | level index |
| [in] | mfs | state and velocity fields used by the BC computation |
| [in,out] | Tau_lev | EB stress fields to fill |
| [in,out] | xheat_flux | x-face heat flux field |
| [in,out] | yheat_flux | y-face heat flux field |
| [in,out] | zheat_flux | z-face heat flux field |
| [in,out] | xqv_flux | x-face moisture flux field |
| [in,out] | yqv_flux | y-face moisture flux field |
| [in,out] | zqv_flux | z-face moisture flux field |
Wrapper to impose Monin Obukhov similarity theory fluxes by populating ghost cells.
| [in] | lev | Current level |
| [in] | mfs | State MultiFabs used to compute the EB boundary fluxes |
| [in,out] | Tau_EB | EB diffusive stress MultiFabs populated with surface stresses |
| [in,out] | xheat_flux | x-face EB heat-flux MultiFab, currently unused |
| [in,out] | yheat_flux | y-face EB heat-flux MultiFab, currently unused |
| [in,out] | Hfx3_EB | EB heat-flux MultiFab populated with scalar surface flux |
| [in,out] | xqv_flux | x-face EB moisture-flux MultiFab, currently unused |
| [in,out] | yqv_flux | y-face EB moisture-flux MultiFab, currently unused |
| [in,out] | zqv_flux | z-face EB moisture-flux MultiFab, currently unused |
| void SurfaceLayer::init_tke_from_ustar | ( | const int & | lev, |
| amrex::MultiFab & | cons, | ||
| const std::unique_ptr< amrex::MultiFab > & | z_phys_nd, | ||
| const amrex::Real | tkefac = one, |
||
| const amrex::Real | zscale = amrex::Real(700.0) |
||
| ) |
Initialize TKE from the current surface friction velocity.
| [in] | lev | level index |
| [in,out] | cons | conserved state whose TKE component is initialized |
| [in] | z_phys_nd | nodal physical-height field |
| [in] | tkefac | scale factor applied to the initialized TKE |
| [in] | zscale | vertical decay scale |
Initialize TKE from surface-layer friction velocity.
| [in] | lev | Current level |
| [in,out] | cons | Conserved state whose RhoKE component is initialized |
| [in] | z_phys_nd | Nodal physical height used to compute height above ground |
| [in] | tkefac | Factor multiplying ustar squared for the surface TKE value |
| [in] | zscale | Scale factor used to taper TKE with height |

|
inline |
Compute the minimum land-mask value over valid and optional ghost cells.
| [in] | lmask | land-mask field |
| [in] | nghost | number of ghost cells included in the reduction |
Referenced by make_SurfaceLayer_at_level().

|
inline |
Allocate and initialize surface-layer data for one AMR level.
| [in] | lev | level index |
| [in] | nlevs | number of AMR levels |
| [in] | mfv | conserved and velocity MultiFabs for this level |
| [in] | Theta_prim | primitive potential-temperature field |
| [in] | Qv_prim | primitive water-vapor field |
| [in] | Qr_prim | primitive rain-water field |
| [in] | z_phys_nd | nodal physical-height field |
| [in] | Hwave | wave-height field |
| [in] | Lwave | wavelength field |
| [in] | eddyDiffs | eddy-diffusivity field |
| [in] | lsm_data | land-surface-model data fields |
| [in] | lsm_data_name | names for lsm_data entries |
| [in] | lsm_flux | land-surface-model flux fields |
| [in] | lsm_flux_name | names for lsm_flux entries |
| [in] | sst_lev | sea-surface-temperature data by time |
| [in] | tsk_lev | skin-temperature data by time |
| [in] | lmask_lev | land-mask data by time |

| void SurfaceLayer::read_custom_roughness | ( | const int & | lev, |
| const std::string & | fname | ||
| ) |
Read custom roughness data for one level.
| [in] | lev | level index |
| [in] | fname | roughness-data file name |
Read or interpolate custom roughness length data.
| [in] | lev | Current level |
| [in] | fname | Roughness file name; an empty name interpolates from level 0 |
Referenced by make_SurfaceLayer_at_level().


|
inline |
Set the surface-moisture field to a constant value.
| [in] | lev | level index |
| [in] | qsurf | surface moisture |
|
inline |
Set the surface-temperature field to a constant value.
| [in] | lev | level index |
| [in] | tsurf | surface temperature |
| void SurfaceLayer::update_fluxes | ( | const int & | lev, |
| const double & | elapsed_time, | ||
| const double & | elapsed_time_since_start_low, | ||
| amrex::MultiFab & | cons_in, | ||
| const std::unique_ptr< amrex::MultiFab > & | z_phys_nd, | ||
| const std::unique_ptr< amrex::MultiFab > & | walldist, | ||
| int | max_iters = 100 |
||
| ) |
Update surface fluxes and related surface-layer state.
| [in] | lev | level index |
| [in] | elapsed_time | current elapsed simulation time |
| [in] | elapsed_time_since_start_low | elapsed time relative to low-data start |
| [in,out] | cons_in | conserved state used by the flux update |
| [in] | z_phys_nd | nodal physical-height field |
| [in] | walldist | wall-distance field |
| [in] | max_iters | maximum MOST iteration count |
Wrapper to update ustar and tstar for Monin Obukhov similarity theory.
| [in] | lev | Current level |
| [in] | elapsed_time | Current simulation time |
| [in] | elapsed_time_since_start_low | Time since the start of the lower-boundary data |
| [in,out] | cons_in | Conserved state, updated when RANS TKE is initialized from surface-layer data |
| [in] | z_phys_nd | Nodal physical height used by terrain-aware surface calculations |
| [in] | walldist | Wall distance used when updating boundary TKE |
| [in] | max_iters | Maximum iterations to use in the MOST flux solve |

|
inline |
Update MOST-average field pointers.
| [in] | lev | level index |
| [in] | vars_old | old-time state variables |
| [in] | Theta_prim | primitive potential-temperature fields by level |
| [in] | Qv_prim | primitive water-vapor fields by level |
| [in] | Qr_prim | primitive rain-water fields by level |

| void SurfaceLayer::update_pblh | ( | const int & | lev, |
| amrex::Vector< amrex::Vector< amrex::MultiFab >> & | vars, | ||
| amrex::MultiFab * | z_phys_cc, | ||
| const MoistureComponentIndices & | moisture_indices | ||
| ) |
Wrapper around compute_pblh.
| [in] | lev | level index |
| [in,out] | vars | state variables used by the PBL-height calculation |
| [in] | z_phys_cc | cell-centered physical-height field |
| [in] | moisture_indices | indices for moisture components |
Update PBL height using the configured estimator.
| [in] | lev | Current level |
| [in] | vars | Level-indexed state MultiFabs passed to the PBL height estimator |
| [in] | z_phys_cc | Cell-centered physical height used by the PBL height estimator |
| [in] | moisture_indices | Moisture component indices used by the PBL height estimator |
|
inline |
Update one stored sea-surface-temperature pointer.
| [in] | lev | level index |
| [in] | itime | time-slice index |
| [in] | sst_ptr | sea-surface-temperature field pointer |
|
inline |
Update prescribed surface temperature from the configured heating rate.
| [in] | time | elapsed simulation time |
|
inline |
Update one stored skin-temperature pointer.
| [in] | lev | level index |
| [in] | itime | time-slice index |
| [in] | tsk_ptr | skin-temperature field pointer |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Referenced by make_SurfaceLayer_at_level().
|
private |
Referenced by make_SurfaceLayer_at_level().
|
private |
| FluxCalcType SurfaceLayer::flux_type {FluxCalcType::MOENG} |
Referenced by make_SurfaceLayer_at_level().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Referenced by make_SurfaceLayer_at_level().
|
private |
|
private |
Referenced by update_surf_temp().
|
private |
Referenced by make_SurfaceLayer_at_level().
|
private |
Referenced by make_SurfaceLayer_at_level().
|
private |
Referenced by make_SurfaceLayer_at_level(), and update_surf_temp().
|
private |
Referenced by make_SurfaceLayer_at_level().
|
private |
Referenced by make_SurfaceLayer_at_level().
|
private |
|
private |
Referenced by get_lmask(), and make_SurfaceLayer_at_level().
|
private |
|
private |
Referenced by make_SurfaceLayer_at_level().
|
private |
Referenced by make_SurfaceLayer_at_level().
|
private |
Referenced by make_SurfaceLayer_at_level().
|
private |
Referenced by make_SurfaceLayer_at_level().
|
private |
Referenced by make_SurfaceLayer_at_level().
|
private |
Referenced by make_SurfaceLayer_at_level().
|
private |
Referenced by get_mac_avg(), get_zref(), make_SurfaceLayer_at_level(), and update_mac_ptrs().
|
private |
|
private |
Referenced by make_SurfaceLayer_at_level(), and update_sst_ptr().
|
private |
|
private |
Referenced by make_SurfaceLayer_at_level().
|
private |
Referenced by make_SurfaceLayer_at_level(), and update_tsk_ptr().
|
private |
|
private |
Referenced by have_variable_sea_roughness(), and make_SurfaceLayer_at_level().
| MoistCalcType SurfaceLayer::moist_type {MoistCalcType::ADIABATIC} |
|
private |
Referenced by get_olen(), and make_SurfaceLayer_at_level().
|
private |
Referenced by get_pblh(), and make_SurfaceLayer_at_level().
| PBLHeightCalcType SurfaceLayer::pblh_type {PBLHeightCalcType::None} |
|
private |
Referenced by get_q_star(), and make_SurfaceLayer_at_level().
|
private |
Referenced by get_q_surf(), make_SurfaceLayer_at_level(), and set_q_surf().
|
private |
|
private |
| RoughCalcType SurfaceLayer::rough_type_land {RoughCalcType::CONSTANT} |
| RoughCalcType SurfaceLayer::rough_type_sea {RoughCalcType::CHARNOCK} |
Referenced by make_SurfaceLayer_at_level().
|
private |
|
private |
Referenced by update_surf_temp().
|
private |
|
private |
|
private |
Referenced by update_surf_temp().
|
private |
|
private |
Referenced by get_surface_diagnostic_source(), and make_SurfaceLayer_at_level().
|
private |
Referenced by get_t_star(), and make_SurfaceLayer_at_level().
|
private |
Referenced by get_t_surf(), make_SurfaceLayer_at_level(), set_t_surf(), and update_surf_temp().
|
private |
| ThetaCalcType SurfaceLayer::theta_type {ThetaCalcType::ADIABATIC} |
Referenced by make_SurfaceLayer_at_level().
|
private |
Referenced by get_u_star(), and make_SurfaceLayer_at_level().
|
private |
|
private |
Referenced by get_w_star(), and make_SurfaceLayer_at_level().
|
private |
Referenced by make_SurfaceLayer_at_level().
|
private |
Referenced by get_z0(), and make_SurfaceLayer_at_level().