smrt.atmosphere package

Contains different options to represent the atmosphere, that is the upper boundary conditions of the radiation transfer equation.

Examples:

from smrt.atmosphere.simple_isotropic_atmosphere import SimpleIsotropicAtmosphere

atmosphere = SimpleIsotropicAtmosphere(tbdown=2.7, tbup=2.7, trans=0.998)

The API is subject to change.

smrt.atmosphere.simple_isotropic_atmosphere module

Implements an isotropic atmosphere with prescribed frequency-dependent emission (up and down) and transmittance.

TB and transmissivity can be specified as a constant, or a frequency-dependent dictionary

To make an atmosphere, it is recommended to use the helper function make_atmosphere().

Examples:

# The full path import is required
from smrt import make_atmosphere

# Constant
atmos = make_atmosphere("simple_isotopic_atmosphere", tb_down=20., tb_up=6., transmittance=1)

# Frequency-dependent
atmos = make_atmosphere("simple_isotopic_atmosphere", tb_down={10e9: 15.2, 21e9: 23.5})
make_atmosphere(tb_down=0, tb_up=0, transmittance=1)

Construct an atmosphere instance.

Parameters:
  • tb_down – (Default value = 0)

  • tb_up – (Default value = 0)

  • transmittance – (Default value = 1)

smrt.atmosphere.pyrtlib_atmosphere module

A non-scattering atmosphere provided by PyRTLib for SMRT

PyRTLib is a standalone Python package for non-scattering line-by-line microwave radiative transfer simulations of the atmosphere emission (passive microwave) developed by Salvatore Larosa, Domenico Cimini, Donatello Gallucci, Saverio Teodosio Nilo, and Filomena Romano. According to the authors, it does not intent to compete with state-of-the- art models as used in the meteorological centers for instance, but has instead an educational purpose and has the major advantage of being fully written in Python, synonym of easy installation and compatibility with SMRT.

PyRTLib is licensed under the GPL-3.0 License, and it must be installed independently of SMRT. pip install smrt[pyrtlib] may work.

PyRTlib allows to simulate and calculate radiometric parameters and estimating propogation parameters needed by SMRT using meteorological data as input. Some meteorological datasets are built-in in PyRTlib and others can be download and used directly in PyRTlib. Available datasets are described on the main website: https://satclop.github.io/pyrtlib/

Citation: Larosa, S., Cimini, D., Gallucci, D., Nilo, S. T., and Romano, F.: PyRTlib: an educational Python-based library for non- scattering atmospheric microwave radiative transfer computations, Geosci. Model Dev., 17, 2053–2076, https://doi.org/10.5194/gmd-17-2053-2024, 2024.

To build an atmosphere in general, it is recommended to use the helper function make_atmosphere(). In the case of PyRTLib, there are in fact three ways to initialize the atmosphere depending on the atmospheric input data to be used.

The simpliest is for climatological profiles:

from smrt import make_atmosphere

atmos = make_atmosphere('pyrtlib_climatology_atmosphere', profile='Subarctic Summer', absorption_model = 'R20')

The list of climatologies is however limited, see the documentation at https://satclop.github.io/pyrtlib/en/main/generated/pyrtlib.climatology.AtmosphericProfiles.html

For a more specific calculations in term of location and date, it is possible obtain data from ERA5 Reanalysis:

from smrt import make_atmosphere

atmos = make_atmosphere('pyrtlib_era5_atmosphere', longitude=-75.07, latitude=123., date=datetime(2020, 2, 22, 12), absorption_model = 'R20')

An ERA5 file will be automatically downloaded which requires the installation of the CDSAPI and cfgrib python packages and to obain a CDS API Key. Please follow the instructions on the Copernicus site: https://cds.climate.copernicus.eu/api-how-to . Note that in April 2024, the CDS is announced to be disrupted “soon”, which will impose changes in SMRT.

The downloaded file is copied in a temporary directory, unless the era5_directory argument is specified, which is recommended to avoid repetitive downloads.

If interested in several locations, it is more efficient to download a single file with the full extent following the PyRTlib documentation: https://satclop.github.io/pyrtlib/en/main/generated/pyrtlib.apiwebservices.ERA5Reanalysis.request_data.html and then use the ‘ncfile’ argument:

from smrt import make_atmosphere

atmos = make_atmosphere('pyrtlib_era5_atmosphere', ncfile='era5_reanalysis-2023-05-16T18:00:00.nc',
                        longitude=-75.07, latitude=123., date=datetime(2020, 2, 22, 12),
                        absorption_model = 'R20')

PyRTlib includes many absorption models and the list can be obtained using:

PyRTlibAtmosphere.available_absorption_models()