Library
Documentation for SatelliteToolboxAtmosphericModels.jl
.
SatelliteToolboxAtmosphericModels.AtmosphericModels._EXPONENTIAL_ATMOSPHERE_H
— Constantconst _EXPONENTIAL_ATMOSPHERE_H
Scale height for the exponential atmospheric model [km].
SatelliteToolboxAtmosphericModels.AtmosphericModels._EXPONENTIAL_ATMOSPHERE_H₀
— Constantconst _EXPONENTIAL_ATMOSPHERE_H₀
Base altitude for the exponential atmospheric model [km].
SatelliteToolboxAtmosphericModels.AtmosphericModels._EXPONENTIAL_ATMOSPHERE_ρ₀
— Constantconst _EXPONENTIAL_ATMOSPHERE_ρ₀
Nominal density for the exponential atmospheric model [kg / m³].
SatelliteToolboxAtmosphericModels.AtmosphericModels._JR1971_CONSTANTS
— Constantconst _JR1971_CONSTANTS
Constants for the Jacchia-Roberts 1971 atmospheric model.
SatelliteToolboxAtmosphericModels.AtmosphericModels._JR1971_ROOT_GUESS
— Constantconst _JR1971_ROOT_GUESS
First guess to compute the roots of a polynomial to find the density below 125 km.
SatelliteToolboxAtmosphericModels.AtmosphericModels.JB2008Output
— Typestruct JB2008Output{T<:Number}
Output of the atmospheric model Jacchia-Bowman 2008.
Fields
total_density::T
: Total atmospheric density [1 / m³].temperature::T
: Temperature at the selected position [K].exospheric_temperature::T
: Exospheric temperature [K].N2_number_density::T
: Number density of N₂ [1 / m³].O2_number_density::T
: Number density of O₂ [1 / m³].O_number_density::T
: Number density of O [1 / m³].Ar_number_density::T
: Number density of Ar [1 / m³].He_number_density::T
: Number density of He [1 / m³].H_number_density::T
: Number density of H [1 / m³].
SatelliteToolboxAtmosphericModels.AtmosphericModels.JR1971Output
— Typestruct JR1971Output{T<:Number}
Output of the atmospheric model Jacchia-Roberts 1971.
Fields
total_density::T
: Total atmospheric density [1 / m³].temperature::T
: Temperature at the selected position [K].exospheric_temperature::T
: Exospheric temperature [K].N2_number_density::T
: Number density of N₂ [1 / m³].O2_number_density::T
: Number density of O₂ [1 / m³].O_number_density::T
: Number density of O [1 / m³].Ar_number_density::T
: Number density of Ar [1 / m³].He_number_density::T
: Number density of He [1 / m³].H_number_density::T
: Number density of H [1 / m³].
SatelliteToolboxAtmosphericModels.AtmosphericModels.Nrlmsise00Flags
— Typestruct Nrlmsise00Flags
Flags to configure NRLMSISE-00.
Fields
F10_Mean::Bool
: F10.7 effect on mean.time_independent::Bool
: Independent of time.sym_annual::Bool
: Symmetrical annual.sym_semiannual::Bool
: Symmetrical semiannual.asym_annual::Bool
: Asymmetrical annual.asyn_semiannual::Bool
: Asymmetrical semiannual.diurnal::Bool
: Diurnal.semidiurnal::Bool
: Semidiurnal.daily_ap::Bool
: Daily AP.all_ut_long_effects::Bool
: All UT/long effects.longitudinal::Bool
: Longitudinal.ut_mixed_ut_long::Bool
: UT and mixed UT/long.mixed_ap_ut_long::Bool
: Mixed AP/UT/long.terdiurnal::Bool
: Terdiurnal.departures_from_eq::Bool
: Departures from diffusive equilibrium.all_tinf_var::Bool
: All TINF variations.all_tlb_var::Bool
: All TLB variations.all_tn1_var::Bool
: All TN1 variations.all_s_var::Bool
: All S variations.all_tn2_var::Bool
: All TN2 variations.all_nlb_var::Bool
: All NLB variations.all_tn3_var::Bool
: All TN3 variations.turbo_scale_height::Bool
: Turbo scale height variations.
SatelliteToolboxAtmosphericModels.AtmosphericModels.Nrlmsise00Output
— Typestruct Nrlmsise00Output{T<:Number}
Output structure for NRLMSISE00 model.
Fields
total_density::T
: Total mass density [kg / m³].temperature
: Temperature at the selected altitude [K].exospheric_temperature
: Exospheric temperature [K].N_number_density
: Nitrogen number density [1 / m³].N2_number_density
: N₂ number density [1 / m³].O_number_density
: Oxygen number density [1 / m³].aO_number_density
: Anomalous Oxygen number density [1 / m³].O2_number_density
: O₂ number density [1 / m³].H_number_density
: Hydrogen number density [1 / m³].He_number_density
: Helium number density [1 / m³].Ar_number_density
: Argon number density [1 / m³].
Remarks
Anomalous oxygen is defined as hot atomic oxygen or ionized oxygen that can become appreciable at high altitudes (> 500 km
) for some ranges of inputs, thereby affection drag on satellites and debris. We group these species under the term Anomalous Oxygen, since their individual variations are not presently separable with the drag data used to define this model component.
SatelliteToolboxAtmosphericModels.AtmosphericModels.Nrlmsise00Structure
— Typestruct Nrlmsise00Structure{T<:Number, T_AP<:Union{Number, AbstractVector}}
Structure with the configuration parameters for NRLMSISE-00 model. T
is the floating-number type and T_AP
is the type of the AP information, which can be a Number
or AbstractVector
.
SatelliteToolboxAtmosphericModels.AtmosphericModels._ccor
— Method_ccor(h::T, r::T, h₁::T, zh::T) where T<:Number -> T
Compute the chemistry / dissociation correction for MSIS models.
Arguments
h::Number
: Altitude.r::Number
: Target ratio.h₁::Number
: Transition scale length.zh::Number
: Altitude of1/2 r
.
SatelliteToolboxAtmosphericModels.AtmosphericModels._ccor2
— Method_ccor2(alt::T, r::T, h₁::T, zh::T, h₂::T) where T<:Number -> T
Compute the O and O₂ chemistry / dissociation correction for MSIS models.
Arguments
h::Number
: Altitude.r::Number
: Target ration.h₁::Number
: Transition scale length.zh::Number
: Altitude of1/2 r
.h₂::Number
: Transition scale length 2.
SatelliteToolboxAtmosphericModels.AtmosphericModels._densm
— Method_densm(h::T, d0::T, xm::T, tz::T, r_lat::T, g_lat::T, tn2::NTuple{N2, T}, tgn2::NTuple{2, T}, tn3::NTuple{N3, T}, tgn3::NTuple{2, T}) where {N2<:Interger, N3<:Integer, T<:Number} -> float(T), float(T)
Compute the temperature and density profiles for the lower atmosphere.
This function returns the density if xm
is not 0, or the temperature otherwise.
Arguments
h::T
: Altitude [km].d₀::T
: Reference density, returned ifh > _ZN2[1]
.xm::T
: Species molecular weight [ ].g_lat::T
: Reference gravity at desired latitude [cm / s²].r_lat::T
: Reference radius at desired latitude [km].tn2::NTuple{N2, T}
: Temperature at the nodes for ZN2 scale [K].tgn2::NTuple{N2, T}
: Temperature gradients at the end nodes for ZN2 scale.tn3::NTuple{N3, T}
: Temperature at the nodes for ZN3 scale [K].tgn3::NTuple{N3, T}
: Temperature gradients at the end nodes for ZN3 scale.
Returns
T
: Density [1 / cm³] isxm
is not 0, or the temperature [K] otherwise.
SatelliteToolboxAtmosphericModels.AtmosphericModels._densu
— Method_densu(h::T, dlb::T, tinf::T, tlb::T, xm::T, α::T, zlb::T, s2::T, g_lat::T, r_lat::T, tn1::NTuple{5, T}, tgn1::NTuple{2, T}) where T<:Number -> T, NTuple{5, T}, NTuple{2, T}
Compute the density [1 / cm³] or temperature [K] profiles according to the new lower thermo polynomial.
This function returns the density if xm
is not 0, or the temperature otherwise.
Arguments
h::T
: Altitude [km].dlb::T
: Density at lower boundary [1 / cm³].tinf::T
: Exospheric temperature [K].tlb::T
: Temperature at lower boundary [K].xm::T
: Species molecular weight [ ].α::T
: Thermal diffusion coefficient.zlb::T
: Altitude at lower boundary [km].s2::T
: Slope.g_lat::T
: Reference gravity at the latitude [cm / s²].r_lat::T
: Reference radius at the latitude [km].tn1::NTuple{5, T}
: Temperature at nodes for ZN1 scale [K].tgn1::NTuple{2, T}
: Temperature gradients at end nodes for ZN1 scale.
Returns
T
: Density [1 / cm³] isxm
is not 0, or the temperature [K] otherwise.NTuple{5, T}
: Updatedtn1
.NTuple{2, T}
: Updatedtgn1
.
SatelliteToolboxAtmosphericModels.AtmosphericModels._dnet
— Method_dnet(dd::T, dm::T, zhm::T, xmm::T, xm::T) where T<:Number -> T
Compute the turbopause correction for MSIS models, returning the combined density.
Arguments
dd::T
: Diffusive density.dm::T
: Full mixed density.zhm::T
: Transition scale length.xmm::T
: Full mixed molecular weight.xm::T
: Species molecular weight.
SatelliteToolboxAtmosphericModels.AtmosphericModels._glob7s
— Method_glob7s(nrlmsise00d::Nrlmsise00Structure{T}, p::AbstractVector{T}) where T<:Number -> T
Compute the function G(L)
with lower atmosphere parameters p
and the NRLMSISE-00 structure nrlmsise00d
.
SatelliteToolboxAtmosphericModels.AtmosphericModels._globe7
— Method_globe7(nrlmsise00d::Nrlmsise00Structure{T}, p::AbstractVector{T}) where T<:Number -> Nrlmsise00Structure{T}, T
Compute the function G(L)
with upper thermosphere parameters p
and the NRLMSISE-00 structure nrlmsise00
.
The variables apt
and apdf
inside nrlmsise00d
can be modified inside this function.
Returns
Nrlmsise00Structure{T}
: Modified structurenrlmsise00d
.T
: Result ofG(L)
.
SatelliteToolboxAtmosphericModels.AtmosphericModels._gravity_and_effective_radius
— Method_gravity_and_effective_radius(ϕ_gd::T) where T<:Number -> T, T
Compute the gravity [cm / s²] and effective radius [km] at the geodetic latitude ϕ_gd
[°].
SatelliteToolboxAtmosphericModels.AtmosphericModels._gtd7
— Method_gtd7(nrlmsise00d::Nrlmsise00Structure{T}) where T<:Number -> Nrlmsise00Structure{T}, Nrlmsise00Output{T}
Compute the temperatures and densities using the information inside the structure nrlmsise00d
without including the anomalous oxygen in the total density.
Returns
Nrlmsise00Structure{T}
: Modified structurenrlmsise00d
.Nrlmsise00Output{T}
: Structure with the output information.
SatelliteToolboxAtmosphericModels.AtmosphericModels._gtd7d
— Method_gtd7d(nrlmsise00d::Nrlmsise00Structure{T}) where T<:Number -> Nrlmsise00Structure{T}, Nrlmsise00Output{T}
Compute the temperatures and densities using the information inside the structure nrlmsise00d
including the anomalous oxygen in the total density.
Returns
Nrlmsise00Structure{T}
: Modified structurenrlmsise00d
.Nrlmsise00Output{T}
: Structure with the output information.
SatelliteToolboxAtmosphericModels.AtmosphericModels._gts7
— Method_gts7(nrlmsise00d::Nrlmsise00Structure{T}) where T<:Number -> Nrlmsise00Structure{T}, Nrlmsise00Output{T}
Compute the temperatures and densities using the information inside the structure nrlmsise00d
and including the anomalous oxygen in the total density for altitudes higher than 72.5 km (thermospheric portion of NRLMSISE-00).
Returns
Nrlmsise00Structure{T}
: Modified structurenrlmsise00d
.Nrlmsise00Output{T}
: Structure with the output information.
SatelliteToolboxAtmosphericModels.AtmosphericModels._g₀
— Method_g0(a::Number, p::AbstractVector)
Compute g₀
function (see Eq. A24d) using the coefficients abs_p25 = abs(p[25])
and p26 = p[26]
.
SatelliteToolboxAtmosphericModels.AtmosphericModels._scale_height
— Method_scale_height(h::T, xm::T, temp::T, g_lat::T, r_lat::T) where T<:Number -> T
Compute the scale height.
Arguments
h::T
: Altitude [km].xm::T
: Species molecular weight [ ].temp::T
: Temperature [K].g_lat::T
: Reference gravity at desired latitude [cm / s²].r_lat::T
: Reference radius at desired latitude [km].
SatelliteToolboxAtmosphericModels.AtmosphericModels._sg₀
— Method_sg₀(ex::Number, ap::AbstractVector, abs_p25::Number, p26::Number)
Compute the sg₀
function (see Eq. A24a) using the ap
vector and the coefficients abs_p25
and p26
.
SatelliteToolboxAtmosphericModels.AtmosphericModels._spline
— Method_spline(x::NTuple{N, T}, y::NTuple{N, T}, ∂²y::NTuple{N, T}, xᵢ::T) where {N, T<:Number} -> float(T)
Compute the interpolation of the cubic spline y(x)
with second derivatives ∂²y
at xᵢ
.
This function was adapted from Numerical Recipes.
Arguments
x::NTuple{N, T}
: X components of the tabulated function in ascending order.y::NTuple{N, T}
: Y components of the tabulated function evaluated atx
.∂²y::NTuple{N, T}
: Second derivatives ofy(x)
∂²y/∂x²
evaluated atx
.xᵢ::T
: Point to compute the interpolation.
SatelliteToolboxAtmosphericModels.AtmosphericModels._spline_∂²
— Method_spline_∂²(x::NTuple{N, T}, y::NTuple{N, T}, ∂²y₁::T, ∂²yₙ::T) where {N, T<:Number} -> NTuple{N, T}
Compute the 2nd derivatives of the cubic spline interpolation y(x)
given the 2nd derivatives at x[1]
(∂²y₁
) and at x[N]
(∂²yₙ
). This functions return a tuple with the evaluated 2nd derivatives at each point in x
.
This function was adapted from Numerical Recipes.
Values higher than 0.99e30
in the 2nd derivatives at the borders (∂²y₁
and ∂²yₙ
) are interpreted as 0
.
Arguments
x::NTuple{N, T}
: X components of the tabulated function in ascending order.y::NTuple{N, T}
: Y components of the tabulated function evaluated atx
.∂²y₁::T
: Second derivative ofy(x)
∂²y/∂x²
evaluated atx[1]
.∂²yₙ::T
: Second derivative ofy(x)
∂²y/∂x²
evaluated atx[N]
.
SatelliteToolboxAtmosphericModels.AtmosphericModels._spline_∫
— Method_spline_∫(x::NTuple{N, T}, y::NTuple{N, T}, ∂²y::NTuple{N, T}, xf::Number) where {N, T<:Number} -> float(T)
Compute the integral of the cubic spline function y(x)
from x[1]
to xf
, where the function second derivatives evaluated at x
are ∂²y
.
Arguments
x::NTuple{N, T}
: X components of the tabulated function in ascending order.y::NTuple{N, T}
: Y components of the tabulated function evaluated atx
.∂²y::NTuple{N, T}
: Second derivatives ofy(x)
∂²y/∂x²
evaluated atx
.xf::Number
: Abscissa endpoint for integration.
SatelliteToolboxAtmosphericModels.AtmosphericModels._ζ
— Method_ζ(r_lat::Number, zz::Number, zl::Number) -> Number
Compute the zeta function.
SatelliteToolboxAtmosphericModels.AtmosphericModels.exponential
— Methodexponential(h::Number) -> Float64
Compute the atmospheric density [kg / m³] at the altitude h
[m] above the ellipsoid using the exponential atmospheric model:
┌ ┐
│ h - h₀ │
ρ(h) = ρ₀ . exp │ - ──────── │ ,
│ H │
└ ┘
in which ρ₀
, h₀
, and H
are parameters obtained from tables that depend only on h
.
SatelliteToolboxAtmosphericModels.AtmosphericModels.jb2008
— Methodjb2008(instant::DateTime, ϕ_gd::Number, λ::Number, h::Number[, F10::Number, F10ₐ::Number, S10::Number, S10ₐ::Number, M10::Number, M10ₐ::Number, Y10::Number, Y10ₐ::Number, DstΔTc::Number]) -> JB2008Output{Float64}
jb2008(jd::Number, ϕ_gd::Number, λ::Number, h::Number[, F10::Number, F10ₐ::Number, S10::Number, S10ₐ::Number, M10::Number, M10ₐ::Number, Y10::Number, Y10ₐ::Number, DstΔTc::Number]) -> JB2008Output{Float64}
Compute the atmospheric density using the Jacchia-Bowman 2008 (JB2008) model.
This model is a product of the Space Environment Technologies, please, refer to the following website for more information:
http://sol.spacenvironment.net/JB2008/
If we omit all space indices, the system tries to obtain them automatically for the selected day jd
or instant
. However, the indices must be already initialized using the function SpaceIndices.init()
.
Arguments
jd::Number
: Julian day to compute the model.instant::DateTime
: Instant to compute the model represent usingDateTime
.ϕ_gd
: Geodetic latitude [rad].λ
: Longitude [rad].h
: Altitude [m].F10
: 10.7-cm solar flux [sfu] obtained 1 day beforejd
.F10ₐ
: 10.7-cm averaged solar flux using a 81-day window centered on input time obtained 1 day beforejd
.S10
: EUV index (26-34 nm) scaled to F10.7 obtained 1 day beforejd
.S10ₐ
: EUV 81-day averaged centered index obtained 1 day beforejd
.M10
: MG2 index scaled to F10.7 obtained 2 days beforejd
.M10ₐ
: MG2 81-day averaged centered index obtained 2 day beforejd
.Y10
: Solar X-ray & Ly-α index scaled to F10.7 obtained 5 days beforejd
.Y10ₐ
: Solar X-ray & Ly-α 81-day averaged centered index obtained 5 days beforejd
.DstΔTc
: Temperature variation related to the Dst.
Returns
JB2008Output{Float64}
: Structure containing the results obtained from the model.
SatelliteToolboxAtmosphericModels.AtmosphericModels.jr1971
— Methodjr1971(instant::DateTime, ϕ_gd::Number, λ::Number, h::Number[, F10::Number, F10ₐ::Number, Kp::Number]) -> JR1971Output{Float64}
jr1971(jd::Number, ϕ_gd::Number, λ::Number, h::Number[, F10::Number, F10ₐ::Number, Kp::Number]) -> JR1971Output{Float64}
Compute the atmospheric density using the Jacchia-Roberts 1971 model.
If we omit all space indices, the system tries to obtain them automatically for the selected day jd
or instant
. However, the indices must be already initialized using the function SpaceIndices.init()
.
Arguments
jd::Number
: Julian day to compute the model.instant::DateTime
: Instant to compute the model represent usingDateTime
.ϕ_gd::Number
: Geodetic latitude [rad].λ::Number
: Longitude [rad].h::Number
: Altitude [m].F10::Number
: 10.7-cm solar flux [sfu].F10ₐ::Number
: 10.7-cm averaged solar flux, 81-day centered on input time [sfu].Kp::Number
: Kp geomagnetic index with a delay of 3 hours.
Returns
JR1971Output{Float64}
: Structure containing the results obtained from the model.
SatelliteToolboxAtmosphericModels.AtmosphericModels.nrlmsise00
— Methodnrlmsise00(instant::DateTime, h::Number, ϕ_gd::Number, λ::Number[, F10ₐ::Number, F10::Number, ap::Union{Number, AbstractVector}]; kwargs...) -> Nrlmsise00Output{Float64}
nrlmsise00(jd::Number, h::Number, ϕ_gd::Number, λ::Number[, F10ₐ::Number, F10::Number, ap::Union{Number, AbstractVector}]; kwargs...) -> Nrlmsise00Output{Float64}
Compute the atmospheric density using the NRLMSISE-00 model.
If we omit all space indices, the system tries to obtain them automatically for the selected day jd
or instant
. However, the indices must be already initialized using the function SpaceIndices.init()
.
Arguments
instant::DateTime
: Instant to compute the model represent usingDateTime
.jd::Number
: Julian day to compute the model.h::Number
: Altitude [m].ϕ_gd::Number
: Geodetic latitude [rad].λ::Number
: Longitude [rad].F10ₐ::Number
: 10.7-cm averaged solar flux, 90-day centered on input time [sfu].F10::Number
: 10.7-cm solar flux [sfu].ap::Union{Number, AbstractVector}
: Magnetic index, see the section AP for more information.
Keywords
flags::Nrlmsise00Flags
: A list of flags to configure the model. For more information, see [Nrlmsise00Flags
]@(ref). (Default =Nrlmsise00Flags()
)include_anomalous_oxygen::Bool
: Iftrue
, the anomalous oxygen density will be included in the total density computation. (Default =true
)P::Union{Nothing, Matrix}
: If the user passes a matrix with dimensions equal to or greater than 8 × 4, it will be used when computing the Legendre associated functions, reducing allocations and improving the performance. If it isnothing
, the matrix is allocated inside the function. (Defaultnothing
)
Returns
Nrlmsise00Output{Float64}
: Structure containing the results obtained from the model.
AP
The input variable ap
contains the magnetic index. It can be a Number
or an AbstractVector
.
If ap
is a number, it must contain the daily magnetic index.
If ap
is an AbstractVector
, it must be a vector with 7 dimensions as described below:
Index | Description |
---|---|
1 | Daily AP. |
2 | 3 hour AP index for current time. |
3 | 3 hour AP index for 3 hours before current time. |
4 | 3 hour AP index for 6 hours before current time. |
5 | 3 hour AP index for 9 hours before current time. |
6 | Average of eight 3 hour AP indices from 12 to 33 hours prior to current time. |
7 | Average of eight 3 hour AP indices from 36 to 57 hours prior to current time. |
Extended Help
- The densities of
O
,H
, andN
are set to0
below72.5 km
. - The exospheric temperature is set to global average for altitudes below
120 km
. The120 km
gradient is left at global average value for altitudes below72.5 km
. - Anomalous oxygen is defined as hot atomic oxygen or ionized oxygen that can become appreciable at high altitudes (
> 500 km
) for some ranges of inputs, thereby affection drag on satellites and debris. We group these species under the term Anomalous Oxygen, since their individual variations are not presently separable with the drag data used to define this model component.
Notes on Input Variables
F10
and F10ₐ
values used to generate the model correspond to the 10.7 cm radio flux at the actual distance of the Earth from the Sun rather than the radio flux at 1 AU. The following site provides both classes of values:
ftp://ftp.ngdc.noaa.gov/STP/SOLAR_DATA/SOLAR_RADIO/FLUX/
F10
, F10ₐ
, and ap
effects are neither large nor well established below 80 km and these parameters should be set to 150, 150, and 4 respectively.
If include_anomalous_oxygen
is false
, the total_density
field in the output is the sum of the mass densities of the species He
, O
, N₂
, O₂
, Ar
, H
, and N
, but does not include anomalous oxygen.
If include_anomalous_oxygen
is false
, the total_density
field in the output is the effective total mass density for drag and is the sum of the mass densities of all species in this model including the anomalous oxygen.