casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ATAtmosphere.h
Go to the documentation of this file.
1 //# ATAtmosphere.h: Model of atmospheric opacity
2 //# Copyright (C) 2004
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //#---------------------------------------------------------------------------
27 
28 #ifndef ATNF_ATATMOSPHERE_H
29 #define ATNF_ATATMOSPHERE_H
30 
31 // includes
32 #include <casa/aips.h>
33 #include <casa/Arrays/Vector.h>
34 //#include <complex>
35 #include <casa/namespace.h>
36 namespace casa {
37 
60 class ATAtmosphere {
61 public:
73  explicit ATAtmosphere(Double wvScale = 1540., Double maxAlt = 10000.0, Int nLayers = 50);
74 
90  ATAtmosphere(Double temperature, Double pressure, Double humidity, Double lapseRate = 0.0065,
91  Double wvScale = 1540., Double maxAlt = 10000.0, Int nLayers = 50);
92 
101  void setWeather(Double temperature, Double pressure, Double humidity);
102 
114  void setObservatoryElevation(Double elev);
115 
124  Double zenithOpacity(Double freq) const;
125 
132  Vector<Double> zenithOpacities(const Vector<Double> &freqs) const;
133 
143  Double opacity(Double freq, Double el) const;
144 
152  Vector<Double> opacities(const Vector<Double> &freqs, Double el) const;
153 
154 protected:
160 
166  Int nLayers() const;
167 
178  static Double wvSaturationPressure(Double temperature);
179 
193  static DComplex dryRefractivity(Double freq, Double temperature,
194  Double pDry, Double pVapour);
195 
209  static DComplex vapourRefractivity(Double freq, Double temperature,
210  Double pDry, Double pVapour);
211 
212 private:
213 
214  // heights of all model layers
216 
217  // temperatures of all model layers
219 
220  // partial pressures of dry component for all model layers
222 
223  // partial pressure of water vapour for all model layers
225 
230  // ground level temperature (K)
232 
233  // sea level pressure (Pascals)
235 
236  // ground level humidity (fraction)
238 
239  // lapse rate (K/m)
241 
242  // water vapour scale height (m)
244 
245  // altitude of the highest layer of the model (m)
247 
248  // observatory elevation (m)
250 };
251 
252 } // namespace casa
253 
254 #endif // #ifndef ATNF_ATATMOSPHERE_H
255 
void setWeather(Double temperature, Double pressure, Double humidity)
Set the new weather station data, recompute the model.
int Int
Definition: aipstype.h:50
Double itsWVScale
water vapour scale height (m)
Definition: ATAtmosphere.h:243
Double itsLapseRate
lapse rate (K/m)
Definition: ATAtmosphere.h:240
Vector< Double > itsTemperatures
temperatures of all model layers
Definition: ATAtmosphere.h:218
Double itsGndTemperature
Atmosphere parameters.
Definition: ATAtmosphere.h:231
Double itsObsHeight
observatory elevation (m)
Definition: ATAtmosphere.h:249
This class implements opacity/atmospheric brightness temperature model equivalent to the model availa...
Definition: ATAtmosphere.h:60
ATAtmosphere(Double wvScale=1540., Double maxAlt=10000.0, Int nLayers=50)
Default Constructor (apart from optional parameters).
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 ...
Vector< Double > itsHeights
heights of all model layers
Definition: ATAtmosphere.h:215
static DComplex vapourRefractivity(Double freq, Double temperature, Double pDry, Double pVapour)
Compute the complex refractivity of the water vapour monomers at the given frequency.
void recomputeAtmosphereModel()
Build the atmosphere model based on exponential fall-off, ideal gas and hydrostatic equilibrium...
Vector< Double > zenithOpacities(const Vector< Double > &freqs) const
Calculate zenith opacity for the range of frequencies.
void setObservatoryElevation(Double elev)
Set the elevation of the observatory (height above mean sea level)
double Double
Definition: aipstype.h:55
Double itsGndHumidity
ground level humidity (fraction)
Definition: ATAtmosphere.h:237
Vector< Double > itsVapourPressures
partial pressure of water vapour for all model layers
Definition: ATAtmosphere.h:224
Double zenithOpacity(Double freq) const
Calculate zenith opacity at the given frequency.
Double opacity(Double freq, Double el) const
Calculate opacity at the given frequency and elevation.
Double itsPressure
sea level pressure (Pascals)
Definition: ATAtmosphere.h:234
Vector< Double > itsDryPressures
partial pressures of dry component for all model layers
Definition: ATAtmosphere.h:221
static Double wvSaturationPressure(Double temperature)
Determine the saturation pressure of water vapour for the given temperature.
Vector< Double > opacities(const Vector< Double > &freqs, Double el) const
Calculate opacities for the range of frequencies at the given elevation.
Int nLayers() const
Obtain the number of model layers, do consistency check that everything is resized accordingly numbe...
Double itsMaxAlt
altitude of the highest layer of the model (m)
Definition: ATAtmosphere.h:246