Documentation
¶
Overview ¶
Package atmosphere models Earth’s air from its physical state: temperature, pressure, and density with height, and the scattering of light along a path. Coefficients identify their sources rather than supplying a sky colour chosen by eye. The package builds on measure.
Index ¶
- type Air
- type Column
- type Composition
- func (air Composition) CrossSection(wavelength measure.Length) (*measure.Area, error)
- func (air Composition) Depth(column Column, wavelength measure.Length) (*float64, error)
- func (air Composition) DepthAbove(wavelength measure.Length, pressure Pressure, latitude measure.Angle, ...) (*float64, error)
- func (air Composition) Skylight(height measure.Length, view, sun Way, wavelengths []measure.Length) ([]float64, error)
- func (air Composition) Through(column Column, wavelength measure.Length) (*float64, error)
- type Density
- type Pressure
- type Way
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Air ¶
type Air struct {
// contains filtered or unexported fields
}
Air stores local temperature, pressure, and mass density.
func Standard ¶
Standard returns the 1976 standard atmosphere from sea level to 86 km geometric height. Out-of-range input returns an error.
func (Air) Temperature ¶
func (air Air) Temperature() measure.Temperature
Temperature returns local air temperature.
type Column ¶
type Column struct {
// contains filtered or unexported fields
}
Column stores the molecular column density along a path and whether that path reaches the ground.
func Along ¶
Along integrates air along a straight path from height at elevation rise, ending at the ground or the standard atmosphere’s top. Refraction is not modelled. Heights outside the standard return an error and no column.
type Composition ¶
type Composition struct {
// contains filtered or unexported fields
}
Composition describes the dry-air mixture used for Rayleigh scattering, parameterized by its carbon-dioxide fraction.
func DryAir ¶
func DryAir(partsAMillion float64) (*Composition, error)
DryAir constructs dry-air composition from CO2 in parts per million. Values outside the fraction from zero to one million ppm return an error.
func (Composition) CrossSection ¶
CrossSection returns molecular Rayleigh scattering area from Bodhaine et al.’s equation 22. Wavelengths outside the refractive index model’s supported interval return an error.
func (Composition) Depth ¶
Depth returns Rayleigh optical depth through a column at the given wavelength. Unsupported wavelengths return CrossSection’s error.
func (Composition) DepthAbove ¶
func (air Composition) DepthAbove(wavelength measure.Length, pressure Pressure, latitude measure.Angle, height measure.Length) (*float64, error)
DepthAbove returns vertical Rayleigh optical depth using local pressure and Bodhaine et al.’s equation 25. Gravity is evaluated at the column’s mass-weighted height, following equation 26. Unsupported wavelengths return CrossSection’s error.
func (Composition) Skylight ¶
func (air Composition) Skylight(height measure.Length, view, sun Way, wavelengths []measure.Length) ([]float64, error)
Skylight returns spectral sky radiance along a look from height, normalized per W/m² of incoming sunlight from the Sun direction. For that unit illumination, radiance is in W m^-2 sr^-1.
The single-scattering model attenuates sunlight to each path sample, applies the unpolarized Rayleigh phase function, and attenuates scattered light back toward the observer. Earth-blocked samples receive no direct sunlight.
Multiple scattering, ground reflection, haze, ozone, refraction, and depolarization are omitted. Depolarization changes the phase function by less than about 1.5%.
Unsupported heights and wavelengths return errors from the standard atmosphere or CrossSection.
type Density ¶
type Density struct {
// contains filtered or unexported fields
}
Density represents mass per volume.
func (Density) InKilogramsPerCubicMetre ¶
InKilogramsPerCubicMetre returns density in kg/m³.
type Pressure ¶
type Pressure struct {
// contains filtered or unexported fields
}
Pressure represents pressure.