AtmPoint

class pyarts3.arts.AtmPoint(*args, **kwargs)

An atmospheric point.

This can be thought of as the sampling all the AtmData of and AtmField at a single altitude-latitude-longitude coordinate. It, like AtmField also acts like a map. They keys are the same as for AtmField. However, the values are simply the Numeric data at that point in the atmosphere.

Always holds an acceptable representation of temperature, pressure, wind, and magnetic field, although these might be 0 or NaN.

See AtmField for the type of data that the atmospheric point can contain.

Workspace variables of type AtmPoint

Overview

Method

flat_values()

Returns a flat list of values.

Method

isotopologue_ratio()

Get the isotopologue ratio

Method

keys()

Available keys

Method

nlte_value()

Get the NLTE value

Method

no_isotopologues()

Returns an atmospheric point without isotopologue ratios.

Method

number_density()

Get the number density [1 / m 3] of a species or of a species isotopologue.

Method

readxml()

Read variable from file.

Method

savexml()

Saves variable to file.

Method

set_isotopologue_ratio()

Set the isotopologue ratio

Method

set_nlte_value()

Set the NLTE value

Method

set_species_vmr()

Set the VMR of the species

Method

species_vmr()

Get the VMR of the species

Method

to_dict()

Convert an atmospheric point to a dictionary.

Method

update()

Update the atmospheric point with dictionary values.

Static Method

from_dict()

Create an atmospheric point from a dictionary.

Static Method

fromxml()

Create variable from file.

Vector3

mag

Magnetic field [T]

Numeric

pressure

Pressure [Pa]

Numeric

temperature

Temperature [K]

Vector3

wind

Wind field [m/s]

Operator

__eq__()

Return self==value.

Operator

__format__()

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

Operator

__ge__()

Return self>=value.

Operator

__getitem__()

__getitem__(self, arg: pyarts3.arts.AtmKey | pyarts3.arts.SpeciesEnum | pyarts3.arts.SpeciesIsotope | pyarts3.arts.QuantumLevelIdentifier | pyarts3.arts.ScatteringSpeciesProperty, /) -> float

Operator

__getstate__()

__getstate__(self) -> tuple[list[pyarts3.arts.AtmKey | pyarts3.arts.SpeciesEnum | pyarts3.arts.SpeciesIsotope | pyarts3.arts.QuantumLevelIdentifier | pyarts3.arts.ScatteringSpeciesProperty], pyarts3.arts.ArrayOfNumeric]

Operator

__gt__()

Return self>value.

Operator

__hash__()

Return hash(self).

Operator

__init__()

__init__(self, arg: pyarts3.arts.AtmPoint) -> 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: pyarts3.arts.AtmKey | pyarts3.arts.SpeciesEnum | pyarts3.arts.SpeciesIsotope | pyarts3.arts.QuantumLevelIdentifier | pyarts3.arts.ScatteringSpeciesProperty, arg1: float, /) -> None

Operator

__setstate__()

__setstate__(self, arg: tuple[collections.abc.Sequence[pyarts3.arts.AtmKey | pyarts3.arts.SpeciesEnum | pyarts3.arts.SpeciesIsotope | pyarts3.arts.QuantumLevelIdentifier | pyarts3.arts.ScatteringSpeciesProperty], pyarts3.arts.ArrayOfNumeric], /) -> None

Operator

__str__()

__str__(self) -> str

Constructors

__init__(self) None
__init__(self, arg: pyarts3.arts.AtmPoint) None

Methods

flat_values(self) pyarts3.arts.Vector

Returns a flat list of values.

isotopologue_ratio(self, isot: pyarts3.arts.SpeciesIsotope) float

Get the isotopologue ratio

keys(self, keep_basic: bool = True, keep_specs: bool = True, keep_isots: bool = False, keep_nlte: bool = False, keep_ssprops: bool = True) list[pyarts3.arts.AtmKey | pyarts3.arts.SpeciesEnum | pyarts3.arts.SpeciesIsotope | pyarts3.arts.QuantumLevelIdentifier | pyarts3.arts.ScatteringSpeciesProperty]

Available keys

nlte_value(self, qid: pyarts3.arts.QuantumLevelIdentifier) float

Get the NLTE value

no_isotopologues(self) pyarts3.arts.AtmPoint

Returns an atmospheric point without isotopologue ratios.

number_density(self, spec: pyarts3.arts.SpeciesEnum | pyarts3.arts.SpeciesIsotope) float

Get the number density [1 / m 3] of a species or of a species isotopologue.

The number density is computed as:

\[n_d = \frac{xp}{kT}\]

where \(x\) is the VMR of the species if spec is a SpeciesEnum (in code: self[spec]) or the VMR of the species isotopolgue if spec is a SpeciesIsotope (in code: self[spec] * self[spec.spec]). \(p\) and \(T\) are the pressure [Pa] and temperature [K] of the atmospheric point, respectively. \(k\) is the Boltzmann constant.

Parameters:

spec (SpeciesEnum | SpeciesIsotope) – The species or isotopologue that is considered.

Returns:

nd – The number density [1 / \(\textrm{m}^3\)] of the species or isotopologue.

Return type:

float

readxml(self, file: str) str

Read variable from file.

Parameters:

file (str) – A file that can be read.

Raises:

RuntimeError – For any failure to read.

Returns:

file – The file path found (may differ from input due to environment variables).

Return type:

str

savexml(self, file: str, type: str = 'ascii', clobber: bool = True) str

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, optional) – Type of file to save. See FileType for options. Defaults is “ascii”.

  • clobber (bool, optional) – Overwrite existing files or add new file with modified name? Defaults is True.

Raises:

RuntimeError – For any failure to write.

Returns:

file – The file saved. May differ from input.

Return type:

str

set_isotopologue_ratio(self, isot: pyarts3.arts.SpeciesIsotope, x: float) None

Set the isotopologue ratio

set_nlte_value(self, qid: pyarts3.arts.QuantumLevelIdentifier, x: float) None

Set the NLTE value

set_species_vmr(self, spec: pyarts3.arts.SpeciesEnum, x: float) None

Set the VMR of the species

species_vmr(self, spec: pyarts3.arts.SpeciesEnum) float

Get the VMR of the species

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, float]

Convert an atmospheric point 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.

Returns:

dict – A dictionary of atmospheric keys and corresponding data.

Return type:

dict

update(self, data: collections.abc.Mapping[pyarts3.arts.AtmKey | pyarts3.arts.SpeciesEnum | pyarts3.arts.SpeciesIsotope | pyarts3.arts.QuantumLevelIdentifier | pyarts3.arts.ScatteringSpeciesProperty, float]) None

Update the atmospheric point 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.

Static Methods

from_dict(data: collections.abc.Mapping[pyarts3.arts.AtmKey | pyarts3.arts.SpeciesEnum | pyarts3.arts.SpeciesIsotope | pyarts3.arts.QuantumLevelIdentifier | pyarts3.arts.ScatteringSpeciesProperty, float], iso: pyarts3.arts.IsoRatioOption = 'Builtin') pyarts3.arts.AtmPoint

Create an atmospheric point 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.

  • iso (IsoRatioOption, optional) – The isotopologue ratio option to use. Default is “Builtin”. Use “None” to create point without isotopologue ratios.

Returns:

atmospheric_point – The atmospheric point created from the dictionary.

Return type:

AtmPoint

fromxml(file: str) pyarts3.arts.AtmPoint

Create variable from file.

Parameters:

file (str) – A file that can be read

Raises:

RuntimeError – For any failure to read.

Returns:

artstype – The variable created from the file.

Return type:

T

Attributes

mag: Vector3

Magnetic field [T]

pressure: Numeric

Pressure [Pa]

temperature: Numeric

Temperature [K]

wind: Vector3

Wind field [m/s]

Operators

__eq__(value, /)

Return self==value.

__format__(self, arg: str, /) str
__ge__(value, /)

Return self>=value.

__getitem__(self, arg: pyarts3.arts.AtmKey | pyarts3.arts.SpeciesEnum | pyarts3.arts.SpeciesIsotope | pyarts3.arts.QuantumLevelIdentifier | pyarts3.arts.ScatteringSpeciesProperty, /) float
__getstate__(self) tuple[list[pyarts3.arts.AtmKey | pyarts3.arts.SpeciesEnum | pyarts3.arts.SpeciesIsotope | pyarts3.arts.QuantumLevelIdentifier | pyarts3.arts.ScatteringSpeciesProperty], pyarts3.arts.ArrayOfNumeric]
__gt__(value, /)

Return self>value.

__hash__()

Return hash(self).

__init__(self) None
__init__(self, arg: pyarts3.arts.AtmPoint) None
__le__(value, /)

Return self<=value.

__lt__(value, /)

Return self<value.

__ne__(value, /)

Return self!=value.

__repr__(self) str
__setitem__(self, arg0: pyarts3.arts.AtmKey | pyarts3.arts.SpeciesEnum | pyarts3.arts.SpeciesIsotope | pyarts3.arts.QuantumLevelIdentifier | pyarts3.arts.ScatteringSpeciesProperty, arg1: float, /) None
__setstate__(self, arg: tuple[collections.abc.Sequence[pyarts3.arts.AtmKey | pyarts3.arts.SpeciesEnum | pyarts3.arts.SpeciesIsotope | pyarts3.arts.QuantumLevelIdentifier | pyarts3.arts.ScatteringSpeciesProperty], pyarts3.arts.ArrayOfNumeric], /) None
__str__(self) str