|
ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
|
#include <ERF_InflowProfile.H>#include <ERF_Constants.H>#include <AMReX.H>#include <AMReX_Math.H>#include <algorithm>#include <cctype>#include <cmath>#include <cstdlib>#include <fstream>#include <sstream>#include <vector>
Functions | |
| std::string | parse_inflow_profile (std::istream &is, InflowProfile &prof) |
| void | read_inflow_profile_file (const std::string &fname, InflowProfile &prof) |
| std::string | make_log_law_inflow_profile (const InflowLogLaw &p, const Real ztop, InflowProfile &prof) |
| std::string make_log_law_inflow_profile | ( | const InflowLogLaw & | p, |
| const Real | ztop, | ||
| InflowProfile & | prof | ||
| ) |
u = (u_star / kappa) ln((z + z0)/z0), so the wind is zero at the ground and speed at height, optionally capped at max_speed, blowing from direction. tke = u_star^2 / Cmu0^2 at the ground, the value erf.dirichlet_k holds in the first cell, tapering linearly to zero at u_star tke_zscale with the floor of SurfaceLayer::init_tke_from_ustar. The table has the ground and 399 heights spaced geometrically from 1 cm to ztop.
Referenced by ERF::init_inflow_profile().

| std::string parse_inflow_profile | ( | std::istream & | is, |
| InflowProfile & | prof | ||
| ) |
The layout of kynema-sgf's TabulatedProfile: one row per height, heights strictly increasing. A comment line whose first word is "z" names the columns (z u v w T tke, in any order; theta and k are accepted for T and tke); other comment lines are ignored. Without such a header, four columns are z u v T and five are z u v T tke. A w column is accepted and not used: the vertical velocity on the face keeps its boundary value. Heights are above the local ground.
Referenced by read_inflow_profile_file().

| void read_inflow_profile_file | ( | const std::string & | fname, |
| InflowProfile & | prof | ||
| ) |
Read a profile file, aborting with the file name on any error.
Referenced by ERF::init_inflow_profile().

