ARTS 2.5.11 (git: 725533f0)
|
Classes | |
struct | ColatitudeConversion |
Converts latitude to co-latitude with a small distance from the poles and flags if this was activated. More... | |
struct | SphericalField |
Stores the up (U), south (S), east (E) values of a field relative to the sphere. More... | |
Typedefs | |
using | MatrixOfSphericalField = Grid< SphericalField, 2 > |
Holds a SphericalField for multiple dimensions (radius times longitudes) | |
Functions | |
constexpr Numeric | longitude_clamp (const Numeric lon) |
Clamps the longitude in the range [-180, 180) | |
std::pair< Matrix, Matrix > | schmidt (const Numeric theta, const Index nmax) ARTS_NOEXCEPT |
Returns the Schmidt normalized Lagrange polynominal and its derivative. | |
SphericalField | schmidt_fieldcalc (const Matrix &g, const Matrix &h, const Numeric r0, const Numeric r, const Numeric lat, const Numeric lon) ARTS_NOEXCEPT |
Computes the spherical field. | |
MatrixOfSphericalField | schmidt_fieldcalc (const Matrix &g, const Matrix &h, const Numeric r0, const Vector &r, const Numeric lat, const Vector &lon) ARTS_NOEXCEPT |
Computes the spherical field for many radius and longitudes. | |
std::array< Numeric, 3 > | to_geodetic (const std::array< Numeric, 3 > xyz, const std::array< Numeric, 2 > ell) noexcept |
Computes the altitude, latitude and longitude in relation to the ellopsiod using non-iterative method. | |
using Legendre::MatrixOfSphericalField = typedef Grid<SphericalField, 2> |
Holds a SphericalField for multiple dimensions (radius times longitudes)
Definition at line 25 of file legendre.h.
|
constexpr |
Clamps the longitude in the range [-180, 180)
Definition at line 20 of file legendre.cc.
References longitude_clamp().
Referenced by longitude_clamp(), schmidt_fieldcalc(), and schmidt_fieldcalc().
std::pair< Matrix, Matrix > Legendre::schmidt | ( | const Numeric | theta, |
const Index | nmax | ||
) |
Returns the Schmidt normalized Lagrange polynominal and its derivative.
The derivative is undefined if theta is 0 or pi, so the function cannot be called with these values
This function is taken from the implementation by Isabela de Oliveira Martins at https://github.com/de-oliveira/IsabelaFunctions/blob/master/IsabelaFunctions/fieldmodel.py (2021-05-06). It implements the calculations step-by-step, updating both main and derivative based on previous values.
[in] | theta | Colatitude in radians |
[in] | nmax | Max number of n |
Definition at line 45 of file legendre.cc.
References ARTS_ASSERT, Constant::pi, and Math::pow2().
Referenced by schmidt_fieldcalc(), and schmidt_fieldcalc().
SphericalField Legendre::schmidt_fieldcalc | ( | const Matrix & | g, |
const Matrix & | h, | ||
const Numeric | r0, | ||
const Numeric | r, | ||
const Numeric | lat, | ||
const Numeric | lon | ||
) |
Computes the spherical field.
If latitude is beyond a limit, the longitude is set to zero and the latitude at the limit away from the pole is used. For these position, the absolute of the horizontal component is kept around in the south-facing component and the east-facing component is set to zero
The latitude limit is defined in the ColatitudeConversion struct.
The longitude is constrained to the range [-180, 180) to have consistent behavior at the daytime border.
This function is taken from the implementation by Isabela de Oliveira Martins at https://github.com/de-oliveira/IsabelaFunctions/blob/master/IsabelaFunctions/fieldmodel.py (2021-05-06).
[in] | g | A N x N matrix of g-coefficients |
[in] | h | A N x N matrix of h-coefficients |
[in] | r0 | The reference radius (spherical) |
[in] | r | The actual radius (spherical) |
[in] | lat | The latitude (spherical) |
[in] | lon | The longitude (spherical) |
Definition at line 104 of file legendre.cc.
References ARTS_ASSERT, Conversion::cosd(), Legendre::SphericalField::E, longitude_clamp(), Legendre::SphericalField::S, schmidt(), Conversion::sind(), Legendre::SphericalField::total_horizontal(), and Legendre::SphericalField::U.
Referenced by IGRF::compute_impl().
MatrixOfSphericalField Legendre::schmidt_fieldcalc | ( | const Matrix & | g, |
const Matrix & | h, | ||
const Numeric | r0, | ||
const Vector & | r, | ||
const Numeric | lat, | ||
const Vector & | lon | ||
) |
Computes the spherical field for many radius and longitudes.
See purely Numeric implementation for more information.
[in] | g | A N x N matrix of g-coefficients |
[in] | h | A N x N matrix of h-coefficients |
[in] | r0 | The reference radius (spherical) |
[in] | r | The actual radius (spherical) |
[in] | lat | The latitude (spherical) |
[in] | lon | The longitude (spherical) |
Definition at line 156 of file legendre.cc.
References ARTS_ASSERT, Conversion::cosd(), Legendre::SphericalField::E, longitude_clamp(), Legendre::SphericalField::S, schmidt(), Conversion::sind(), Legendre::SphericalField::total_horizontal(), and Legendre::SphericalField::U.
|
noexcept |
Computes the altitude, latitude and longitude in relation to the ellopsiod using non-iterative method.
Definition at line 231 of file legendre.cc.
References a, Conversion::atan2d(), b, c, Math::pow2(), Math::pow3(), and Math::pow4().