AtmField

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

An atmospheric field

Workspace variables of type AtmField

Overview

Method

at()

Get the data at a point

Method

readxml()

Read variable from file

Method

savexml()

Saves variable to file

Method

to_dict()

Convert an atmospheric field to a dictionary.

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

top_of_atmosphere

Top of the atmosphere [m]

Operator

__eq__()

Return self==value.

Operator

__ge__()

Return self>=value.

Operator

__getitem__()

Get the value of a key

Operator

__gt__()

Return self>value.

Operator

__hash__()

Return hash(self).

Operator

__le__()

Return self<=value.

Operator

__lt__()

Return self<value.

Operator

__ne__()

Return self!=value.

Operator

__setitem__()

Set the value of a key

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

at(self, h: float, lat: float, lon: float) pyarts.arts.AtmPoint
at(self, h: float, lat: float, lon: float) pyarts.arts.AtmPoint

Get the data at a point

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

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.

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

__eq__(value, /)

Return self==value.

__ge__(value, /)

Return self>=value.

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

Get the value of a key

__gt__(value, /)

Return self>value.

__hash__()

Return hash(self).

__le__(value, /)

Return self<=value.

__lt__(value, /)

Return self<value.

__ne__(value, /)

Return self!=value.

__setitem__(self, key: pyarts.arts.AtmKey | pyarts.arts.SpeciesEnum | pyarts.arts.SpeciesIsotope | pyarts.arts.QuantumIdentifier | pyarts.arts.ScatteringSpeciesProperty, val: pyarts.arts.GriddedField3 | float | pyarts.arts.NumericTernaryOperator) None
__setitem__(self, key: pyarts.arts.ArrayOfSpeciesTag, val: pyarts.arts.GriddedField3 | float | pyarts.arts.NumericTernaryOperator) None
__setitem__(self, arg0: pyarts.arts.AtmKey | pyarts.arts.SpeciesEnum | pyarts.arts.SpeciesIsotope | pyarts.arts.QuantumIdentifier | pyarts.arts.ScatteringSpeciesProperty, arg1: pyarts.arts.GriddedField3 | float | pyarts.arts.NumericTernaryOperator, /) None
__setitem__(self, arg0: pyarts.arts.ArrayOfSpeciesTag, arg1: pyarts.arts.GriddedField3 | float | pyarts.arts.NumericTernaryOperator, /) None

Set the value of a key