casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Private Attributes | List of all members
casa::ATAtmosphere Class Reference

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< DoublezenithOpacities (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< Doubleopacities (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< DoubleitsHeights
 heights of all model layers More...
 
Vector< DoubleitsTemperatures
 temperatures of all model layers More...
 
Vector< DoubleitsDryPressures
 partial pressures of dry component for all model layers More...
 
Vector< DoubleitsVapourPressures
 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...
 

Detailed Description

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

Author
Max Voronkov
Date
Date:
2010-03-17 14:55:17 +1000 (Thu, 26 Apr 2007)
Version

Definition at line 60 of file ATAtmosphere.h.

Constructor & Destructor Documentation

casa::ATAtmosphere::ATAtmosphere ( Double  wvScale = 1540.,
Double  maxAlt = 10000.0,
Int  nLayers = 50 
)
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%.

Parameters
[in]wvScalewater vapour scale height (m), default is 1540m to match MIRIAD's model
[in]maxAltmaximum altitude of the model atmosphere (m), plane parallel layers are spread linearly up to this height, default is 10000m to match MIRIAD.
[in]nLayersnumber 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.

Parameters
[in]temperatureair temperature at the observatory (K)
[in]pressureair 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]pressureair pressure at the observatory (Pascals)
[in]humidityair humidity at the observatory (fraction)
[in]lapseRatetemperature lapse rate (K/m), default is 0.0065 K/m to match MIRIAD and ISA
[in]wvScalewater vapour scale height (m), default is 1540m to match MIRIAD's model
[in]maxAltmaximum altitude of the model atmosphere (m), plane parallel layers are spread linearly up to this height, default is 10000m to match MIRIAD.
[in]nLayersnumber of plane parallel layers in the model (essentially for a numberical integration), default is 50 to match MIRIAD.

Member Function Documentation

static DComplex casa::ATAtmosphere::dryRefractivity ( Double  freq,
Double  temperature,
Double  pDry,
Double  pVapour 
)
staticprotected

Compute the complex refractivity of the dry components of the atmosphere (oxygen lines) at the given frequency.

Parameters
[in]freqfrequency (Hz)
[in]temperatureair temperature (K)
[in]pDrypartial pressure of dry components (Pascals)
[in]pVapourpartial pressure of water vapour (Pascals)
Returns
complex refractivity

Reference: Liebe, An updated model for millimeter wave propogation in moist air, Radio Science, 20, 1069-1089 (1985).

Int casa::ATAtmosphere::nLayers ( ) const
protected

Obtain the number of model layers, do consistency check that everything is resized accordingly number of model layers.

Vector<Double> casa::ATAtmosphere::opacities ( const Vector< Double > &  freqs,
Double  el 
) const

Calculate opacities for the range of frequencies at the given elevation.

Same as opacity, but for a Vector of frequencies.

Parameters
[in]freqsVector of frequencies in Hz
[in]elelevation in radians
Returns
Vector of opacities, one value per frequency (nepers, i.e. dimensionless)
Double casa::ATAtmosphere::opacity ( Double  freq,
Double  el 
) const

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.

Parameters
[in]freqfrequency of interest in Hz
[in]elelevation in radians
Returns
zenith opacity (nepers, i.e. dimensionless)
void casa::ATAtmosphere::recomputeAtmosphereModel ( )
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.

Parameters
[in]elevelevation in metres
void casa::ATAtmosphere::setWeather ( Double  temperature,
Double  pressure,
Double  humidity 
)

Set the new weather station data, recompute the model.

Parameters
[in]temperatureair temperature at the observatory (K)
[in]pressureair 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]humidityair humidity at the observatory (fraction)
static DComplex casa::ATAtmosphere::vapourRefractivity ( Double  freq,
Double  temperature,
Double  pDry,
Double  pVapour 
)
staticprotected

Compute the complex refractivity of the water vapour monomers at the given frequency.

Parameters
[in]freqfrequency (Hz)
[in]temperatureair temperature (K)
[in]pDrypartial pressure of dry components (Pascals)
[in]pVapourpartial pressure of water vapour (Pascals)
Returns
complex refractivity

Reference: Liebe, An updated model for millimeter wave propogation in moist air, Radio Science, 20, 1069-1089 (1985).

static Double casa::ATAtmosphere::wvSaturationPressure ( Double  temperature)
staticprotected

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).

Parameters
[in]temperaturetemperature in K
Returns
vapour saturation pressure (Pascals)
Vector<Double> casa::ATAtmosphere::zenithOpacities ( const Vector< Double > &  freqs) const

Calculate zenith opacity for the range of frequencies.

Same as zenithOpacity, but for a Vector of frequencies.

Parameters
[in]freqsVector of frequencies in Hz
Returns
Vector of zenith opacities, one value per frequency (nepers, i.e. dimensionless)
Double casa::ATAtmosphere::zenithOpacity ( Double  freq) const

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.

Parameters
[in]freqfrequency of interest in Hz
Returns
zenith opacity (nepers, i.e. dimensionless)

Member Data Documentation

Vector<Double> casa::ATAtmosphere::itsDryPressures
private

partial pressures of dry component for all model layers

Definition at line 221 of file ATAtmosphere.h.

Double casa::ATAtmosphere::itsGndHumidity
private

ground level humidity (fraction)

Definition at line 237 of file ATAtmosphere.h.

Double casa::ATAtmosphere::itsGndTemperature
private

Atmosphere parameters.

ground level temperature (K)

Definition at line 231 of file ATAtmosphere.h.

Vector<Double> casa::ATAtmosphere::itsHeights
private

heights of all model layers

Definition at line 215 of file ATAtmosphere.h.

Double casa::ATAtmosphere::itsLapseRate
private

lapse rate (K/m)

Definition at line 240 of file ATAtmosphere.h.

Double casa::ATAtmosphere::itsMaxAlt
private

altitude of the highest layer of the model (m)

Definition at line 246 of file ATAtmosphere.h.

Double casa::ATAtmosphere::itsObsHeight
private

observatory elevation (m)

Definition at line 249 of file ATAtmosphere.h.

Double casa::ATAtmosphere::itsPressure
private

sea level pressure (Pascals)

Definition at line 234 of file ATAtmosphere.h.

Vector<Double> casa::ATAtmosphere::itsTemperatures
private

temperatures of all model layers

Definition at line 218 of file ATAtmosphere.h.

Vector<Double> casa::ATAtmosphere::itsVapourPressures
private

partial pressure of water vapour for all model layers

Definition at line 224 of file ATAtmosphere.h.

Double casa::ATAtmosphere::itsWVScale
private

water vapour scale height (m)

Definition at line 243 of file ATAtmosphere.h.


The documentation for this class was generated from the following file: