Climatology

Module: sasktran.climatology

A sasktran.Climatology object is essentially a lookup table of profiles where the tables keys are quantities name. A grid (altitude and potentially geographic) definition is also associated.

Users can defined their own user defined climatologies using the sasktran.ClimatologyUserDefined class. Some climatologies that we use a lot are built into SASKTRAN (see Useful Climatology Shorthands).

sasktran.ClimatologyUserDefined(altitudes, …)

A special climatology which handles user defined values.

sasktran.ClimatologyUserDefined2D(…)

A two dimensional user defined climatology in altitude and angle within a user specified plane.

sasktran.ClimatologyUserDefined3D(lats, …)

A user defined climatology class for profiles which have a geographic dependence.

sasktran.Labow()

The Labow volume mixing ratio climatology of ozone.

sasktran.Pratmo()

A climatology for the NO2 number density based upon the Prather photo-chemical box model.

sasktran.MSIS90([include_o2, includes, …])

A climatology that implements the MSIS-90 atmospheric model, (Hedin 1991).

sasktran.ECMWF()

A climatology of number density, pressure, and temperature based on the ERA interim reanalysis.

sasktran.GloSSAC(wavelength_nm[, extend])

The global stratospheric aerosol extinction climatology at 8 wavelengths from 386-3400nm that spans from 1979-2016 and incorporates data from numerous satellite datasets.

class sasktran.Climatology(**kwargs)

Bases: sasktran.climatology.ClimatologyBase

A climatology quantifying something in/about the atmosphere. For example climatologies could be used to define profiles for temperature, pressure, gas number densities, etc.

Parameters

name (str) – Name of the climatology to create

Examples

>>> import sasktran as sk
>>> msis = sk.Climatology('msis90')
>>> print(msis)
SasktranIF Climatology: msis90
Supported Species: ['SKCLIMATOLOGY_PRESSURE_PA', 'SKCLIMATOLOGY_AIRNUMBERDENSITY_CM3', 'SKCLIMATOLOGY_TEMPERATURE_K', 'SKCLIMATOLOGY_O2_CM3']
get_parameter(**kwargs)

Get a profile from the climatology.

Parameters
  • species (str) – Species identifier of the species to query. Corresponds to sasktran.Species.species.

  • latitude (float) – Latitude in degrees.

  • longitude (float) – Longitude in degrees.

  • altitudes (np.ndarray) – Profile altitude grid in meters.

  • mjd (float) – Modified julian date.

Returns

Climatology values at the specified altitudes.

Return type

np.ndarray

supported_species()

Get a list of Species identifiers that are supported by this climatology.

Returns

Species identifiers that are supported by this climatology. Identifiers correspond to sasktran.Species.species

Return type

list

User Defined Climatologies

class sasktran.ClimatologyUserDefined(altitudes: numpy.ndarray, values: dict, interp: str = 'linear', spline: bool = False)

Bases: sasktran.climatology.Climatology

A special climatology which handles user defined values.

Parameters
  • altitudes (np.ndarray) – Array of altitudes in meters that the profile is to be specified at. Same shape as values.

  • values (dict) – dictionary of species, value pairs. Values should be the same length as altitudes.

  • interp (str, optional) – One of ‘linear’ or ‘log’. Defines the interpolation space. Default is ‘linear’

  • spline (bool, optional) – One of True of False. If True then a quadratic spline will be used to interpolate, if False then piecewise linear interpolation is done. Default is False.

Examples

>>> from sasktran.climatology import ClimatologyUserDefined
>>> import numpy as np
>>> altitudes = np.linspace(500, 99500, 100)
>>> values = np.ones_like(altitudes)
>>> climatology = ClimatologyUserDefined(altitudes, {'SKCLIMATOLOGY_O3_CM3': values})
>>> climatology.get_parameter('SKCLIMATOLOGY_O3_CM3', latitude=0, longitude=0, altitudes=[10000, 11000], mjd=54372)
array([ 1.,  1.])
>>> climatology['SKCLIMATOLOGY_O3_CM3'] *= 2
>>> climatology.get_parameter('SKCLIMATOLOGY_O3_CM3', latitude=0, longitude=0, altitudes=[10000, 11000], mjd=54372)
array([ 2.,  2.])
supported_species()

Get a list of Species identifiers that are supported by this climatology.

Returns

Species identifiers that are supported by this climatology. Identifiers correspond to sasktran.Species.species

Return type

list

class sasktran.ClimatologyUserDefined2D(angles_deg: numpy.ndarray, alts_m: numpy.ndarray, values: dict, reference_vector: numpy.ndarray, normal_vector: numpy.ndarray)

Bases: sasktran.climatology.Climatology

A two dimensional user defined climatology in altitude and angle within a user specified plane.

Parameters
  • angles_deg (np.ndarray) – One dimensional array of the angular grid in degrees

  • alts_m (np.ndarray) – One dimensional array of the height grid in meters

  • values (dict) – dictionary of species, value pairs. Values should be two dimensional arrays of shape (len(angles_deg), len(alts_m))

  • reference_vector (np.ndarray) – Length 3 unit vector defining the location where the angle is 0, i.e., the x-axis of the plane

  • normal_vector (np.ndarray) – Length 3 unit vector defining the normal vector of the plane.

supported_species()

Get a list of Species identifiers that are supported by this climatology.

Returns

Species identifiers that are supported by this climatology. Identifiers correspond to sasktran.Species.species

Return type

list

class sasktran.ClimatologyUserDefined3D(lats: numpy.ndarray, lons: numpy.ndarray, alts: numpy.ndarray, values: dict, interp: str = 'linear', spline: bool = False)

Bases: sasktran.climatology.Climatology

A user defined climatology class for profiles which have a geographic dependence.

For more information see sk.ClimatologyUserDefined.

Parameters
  • lats (np.ndarray) – The latitude grid (1D) for the climatology. The latitudes for the region will be queried must be defined. Latitudes don’t need to be evenly spaced.

  • lons (np.ndarray) – The longitude grid (1D) for the climatology. Must span 0 to 360 longitude (but doesn’t need even spacing).

  • alts (np.ndarray) – The altitude grid for the climatology in meters. Altitudes don’t need to be evenly spaced. Altitudes at the top of that atmosphere (TOA) and the ground (elevation) must be defined.

  • values – A 3D array of values with dimensions: latitude, longitude, altitude.

  • interp (str, optional) – One of ‘linear’ or ‘log’. Defines the interpolation space. Default is ‘linear’

  • spline (bool, optional) – One of True of False. If True then a quadratic spline will be used to interpolate, if False then piecewise linear interpolation is done. Default is False.

supported_species()

Get a list of Species identifiers that are supported by this climatology.

Returns

Species identifiers that are supported by this climatology. Identifiers correspond to sasktran.Species.species

Return type

list

Note

For all climatologies the altitude grid must be given in meters.

Note

All species climatologies must be in units of \(\mathrm{\frac{molecules}{cm^3}}\).

Useful Climatology Shorthands

class sasktran.Labow

Bases: sasktran.climatology.Climatology

The Labow volume mixing ratio climatology of ozone. This is a climatology of the volume mixing ratio from 0 km to 60 km in 1 km increments for 18 latitudes in steps of 10 degrees from -85 to +85 for each month of the year. The climatology seems to be unpublished as all references refer to an unpublished piece of work by McPeters and Labow in 2002 or 2003. We have extended the climatology above 60 km using the differences in scale height between the neutrals (7 km scale height ) and ozone (4.5 km scale height) to calculate a new scale height to extrapolate the signal at 60 km. We have also extended the volume mixing ratio so it can be converted to an ozone density. This requires an atmospheric number density climatology for which the MSIS90 climatology is used:

class sasktran.Pratmo

Bases: sasktran.climatology.Climatology

A climatology for the NO2 number density based upon the Prather photo-chemical box model. This climatological model is based upon monthly mean solutions to the box model for a range of latitudes, local solar times and altitudes.

supported_species()

Get a list of Species identifiers that are supported by this climatology.

Returns

Species identifiers that are supported by this climatology. Identifiers correspond to sasktran.Species.species

Return type

list

class sasktran.MSIS90(include_o2=False, includes=None, f107_avg_flux=150.0, f107_prev_day_flux=150.0, ap_index=4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, max_altitude_km=120, height_spacing_km=1.0)

Bases: sasktran.climatology.Climatology

A climatology that implements the MSIS-90 atmospheric model, (Hedin 1991). This is typically used in Sasktran applications as a quick and robust background atmospheric state. The MSIS-90 model was built by the ionospheric/thermospheric community using mass spectrometer and incohorent radar scatter data to provide background atmospheric state in the thermosphere under varying geomagnetic conditions. The model was coupled to CIRA-86 (Chandra 1990 and Fleming 1990) to provide atmospheric state for altitudes between the ground and ~120 km.

Most sasktran applications only require atmospheric state below 100 km and only utilize the CIRA-86 part of the MSIS model. Thus we have configured the default implementation of the MSIS-90 model to only provide the 3 basic atmospheric state parameters, pressure, temperature and number density.

Users may configure the MSIS-90 climatology using the objects properties outlined below to fetch seven other species over a larger height range with specific geomagnetic and solar flux conditions. Users are referred to Hedin’s 1991 publication for details on how to configure the parameters. The current sasktran MSIS model does not provide any method to access the TSELEC function describes in the fortran code.

Parameters
  • includes (List[str], optional) – Extra species to include in the model, supported species are ‘O2’, ‘O’, ‘He’, ‘N2’, ‘Ar’, ‘N’, and ‘H’. This option is not case sensitive. Default None.

  • f107_avg_flux (float, optional) – The three day average of the F10.7 solar flux in sfu. Default 150.0.

  • f107_prev_day_flux (float, optional) – The F10.7 solar flux for the previous day in sfu. Default 150.0.

  • ap_index (arraylike, optional) –

    The Ap index that defines the prevailing geomagnetic conditions used by the MSIS model. The elements are

    1. Daily Ap.

    2. 3 hour Ap index for the current time.

    3. 3 hour Ap index for 3 hours before the current time.

    4. 3 hour Ap index for 6 hours before the current time.

    5. 3 hour Ap index for 9 hours before the current time.

    6. Average of eight 3 hour Ap indicies from 12 to 33 hours prior to current time.

    7. Average of eight 3 hour Ap indicies from 36 to 59 hours prior to current time.

    The default value is 4.0 for each of these.

  • max_altitude_km (float, optional) – The nominal maximum altitude that will be calculated by the model in km. Default is 120.

  • height_spacing_km (float, optional) – The spacing in km between sample points internally stored by the model. Default is 1.

Examples

Using MSIS below 120 km, the default settings are typically adequate.

>>> import sasktran as sk
>>> msis = sk.MSIS90()
>>> pressure = msis.get_parameter('SKCLIMATOLOGY_PRESSURE_PA', latitude=0, longitude=0, altitudes=[25000], mjd=54372)
>>> print(pressure)
[2541.21983765]

Above 120 km extra options should be set

>>> import sasktran as sk
>>> msis = sk.MSIS90(max_altitude_km=200, includes=['O2', 'N2'])
>>> N2 = msis.get_parameter('SKCLIMATOLOGY_N2_CM3', latitude=0, longitude=0, altitudes=[150000], mjd=54372)
>>> O2 = msis.get_parameter('SKCLIMATOLOGY_O2_CM3', latitude=0, longitude=0, altitudes=[150000], mjd=54372)
>>> print(N2)
[2.89394292e+10]
>>> print(O2)
[2.04250319e+09]

References

Fleming, E.L., S. Chandra, J.J. Barnett and M. Corney (1990), Zonal mean temperature, pressure, zonal wind, and geopotential height as functions of latitude, COSPAR International Reference Atmosphere: 1986, Part II: Middle Atmosphere Models, Adv. Space Res., 10, 12, 11-59, doi:10.1016/0273-1177(90)90386-E.

Chandra, S., E.L. Fleming, M.R. Schoeberl, J.J. Barnett, (1990), Monthly mean global climatology of temperature, wind, geopotential height and pressure for 0–120 km, Advances in Space Research, 10, 6, 3-12, doi.org/10.1016/0273-1177(90)90230-W.

Hedin, A. E. (1991), Extension of the MSIS Thermosphere Model into the middle and lower atmosphere, J. Geophys. Res., 96 ( A2), 1159– 1172, doi:10.1029/90JA02125

supported_species()

Get a list of Species identifiers that are supported by this climatology.

Returns

Species identifiers that are supported by this climatology. Identifiers correspond to sasktran.Species.species

Return type

list

class sasktran.ECMWF

Bases: sasktran.climatology.Climatology

A climatology of number density, pressure, and temperature based on the ERA interim reanalysis. This climatology requires additional configuration, see Configuration for more information.

get_parameter(species: str, latitude: float, longitude: float, altitudes: numpy.ndarray, mjd: float)

Get a profile from the climatology.

Parameters
  • species (str) – Species identifier of the species to query. Corresponds to sasktran.Species.species.

  • latitude (float) – Latitude in degrees.

  • longitude (float) – Longitude in degrees.

  • altitudes (np.ndarray) – Profile altitude grid in meters.

  • mjd (float) – Modified julian date.

Returns

Climatology values at the specified altitudes.

Return type

np.ndarray

class sasktran.GloSSAC(wavelength_nm: int = 525, extend=False)

Bases: sasktran.climatology.ClimatologyUserDefined

The global stratospheric aerosol extinction climatology at 8 wavelengths from 386-3400nm that spans from 1979-2016 and incorporates data from numerous satellite datasets. Interpolations in latitude and time use nearest neigbour.

Note about wavelengths:

386, 452, 525 and 1020 are the merged aerosol extinction datasets, although 386 and 452nm are not generally recommended. 525 and 1020nm channels provide the most robust extinction values so for radiative transfer calculations it is recommended to use one of these two channels.

Other channels (750, 1257 and 3400) are from individual instruments.

As the GloSSAC climatology is extinction based the species_name is ‘SKCLIMATOLOGY_AEROSOL_EXTINCTIONPERKM’, although the skif_object is converted to number density for use in sasktran.

Parameters
  • wavelength_nm (float) – wavelength of the returned extinction. Possible values are: 386, 452, 525, 750, 1020, 1257, 3400

  • extend (bool) – If true the extinction profile is extended above and below the valid range to avoid sharp distcontinuities. Profiles are assumed to exponenetially decay outside the valid range. Default is False where all non-valid regions are set to zero. The class variables decay_below and decay_above can be used to adjust the decay rates below and above the valid range respectively

get_parameter(species: str, latitude: float, longitude: float, altitudes: numpy.ndarray, mjd: float)

Get a profile from the climatology.

Parameters
  • species (str) – Species identifier of the species to query. Corresponds to sasktran.Species.species.

  • latitude (float) – Latitude in degrees.

  • longitude (float) – Longitude in degrees.

  • altitudes (np.ndarray) – Profile altitude grid in meters.

  • mjd (float) – Modified julian date.

Returns

Climatology values at the specified altitudes.

Return type

np.ndarray

skif_object(**kwargs)
Returns

Underlying ISKClimatology object which represents the climatology

Return type

skif.ISKClimatology

See Also

Atmosphere

An object that describes the atmospheric constituents, and surface type to the engine. Atmospheric constituents are defined by a list of Species, and surfaces are defined by a given BRDF.

Species

Representation of a atmospheric constituent.

Optical Properties

Classes that describes the optical properties of some atmospheric Species.