|
ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
|
#include <memory>#include <string>#include <AMReX_BoxArray.H>#include <AMReX_DistributionMapping.H>#include <AMReX_Geometry.H>#include <AMReX_MultiFab.H>#include <AMReX_REAL.H>#include <AMReX_Vector.H>#include <ERF_RadStruct.H>#include <ERF_LandSurface.H>#include <ERF_RadiationDiagnostics.H>#include <ERF_TwoStreamCanopyForcing.H>

Go to the source code of this file.
Classes | |
| class | TwoStreamRadiation |
| The two-stream radiation model (erf.radiation_model = TwoStream). More... | |
| struct | TwoStreamRadiation::OrbitalCache |
| struct | TwoStreamRadiation::FluxDiag |
| struct | TwoStreamSunDate |
| The calendar sun of the two-stream model at one time (see two_stream_sun_date()). More... | |
Functions | |
| void | copy_surface_plane (const amrex::MultiFab &src2d, amrex::MultiFab &dst) |
| Copy a 2D field (k = 0 only) into the k = 0 plane of a surface-model field. More... | |
| TwoStreamSunDate | two_stream_sun_date (const RadChoice &rc, TwoStreamRadiation::OrbitalCache &orbit, double epoch_time) |
| The calendar sun of the two-stream model at a UTC epoch time (start_time + t). More... | |
Variables | |
| constexpr amrex::Real | two_stream_tsi_reference = 1360.9 |
| RRTMGP's reference total solar irradiance [W/m^2], scaled by the date's Earth-Sun distance factor. More... | |
| void copy_surface_plane | ( | const amrex::MultiFab & | src2d, |
| amrex::MultiFab & | dst | ||
| ) |
Copy a 2D field (k = 0 only) into the k = 0 plane of a surface-model field.
Surface-model fields keep their surface values in the k = 0 plane, which may lie in the field's z ghost region (SLM stores soil layers at k < 0), and carry x/y ghost cells the source need not have. Only the i,j extent of each destination VALID box is written, so ghost columns and every other k are left alone. The two fields must share a horizontal layout: the destination's boxes flattened to k = 0 equal the source's, on the same DistributionMapping – which holds for ERF's ba2d and a land model's data built from the same level grids, and is asserted rather than assumed.
| TwoStreamSunDate two_stream_sun_date | ( | const RadChoice & | rc, |
| TwoStreamRadiation::OrbitalCache & | orbit, | ||
| double | epoch_time | ||
| ) |
The calendar sun of the two-stream model at a UTC epoch time (start_time + t).
The date as the RRTMGP interface forms it, the orbit of the year (or the erf.rad_orbital_* overrides) cached in orbit, and the declination and distance factor of ERF_OrbCosZenith.H. The two-stream sweep places its sun from this, with the column's position, and so does the immersed-boundary balance with erf.ibseb.sun_mode = two_stream.
The calendar sun of the two-stream model at a UTC epoch time: the calendar day with the time of day as its fraction, the declination and the Earth-Sun distance factor, from the date as the RRTMGP interface forms it and the orbital code of ERF_OrbCosZenith.H (orbital_params once per year into orbit, with the erf.rad_orbital_* overrides passed to it, then orbital_decl per call). set_solar_state() takes the sun of every sweep from here, and the immersed-boundary balance its erf.ibseb.sun_mode = two_stream sun, so the two cannot drift apart.
Referenced by ERF::ibseb_set_two_stream_sun().


|
inlineconstexpr |
RRTMGP's reference total solar irradiance [W/m^2], scaled by the date's Earth-Sun distance factor.
Referenced by ERF::ibseb_set_two_stream_sun().