|
ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
|
Classes | |
| struct | ConversionFailure |
Enumerations | |
| enum class | ConversionError : int { none = 0 , bad_density , no_moisture_comp , bad_rho_qv , bad_qv , bad_theta_to_temperature , bad_temperature_to_theta , bad_pressure , bad_skin_temperature , bad_q_air , bad_q_surf } |
Functions | |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real | pressure_at_boundary_from_cell (const amrex::Real rho, const amrex::Real rho_theta, const amrex::Real qv, const amrex::Real delta_z) |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real | pressure_at_surface (const amrex::Real rho, const amrex::Real rho_theta, const amrex::Real qv, const amrex::Real delta_z) |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool | valid_pressure (const amrex::Real pressure) |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool | valid_temperature (const amrex::Real temperature) |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool | theta_to_temperature (const amrex::Real theta, const amrex::Real pressure, const amrex::Real rdOcp, amrex::Real &temperature) |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool | temperature_to_theta (const amrex::Real temperature, const amrex::Real pressure, const amrex::Real rdOcp, amrex::Real &theta) |
| AMREX_GPU_DEVICE AMREX_FORCE_INLINE void | record_conversion_failure (ConversionFailure *fail, const bool fatal, const ConversionError code, const int i, const int j, const int k, const amrex::Real rho=amrex::Real(0.0), const amrex::Real rho_theta=amrex::Real(0.0), const amrex::Real rho_qv=amrex::Real(0.0), const amrex::Real t_surf=amrex::Real(0.0), const amrex::Real pressure=amrex::Real(0.0), const amrex::Real delta_z=amrex::Real(0.0), const amrex::Real q_air=amrex::Real(0.0)) |
| AMREX_FORCE_INLINE const char * | conversion_error_text (const ConversionError code) |
| void | abort_on_conversion_failure (const char *who, const int lev, ConversionFailure const &fail) |
|
strong |
Why a surface conversion could not be made, in the order the kernels test for it.
Every kernel that converts between the atmospheric state and a surface temperature or humidity guards the same sequence of ways that state can be unusable. Which guard tripped is the difference between "the surface layer gave up" and knowing that the state handed to it was already bad – so the guards are named rather than merged into a single flag.
| Enumerator | |
|---|---|
| none | |
| bad_density | |
| no_moisture_comp | |
| bad_rho_qv | |
| bad_qv | |
| bad_theta_to_temperature | |
| bad_temperature_to_theta | |
| bad_pressure | |
| bad_skin_temperature | |
| bad_q_air | |
| bad_q_surf | |
|
inline |
Describe what this rank recorded, then abort if any rank recorded anything.
Collective: every rank must call this. Each rank that failed describes its own first failure before the abort, so a failure confined to one rank still names the cell and the numbers rather than only the check that tripped.
| [in] | who | Name of the fill, used to open the message |
| [in] | lev | Level being filled |
| [in] | fail | This rank's record |
Referenced by SurfaceLayer::fill_qsurf_with_qsat(), SurfaceLayer::fill_qsurf_with_skin_moisture(), SurfaceLayer::fill_tsurf_with_coupled_sst(), SurfaceLayer::fill_tsurf_with_sfc_sst(), and SurfaceLayer::fill_tsurf_with_skin_temperature().


| AMREX_FORCE_INLINE const char* erf_surface_temperature::conversion_error_text | ( | const ConversionError | code | ) |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real erf_surface_temperature::pressure_at_boundary_from_cell | ( | const amrex::Real | rho, |
| const amrex::Real | rho_theta, | ||
| const amrex::Real | qv, | ||
| const amrex::Real | delta_z | ||
| ) |
Pressure at a boundary face from the adjacent atmospheric cell state.
The state pressure is diagnosed at the cell centre. Adding rho*g*delta_z gives the pressure at the boundary face, where delta_z is the signed distance from the face to the cell centre.
Referenced by SurfaceLayer::fill_qsurf_with_qsat(), SurfaceLayer::fill_qsurf_with_skin_moisture(), SurfaceLayer::fill_tsurf_with_coupled_sst(), SurfaceLayer::fill_tsurf_with_sfc_sst(), SurfaceLayer::fill_tsurf_with_skin_temperature(), and pressure_at_surface().


| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real erf_surface_temperature::pressure_at_surface | ( | const amrex::Real | rho, |
| const amrex::Real | rho_theta, | ||
| const amrex::Real | qv, | ||
| const amrex::Real | delta_z | ||
| ) |
Referenced by Radiation::mf_to_kokkos_buffers(), and vertical_two_stream_sweep().


| AMREX_GPU_DEVICE AMREX_FORCE_INLINE void erf_surface_temperature::record_conversion_failure | ( | ConversionFailure * | fail, |
| const bool | fatal, | ||
| const ConversionError | code, | ||
| const int | i, | ||
| const int | j, | ||
| const int | k, | ||
| const amrex::Real | rho = amrex::Real(0.0), |
||
| const amrex::Real | rho_theta = amrex::Real(0.0), |
||
| const amrex::Real | rho_qv = amrex::Real(0.0), |
||
| const amrex::Real | t_surf = amrex::Real(0.0), |
||
| const amrex::Real | pressure = amrex::Real(0.0), |
||
| const amrex::Real | delta_z = amrex::Real(0.0), |
||
| const amrex::Real | q_air = amrex::Real(0.0) |
||
| ) |
Record one cell's failure.
Every failing cell adds to a count; the first authoritative one to arrive also claims the description, so what gets reported is a failure that matters rather than whichever thread happened to finish last. Pass the values the caller has reached by this point: the report prints the ones that mean something for the code it is given.
| [in,out] | fail | This rank's record |
| [in] | fatal | Whether this is a cell the fill is authoritative for |
| [in] | code | Which guard tripped |
| [in] | i,j,k | The cell whose state was read |
Referenced by SurfaceLayer::fill_qsurf_with_qsat(), SurfaceLayer::fill_qsurf_with_skin_moisture(), SurfaceLayer::fill_tsurf_with_coupled_sst(), SurfaceLayer::fill_tsurf_with_sfc_sst(), and SurfaceLayer::fill_tsurf_with_skin_temperature().

| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool erf_surface_temperature::temperature_to_theta | ( | const amrex::Real | temperature, |
| const amrex::Real | pressure, | ||
| const amrex::Real | rdOcp, | ||
| amrex::Real & | theta | ||
| ) |
Referenced by SurfaceLayer::fill_tsurf_with_coupled_sst(), SurfaceLayer::fill_tsurf_with_sfc_sst(), SurfaceLayer::fill_tsurf_with_skin_temperature(), and metgrid_surface_theta().


| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool erf_surface_temperature::theta_to_temperature | ( | const amrex::Real | theta, |
| const amrex::Real | pressure, | ||
| const amrex::Real | rdOcp, | ||
| amrex::Real & | temperature | ||
| ) |
Referenced by SurfaceLayer::fill_qsurf_with_qsat(), rrtmgp::resolve_surface_temperature(), and vertical_two_stream_sweep().


| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool erf_surface_temperature::valid_pressure | ( | const amrex::Real | pressure | ) |
Referenced by SurfaceLayer::fill_qsurf_with_skin_moisture(), temperature_to_theta(), and theta_to_temperature().

| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool erf_surface_temperature::valid_temperature | ( | const amrex::Real | temperature | ) |
Referenced by SurfaceLayer::fill_qsurf_with_skin_moisture(), temperature_to_theta(), and theta_to_temperature().
