joseki.profiles.ussa_1976.core¶
U.S. Standard Atmosphere 1976 thermophysical model.
The U.S. Standard Atmosphere 1976 model [NNU76] divides the atmosphere into two altitude regions:
the low-altitude region, from 0 to 86 kilometers
the high-altitude region, from 86 to 1000 kilometers.
A number of computational functions hereafter are specialized for one or
the other altitude region and is valid only in that altitude region, not in
the other.
Their name include a low_altitude or a high_altitude part to reflect
that they are valid only in the low altitude region and high altitude region,
respectively.
Attributes¶
Functions¶
|
Compute U.S. Standard Atmosphere 1976 data set on specified altitude grid. |
Compute gravity. |
|
|
Compute U.S. Standard Atmosphere 1976 in high-altitude region. |
Compute temperature and pressure at low-altitude region' levels. |
|
|
Compute U.S. Standard Atmosphere 1976 in low-altitude region. |
Compute mean molar mass in high-altitude region. |
|
|
Compute number density of individual species in high-altitude region. |
|
Compute pressure in low-altitude region. |
|
Compute pressure in low-altitude non-zero temperature gradient region. |
|
Compute pressure in low-altitude zero temperature gradient region. |
Compute temperature gradient in high-altitude region. |
|
Compute temperature in high-altitude region. |
|
Compute temperature in low-altitude region. |
|
Compute Eddy diffusion coefficient in high-altitude region. |
|
|
Evaluate function \(f\) above 115 km altitude. |
|
Evaluate function \(f\) below 115 km altitude. |
Initialise data set. |
|
|
Compute linear interpolation of \(y(x)\) in logarithmic space. |
|
Compute \(\tau\) function. |
|
Compute thermal diffusion coefficient values in high-altitude region. |
|
Compute thermal diffusion term of given species in high-altitude region. |
|
Compute oxygen thermal diffusion term in high-altitude region. |
|
Convert geopotential height to (geometric) altitude. |
Convert altitude to geopotential height. |
|
|
Compute velocity term of a given species in high-altitude region. |
Compute velocity term of atomic oxygen in high-altitude region. |
|
|
Compute transport term. |
|
Compute transport term. |
Module Contents¶
- joseki.profiles.ussa_1976.core.compute(z=DEFAULT_Z, variables=None)[source]¶
Compute U.S. Standard Atmosphere 1976 data set on specified altitude grid.
- Parameters:
z (array) – Altitude [m].
variables (list, optional) – Names of the variables to compute.
- Returns:
Data set holding the values of the different atmospheric variables.
- Return type:
Dataset
- Raises:
ValueError – When altitude is out of bounds, or when variables are invalid.
- joseki.profiles.ussa_1976.core.compute_gravity(z)[source]¶
Compute gravity.
- Parameters:
z (array) – Altitude [m].
- Returns:
Gravity [m * s^-2].
- Return type:
array
- joseki.profiles.ussa_1976.core.compute_high_altitude(data_set, mask=None, inplace=False)[source]¶
Compute U.S. Standard Atmosphere 1976 in high-altitude region.
- Parameters:
data_set (Dataset) – Data set to compute.
mask (DataArray, optional) – Mask to select the region of the data set to compute. By default, the mask selects the entire data set.
inplace (bool, default False) – If
True, modifiesdata_setin place, else returns a copy ofdata_set.
- Returns:
If
inplaceis True, returns nothing, else returns a copy ofdata_set.- Return type:
Dataset
- joseki.profiles.ussa_1976.core.compute_levels_temperature_and_pressure_low_altitude()[source]¶
Compute temperature and pressure at low-altitude region’ levels.
- Returns:
Levels temperatures [K] and pressures [Pa].
- Return type:
tuple of arrays
- joseki.profiles.ussa_1976.core.compute_low_altitude(data_set, mask=None, inplace=False)[source]¶
Compute U.S. Standard Atmosphere 1976 in low-altitude region.
- Parameters:
data_set (Dataset) – Data set to compute.
mask (DataArray, optional) – Mask to select the region of the data set to compute. By default, the mask selects the entire data set.
inplace (bool, default=False) – If
True, modifiesdata_setin place, else returns a copy ofdata_set.
- Returns:
If
inplaceisTrue, returns nothing, else returns a copy ofdata_set.- Return type:
Dataset
- joseki.profiles.ussa_1976.core.compute_mean_molar_mass_high_altitude(z)[source]¶
Compute mean molar mass in high-altitude region.
- Parameters:
z (array) – Altitude [m].
- Returns:
Mean molar mass [kg/mole].
- Return type:
array
- joseki.profiles.ussa_1976.core.compute_number_densities_high_altitude(altitudes)[source]¶
Compute number density of individual species in high-altitude region.
- Parameters:
altitudes (array) – Altitudes [m].
- Returns:
Number densities of the individual species and total number density at the given altitudes.
- Return type:
DataArray
Notes
A uniform altitude grid is generated and used for the computation of the integral as well as for the computation of the number densities of the individual species. This gridded data is then interpolated at the query
altitudesusing a linear interpolation scheme in logarithmic space.
- joseki.profiles.ussa_1976.core.compute_pressure_low_altitude(h, pb, tb)[source]¶
Compute pressure in low-altitude region.
- Parameters:
h (array) – Geopotential height [m].
pb (array) – Levels pressure [Pa].
tb (array) – Levels temperature [K].
- Returns:
Pressure [Pa].
- Return type:
array
- joseki.profiles.ussa_1976.core.compute_pressure_low_altitude_non_zero_gradient(h, hb, pb, tb, lkb)[source]¶
Compute pressure in low-altitude non-zero temperature gradient region.
- Parameters:
- Returns:
Pressure [Pa].
- Return type:
array
- joseki.profiles.ussa_1976.core.compute_pressure_low_altitude_zero_gradient(h, hb, pb, tb)[source]¶
Compute pressure in low-altitude zero temperature gradient region.
- joseki.profiles.ussa_1976.core.compute_temperature_gradient_high_altitude(z)[source]¶
Compute temperature gradient in high-altitude region.
- Parameters:
z (array) – Altitude [m].
- Returns:
Temperature gradient [K/m].
- Return type:
array
- joseki.profiles.ussa_1976.core.compute_temperature_high_altitude(z)[source]¶
Compute temperature in high-altitude region.
- Parameters:
z (array) – Altitude [m].
- Returns:
Temperature [K].
- Return type:
array
- joseki.profiles.ussa_1976.core.compute_temperature_low_altitude(h, tb)[source]¶
Compute temperature in low-altitude region.
- Parameters:
h (array) – Geopotential height [m].
tb (array) – Levels temperature [K].
- Returns:
Temperature [K].
- Return type:
array
- joseki.profiles.ussa_1976.core.eddy_diffusion_coefficient(z)[source]¶
Compute Eddy diffusion coefficient in high-altitude region.
- Parameters:
z (array) – Altitude [m].
- Returns:
Eddy diffusion coefficient [m^2 * s^-1].
- Return type:
array
Notes
Valid in the altitude region \(86 \leq z \leq 150\) km.
- joseki.profiles.ussa_1976.core.f_above_115_km(g, t, dt_dz, mi, alpha)[source]¶
Evaluate function \(f\) above 115 km altitude.
Evaluate the function \(f\) defined by equation (36) in [NNU76] in the altitude region \(115\) \(\lt z \leq 1000\) km.
- Parameters:
g (array) – Gravity at the different altitudes [m * s^-2].
t (array) – Temperature at the different altitudes [K].
dt_dz (array) – Temperature gradient at the different altitudes [K * m^-1].
mi (float) – Species molar masses [kg * mole^-1].
alpha (float) – Alpha thermal diffusion constant [dimensionless].
- Returns:
Function \(f\) at the different altitudes.
- Return type:
array
- joseki.profiles.ussa_1976.core.f_below_115_km(g, t, dt_dz, m, mi, alpha, d, k)[source]¶
Evaluate function \(f\) below 115 km altitude.
Evaluates the function \(f\) defined by equation (36) in [NNU76] in the altitude region \(86\) km \(\leq z \leq 115\) km.
- Parameters:
g (array) – Gravity values at the different altitudes [m * s^-2].
t (array) – Temperature values at the different altitudes [K].
dt_dz (array) – Temperature gradient values at the different altitudes [K * m^-1].
m (array) – Molar mass [kg * mole^-1].
mi (float) – Species molar masses [kg * mole^-1].
alpha (float) – Alpha thermal diffusion constant [dimensionless].
d (array) – Thermal diffusion coefficient values at the different altitudes [m^2 * s^-1].
k (array) – Eddy diffusion coefficient values at the different altitudes [m^2 * s^-1].
- Returns:
Function \(f\) at the different altitudes.
- Return type:
array
- joseki.profiles.ussa_1976.core.init_data_set(z)[source]¶
Initialise data set.
- Parameters:
z (array) – Altitudes [m].
- Returns:
Initialised data set.
- Return type:
Dataset
- joseki.profiles.ussa_1976.core.log_interp1d(x, y)[source]¶
Compute linear interpolation of \(y(x)\) in logarithmic space.
- Parameters:
x (array) – 1-D array of real values.
y (array) – N-D array of real values. The length of y along the interpolation axis must be equal to the length of x.
- Returns:
Interpolating function.
- Return type:
callable
- joseki.profiles.ussa_1976.core.tau_function(z_grid, below_500=True)[source]¶
Compute \(\tau\) function.
Compute integral given by equation (40) in [NNU76] at each point of an altitude grid.
- Parameters:
z_grid (array) – Altitude grid (values sorted by ascending order) to use for integration [m].
below_500 (bool, default True) –
Trueif altitudes inz_gridare lower than 500 km, False otherwise.
- Returns:
Integral evaluations [dimensionless].
- Return type:
array
Notes
Valid for 150 km \(\leq z \leq\) 500 km.
- joseki.profiles.ussa_1976.core.thermal_diffusion_coefficient(nb, t, a, b)[source]¶
Compute thermal diffusion coefficient values in high-altitude region.
- joseki.profiles.ussa_1976.core.thermal_diffusion_term(s, z_grid, g, t, dt_dz, m, d, k)[source]¶
Compute thermal diffusion term of given species in high-altitude region.
- Parameters:
s (str) – Species.
z_grid (array) – Altitude grid [m].
g (array) – Gravity values on the altitude grid [m * s^-2].
t (array) – Temperature values on the altitude grid [K].
dt_dz (array) – Temperature gradient values on the altitude grid [K * m^-1].
m (array) – Values of the mean molar mass on the altitude grid [kg * mole^-1].
d (array) – Molecular diffusion coefficient values on the altitude grid, for altitudes strictly less than 115 km [m^2 * s^-1].
k (array) – Eddy diffusion coefficient values on the altitude grid, for altitudes strictly less than 115 km [m^2 * s^-1].
- Returns:
Thermal diffusion term [m^-1].
- Return type:
array
- joseki.profiles.ussa_1976.core.thermal_diffusion_term_atomic_oxygen(z_grid, g, t, dt_dz, d, k)[source]¶
Compute oxygen thermal diffusion term in high-altitude region.
- Parameters:
z_grid (array) – Altitude grid [m].
g (array) – Gravity values on the altitude grid [m * s^-2].
t (array) – Temperature values on the altitude grid [K].
dt_dz (array) – Temperature values gradient on the altitude grid [K * m^-1].
d (array) – Thermal diffusion coefficient on the altitude grid [m^2 * s^-1].
k (array) – Eddy diffusion coefficient values on the altitude grid [m^2 * s^-1].
- Returns:
Thermal diffusion term [-1].
- Return type:
array
- joseki.profiles.ussa_1976.core.to_altitude(h)[source]¶
Convert geopotential height to (geometric) altitude.
- Parameters:
h (array) – Geopotential altitude [m].
- Returns:
Altitude [m].
- Return type:
array
- joseki.profiles.ussa_1976.core.to_geopotential_height(z)[source]¶
Convert altitude to geopotential height.
- Parameters:
z (array) – Altitude [m].
- Returns:
Geopotential height [m].
- Return type:
array
- joseki.profiles.ussa_1976.core.velocity_term(s, z_grid)[source]¶
Compute velocity term of a given species in high-altitude region.
- Parameters:
s (str) – Species.
z_grid (array) – Altitude grid [m].
- Returns:
Velocity term [m^-1].
- Return type:
array
Notes
Not valid for atomic oxygen. See
velocity_term_atomic_oxygen().
- joseki.profiles.ussa_1976.core.velocity_term_atomic_oxygen(grid)[source]¶
Compute velocity term of atomic oxygen in high-altitude region.
- Parameters:
grid (array) – Altitude grid [m].
- Returns:
Velocity term [m^-1].
- Return type:
array
- joseki.profiles.ussa_1976.core.velocity_term_hump(z, q1, q2, u1, u2, w1, w2)[source]¶
Compute transport term.
Compute the transport term given by equation (37) in [NNU76].
- Parameters:
- Returns:
Transport term [m^-1].
- Return type:
array
Notes
Valid in the altitude region: 86 km \(\leq z \leq\) 150 km.
- joseki.profiles.ussa_1976.core.velocity_term_no_hump(z, q1, u1, w1)[source]¶
Compute transport term.
Compute the transport term given by equation (37) in [NNU76] where the second term is zero.
- Parameters:
- Returns:
Transport term [m^-1].
- Return type:
array
Notes
Valid in the altitude region \(86\) km \(\leq z \leq 150\) km.
- joseki.profiles.ussa_1976.core.DEFAULT_Z¶
- joseki.profiles.ussa_1976.core.DIMS¶
- joseki.profiles.ussa_1976.core.LONG_NAME¶
- joseki.profiles.ussa_1976.core.SPECIES = ['N2', 'O2', 'Ar', 'CO2', 'Ne', 'He', 'Kr', 'Xe', 'CH4', 'H2', 'O', 'H']¶
- joseki.profiles.ussa_1976.core.STANDARD_NAME¶
- joseki.profiles.ussa_1976.core.UNITS¶
- joseki.profiles.ussa_1976.core.VARIABLES = ['t', 'p', 'n', 'n_tot', 'rho', 'mv', 'hp', 'v', 'mfp', 'f', 'cs', 'mu', 'nu', 'kt']¶