|
ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
|
Functions | |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void | Newton_Raphson_hse (const Real &m_tol, const Real &RdOCp, const Real &dz, const Real &g, const Real &C, const Real &T, const Real &qt, const Real &qv, Real &P, Real &rd, Real &F) |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void | init_isentropic_hse (const amrex::Real &r_sfc, const amrex::Real &theta, amrex::Real *r, amrex::Real *p, const amrex::Real &dz, const int klo, const int khi) |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void | init_isentropic_hse_terrain (int i, int j, const amrex::Real &r_sfc, const amrex::Real &theta, amrex::Real *r, amrex::Real *p, const amrex::Array4< amrex::Real const > z_cc, const int &klo, const int &khi) |
| AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE Real | compute_saturation_pressure (const Real T_b, const bool use_empirical) |
| AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE Real | compute_relative_humidity (const Real p_b, const Real T_b, const bool use_empirical, const int which_zone, const Real scaled_height) |
| AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE Real | vapor_mixing_ratio (const Real p_b, const Real T_b, const Real RH, const bool use_empirical, int which_zone) |
| AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE Real | compute_F_for_temp (const Real T_b, const Real p_b, const Real q_t, const Real eq_pot_temp, const bool use_empirical, const int which_zone, const Real scaled_height) |
| AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE Real | compute_temperature (const Real p_b, const Real q_t, const Real eq_pot_temp, const bool use_empirical, const int which_zone, const Real scaled_height) |
| AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE Real | compute_dewpoint_temperature (const Real T_b, const Real RH) |
| AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE Real | compute_theta (const Real scaled_height, const Real theta_0, const Real theta_tr, const Real z_tr, const Real T_tr) |
| AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE void | compute_rho (const Real &pressure, Real &theta, Real &rho, Real &q_v, Real &T_dp, Real &T_b, const Real q_t, const Real eq_pot_temp, const bool use_empirical, const int which_zone, const Real scaled_height, const bool T_from_theta, const Real theta_0, const Real theta_tr, const Real z_tr, const Real T_tr) |
| AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE Real | compute_F (const Real &p_k, const Real &p_k_minus_1, Real &theta_k, Real &rho_k, Real &q_v_k, Real &T_dp, Real &T_b, const Real &dz, const Real &rho_k_minus_1, const Real q_t, const Real eq_pot_temp, const bool use_empirical, const int which_zone, const Real scaled_height, const bool T_from_theta, const Real theta_0, const Real theta_tr, const Real z_tr, const Real T_tr) |
| AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE Real | compute_p_k (Real &p_k, const Real p_k_minus_1, Real &theta_k, Real &rho_k, Real &q_v_k, Real &T_dp, Real &T_b, const Real dz, const Real rho_k_minus_1, const Real q_t, const Real eq_pot_temp, const bool use_empirical, const int which_zone, const Real scaled_height, const bool T_from_theta, const Real theta_0, const Real theta_tr, const Real z_tr, const Real T_tr) |
| AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE void | init_isentropic_hse_no_terrain (Real *theta, Real *r, Real *p, Real *q_v, const Real &dz, const int &khi, const Real q_t, const Real eq_pot_temp, const bool use_empirical, const bool T_from_theta=false, const Real z_tr_1=-1., const Real z_tr_2=-1., const Real theta_0=0., const Real theta_tr=0., const Real T_tr=0.) |
Variables | |
| const int | MAX_ITER = 10 |
| const amrex::Real | TOL = 1.e-8 |
Utility functions for calculating a hydrostatic equilibrium (HSE) base state
| AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE Real HSEutils::compute_dewpoint_temperature | ( | const Real | T_b, |
| const Real | RH | ||
| ) |
| AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE Real HSEutils::compute_F | ( | const Real & | p_k, |
| const Real & | p_k_minus_1, | ||
| Real & | theta_k, | ||
| Real & | rho_k, | ||
| Real & | q_v_k, | ||
| Real & | T_dp, | ||
| Real & | T_b, | ||
| const Real & | dz, | ||
| const Real & | rho_k_minus_1, | ||
| const Real | q_t, | ||
| const Real | eq_pot_temp, | ||
| const bool | use_empirical, | ||
| const int | which_zone, | ||
| const Real | scaled_height, | ||
| const bool | T_from_theta, | ||
| const Real | theta_0, | ||
| const Real | theta_tr, | ||
| const Real | z_tr, | ||
| const Real | T_tr | ||
| ) |
Referenced by compute_p_k().


| AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE Real HSEutils::compute_F_for_temp | ( | const Real | T_b, |
| const Real | p_b, | ||
| const Real | q_t, | ||
| const Real | eq_pot_temp, | ||
| const bool | use_empirical, | ||
| const int | which_zone, | ||
| const Real | scaled_height | ||
| ) |
Referenced by compute_temperature().


| AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE Real HSEutils::compute_p_k | ( | Real & | p_k, |
| const Real | p_k_minus_1, | ||
| Real & | theta_k, | ||
| Real & | rho_k, | ||
| Real & | q_v_k, | ||
| Real & | T_dp, | ||
| Real & | T_b, | ||
| const Real | dz, | ||
| const Real | rho_k_minus_1, | ||
| const Real | q_t, | ||
| const Real | eq_pot_temp, | ||
| const bool | use_empirical, | ||
| const int | which_zone, | ||
| const Real | scaled_height, | ||
| const bool | T_from_theta, | ||
| const Real | theta_0, | ||
| const Real | theta_tr, | ||
| const Real | z_tr, | ||
| const Real | T_tr | ||
| ) |
Referenced by init_isentropic_hse_no_terrain().


| AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE Real HSEutils::compute_relative_humidity | ( | const Real | p_b, |
| const Real | T_b, | ||
| const bool | use_empirical, | ||
| const int | which_zone, | ||
| const Real | scaled_height | ||
| ) |
Referenced by compute_F_for_temp(), and compute_rho().


| AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE void HSEutils::compute_rho | ( | const Real & | pressure, |
| Real & | theta, | ||
| Real & | rho, | ||
| Real & | q_v, | ||
| Real & | T_dp, | ||
| Real & | T_b, | ||
| const Real | q_t, | ||
| const Real | eq_pot_temp, | ||
| const bool | use_empirical, | ||
| const int | which_zone, | ||
| const Real | scaled_height, | ||
| const bool | T_from_theta, | ||
| const Real | theta_0, | ||
| const Real | theta_tr, | ||
| const Real | z_tr, | ||
| const Real | T_tr | ||
| ) |
Referenced by compute_F().


| AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE Real HSEutils::compute_saturation_pressure | ( | const Real | T_b, |
| const bool | use_empirical | ||
| ) |
Referenced by compute_F_for_temp(), compute_relative_humidity(), and vapor_mixing_ratio().


| AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE Real HSEutils::compute_temperature | ( | const Real | p_b, |
| const Real | q_t, | ||
| const Real | eq_pot_temp, | ||
| const bool | use_empirical, | ||
| const int | which_zone, | ||
| const Real | scaled_height | ||
| ) |
Referenced by compute_rho().


| AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE Real HSEutils::compute_theta | ( | const Real | scaled_height, |
| const Real | theta_0, | ||
| const Real | theta_tr, | ||
| const Real | z_tr, | ||
| const Real | T_tr | ||
| ) |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void HSEutils::init_isentropic_hse | ( | const amrex::Real & | r_sfc, |
| const amrex::Real & | theta, | ||
| amrex::Real * | r, | ||
| amrex::Real * | p, | ||
| const amrex::Real & | dz, | ||
| const int | klo, | ||
| const int | khi | ||
| ) |
Function to calculate the hydrostatic density and pressure
| [in] | r_sfc | surface density |
| [in] | theta | surface potential temperature |
| [out] | r | hydrostatically balanced density profile |
| [out] | p | hydrostatically balanced pressure profile |
| [in] | dz | vertical grid spacing (constant) |
| [in] | prob_lo_z | surface height |
| [in] | khi | z-index corresponding to the big end of the domain |
Referenced by erf_init_dens_hse().


| AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE void HSEutils::init_isentropic_hse_no_terrain | ( | Real * | theta, |
| Real * | r, | ||
| Real * | p, | ||
| Real * | q_v, | ||
| const Real & | dz, | ||
| const int & | khi, | ||
| const Real | q_t, | ||
| const Real | eq_pot_temp, | ||
| const bool | use_empirical, | ||
| const bool | T_from_theta = false, |
||
| const Real | z_tr_1 = -1., |
||
| const Real | z_tr_2 = -1., |
||
| const Real | theta_0 = 0., |
||
| const Real | theta_tr = 0., |
||
| const Real | T_tr = 0. |
||
| ) |
Referenced by erf_init_dens_hse_moist().


| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void HSEutils::init_isentropic_hse_terrain | ( | int | i, |
| int | j, | ||
| const amrex::Real & | r_sfc, | ||
| const amrex::Real & | theta, | ||
| amrex::Real * | r, | ||
| amrex::Real * | p, | ||
| const amrex::Array4< amrex::Real const > | z_cc, | ||
| const int & | klo, | ||
| const int & | khi | ||
| ) |
Function to calculate the hydrostatic density and pressure over terrain
| [in] | i | x-index |
| [in] | j | y-index |
| [in] | r_sfc | surface density |
| [in] | theta | surface potential temperature |
| [out] | r | hydrostatically balanced density profile |
| [out] | p | hydrostatically balanced pressure profile |
| [in] | z_cc | cell-center heights |
| [in] | khi | z-index corresponding to the big end of the domain |
Referenced by erf_init_dens_hse().


| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void HSEutils::Newton_Raphson_hse | ( | const Real & | m_tol, |
| const Real & | RdOCp, | ||
| const Real & | dz, | ||
| const Real & | g, | ||
| const Real & | C, | ||
| const Real & | T, | ||
| const Real & | qt, | ||
| const Real & | qv, | ||
| Real & | P, | ||
| Real & | rd, | ||
| Real & | F | ||
| ) |
Function to calculate the hydrostatic density and pressure from Newton-Raphson iterations
| [in] | m_tol | iteration tolerance |
| [in] | RdOCp | Rd/Cp |
| [out] | dz | change in vertical height |
| [out] | g | magnitude of gravity |
| [in] | C | sum of known terms in HSE balance |
| [in] | T | theta at the current cell center |
| [in] | qt | total moisture (non-precip and precip) |
| [in] | qv | water vapor |
| [in] | P | pressure at cell center |
| [in] | rd | dry density at cell center |
| [in] | F | starting residual of non-linear eq |
Referenced by InputSoundingData::calc_rho_p().


| AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE Real HSEutils::vapor_mixing_ratio | ( | const Real | p_b, |
| const Real | T_b, | ||
| const Real | RH, | ||
| const bool | use_empirical, | ||
| int | which_zone | ||
| ) |
Referenced by compute_F_for_temp(), and compute_rho().


| const int HSEutils::MAX_ITER = 10 |
Referenced by init_isentropic_hse(), and init_isentropic_hse_terrain().
| const amrex::Real HSEutils::TOL = 1.e-8 |
Referenced by init_isentropic_hse(), and init_isentropic_hse_terrain().