torchMWRT.lineshape#

Line-shape parameter loaders for microwave absorption models.

This module consolidates the original pyrtlib line-shape loaders for water vapor, oxygen, and ozone into a single torch-friendly interface. In pyrtlib, these definitions were split across pyrtlib._lineshape.h2oll, pyrtlib._lineshape.o2ll, and pyrtlib._lineshape.o3ll.

Functions

ensure_lineshape_data_available([destination])

Ensure required line-shape NetCDF tables exist locally.

Classes

H2OLL(**kwargs)

Water-vapor line-shape coefficient container.

O2LL(**kwargs)

Oxygen line-shape coefficient container.

O3LL(**kwargs)

Ozone line-shape coefficient container.

torchMWRT.lineshape.ensure_lineshape_data_available(destination=None)[source]#

Ensure required line-shape NetCDF tables exist locally.

Missing files are copied from an installed pyrtlib package.

class torchMWRT.lineshape.H2OLL(**kwargs)[source]#

Bases: _LineShape

Water-vapor line-shape coefficient container.

Notes

Frequencies are in GHz. Strengths and broadening/shift coefficients follow the conventions documented in the original pyrtlib H2O line-shape module.

Provenance: reference text and coefficient intent are taken from pyrtlib._lineshape.h2oll and consolidated here.

References

    1. Koshelev et al., JQSRT, v.205, pp.51-58 (2018)

    1. Payne et al., IEEE Trans. Geosci. Remote Sens., v.46, pp.3601-3617 (2008)

    1. Golubiatnikov, J. Mol. Spectrosc., v.230, pp.196-198 (2005)

    1. Koshelev et al., J. Mol. Spectrosc., v.241, pp.101-108 (2007)

  • J.-M. Colmont et al., J. Mol. Spectrosc., v.193, pp.233-243 (1999)

    1. Tretyakov et al., JQSRT, v.114, pp.109-121 (2013)

    1. Golubiatnikov et al., JQSRT, v.109, pp.1828-1833 (2008)

    1. Podobedov et al., JQSRT, v.87, pp.377-385 (2004)

    1. Koshelev, JQSRT, v.112, pp.550-552 (2011)

    1. Tretyakov, JQSRT, v.328, pp.7-26 (2016)

    1. Turner et al., IEEE Trans. Geosci. Remote Sens., v.47, pp.3326-3337 (2009)

    1. Koshelev et al., JQSRT, doi:10.1016/j.jqsrt.2020.107472

Other parameters from HITRAN2020.

NC_PATH = '_lineshape/h2o_lineshape.nc'#
classmethod available_models()[source]#

Return available H2O line-shape model identifiers.

Returns:

Names of model groups found in h2o_lineshape.nc.

Return type:

list[str]

classmethod load(model, device=None, dtype=None)[source]#

Load H2O line-shape parameters for a model.

Parameters:
  • model (str) – H2O absorption-model identifier.

  • device (torch.device, optional) – Target device for returned tensors.

  • dtype (torch.dtype, optional) – Target dtype for returned tensors.

Returns:

Loaded and converted line-shape parameter object.

Return type:

H2OLL

Raises:

ValueError – If model is not available in the NetCDF file.

Notes

Model-dependent field mapping mirrors the original pyrtlib logic, including special handling for R03/R16/R17 and SD-family variants.

Provenance: variable mapping rules were consolidated from pyrtlib._lineshape.h2oll.

class torchMWRT.lineshape.O2LL(**kwargs)[source]#

Bases: _LineShape

Oxygen line-shape coefficient container.

Notes

This class loads line-mixing and broadening coefficients used by the O2 absorption models.

Provenance: data-field selection rules are taken from pyrtlib._lineshape.o2ll and consolidated here.

NC_PATH = '_lineshape/o2_lineshape.nc'#
classmethod available_models()[source]#

Return available O2 line-shape model identifiers.

Returns:

Names of model groups found in o2_lineshape.nc.

Return type:

list[str]

classmethod load(model, device=None, dtype=None)[source]#

Load O2 line-shape parameters for a model.

Parameters:
  • model (str) – O2 absorption-model identifier.

  • device (torch.device, optional) – Target device for returned tensors.

  • dtype (torch.dtype, optional) – Target dtype for returned tensors.

Returns:

Loaded and converted line-shape parameter object.

Return type:

O2LL

Raises:

ValueError – If model is not available in the NetCDF file.

Notes

Optional parameter arrays (for example v, y0, y1, g*, dnu*) are attached only for model families where they exist.

Provenance: model-conditional field extraction was consolidated from pyrtlib._lineshape.o2ll.

class torchMWRT.lineshape.O3LL(**kwargs)[source]#

Bases: _LineShape

Ozone line-shape coefficient container.

Notes

Coefficients are loaded from the ozone NetCDF line-shape table and exposed with convenient derived views (fl, s1, b, w, x, sr).

Provenance: loading/mapping behavior is taken from pyrtlib._lineshape.o3ll and consolidated here.

NC_PATH = '_lineshape/o3_lineshape.nc'#
classmethod available_models()[source]#

Return available O3 line-shape model identifiers.

Returns:

Names of model groups found in o3_lineshape.nc.

Return type:

list[str]

classmethod load(model, device=None, dtype=None)[source]#

Load O3 line-shape parameters for a model.

Parameters:
  • model (str) – O3 absorption-model identifier.

  • device (torch.device, optional) – Target device for returned tensors.

  • dtype (torch.dtype, optional) – Target dtype for returned tensors.

Returns:

Loaded and converted line-shape parameter object.

Return type:

O3LL

Raises:

ValueError – If model is not available in the NetCDF file.

Notes

Provenance: model loading and variable mapping are consolidated from pyrtlib._lineshape.o3ll.