AtmField
- class pyarts3.arts.AtmField(*args, **kwargs)
An atmospheric field.
An atmospheric field holds two things:
The top of the atmosphere altitude, which is the altitude at which the atmosphere ends. Unit: m
A map of
AtmData
. The available types of keys are:See each key for more information on what type of data it allows holding.
Workspace variables of type AtmField
Overview
Method
Convert all fields of the input atmospheric field to gridded fields.
Method
Get a list of the keys from an atmospheric field.
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
Isotopologue ratio data
Attribute
NLTE data
Attribute
Basic atmospheric data
Attribute
Species data
Attribute
Scattering species properties data
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: pyarts3.arts.AtmKey | pyarts3.arts.SpeciesEnum | pyarts3.arts.SpeciesIsotope | pyarts3.arts.QuantumLevelIdentifier | pyarts3.arts.ScatteringSpeciesProperty, /) -> pyarts3.arts.AtmData
Operator
__getstate__(self) -> tuple[list[pyarts3.arts.AtmKey | pyarts3.arts.SpeciesEnum | pyarts3.arts.SpeciesIsotope | pyarts3.arts.QuantumLevelIdentifier | pyarts3.arts.ScatteringSpeciesProperty], pyarts3.arts.ArrayOfAtmData, float]
Operator
Return self>value.
Operator
Return hash(self).
Operator
__init__(self, toa: float = 100000.0, iso: pyarts3.arts.IsoRatioOption = “Builtin”) -> None
Operator
Return self<=value.
Operator
Return self<value.
Operator
Return self!=value.
Operator
__repr__(self) -> str
Operator
__setitem__(self, arg0: pyarts3.arts.AtmKey | pyarts3.arts.SpeciesEnum | pyarts3.arts.SpeciesIsotope | pyarts3.arts.QuantumLevelIdentifier | pyarts3.arts.ScatteringSpeciesProperty, arg1: pyarts3.arts.AtmData, /) -> None
Operator
__setstate__(self, arg: tuple[collections.abc.Sequence[pyarts3.arts.AtmKey | pyarts3.arts.SpeciesEnum | pyarts3.arts.SpeciesIsotope | pyarts3.arts.QuantumLevelIdentifier | pyarts3.arts.ScatteringSpeciesProperty], pyarts3.arts.ArrayOfAtmData, float], /) -> None
Operator
__str__(self) -> str
Constructors
- __init__(self) None
- __init__(self, arg: pyarts3.arts.AtmField) None
- __init__(self, toa: float = 100000.0, iso: pyarts3.arts.IsoRatioOption = 'Builtin') None
- __init__(self, toa: float = 100000.0, iso: pyarts3.arts.IsoRatioOption = 'Builtin') None
Methods
- as_gridded(self, alt: pyarts3.arts.AscendingGrid, lat: pyarts3.arts.LatGrid, lon: pyarts3.arts.LonGrid) pyarts3.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:
- keys(self, core: bool = True, specs: bool = True, isots: bool = True, nlte: bool = True, ssprops: bool = True) list[pyarts3.arts.AtmKey | pyarts3.arts.SpeciesEnum | pyarts3.arts.SpeciesIsotope | pyarts3.arts.QuantumLevelIdentifier | pyarts3.arts.ScatteringSpeciesProperty]
Get a list of the keys from an atmospheric field.
>>> from pyarts3.arts import AtmField >>> field = AtmField() >>> field["t"] = 273 >>> k = AtmField.keys(isots=False) # Get list of keys ignoring isotopologue ratios ["t"]
- Parameters:
core (bool, optional) – If True, the core atmospheric keys will be included (i.e., temperature, pressure, etc). Default is True.
specs (bool, optional) – If True, the species VMR keys will be included. Default is True.
isots (bool, optional) – If True, the isotopologue ratio keys will be included. Default is True.
nlte (bool, optional) – If True, the NLTE keys will be included. Default is True.
ssprops (bool, optional) – If True, the scattering species property keys will be included. Default is True.
- readxml(self, file: str) str
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) str
Saves variable to file
- Parameters:
- On Error:
Throws RuntimeError for any failure to save
- species_keys(self) pyarts3.arts.ArrayOfSpeciesEnum
Species keys
- to_dict(self, core: bool = True, specs: bool = True, isots: bool = True, nlte: bool = True, ssprops: bool = True) dict[pyarts3.arts.AtmKey | pyarts3.arts.SpeciesEnum | pyarts3.arts.SpeciesIsotope | pyarts3.arts.QuantumLevelIdentifier | pyarts3.arts.ScatteringSpeciesProperty, pyarts3.arts.GeodeticField3 | float | pyarts3.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[pyarts3.arts.AtmKey | pyarts3.arts.SpeciesEnum | pyarts3.arts.SpeciesIsotope | pyarts3.arts.QuantumLevelIdentifier | pyarts3.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[pyarts3.arts.AtmKey | pyarts3.arts.SpeciesEnum | pyarts3.arts.SpeciesIsotope | pyarts3.arts.QuantumLevelIdentifier | pyarts3.arts.ScatteringSpeciesProperty, pyarts3.arts.GeodeticField3 | float | pyarts3.arts.NumericTernaryOperator], extrap: pyarts3.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[pyarts3.arts.AtmKey | pyarts3.arts.SpeciesEnum | pyarts3.arts.SpeciesIsotope | pyarts3.arts.QuantumLevelIdentifier | pyarts3.arts.ScatteringSpeciesProperty, pyarts3.arts.GeodeticField3 | float | pyarts3.arts.NumericTernaryOperator], toa: float = 100000.0, iso: pyarts3.arts.IsoRatioOption = 'Builtin', extrap: pyarts3.arts.InterpolationExtrapolation = 'Nearest') pyarts3.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) pyarts3.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
- isots: dict[SpeciesIsotope, AtmData]
Isotopologue ratio data
- nlte: dict[QuantumIdentifier, AtmData]
NLTE data
- specs: dict[SpeciesEnum, AtmData]
Species data
- ssprops: dict[ScatteringSpeciesProperty, AtmData]
Scattering species properties data
Operators
- __call__(self, h: float, lat: float, lon: float) pyarts3.arts.AtmPoint
- __call__(self, h: pyarts3.arts.Vector, lat: pyarts3.arts.Vector, lon: pyarts3.arts.Vector) pyarts3.arts.ArrayOfAtmPoint
Overloaded function.
__call__(self, h: float, lat: float, lon: float) -> pyarts3.arts.AtmPoint
Get the data at a point
__call__(self, h: pyarts3.arts.Vector, lat: pyarts3.arts.Vector, lon: pyarts3.arts.Vector) -> pyarts3.arts.ArrayOfAtmPoint
Get the data as a list
- __eq__(value, /)
Return self==value.
- __ge__(value, /)
Return self>=value.
- __getitem__(self, arg: pyarts3.arts.AtmKey | pyarts3.arts.SpeciesEnum | pyarts3.arts.SpeciesIsotope | pyarts3.arts.QuantumLevelIdentifier | pyarts3.arts.ScatteringSpeciesProperty, /) pyarts3.arts.AtmData
- __getstate__(self) tuple[list[pyarts3.arts.AtmKey | pyarts3.arts.SpeciesEnum | pyarts3.arts.SpeciesIsotope | pyarts3.arts.QuantumLevelIdentifier | pyarts3.arts.ScatteringSpeciesProperty], pyarts3.arts.ArrayOfAtmData, float]
- __gt__(value, /)
Return self>value.
- __hash__()
Return hash(self).
- __init__(self) None
- __init__(self, arg: pyarts3.arts.AtmField) None
- __init__(self, toa: float = 100000.0, iso: pyarts3.arts.IsoRatioOption = 'Builtin') None
- __init__(self, toa: float = 100000.0, iso: pyarts3.arts.IsoRatioOption = 'Builtin') None
- __le__(value, /)
Return self<=value.
- __lt__(value, /)
Return self<value.
- __ne__(value, /)
Return self!=value.
- __setitem__(self, arg0: pyarts3.arts.AtmKey | pyarts3.arts.SpeciesEnum | pyarts3.arts.SpeciesIsotope | pyarts3.arts.QuantumLevelIdentifier | pyarts3.arts.ScatteringSpeciesProperty, arg1: pyarts3.arts.AtmData, /) None