AtmField

class pyarts.arts.AtmField(*args, **kwargs)

An atmospheric field

Workspace variables of type AtmField

Overview

Method

as_gridded()

Convert all fields of the input atmospheric field to gridded fields.

Method

keys()

Get a list of the keys from an atmospheric field.

Method

readxml()

Read variable from file

Method

savexml()

Saves variable to file

Method

species_keys()

Species keys

Method

to_dict()

Convert an atmospheric field to a dictionary.

Method

to_xarray()

Convert the atmospheric field to an xarray dataset.

Method

update()

Update the atmospheric field with dictionary values.

Static Method

from_dict()

Create an atmospheric field from a dictionary.

Static Method

fromxml()

Create variable from file

Attribute

isots

Isotopologue ratio data

Attribute

nlte

NLTE data

Attribute

other

Other data

Attribute

specs

Species data

Attribute

ssprops

Scattering species properties data

Attribute

top_of_atmosphere

Top of the atmosphere [m]

Operator

__call__()

Overloaded function.

Operator

__eq__()

Return self==value.

Operator

__format__()

__format__(self, arg: str, /) -> str

Operator

__ge__()

Return self>=value.

Operator

__getitem__()

__getitem__(self, arg: pyarts.arts.AtmKey | pyarts.arts.SpeciesEnum | pyarts.arts.SpeciesIsotope | pyarts.arts.QuantumIdentifier | pyarts.arts.ScatteringSpeciesProperty, /) -> pyarts.arts.AtmData

Operator

__getstate__()

__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

__gt__()

Return self>value.

Operator

__hash__()

Return hash(self).

Operator

__init__()

__init__(self, toa: float = 100000.0, iso: pyarts.arts.IsoRatioOption = “Builtin”) -> None

Operator

__le__()

Return self<=value.

Operator

__lt__()

Return self<value.

Operator

__ne__()

Return self!=value.

Operator

__repr__()

__repr__(self) -> str

Operator

__setitem__()

__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__()

__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__()

__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:
Returns:

gridded_atm – An atmospheric field with all fields gridded to the input altitude, latitude, and longitude grids.

Return type:

AtmField

keys(self, core: bool = True, specs: bool = True, isots: bool = True, nlte: bool = True, ssprops: bool = True) list[pyarts.arts.AtmKey | pyarts.arts.SpeciesEnum | pyarts.arts.SpeciesIsotope | pyarts.arts.QuantumIdentifier | pyarts.arts.ScatteringSpeciesProperty]

Get a list of the keys from an atmospheric field.

>>> from pyarts.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) 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:
  • file (str) – The path to which the file is written. Note that several of the options might modify the name or write more files

  • type (str) – Type of file to save. See FileType for options.

  • clobber (bool) – Overwrite existing files or add new file with modified name?

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:

xarray.Dataset

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

isots

Isotopologue ratio data

nlte

NLTE data

other

Other data

specs

Species data

ssprops

Scattering species properties data

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.

  1. __call__(self, h: float, lat: float, lon: float) -> pyarts.arts.AtmPoint

Get the data at a point

  1. __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.

__format__(self, arg: str, /) str
__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.

__repr__(self) str
__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
__str__(self) str