AtmField
- class pyarts.arts.AtmField(*args, **kwargs)
An atmospheric field
Workspace variables of type AtmField
Overview
Method
Convert all fields of the input atmospheric field to gridded fields.
Method
Read variable from file
Method
Saves variable to file
Method
Species keys
Method
Convert an atmospheric field to a dictionary.
Method
Convert the atmospheric field to an xarray dataset.
Method
Update the atmospheric field with dictionary values.
Static Method
Create an atmospheric field from a dictionary.
Static Method
Create variable from file
Attribute
Top of the atmosphere [m]
Operator
Overloaded function.
Operator
Return self==value.
Operator
__format__(self, arg: str, /) -> str
Operator
Return self>=value.
Operator
__getitem__(self, arg: pyarts.arts.AtmKey | pyarts.arts.SpeciesEnum | pyarts.arts.SpeciesIsotope | pyarts.arts.QuantumIdentifier | pyarts.arts.ScatteringSpeciesProperty, /) -> pyarts.arts.AtmData
Operator
__getstate__(self) -> tuple[list[pyarts.arts.AtmKey | pyarts.arts.SpeciesEnum | pyarts.arts.SpeciesIsotope | pyarts.arts.QuantumIdentifier | pyarts.arts.ScatteringSpeciesProperty], std::vector<Atm::Data, std::allocator<Atm::Data> >, float]
Operator
Return self>value.
Operator
Return hash(self).
Operator
__init__(self, toa: float = 100000.0, iso: pyarts.arts.IsoRatioOption = “Builtin”) -> None
Operator
Return self<=value.
Operator
Return self<value.
Operator
Return self!=value.
Operator
__repr__(self) -> str
Operator
__setitem__(self, arg0: pyarts.arts.AtmKey | pyarts.arts.SpeciesEnum | pyarts.arts.SpeciesIsotope | pyarts.arts.QuantumIdentifier | pyarts.arts.ScatteringSpeciesProperty, arg1: pyarts.arts.AtmData, /) -> None
Operator
__setstate__(self, arg: tuple[collections.abc.Sequence[pyarts.arts.AtmKey | pyarts.arts.SpeciesEnum | pyarts.arts.SpeciesIsotope | pyarts.arts.QuantumIdentifier | pyarts.arts.ScatteringSpeciesProperty], std::vector<Atm::Data, std::allocator<Atm::Data> >, float], /) -> None
Operator
__str__(self) -> str
Constructors
- __init__(self) None
- __init__(self, arg: pyarts.arts.AtmField) None
- __init__(self, toa: float = 100000.0, iso: pyarts.arts.IsoRatioOption = 'Builtin') None
- __init__(self, toa: float = 100000.0, iso: pyarts.arts.IsoRatioOption = 'Builtin') None
Methods
- as_gridded(self, alt: pyarts.arts.AscendingGrid, lat: pyarts.arts.AscendingGrid, lon: pyarts.arts.AscendingGrid) pyarts.arts.AtmField
Convert all fields of the input atmospheric field to gridded fields.
- Parameters:
alt (AscendingGrid) – The altitude grid.
lat (AscendingGrid) – The latitude grid.
lon (AscendingGrid) – The longitude grid.
- Returns:
gridded_atm – An atmospheric field with all fields gridded to the input altitude, latitude, and longitude grids.
- Return type:
- readxml(self, file: str) None
Read variable from file
- Parameters:
file (str) – A file that can be read
- On Error:
Throws RuntimeError for any failure to read
- savexml(self, file: str, type: str = 'ascii', clobber: bool = True) None
Saves variable to file
- Parameters:
- On Error:
Throws RuntimeError for any failure to save
- species_keys(self) pyarts.arts.ArrayOfSpeciesEnum
Species keys
- to_dict(self, core: bool = True, specs: bool = True, isots: bool = True, nlte: bool = True, ssprops: bool = True) dict[pyarts.arts.AtmKey | pyarts.arts.SpeciesEnum | pyarts.arts.SpeciesIsotope | pyarts.arts.QuantumIdentifier | pyarts.arts.ScatteringSpeciesProperty, pyarts.arts.GriddedField3 | float | pyarts.arts.NumericTernaryOperator]
Convert an atmospheric field to a dictionary.
Tip
The function
stringify_keys()
may be used to convert the dictionary keys to strings. This allows for easier manipulation of the data of the dictionary.- Parameters:
core (bool, optional) – If True, the core atmospheric data will be included (i.e., temperature, pressure, etc). Default is True.
specs (bool, optional) – If True, the species VMR data will be included. Default is True.
isots (bool, optional) – If True, the isotopologue ratio data will be included. Default is True.
nlte (bool, optional) – If True, the NLTE data will be included. Default is True.
ssprops (bool, optional) – If True, the scattering species properties data will be included. Default is True.
- to_xarray(self, keys: collections.abc.Sequence[pyarts.arts.AtmKey | pyarts.arts.SpeciesEnum | pyarts.arts.SpeciesIsotope | pyarts.arts.QuantumIdentifier | pyarts.arts.ScatteringSpeciesProperty] = []) object
Convert the atmospheric field to an xarray dataset.
The atmospheric field must be gridded using, e.g., the
as_gridded()
method.- Parameters:
keys (list, optional) – The keys to include in the xarray dataset. Default is empty, which includes all keys.
- Returns:
dataset – The dataset with the atmospheric field data. The coordinates are “alt”, “lat”, and “lon”.
- Return type:
- update(self, data: collections.abc.Mapping[pyarts.arts.AtmKey | pyarts.arts.SpeciesEnum | pyarts.arts.SpeciesIsotope | pyarts.arts.QuantumIdentifier | pyarts.arts.ScatteringSpeciesProperty, pyarts.arts.GriddedField3 | float | pyarts.arts.NumericTernaryOperator], extrap: pyarts.arts.InterpolationExtrapolation = 'Nearest') None
Update the atmospheric field with dictionary values.
Tip
Each key-type of the dictionary is constructible from a
str
. So using a dictionary with string keys is possible.- Parameters:
data (dict) – A dictionary of atmospheric keys and corresponding data.
extrap (InterpolationExtrapolation, optional) – The extrapolation method to use for the new keys. Default is “Nearest”. Ignored by existing keys.
Static Methods
- from_dict(data: collections.abc.Mapping[pyarts.arts.AtmKey | pyarts.arts.SpeciesEnum | pyarts.arts.SpeciesIsotope | pyarts.arts.QuantumIdentifier | pyarts.arts.ScatteringSpeciesProperty, pyarts.arts.GriddedField3 | float | pyarts.arts.NumericTernaryOperator], toa: float = 100000.0, iso: pyarts.arts.IsoRatioOption = 'Builtin', extrap: pyarts.arts.InterpolationExtrapolation = 'Nearest') pyarts.arts.AtmField
Create an atmospheric field from a dictionary.
Tip
Each key-type of the dictionary is constructible from a
str
. So using a dictionary with string keys is possible.- Parameters:
data (dict) – A dictionary of atmospheric keys and corresponding data.
toa (Numeric, optional) – The top of the atmosphere. Default is 100e3.
iso (IsoRatioOption, optional) – The isotopologue ratio option to use. Default is “Builtin”. Use “None” to create field without isotopologue ratios.
extrap (InterpolationExtrapolation, optional) – The extrapolation method to use for the new keys. Default is “Nearest”.
- fromxml(file: str) pyarts.arts.AtmField
Create variable from file
- Parameters:
file (str) – A file that can be read
- On Error:
Throws RuntimeError for any failure to read
Attributes
- top_of_atmosphere
Top of the atmosphere [m]
Operators
- __call__(self, h: float, lat: float, lon: float) pyarts.arts.AtmPoint
- __call__(self, h: pyarts.arts.Vector, lat: pyarts.arts.Vector, lon: pyarts.arts.Vector) pyarts.arts.ArrayOfAtmPoint
Overloaded function.
__call__(self, h: float, lat: float, lon: float) -> pyarts.arts.AtmPoint
Get the data at a point
__call__(self, h: pyarts.arts.Vector, lat: pyarts.arts.Vector, lon: pyarts.arts.Vector) -> pyarts.arts.ArrayOfAtmPoint
Get the data as a list
- __eq__(value, /)
Return self==value.
- __ge__(value, /)
Return self>=value.
- __getitem__(self, arg: pyarts.arts.AtmKey | pyarts.arts.SpeciesEnum | pyarts.arts.SpeciesIsotope | pyarts.arts.QuantumIdentifier | pyarts.arts.ScatteringSpeciesProperty, /) pyarts.arts.AtmData
- __getstate__(self) tuple[list[pyarts.arts.AtmKey | pyarts.arts.SpeciesEnum | pyarts.arts.SpeciesIsotope | pyarts.arts.QuantumIdentifier | pyarts.arts.ScatteringSpeciesProperty], std::vector<Atm::Data, std::allocator<Atm::Data> >, float]
- __getstate__(self) tuple[list[pyarts.arts.AtmKey | pyarts.arts.SpeciesEnum | pyarts.arts.SpeciesIsotope | pyarts.arts.QuantumIdentifier | pyarts.arts.ScatteringSpeciesProperty], std::vector<Atm::Data, std::allocator<Atm::Data> >, float]
- __gt__(value, /)
Return self>value.
- __hash__()
Return hash(self).
- __init__(self) None
- __init__(self, arg: pyarts.arts.AtmField) None
- __init__(self, toa: float = 100000.0, iso: pyarts.arts.IsoRatioOption = 'Builtin') None
- __init__(self, toa: float = 100000.0, iso: pyarts.arts.IsoRatioOption = 'Builtin') None
- __le__(value, /)
Return self<=value.
- __lt__(value, /)
Return self<value.
- __ne__(value, /)
Return self!=value.
- __setitem__(self, arg0: pyarts.arts.AtmKey | pyarts.arts.SpeciesEnum | pyarts.arts.SpeciesIsotope | pyarts.arts.QuantumIdentifier | pyarts.arts.ScatteringSpeciesProperty, arg1: pyarts.arts.AtmData, /) None
- __setstate__(self, arg: tuple[collections.abc.Sequence[pyarts.arts.AtmKey | pyarts.arts.SpeciesEnum | pyarts.arts.SpeciesIsotope | pyarts.arts.QuantumIdentifier | pyarts.arts.ScatteringSpeciesProperty], std::vector<Atm::Data, std::allocator<Atm::Data> >, float], /) None
- __setstate__(self, arg: tuple[collections.abc.Sequence[pyarts.arts.AtmKey | pyarts.arts.SpeciesEnum | pyarts.arts.SpeciesIsotope | pyarts.arts.QuantumIdentifier | pyarts.arts.ScatteringSpeciesProperty], std::vector<Atm::Data, std::allocator<Atm::Data> >, float], /) None