casa
5.7.0-16
|
This class implements opacity/atmospheric brightness temperature model equivalent to the model available in MIRIAD. More...
#include <ATAtmosphere.h>
Public Member Functions | |
ATAtmosphere (Double wvScale=1540., Double maxAlt=10000.0, Int nLayers=50) | |
Default Constructor (apart from optional parameters). More... | |
ATAtmosphere (Double temperature, Double pressure, Double humidity, Double lapseRate=0.0065, Double wvScale=1540., Double maxAlt=10000.0, Int nLayers=50) | |
Constructor with explicitly given parameters of the atmosphere. More... | |
void | setWeather (Double temperature, Double pressure, Double humidity) |
Set the new weather station data, recompute the model. More... | |
void | setObservatoryElevation (Double elev) |
Set the elevation of the observatory (height above mean sea level) More... | |
Double | zenithOpacity (Double freq) const |
Calculate zenith opacity at the given frequency. More... | |
Vector< Double > | zenithOpacities (const Vector< Double > &freqs) const |
Calculate zenith opacity for the range of frequencies. More... | |
Double | opacity (Double freq, Double el) const |
Calculate opacity at the given frequency and elevation. More... | |
Vector< Double > | opacities (const Vector< Double > &freqs, Double el) const |
Calculate opacities for the range of frequencies at the given elevation. More... | |
Protected Member Functions | |
void | recomputeAtmosphereModel () |
Build the atmosphere model based on exponential fall-off, ideal gas and hydrostatic equilibrium. More... | |
Int | nLayers () const |
Obtain the number of model layers, do consistency check that everything is resized accordingly number of model layers. More... | |
Static Protected Member Functions | |
static Double | wvSaturationPressure (Double temperature) |
Determine the saturation pressure of water vapour for the given temperature. More... | |
static DComplex | dryRefractivity (Double freq, Double temperature, Double pDry, Double pVapour) |
Compute the complex refractivity of the dry components of the atmosphere (oxygen lines) at the given frequency. More... | |
static DComplex | vapourRefractivity (Double freq, Double temperature, Double pDry, Double pVapour) |
Compute the complex refractivity of the water vapour monomers at the given frequency. More... | |
Private Attributes | |
Vector< Double > | itsHeights |
heights of all model layers More... | |
Vector< Double > | itsTemperatures |
temperatures of all model layers More... | |
Vector< Double > | itsDryPressures |
partial pressures of dry component for all model layers More... | |
Vector< Double > | itsVapourPressures |
partial pressure of water vapour for all model layers More... | |
Double | itsGndTemperature |
Atmosphere parameters. More... | |
Double | itsPressure |
sea level pressure (Pascals) More... | |
Double | itsGndHumidity |
ground level humidity (fraction) More... | |
Double | itsLapseRate |
lapse rate (K/m) More... | |
Double | itsWVScale |
water vapour scale height (m) More... | |
Double | itsMaxAlt |
altitude of the highest layer of the model (m) More... | |
Double | itsObsHeight |
observatory elevation (m) More... | |
This class implements opacity/atmospheric brightness temperature model equivalent to the model available in MIRIAD.
The actual math is a conversion of the Fortran code written by Bob Sault for MIRIAD. It implements a simple model of the atmosphere and Liebe's model (1985) of the complex refractive index of air.
The model of the atmosphere is one with an exponential fall-off in the water vapour content (scale height of 1540 m) and a temperature lapse rate of 6.5 mK/m. Otherwise the atmosphere obeys the ideal gas equation and hydrostatic equilibrium.
Note, the model includes atmospheric lines up to 800 GHz, but was not rigorously tested above 100 GHz and for instruments located at a significant elevation. For high-elevation sites it may be necessary to adjust scale height and lapse rate.
The ASAP atmosphere opacity model
Definition at line 60 of file ATAtmosphere.h.
|
explicit |
Default Constructor (apart from optional parameters).
The class set up this way will assume International Standard Atmosphere (ISA) conditions, except for humidity. The latter is assumed to be 50%, which seems more realistic for Australian telescopes than 0%.
[in] | wvScale | water vapour scale height (m), default is 1540m to match MIRIAD's model |
[in] | maxAlt | maximum altitude of the model atmosphere (m), plane parallel layers are spread linearly up to this height, default is 10000m to match MIRIAD. |
[in] | nLayers | number of plane parallel layers in the model (essentially for a numberical integration), default is 50 to match MIRIAD. |
casa::ATAtmosphere::ATAtmosphere | ( | Double | temperature, |
Double | pressure, | ||
Double | humidity, | ||
Double | lapseRate = 0.0065 , |
||
Double | wvScale = 1540. , |
||
Double | maxAlt = 10000.0 , |
||
Int | nLayers = 50 |
||
) |
Constructor with explicitly given parameters of the atmosphere.
[in] | temperature | air temperature at the observatory (K) |
[in] | pressure | air pressure at the sea level if the observatory elevation is set to non-zero value (note, by default is set to 200m) or at the observatory ground level if the elevation is set to 0. (The value is in Pascals) |
[in] | pressure | air pressure at the observatory (Pascals) |
[in] | humidity | air humidity at the observatory (fraction) |
[in] | lapseRate | temperature lapse rate (K/m), default is 0.0065 K/m to match MIRIAD and ISA |
[in] | wvScale | water vapour scale height (m), default is 1540m to match MIRIAD's model |
[in] | maxAlt | maximum altitude of the model atmosphere (m), plane parallel layers are spread linearly up to this height, default is 10000m to match MIRIAD. |
[in] | nLayers | number of plane parallel layers in the model (essentially for a numberical integration), default is 50 to match MIRIAD. |
|
staticprotected |
Compute the complex refractivity of the dry components of the atmosphere (oxygen lines) at the given frequency.
[in] | freq | frequency (Hz) |
[in] | temperature | air temperature (K) |
[in] | pDry | partial pressure of dry components (Pascals) |
[in] | pVapour | partial pressure of water vapour (Pascals) |
Reference: Liebe, An updated model for millimeter wave propogation in moist air, Radio Science, 20, 1069-1089 (1985).
|
protected |
Obtain the number of model layers, do consistency check that everything is resized accordingly number of model layers.
Calculate opacities for the range of frequencies at the given elevation.
Same as opacity, but for a Vector of frequencies.
[in] | freqs | Vector of frequencies in Hz |
[in] | el | elevation in radians |
Calculate opacity at the given frequency and elevation.
This is a simplified version of the routine implemented in MIRIAD, which calculates just the opacity and nothing else. In contract to zenithOpacity, this method takes into account refraction and is more accurate than if one assumes 1/sin(el) factor.
[in] | freq | frequency of interest in Hz |
[in] | el | elevation in radians |
|
protected |
Build the atmosphere model based on exponential fall-off, ideal gas and hydrostatic equilibrium.
The model parameters are taken from the data members of this class.
void casa::ATAtmosphere::setObservatoryElevation | ( | Double | elev | ) |
Set the elevation of the observatory (height above mean sea level)
The observatory elevation affects only interpretation of the pressure supplied as part of the weather data, if this value is non-zero, the pressure (e.g. in setWeather or constructor) is that at mean sea level. If the observatory elevation is set to zero, regardless on real elevation, the pressure is that at the observatory ground level.
By default, 200m is assumed.
[in] | elev | elevation in metres |
Set the new weather station data, recompute the model.
[in] | temperature | air temperature at the observatory (K) |
[in] | pressure | air pressure at the sea level if the observatory elevation is set to non-zero value (note, by default is set to 200m) or at the observatory ground level if the elevation is set to 0. (The value is in Pascals) |
[in] | humidity | air humidity at the observatory (fraction) |
|
staticprotected |
Compute the complex refractivity of the water vapour monomers at the given frequency.
[in] | freq | frequency (Hz) |
[in] | temperature | air temperature (K) |
[in] | pDry | partial pressure of dry components (Pascals) |
[in] | pVapour | partial pressure of water vapour (Pascals) |
Reference: Liebe, An updated model for millimeter wave propogation in moist air, Radio Science, 20, 1069-1089 (1985).
Determine the saturation pressure of water vapour for the given temperature.
Reference: Waters, Refraction effects in the neutral atmosphere. Methods of Experimental Physics, vol 12B, p 186-200 (1976).
[in] | temperature | temperature in K |
Calculate zenith opacity for the range of frequencies.
Same as zenithOpacity, but for a Vector of frequencies.
[in] | freqs | Vector of frequencies in Hz |
Calculate zenith opacity at the given frequency.
This is a simplified version of the routine implemented in MIRIAD, which calculates just zenith opacity and nothing else. Note, that if the opacity is high, 1/sin(el) law is not correct even in the plane parallel case due to refraction.
[in] | freq | frequency of interest in Hz |
partial pressures of dry component for all model layers
Definition at line 221 of file ATAtmosphere.h.
|
private |
ground level humidity (fraction)
Definition at line 237 of file ATAtmosphere.h.
|
private |
heights of all model layers
Definition at line 215 of file ATAtmosphere.h.
|
private |
lapse rate (K/m)
Definition at line 240 of file ATAtmosphere.h.
|
private |
altitude of the highest layer of the model (m)
Definition at line 246 of file ATAtmosphere.h.
|
private |
observatory elevation (m)
Definition at line 249 of file ATAtmosphere.h.
|
private |
sea level pressure (Pascals)
Definition at line 234 of file ATAtmosphere.h.
temperatures of all model layers
Definition at line 218 of file ATAtmosphere.h.
partial pressure of water vapour for all model layers
Definition at line 224 of file ATAtmosphere.h.
|
private |
water vapour scale height (m)
Definition at line 243 of file ATAtmosphere.h.