Class emulator::impl::AtmFieldManager
ClassList > emulator > impl > AtmFieldManager
Field storage container for atmosphere emulator. More...
#include <atm_field_manager.hpp>
Public Attributes
| Type | Name |
|---|---|
| std::vector< double > | aldif NIR diffuse albedo [-]. |
| std::vector< double > | aldir NIR direct albedo [-]. |
| std::vector< double > | asdif Visible diffuse albedo [-]. |
| std::vector< double > | asdir Visible direct albedo [-]. |
| std::vector< double > | cflx CO2 flux [kg/m²/s]. |
| std::vector< double > | dens Air density [kg/m³]. |
| std::map< std::string, std::vector< double > > | dynamic_fields Runtime-registered fields for configurable I/O. |
| std::vector< double > | icefrac Sea ice fraction [-]. |
| std::vector< double > | lhf Latent heat flux [W/m²]. |
| std::vector< double > | lndfrac Land fraction [-]. |
| std::vector< double > | lwdn Downward longwave radiation [W/m²]. |
| std::vector< double > | lwup Upward longwave radiation [W/m²]. |
| std::vector< double > | net_inputs Packed input tensor for inference. |
| std::vector< double > | net_outputs Packed output tensor from inference. |
| std::vector< double > | ocnfrac Ocean fraction [-]. |
| std::vector< double > | pbot Pressure at bottom level [Pa]. |
| std::vector< double > | pslv Sea level pressure [Pa]. |
| std::vector< double > | ptem Potential temperature [K]. |
| std::vector< double > | qref Reference specific humidity [kg/kg]. |
| std::vector< double > | rainc Convective precipitation [kg/m²/s]. |
| std::vector< double > | rainl Large-scale precipitation [kg/m²/s]. |
| std::vector< double > | shf Sensible heat flux [W/m²]. |
| std::vector< double > | shum Specific humidity [kg/kg]. |
| std::vector< double > | snowc Convective snowfall [kg/m²/s]. |
| std::vector< double > | snowhice Snow height over ice [m]. |
| std::vector< double > | snowhland Snow height over land [m]. |
| std::vector< double > | snowl Large-scale snowfall [kg/m²/s]. |
| std::vector< double > | sst Sea surface temperature [K]. |
| std::vector< double > | swndf NIR diffuse shortwave [W/m²]. |
| std::vector< double > | swndr NIR direct shortwave [W/m²]. |
| std::vector< double > | swnet Net shortwave radiation [W/m²]. |
| std::vector< double > | swvdf Visible diffuse shortwave [W/m²]. |
| std::vector< double > | swvdr Visible direct shortwave [W/m²]. |
| std::vector< double > | tbot Temperature at bottom level [K]. |
| std::vector< double > | tref Reference temperature [K]. |
| std::vector< double > | ts Surface temperature [K]. |
| std::vector< double > | u10 10m wind speed [m/s] |
| std::vector< double > | u10withgusts 10m wind with gusts [m/s] |
| std::vector< double > | ubot Zonal wind at bottom level [m/s]. |
| std::vector< double > | vbot Meridional wind at bottom level [m/s]. |
| std::vector< double > | wsx Zonal wind stress [N/m²]. |
| std::vector< double > | wsy Meridional wind stress [N/m²]. |
| std::vector< double > | zbot Height at bottom level [m]. |
Public Static Attributes
| Type | Name |
|---|---|
| int | N_INPUT_CHANNELS = 39Default number of input channels (legacy, use config instead). |
| int | N_OUTPUT_CHANNELS = 44Default number of output channels (legacy, use config instead). |
Public Functions
| Type | Name |
|---|---|
| AtmFieldManager () = default |
|
| void | allocate (int ncols) Allocate all field vectors for given number of columns. |
| void | deallocate () Deallocate all field vectors. |
| std::vector< double > * | get_field_ptr (const std::string & name) Get pointer to a field vector by name. |
| bool | is_allocated () const Check if fields are allocated. |
| void | register_dynamic_field (const std::string & name) Register or create a dynamic field. |
| void | set_defaults (int ncols) Set default climatological values for export fields. |
| ~AtmFieldManager () = default |
Detailed Description
Public Attributes Documentation
variable aldif
NIR diffuse albedo [-].
std::vector<double> emulator::impl::AtmFieldManager::aldif;
variable aldir
NIR direct albedo [-].
std::vector<double> emulator::impl::AtmFieldManager::aldir;
variable asdif
Visible diffuse albedo [-].
std::vector<double> emulator::impl::AtmFieldManager::asdif;
variable asdir
Visible direct albedo [-].
std::vector<double> emulator::impl::AtmFieldManager::asdir;
variable cflx
CO2 flux [kg/m²/s].
std::vector<double> emulator::impl::AtmFieldManager::cflx;
variable dens
Air density [kg/m³].
std::vector<double> emulator::impl::AtmFieldManager::dens;
variable dynamic_fields
Runtime-registered fields for configurable I/O.
std::map<std::string, std::vector<double> > emulator::impl::AtmFieldManager::dynamic_fields;
variable icefrac
Sea ice fraction [-].
std::vector<double> emulator::impl::AtmFieldManager::icefrac;
variable lhf
Latent heat flux [W/m²].
std::vector<double> emulator::impl::AtmFieldManager::lhf;
variable lndfrac
Land fraction [-].
std::vector<double> emulator::impl::AtmFieldManager::lndfrac;
variable lwdn
Downward longwave radiation [W/m²].
std::vector<double> emulator::impl::AtmFieldManager::lwdn;
variable lwup
Upward longwave radiation [W/m²].
std::vector<double> emulator::impl::AtmFieldManager::lwup;
variable net_inputs
Packed input tensor for inference.
std::vector<double> emulator::impl::AtmFieldManager::net_inputs;
variable net_outputs
Packed output tensor from inference.
std::vector<double> emulator::impl::AtmFieldManager::net_outputs;
variable ocnfrac
Ocean fraction [-].
std::vector<double> emulator::impl::AtmFieldManager::ocnfrac;
variable pbot
Pressure at bottom level [Pa].
std::vector<double> emulator::impl::AtmFieldManager::pbot;
variable pslv
Sea level pressure [Pa].
std::vector<double> emulator::impl::AtmFieldManager::pslv;
variable ptem
Potential temperature [K].
std::vector<double> emulator::impl::AtmFieldManager::ptem;
variable qref
Reference specific humidity [kg/kg].
std::vector<double> emulator::impl::AtmFieldManager::qref;
variable rainc
Convective precipitation [kg/m²/s].
std::vector<double> emulator::impl::AtmFieldManager::rainc;
variable rainl
Large-scale precipitation [kg/m²/s].
std::vector<double> emulator::impl::AtmFieldManager::rainl;
variable shf
Sensible heat flux [W/m²].
std::vector<double> emulator::impl::AtmFieldManager::shf;
variable shum
Specific humidity [kg/kg].
std::vector<double> emulator::impl::AtmFieldManager::shum;
variable snowc
Convective snowfall [kg/m²/s].
std::vector<double> emulator::impl::AtmFieldManager::snowc;
variable snowhice
Snow height over ice [m].
std::vector<double> emulator::impl::AtmFieldManager::snowhice;
variable snowhland
Snow height over land [m].
std::vector<double> emulator::impl::AtmFieldManager::snowhland;
variable snowl
Large-scale snowfall [kg/m²/s].
std::vector<double> emulator::impl::AtmFieldManager::snowl;
variable sst
Sea surface temperature [K].
std::vector<double> emulator::impl::AtmFieldManager::sst;
variable swndf
NIR diffuse shortwave [W/m²].
std::vector<double> emulator::impl::AtmFieldManager::swndf;
variable swndr
NIR direct shortwave [W/m²].
std::vector<double> emulator::impl::AtmFieldManager::swndr;
variable swnet
Net shortwave radiation [W/m²].
std::vector<double> emulator::impl::AtmFieldManager::swnet;
variable swvdf
Visible diffuse shortwave [W/m²].
std::vector<double> emulator::impl::AtmFieldManager::swvdf;
variable swvdr
Visible direct shortwave [W/m²].
std::vector<double> emulator::impl::AtmFieldManager::swvdr;
variable tbot
Temperature at bottom level [K].
std::vector<double> emulator::impl::AtmFieldManager::tbot;
variable tref
Reference temperature [K].
std::vector<double> emulator::impl::AtmFieldManager::tref;
variable ts
Surface temperature [K].
std::vector<double> emulator::impl::AtmFieldManager::ts;
variable u10
10m wind speed [m/s]
std::vector<double> emulator::impl::AtmFieldManager::u10;
variable u10withgusts
10m wind with gusts [m/s]
std::vector<double> emulator::impl::AtmFieldManager::u10withgusts;
variable ubot
Zonal wind at bottom level [m/s].
std::vector<double> emulator::impl::AtmFieldManager::ubot;
variable vbot
Meridional wind at bottom level [m/s].
std::vector<double> emulator::impl::AtmFieldManager::vbot;
variable wsx
Zonal wind stress [N/m²].
std::vector<double> emulator::impl::AtmFieldManager::wsx;
variable wsy
Meridional wind stress [N/m²].
std::vector<double> emulator::impl::AtmFieldManager::wsy;
variable zbot
Height at bottom level [m].
std::vector<double> emulator::impl::AtmFieldManager::zbot;
Public Static Attributes Documentation
variable N_INPUT_CHANNELS
Default number of input channels (legacy, use config instead).
int emulator::impl::AtmFieldManager::N_INPUT_CHANNELS;
variable N_OUTPUT_CHANNELS
Default number of output channels (legacy, use config instead).
int emulator::impl::AtmFieldManager::N_OUTPUT_CHANNELS;
Public Functions Documentation
function AtmFieldManager
emulator::impl::AtmFieldManager::AtmFieldManager () = default
function allocate
Allocate all field vectors for given number of columns.
void emulator::impl::AtmFieldManager::allocate (
int ncols
)
Allocates import and export field vectors. The net_inputs and net_outputs vectors are cleared but not pre-allocated (they are sized dynamically in prepare_inputs()).
Parameters:
ncolsNumber of local columns
function deallocate
Deallocate all field vectors.
void emulator::impl::AtmFieldManager::deallocate ()
function get_field_ptr
Get pointer to a field vector by name.
std::vector< double > * emulator::impl::AtmFieldManager::get_field_ptr (
const std::string & name
)
Looks up the field in the hardcoded field map, then in dynamic fields.
Parameters:
nameField name (e.g., "ts", "tbot", "pbot")
Returns:
Pointer to the field vector, or nullptr if not found
function is_allocated
Check if fields are allocated.
inline bool emulator::impl::AtmFieldManager::is_allocated () const
Returns:
true if allocate() has been called
function register_dynamic_field
Register or create a dynamic field.
void emulator::impl::AtmFieldManager::register_dynamic_field (
const std::string & name
)
If the field doesn't exist (not in hardcoded or dynamic fields), creates a new entry in dynamic_fields. If already allocated, resizes the new field to match ncols.
Parameters:
nameField name to register
function set_defaults
Set default climatological values for export fields.
void emulator::impl::AtmFieldManager::set_defaults (
int ncols
)
Initializes export fields with reasonable default values for testing.
Parameters:
ncolsNumber of columns
function ~AtmFieldManager
emulator::impl::AtmFieldManager::~AtmFieldManager () = default
The documentation for this class was generated from the following file components/emulator_comps/eatm/src/impl/atm_field_manager.hpp