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

Class for an atmospheric profile object. More...

#include <ATMProfile.h>

Inheritance diagram for AtmProfile:
RefractiveIndexProfile SkyStatus

Public Member Functions

 AtmProfile (unsigned int n)
 A constructor of an empty profile with n layers, that can be filled up later. More...
 
 AtmProfile (const Length &altitude, const Pressure &groundPressure, const Temperature &groundTemperature, double tropoLapseRate, const Humidity &relativeHumidity, const Length &wvScaleHeight, const Pressure &pressureStep, double pressureStepFactor, const Length &topAtmProfile, unsigned int atmType)
 A long constructor of the atmospheric profile from the basic set of parameters described above. More...
 
 AtmProfile (const Length &altitude, const Pressure &groundPressure, const Temperature &groundTemperature, double tropoLapseRate, const Humidity &relativeHumidity, const Length &wvScaleHeight, const Pressure &pressureStep, double pressureStepFactor, const Length &topAtmProfile, unsigned int atmType, const vector< Length > &v_layerBoundaries, const vector< Temperature > &v_layerTemperature)
 A long constructor of the atmospheric profile from the basic set of parameters described above which, in addition, includes user-defined temperature profile. More...
 
 AtmProfile (const Length &altitude, const Pressure &groundPressure, const Temperature &groundTemperature, double tropoLapseRate, const Humidity &relativeHumidity, const Length &wvScaleHeight, unsigned int atmType)
 A long constructor of the atmospheric profile from the basic set of parameters described above. More...
 
 AtmProfile (const Length &altitude, const vector< Length > &v_layerThickness, const vector< Pressure > &v_layerPressure, const vector< Temperature > &v_layerTemperature, const vector< MassDensity > &v_layerWaterVapor)
 The user provides his own atmospheric profile (basic one: four vectors for layer thickness in m, average pressure in each layer in mb, average temperature in each layer in K, and average water vapor density in each layer in kg/m**3). More...
 
 AtmProfile (const vector< Length > &v_layerBoundaries, const vector< Pressure > &v_layerPressure, const vector< Temperature > &v_layerTemperature, const vector< MassDensity > &v_layerWaterVapor)
 
 AtmProfile (const Length &altitude, const vector< Length > &v_layerThickness, const vector< Pressure > &v_layerPressure, const vector< Temperature > &v_layerTemperature, const vector< NumberDensity > &v_layerWaterVapor)
 
 AtmProfile (const vector< Length > &v_layerBoundaries, const vector< Pressure > &v_layerPressure, const vector< Temperature > &v_layerTemperature, const vector< NumberDensity > &v_layerWaterVapor)
 
 AtmProfile (const Length &altitude, const vector< Length > &v_layerThickness, const vector< Pressure > &v_layerPressure, const vector< Temperature > &v_layerTemperature, const vector< MassDensity > &v_layerWaterVapor, const vector< NumberDensity > &v_layerO3)
 The user provides his own atmospheric profile (in this case five vectors for layer thickness in m, average pressure in each layer in mb, average temperature in each layer in K, average water vapor density in each layer in kg/m**3, and average ozone number density in each layer in molecules/m**3) QUESTION: SHOULD CO and N2O, NO2, SO2 PROFILES BE FILLED UP INTERNALLY FROM A STANDARD ATMOSPHERE OR LEFT ITS ABUNDANCES EQUAL TO ZERO ? More...
 
 AtmProfile (const Length &altitude, const vector< Length > &v_layerThickness, const vector< Pressure > &v_layerPressure, const vector< Temperature > &v_layerTemperature, const vector< NumberDensity > &v_layerWaterVapor, const vector< NumberDensity > &v_layerO3)
 
 AtmProfile (const Length &altitude, const vector< Length > &v_layerThickness, const vector< Pressure > &v_layerPressure, const vector< Temperature > &v_layerTemperature, const vector< MassDensity > &v_layerWaterVapor, const vector< NumberDensity > &v_layerO3, const vector< NumberDensity > &v_layerCO, const vector< NumberDensity > &v_layerN2O, const vector< NumberDensity > &v_layerNO2, const vector< NumberDensity > &v_layerSO2)
 The user provides his own atmospheric profile (in this case seven vectors for layer thickness in m, average pressure in each layer in mb, average temperature in each layer in K, average water vapor density in each layer in kg/m**3, average ozone number density in each layer in molecules/m**3, average CO number density in each layer in molecules/m**3, average N2O, NO2, SO2 number density in each layer in molecules/m**3) More...
 
 AtmProfile (const Length &altitude, const vector< Length > &v_layerThickness, const vector< Pressure > &v_layerPressure, const vector< Temperature > &v_layerTemperature, const vector< NumberDensity > &v_layerWaterVapor, const vector< NumberDensity > &v_layerO3, const vector< NumberDensity > &v_layerCO, const vector< NumberDensity > &v_layerN2O, const vector< NumberDensity > &v_layerNO2, const vector< NumberDensity > &v_layerSO2)
 
 AtmProfile (const AtmProfile &a)
 
virtual ~AtmProfile ()
 
bool setBasicAtmosphericParameters (const Length &altitude, const Pressure &groundPressure, const Temperature &groundTemperature, double tropoLapseRate, const Humidity &relativeHumidity, const Length &wvScaleHeight)
 Setter to update the AtmProfile if some basic atmospheric parameter has changed. More...
 
string getAtmosphereType () const
 Accessor to the type of current atmosphere. More...
 
Temperature getGroundTemperature () const
 Accessor to the current Ground Temperature used in the object. More...
 
double getTropoLapseRate () const
 Accessor to the current Tropospheric Lapse Rate used in the object (temperature/length units) More...
 
Pressure getGroundPressure () const
 Accessor to the current Ground Pressure used in the object (pressure units) More...
 
Temperature getTropopauseTemperature () const
 Accessor to the current Tropopause Temperature used in the object. More...
 
Humidity getRelativeHumidity () const
 Accessor to the current Ground Relative Humidity in the object (humidity units) More...
 
Length getWvScaleHeight () const
 Accessor to the current Water Vapor Scale Height in the object (length units) More...
 
Pressure getPressureStep () const
 Accessor to the current Primary Pressure Step in the object. More...
 
Pressure getPressureStepFactor () const
 Accessor to the current Pressure_Step_Factor in the object. More...
 
Length getAltitude () const
 Accessor to the ground altitude of site (length units) More...
 
Length getGroundAltitude () const
 Alternative accessor to the ground altitude of site (length units) More...
 
void setAltitude (const Length &groundaltitude)
 setter for the ground altitude of site (length units). More...
 
Length getTropopauseAltitude () const
 Alternative setter for the ground altitude of site (length units). More...
 
Length getTopAtmProfile () const
 Accessor to the Maximum allowed altitude for the Atmospheric Profile above the site (length units) More...
 
unsigned int getNumLayer () const
 Accessor to the number of layers of the atmospheric profile. More...
 
vector< TemperaturegetTemperatureProfile () const
 Method to access the Temperature Profile. More...
 
Temperature getLayerTemperature (unsigned int i) const
 Method to access the average Temperature in layer i (thickness of layers in ThicknessProfile)

Exceptions
AtmExceptionif the layer is not valid.
More...
 
Temperature getLayerBottomTemperature (unsigned int i) const
 Method to access the Temperature at bottom of layer i (thickness of layers in ThicknessProfile)

Exceptions
AtmExceptionif the layer is not valid.
More...
 
Temperature getLayerTopTemperature (unsigned int i) const
 Method to access the Temperature at top of layer i (thickness of layers in ThicknessProfile)

Exceptions
AtmExceptionif the layer is not valid.
More...
 
void setLayerTemperature (unsigned int i, const Temperature &layerTemperature)
 Setter for the average Temperature in layer i (allows to touch one layer each time once a profile has been defined) More...
 
vector< LengthgetThicknessProfile () const
 Method to retrieve the layer thickness from site altitude upwards. More...
 
Length getLayerThickness (unsigned int i) const
 Method to access the layer thickness of layer i

Exceptions
AtmExceptionif the layer is not valid.
More...
 
void setLayerThickness (unsigned int i, const Length &layerThickness)
 Setter for the thickness of layer i (allows to touch one layer each time once a profile has been defined). More...
 
Length getLayerBottomHeightAboveGround (unsigned int i) const
 void setLayerThickness(const Length &layerThickness, unsigned int i) { setLayerThickness(i, layerThickness); } More...
 
Length getLayerBottomHeightAboveSeaLevel (unsigned int i) const
 Method to access the Bottom Height of layer i above the Sea Level

Exceptions
AtmExceptionif the layer is not valid.
More...
 
Length getLayerTopHeightAboveGround (unsigned int i) const
 Method to access the Top Height of layer i above the Ground

Exceptions
AtmExceptionif the layer is not valid.
More...
 
Length getLayerTopHeightAboveSeaLevel (unsigned int i) const
 Method to access the Top Height of layer i above the Sea Level

Exceptions
AtmExceptionif the layer is not valid.
More...
 
MassDensity getLayerWaterVaporMassDensity (unsigned int i) const
 Function to retrieve Average Water vapor density in a given layer in kg/m**3 (thickness of layers in ThicknessProfile)

Exceptions
AtmExceptionif the layer is not valid.
More...
 
MassDensity getLayerBottomWaterVaporMassDensity (unsigned int i) const
 
MassDensity getLayerTopWaterVaporMassDensity (unsigned int i) const
 
NumberDensity getLayerWaterVaporNumberDensity (unsigned int i) const
 
NumberDensity getLayerBottomWaterVaporNumberDensity (unsigned int i) const
 
NumberDensity getLayerTopWaterVaporNumberDensity (unsigned int i) const
 
void setLayerWaterVaporMassDensity (unsigned int i, const MassDensity &layerWaterVapor)
 Setter for the average Water vapor density in layer i in kg/m**3 (allows to touch one layer each time once a profile has been defined) More...
 
void setLayerWaterVaporNumberDensity (unsigned int i, const NumberDensity &layerWaterVapor)
 void setLayerWaterVaporMassDensity(const MassDensity &layerWaterVapor, unsigned int i) { setLayerWaterVaporMassDensity(i, layerWaterVapor); } More...
 
vector< PressuregetPressureProfile () const
 void setLayerWaterVapor(const NumberDensity &layerWaterVapor, unsigned int i) { setLayerWaterVapor(i, layerWaterVapor); } More...
 
Pressure getLayerPressure (unsigned int i) const
 Method to access the average Pressure in layer i

Exceptions
AtmExceptionif the layer is not valid.
More...
 
Pressure getLayerBottomPressure (unsigned int i) const
 Method to access the Pressure at bottom of layer i

Exceptions
AtmExceptionif the layer is not valid.
More...
 
Pressure getLayerTopPressure (unsigned int i) const
 Method to access the Pressure at top of layer i

Exceptions
AtmExceptionif the layer is not valid.
More...
 
void setLayerPressure (unsigned int i, const Pressure &layerPressure)
 Setter for the average Pressure in layer i (allows to touch one layer each time once a profile has been defined) More...
 
NumberDensity getLayerCO (unsigned int i) const
 void setLayerPressure(const Pressure &layerPressure, unsigned int i) { setLayerPressure(i, layerPressure); } More...
 
void setLayerCO (unsigned int i, const NumberDensity &layerCO)
 Setter for the average number density of CO in layer i in molecules/m**3 (allows to touch one layer each time once a profile has been defined) More...
 
NumberDensity getLayerO3 (unsigned int i) const
 void setLayerCO(const NumberDensity &layerCO, unsigned int i) { setLayerCO(i, layerCO); } More...
 
void setLayerO3 (unsigned int i, const NumberDensity &layerO3)
 Setter for the average number density of O3 in layer i in molecules/m**3 (allows to touch one layer each time once a profile has been defined) More...
 
NumberDensity getLayerN2O (unsigned int i) const
 void setLayerO3(const NumberDensity &layerO3, unsigned int i) { setLayerO3(i, layerO3); } More...
 
void setLayerN2O (unsigned int i, const NumberDensity &layerN2O)
 Setter for the average number density of N2O in layer i in molecules/m**3 (allows to touch one layer each time once a profile has been defined) More...
 
NumberDensity getLayerNO2 (unsigned int i) const
 void setLayerN2O(const NumberDensity &layerN2O, unsigned int i) { setLayerN2O(i, layerN2O); } More...
 
void setLayerNO2 (unsigned int i, const NumberDensity &layerNO2)
 Setter for the average number density of NO2 in layer i in molecules/m**3 (allows to touch one layer each time once a profile has been defined) More...
 
NumberDensity getLayerSO2 (unsigned int i) const
 void setLayerNO2(const NumberDensity &layerNO2, unsigned int i) { setLayerNO2(i, layerNO2); } More...
 
void setLayerSO2 (unsigned int i, const NumberDensity &layerSO2)
 Setter for the average number density of SO2 in layer i in molecules/m**3 (allows to touch one layer each time once a profile has been defined) More...
 
void setBasicAtmosphericParameterThresholds (const Length &altitudeThreshold, const Pressure &groundPressureThreshold, const Temperature &groundTemperatureThreshold, double tropoLapseRateThreshold, const Humidity &relativeHumidityThreshold, const Length &wvScaleHeightThreshold)
 void setLayerSO2(const NumberDensity &layerSO2, unsigned int i) { setLayerSO2(i, layerSO2); } More...
 
Length getGroundWH2O () const
 Method to get the zenith column of water vapor. More...
 
Length getAltitudeThreshold () const
 Thresholds. More...
 
Pressure getGroundPressureThreshold () const
 
Temperature getGroundTemperatureThreshold () const
 
double getTropoLapseRateThreshold () const
 
Humidity getRelativeHumidityThreshold () const
 
Length getWvScaleHeightThreshold () const
 
void setAltitudeThreshold (const Length &altitudeThreshold)
 
void setGroundPressureThreshold (const Pressure &groundPressureThreshold)
 
void setGroundTemperatureThreshold (const Temperature &groundTemperatureThreshold)
 

Static Public Member Functions

static string getAtmosphereType (unsigned int typeAtm)
 Accessor to the type of atmosphere specified by the number. More...
 

Protected Member Functions

 AtmProfile ()
 Default constructor (required if copy constructor in derived classes) More...
 
unsigned int mkAtmProfile ()
 
bool updateAtmProfile (const Length &altitude, const Pressure &groundPressure, const Temperature &groundTemperature, double tropoLapseRate, const Humidity &relativeHumidity, const Length &wvScaleHeight)
 returns error code: <0 unsuccessful More...
 
void initBasicAtmosphericParameterThresholds ()
 

Protected Attributes

unsigned int typeAtm_
 1: tropical, 2: midlatSummer, 3: midlatWinter, 4: subarcticSummer, 5: subarcticWinter More...
 
Temperature groundTemperature_
 Ambient temperature at the site (K) More...
 
double tropoLapseRate_
 tropospheric lapse rate in K/km More...
 
Temperature tropoTemperature_
 Temperature at the tropopause. More...
 
unsigned int tropoLayer_
 Layer where tropopause starts. More...
 
Length tropoAltitude_
 Altitude where tropopause starts. More...
 
Pressure groundPressure_
 Ground pressure at the site. More...
 
Humidity relativeHumidity_
 
Length wvScaleHeight_
 
                          Relative humidity at the site (%)

used only to make an estimate of the water vapor column, first guess) More...

 
Pressure pressureStep_
 Pressure basic step (mb) More...
 
double pressureStepFactor_
 
Length altitude_
 Multiplicative factor for presure steps. More...
 
Length topAtmProfile_
 Top of atmospheric profile (km) More...
 
unsigned int numLayer_
 Total number of layers in the output atmospheric profiles. More...
 
double fractionLast_
 Fraction of last layer needed for some calculations. More...
 
bool newBasicParam_
 
vector< double > v_layerThickness_
 Thickness of layer (m) More...
 
vector< double > v_layerTemperature_
 Temp. of layers (K) More...
 
vector< double > v_layerTemperature0_
 Temp. at bottom of layers (K) More...
 
vector< double > v_layerTemperature1_
 Temp. at top of layer (K) More...
 
vector< double > v_layerWaterVapor_
 Average water vapor kg/m**3 in the layer. More...
 
vector< double > v_layerWaterVapor0_
 Water vapor kg/m**3 at bottom of layer. More...
 
vector< double > v_layerWaterVapor1_
 Water vapor kg/m**3 at top of layer. More...
 
vector< double > v_layerPressure_
 Pressure of layers (mb) More...
 
vector< double > v_layerPressure0_
 Pressure at bottom of layers (mb) More...
 
vector< double > v_layerPressure1_
 Pressure at top of layers (mb) More...
 
vector< double > v_layerCO_
 CO in molecules per m**3. More...
 
vector< double > v_layerO3_
 O3 in molecules per m**3. More...
 
vector< double > v_layerN2O_
 N2O in molecules per m**3. More...
 
vector< double > v_layerNO2_
 NO2 in molecules per m**3. More...
 
vector< double > v_layerSO2_
 SO2 in molecules per m**3. More...
 
Length altitudeThreshold_
 
Pressure groundPressureThreshold_
 
Temperature groundTemperatureThreshold_
 
double tropoLapseRateThreshold_
 
Humidity relativeHumidityThreshold_
 
Length wvScaleHeightThreshold_
 
unsigned int ier_
 

Private Member Functions

MassDensity rwat (const Temperature &t, const Humidity &rh, const Pressure &p) const
 
Humidity rwat_inv (const Temperature &tt, const MassDensity &dd, const Pressure &pp) const
 
vector< NumberDensityst76 (const Length &ha, unsigned int tip) const
 
double poli2 (double ha, double x1, double x2, double x3, double y1, double y2, double y3) const
 

Static Private Attributes

static Pressure pressureStep_default_
 
static double pressureStepFactor_default_
 
static Length topAtmProfile_default_
 static double pSFd; // = 1.2; More...
 

Detailed Description

Class for an atmospheric profile object.

  An  atmospheric profile is composed of 4 quantities as a function of altitude z:
  - the layer thickness
  - the pressure P
  - the temperature T and
  - the gas densities for H2O, O3, CO, N2O, NO2, SO2.<br>

This object is needed for computing the absorption and phase coefficients, as well as for performing radiative transfer calculations (only layer thickness/T are needed).

This class builds an atmospheric profile that can be used to calculate absorption and phase coefficients, as well as to perform forward and/or retrieval radiative transfer calculations. It is composed of a set of parameters needed to build a layer thickness/P/T/gas densities densities profile from simple parameters currently available at observatories (from weather stations for example) using functions from the ATM library. The set of input parameters consists of the pressure P, the temperature T and the relative humidity at the ground, the altitude of the site, the tropospheric temperature lapse rate,... The profile is built as: thickness of the considered atmospheric layers above the site, and mean P,T,H2O,O3,CO,N2O, NO2, SO2 in them. The total number of atmospheric layers in the particular profile is also available (a negative value indicates an error).
The zenith column of water vapor can be calculated by simply integrating the H2O profile.

\[ column\;\;H_{2}O\;\; (mm) =\sum_{layers} \Delta z \cdot [ H_{2}O ] \]

Definition at line 78 of file ATMProfile.h.

Constructor & Destructor Documentation

AtmProfile::AtmProfile ( unsigned int  n)

A constructor of an empty profile with n layers, that can be filled up later.

AtmProfile::AtmProfile ( const Length altitude,
const Pressure groundPressure,
const Temperature groundTemperature,
double  tropoLapseRate,
const Humidity relativeHumidity,
const Length wvScaleHeight,
const Pressure pressureStep,
double  pressureStepFactor,
const Length topAtmProfile,
unsigned int  atmType 
)

A long constructor of the atmospheric profile from the basic set of parameters described above.

Please note that this constructor assumes that the &altitude of the antenna is the SAME of the weather station that provides: &groundPressure, &groundTemperature, and &relativeHumidity

AtmProfile::AtmProfile ( const Length altitude,
const Pressure groundPressure,
const Temperature groundTemperature,
double  tropoLapseRate,
const Humidity relativeHumidity,
const Length wvScaleHeight,
const Pressure pressureStep,
double  pressureStepFactor,
const Length topAtmProfile,
unsigned int  atmType,
const vector< Length > &  v_layerBoundaries,
const vector< Temperature > &  v_layerTemperature 
)

A long constructor of the atmospheric profile from the basic set of parameters described above which, in addition, includes user-defined temperature profile.

AtmProfile::AtmProfile ( const Length altitude,
const Pressure groundPressure,
const Temperature groundTemperature,
double  tropoLapseRate,
const Humidity relativeHumidity,
const Length wvScaleHeight,
unsigned int  atmType 
)

A long constructor of the atmospheric profile from the basic set of parameters described above.

 A short constructor of the atmospheric profile. With respect to the long constructor, this one considers

the following (recomended) default values: pressureStep = 10 mb, pressureStepFactor = 1.2, topAtmProfile = 48.0 km

AtmProfile::AtmProfile ( const Length altitude,
const vector< Length > &  v_layerThickness,
const vector< Pressure > &  v_layerPressure,
const vector< Temperature > &  v_layerTemperature,
const vector< MassDensity > &  v_layerWaterVapor 
)

The user provides his own atmospheric profile (basic one: four vectors for layer thickness in m, average pressure in each layer in mb, average temperature in each layer in K, and average water vapor density in each layer in kg/m**3).

QUESTION: SHOULD O3, CO, N2O, NO2, SO2 PROFILES BE FILLED UP INTERNALLY FROM A STANDARD ATMOSPHERE OR LEFT ITS ABUNDANCES EQUAL TO ZERO ?

AtmProfile::AtmProfile ( const vector< Length > &  v_layerBoundaries,
const vector< Pressure > &  v_layerPressure,
const vector< Temperature > &  v_layerTemperature,
const vector< MassDensity > &  v_layerWaterVapor 
)
AtmProfile::AtmProfile ( const Length altitude,
const vector< Length > &  v_layerThickness,
const vector< Pressure > &  v_layerPressure,
const vector< Temperature > &  v_layerTemperature,
const vector< NumberDensity > &  v_layerWaterVapor 
)
AtmProfile::AtmProfile ( const vector< Length > &  v_layerBoundaries,
const vector< Pressure > &  v_layerPressure,
const vector< Temperature > &  v_layerTemperature,
const vector< NumberDensity > &  v_layerWaterVapor 
)
AtmProfile::AtmProfile ( const Length altitude,
const vector< Length > &  v_layerThickness,
const vector< Pressure > &  v_layerPressure,
const vector< Temperature > &  v_layerTemperature,
const vector< MassDensity > &  v_layerWaterVapor,
const vector< NumberDensity > &  v_layerO3 
)

The user provides his own atmospheric profile (in this case five vectors for layer thickness in m, average pressure in each layer in mb, average temperature in each layer in K, average water vapor density in each layer in kg/m**3, and average ozone number density in each layer in molecules/m**3) QUESTION: SHOULD CO and N2O, NO2, SO2 PROFILES BE FILLED UP INTERNALLY FROM A STANDARD ATMOSPHERE OR LEFT ITS ABUNDANCES EQUAL TO ZERO ?

AtmProfile::AtmProfile ( const Length altitude,
const vector< Length > &  v_layerThickness,
const vector< Pressure > &  v_layerPressure,
const vector< Temperature > &  v_layerTemperature,
const vector< NumberDensity > &  v_layerWaterVapor,
const vector< NumberDensity > &  v_layerO3 
)
AtmProfile::AtmProfile ( const Length altitude,
const vector< Length > &  v_layerThickness,
const vector< Pressure > &  v_layerPressure,
const vector< Temperature > &  v_layerTemperature,
const vector< MassDensity > &  v_layerWaterVapor,
const vector< NumberDensity > &  v_layerO3,
const vector< NumberDensity > &  v_layerCO,
const vector< NumberDensity > &  v_layerN2O,
const vector< NumberDensity > &  v_layerNO2,
const vector< NumberDensity > &  v_layerSO2 
)

The user provides his own atmospheric profile (in this case seven vectors for layer thickness in m, average pressure in each layer in mb, average temperature in each layer in K, average water vapor density in each layer in kg/m**3, average ozone number density in each layer in molecules/m**3, average CO number density in each layer in molecules/m**3, average N2O, NO2, SO2 number density in each layer in molecules/m**3)

AtmProfile::AtmProfile ( const Length altitude,
const vector< Length > &  v_layerThickness,
const vector< Pressure > &  v_layerPressure,
const vector< Temperature > &  v_layerTemperature,
const vector< NumberDensity > &  v_layerWaterVapor,
const vector< NumberDensity > &  v_layerO3,
const vector< NumberDensity > &  v_layerCO,
const vector< NumberDensity > &  v_layerN2O,
const vector< NumberDensity > &  v_layerNO2,
const vector< NumberDensity > &  v_layerSO2 
)
AtmProfile::AtmProfile ( const AtmProfile a)
virtual AtmProfile::~AtmProfile ( )
inlinevirtual

Definition at line 218 of file ATMProfile.h.

AtmProfile::AtmProfile ( )
inlineprotected

Default constructor (required if copy constructor in derived classes)

Definition at line 525 of file ATMProfile.h.

Member Function Documentation

Length AtmProfile::getAltitude ( ) const
inline

Accessor to the ground altitude of site (length units)

Definition at line 279 of file ATMProfile.h.

References altitude_.

Length AtmProfile::getAltitudeThreshold ( ) const
inline

Thresholds.

Definition at line 462 of file ATMProfile.h.

References altitudeThreshold_.

string AtmProfile::getAtmosphereType ( ) const

Accessor to the type of current atmosphere.

static string AtmProfile::getAtmosphereType ( unsigned int  typeAtm)
static

Accessor to the type of atmosphere specified by the number.

Length AtmProfile::getGroundAltitude ( ) const
inline

Alternative accessor to the ground altitude of site (length units)

Definition at line 282 of file ATMProfile.h.

References altitude_.

Pressure AtmProfile::getGroundPressure ( ) const
inline

Accessor to the current Ground Pressure used in the object (pressure units)

Definition at line 255 of file ATMProfile.h.

References groundPressure_.

Pressure AtmProfile::getGroundPressureThreshold ( ) const
inline

Definition at line 463 of file ATMProfile.h.

References groundPressureThreshold_.

Temperature AtmProfile::getGroundTemperature ( ) const
inline

Accessor to the current Ground Temperature used in the object.

Definition at line 249 of file ATMProfile.h.

References groundTemperature_.

Referenced by SkyStatus::getAverageTebbSky(), and SkyStatus::getAverageTrjSky().

Temperature AtmProfile::getGroundTemperatureThreshold ( ) const
inline

Definition at line 464 of file ATMProfile.h.

References groundTemperatureThreshold_.

Length AtmProfile::getGroundWH2O ( ) const
Length AtmProfile::getLayerBottomHeightAboveGround ( unsigned int  i) const

void setLayerThickness(const Length &layerThickness, unsigned int i) { setLayerThickness(i, layerThickness); }

Method to access the Bottom Height of layer i above the Ground

Exceptions
AtmExceptionif the layer is not valid.
Length AtmProfile::getLayerBottomHeightAboveSeaLevel ( unsigned int  i) const

Method to access the Bottom Height of layer i above the Sea Level

Exceptions
AtmExceptionif the layer is not valid.

Pressure AtmProfile::getLayerBottomPressure ( unsigned int  i) const

Method to access the Pressure at bottom of layer i

Exceptions
AtmExceptionif the layer is not valid.

Temperature AtmProfile::getLayerBottomTemperature ( unsigned int  i) const

Method to access the Temperature at bottom of layer i (thickness of layers in ThicknessProfile)

Exceptions
AtmExceptionif the layer is not valid.

MassDensity AtmProfile::getLayerBottomWaterVaporMassDensity ( unsigned int  i) const
NumberDensity AtmProfile::getLayerBottomWaterVaporNumberDensity ( unsigned int  i) const
NumberDensity AtmProfile::getLayerCO ( unsigned int  i) const
inline

void setLayerPressure(const Pressure &layerPressure, unsigned int i) { setLayerPressure(i, layerPressure); }

Function to retrieve CO density in a given layer (thickness of layers in ThicknessProfile)

Definition at line 409 of file ATMProfile.h.

References v_layerCO_.

NumberDensity AtmProfile::getLayerN2O ( unsigned int  i) const
inline

void setLayerO3(const NumberDensity &layerO3, unsigned int i) { setLayerO3(i, layerO3); }

Function to retrieve N2O density in a given layer (thickness of layers in ThicknessProfile)

Definition at line 425 of file ATMProfile.h.

References v_layerN2O_.

NumberDensity AtmProfile::getLayerNO2 ( unsigned int  i) const
inline

void setLayerN2O(const NumberDensity &layerN2O, unsigned int i) { setLayerN2O(i, layerN2O); }

Function to retrieve NO2 density in a given layer (thickness of layers in ThicknessProfile)

Definition at line 433 of file ATMProfile.h.

References v_layerNO2_.

NumberDensity AtmProfile::getLayerO3 ( unsigned int  i) const
inline

void setLayerCO(const NumberDensity &layerCO, unsigned int i) { setLayerCO(i, layerCO); }

Function to retrieve O3 density in a given layer (thickness of layers in ThicknessProfile)

Definition at line 417 of file ATMProfile.h.

References v_layerO3_.

Pressure AtmProfile::getLayerPressure ( unsigned int  i) const

Method to access the average Pressure in layer i

Exceptions
AtmExceptionif the layer is not valid.

NumberDensity AtmProfile::getLayerSO2 ( unsigned int  i) const
inline

void setLayerNO2(const NumberDensity &layerNO2, unsigned int i) { setLayerNO2(i, layerNO2); }

Function to retrieve SO2 density in a given layer (thickness of layers in ThicknessProfile)

Definition at line 441 of file ATMProfile.h.

References v_layerSO2_.

Temperature AtmProfile::getLayerTemperature ( unsigned int  i) const

Method to access the average Temperature in layer i (thickness of layers in ThicknessProfile)

Exceptions
AtmExceptionif the layer is not valid.

Length AtmProfile::getLayerThickness ( unsigned int  i) const

Method to access the layer thickness of layer i

Exceptions
AtmExceptionif the layer is not valid.

Length AtmProfile::getLayerTopHeightAboveGround ( unsigned int  i) const

Method to access the Top Height of layer i above the Ground

Exceptions
AtmExceptionif the layer is not valid.

Length AtmProfile::getLayerTopHeightAboveSeaLevel ( unsigned int  i) const

Method to access the Top Height of layer i above the Sea Level

Exceptions
AtmExceptionif the layer is not valid.

Pressure AtmProfile::getLayerTopPressure ( unsigned int  i) const

Method to access the Pressure at top of layer i

Exceptions
AtmExceptionif the layer is not valid.

Temperature AtmProfile::getLayerTopTemperature ( unsigned int  i) const

Method to access the Temperature at top of layer i (thickness of layers in ThicknessProfile)

Exceptions
AtmExceptionif the layer is not valid.

MassDensity AtmProfile::getLayerTopWaterVaporMassDensity ( unsigned int  i) const
NumberDensity AtmProfile::getLayerTopWaterVaporNumberDensity ( unsigned int  i) const
MassDensity AtmProfile::getLayerWaterVaporMassDensity ( unsigned int  i) const

Function to retrieve Average Water vapor density in a given layer in kg/m**3 (thickness of layers in ThicknessProfile)

Exceptions
AtmExceptionif the layer is not valid.

NumberDensity AtmProfile::getLayerWaterVaporNumberDensity ( unsigned int  i) const
unsigned int AtmProfile::getNumLayer ( ) const
inline

Accessor to the number of layers of the atmospheric profile.

Definition at line 299 of file ATMProfile.h.

References numLayer_.

vector<Pressure> AtmProfile::getPressureProfile ( ) const

void setLayerWaterVapor(const NumberDensity &layerWaterVapor, unsigned int i) { setLayerWaterVapor(i, layerWaterVapor); }

Method to get the Pressure Profile

Pressure AtmProfile::getPressureStep ( ) const
inline

Accessor to the current Primary Pressure Step in the object.

The Primary Pressure Step (pressure units) is used to define the thickness of the first layer in the profile. Pressure difference between the boundaries of first layer will be equal to the Primary Pressure Step.

Definition at line 270 of file ATMProfile.h.

References pressureStep_.

Pressure AtmProfile::getPressureStepFactor ( ) const
inline

Accessor to the current Pressure_Step_Factor in the object.

The Pressure_Step_Factor (no units) is the Pressure step change between consecutive layers when moving upwards. Pressure difference between the boundaries of the (n+1)-th layer (DP_n+1) will be DP_n**DP1.

Definition at line 276 of file ATMProfile.h.

References pressureStepFactor_.

Humidity AtmProfile::getRelativeHumidity ( ) const
inline

Accessor to the current Ground Relative Humidity in the object (humidity units)

Definition at line 261 of file ATMProfile.h.

References relativeHumidity_.

Humidity AtmProfile::getRelativeHumidityThreshold ( ) const
inline

Definition at line 466 of file ATMProfile.h.

References relativeHumidityThreshold_.

vector<Temperature> AtmProfile::getTemperatureProfile ( ) const

Method to access the Temperature Profile.

vector<Length> AtmProfile::getThicknessProfile ( ) const

Method to retrieve the layer thickness from site altitude upwards.

Use Altitude to + ThicknessProfile to know the vertical grid.

Length AtmProfile::getTopAtmProfile ( ) const
inline

Accessor to the Maximum allowed altitude for the Atmospheric Profile above the site (length units)

Definition at line 296 of file ATMProfile.h.

References topAtmProfile_.

double AtmProfile::getTropoLapseRate ( ) const
inline

Accessor to the current Tropospheric Lapse Rate used in the object (temperature/length units)

Definition at line 252 of file ATMProfile.h.

References tropoLapseRate_.

double AtmProfile::getTropoLapseRateThreshold ( ) const
inline

Definition at line 465 of file ATMProfile.h.

References tropoLapseRateThreshold_.

Length AtmProfile::getTropopauseAltitude ( ) const
inline

Alternative setter for the ground altitude of site (length units).

Careful! It will remove or add layers if necessary. Ground values of T/P/h would change as well void setGroundAltitude(const Length &groundaltitude);Accessor to the altitude of the tropopause (length units)

Definition at line 293 of file ATMProfile.h.

References tropoAltitude_.

Temperature AtmProfile::getTropopauseTemperature ( ) const
inline

Accessor to the current Tropopause Temperature used in the object.

Definition at line 258 of file ATMProfile.h.

References tropoTemperature_.

Length AtmProfile::getWvScaleHeight ( ) const
inline

Accessor to the current Water Vapor Scale Height in the object (length units)

Definition at line 264 of file ATMProfile.h.

References wvScaleHeight_.

Length AtmProfile::getWvScaleHeightThreshold ( ) const
inline

Definition at line 467 of file ATMProfile.h.

References wvScaleHeightThreshold_.

void AtmProfile::initBasicAtmosphericParameterThresholds ( )
protected
unsigned int AtmProfile::mkAtmProfile ( )
protected
double AtmProfile::poli2 ( double  ha,
double  x1,
double  x2,
double  x3,
double  y1,
double  y2,
double  y3 
) const
private
MassDensity AtmProfile::rwat ( const Temperature t,
const Humidity rh,
const Pressure p 
) const
private
Humidity AtmProfile::rwat_inv ( const Temperature tt,
const MassDensity dd,
const Pressure pp 
) const
private
void AtmProfile::setAltitude ( const Length groundaltitude)

setter for the ground altitude of site (length units).

Careful! It will remove or add layers if necessary. Ground values of T/P/h would change as well

void AtmProfile::setAltitudeThreshold ( const Length altitudeThreshold)
inline

Definition at line 469 of file ATMProfile.h.

References altitudeThreshold_.

bool AtmProfile::setBasicAtmosphericParameters ( const Length altitude,
const Pressure groundPressure,
const Temperature groundTemperature,
double  tropoLapseRate,
const Humidity relativeHumidity,
const Length wvScaleHeight 
)

Setter to update the AtmProfile if some basic atmospheric parameter has changed.

Precondition
an atmospheric profile already exists
Parameters
altitudethe new altitude, a Length
groundPressurethe Pressure at the ground level
groundTemperaturethe Temperature at the ground level
tropoLapseRatethe tropospheric lapse rate
relativeHumiditythe relative Humidity
wvScaleHeightthe scale height of the water vapor, a Length
Returns
true if the atmospheric profile has been update, else false because the basic parameters have not changed
Postcondition
the atmospheric profile has been updated, only if at least one of the basic parameters has changed
Note
there is an overriding on this method in the sub-class AbsorptionPhaseProfile which in turn has an overriding in its WaterVaporRetrieval sub-class. Hence this method must not be overloaded in this AtmProfile class.
void AtmProfile::setBasicAtmosphericParameterThresholds ( const Length altitudeThreshold,
const Pressure groundPressureThreshold,
const Temperature groundTemperatureThreshold,
double  tropoLapseRateThreshold,
const Humidity relativeHumidityThreshold,
const Length wvScaleHeightThreshold 
)

void setLayerSO2(const NumberDensity &layerSO2, unsigned int i) { setLayerSO2(i, layerSO2); }

void AtmProfile::setGroundPressureThreshold ( const Pressure groundPressureThreshold)
inline

Definition at line 470 of file ATMProfile.h.

References groundPressureThreshold_.

void AtmProfile::setGroundTemperatureThreshold ( const Temperature groundTemperatureThreshold)
inline

Definition at line 471 of file ATMProfile.h.

void AtmProfile::setLayerCO ( unsigned int  i,
const NumberDensity layerCO 
)
inline

Setter for the average number density of CO in layer i in molecules/m**3 (allows to touch one layer each time once a profile has been defined)

Definition at line 412 of file ATMProfile.h.

References NumberDensity::get(), and v_layerCO_.

void AtmProfile::setLayerN2O ( unsigned int  i,
const NumberDensity layerN2O 
)
inline

Setter for the average number density of N2O in layer i in molecules/m**3 (allows to touch one layer each time once a profile has been defined)

Definition at line 428 of file ATMProfile.h.

References NumberDensity::get(), and v_layerN2O_.

void AtmProfile::setLayerNO2 ( unsigned int  i,
const NumberDensity layerNO2 
)
inline

Setter for the average number density of NO2 in layer i in molecules/m**3 (allows to touch one layer each time once a profile has been defined)

Definition at line 436 of file ATMProfile.h.

References NumberDensity::get(), and v_layerNO2_.

void AtmProfile::setLayerO3 ( unsigned int  i,
const NumberDensity layerO3 
)
inline

Setter for the average number density of O3 in layer i in molecules/m**3 (allows to touch one layer each time once a profile has been defined)

Definition at line 420 of file ATMProfile.h.

References NumberDensity::get(), and v_layerO3_.

void AtmProfile::setLayerPressure ( unsigned int  i,
const Pressure layerPressure 
)
inline

Setter for the average Pressure in layer i (allows to touch one layer each time once a profile has been defined)

Definition at line 404 of file ATMProfile.h.

References Pressure::get(), and v_layerPressure_.

void AtmProfile::setLayerSO2 ( unsigned int  i,
const NumberDensity layerSO2 
)
inline

Setter for the average number density of SO2 in layer i in molecules/m**3 (allows to touch one layer each time once a profile has been defined)

Definition at line 444 of file ATMProfile.h.

References NumberDensity::get(), and v_layerSO2_.

void AtmProfile::setLayerTemperature ( unsigned int  i,
const Temperature layerTemperature 
)

Setter for the average Temperature in layer i (allows to touch one layer each time once a profile has been defined)

void AtmProfile::setLayerThickness ( unsigned int  i,
const Length layerThickness 
)

Setter for the thickness of layer i (allows to touch one layer each time once a profile has been defined).

We do not advise to use this one unless you change P and T accordingly

void AtmProfile::setLayerWaterVaporMassDensity ( unsigned int  i,
const MassDensity layerWaterVapor 
)

Setter for the average Water vapor density in layer i in kg/m**3 (allows to touch one layer each time once a profile has been defined)

void AtmProfile::setLayerWaterVaporNumberDensity ( unsigned int  i,
const NumberDensity layerWaterVapor 
)

void setLayerWaterVaporMassDensity(const MassDensity &layerWaterVapor, unsigned int i) { setLayerWaterVaporMassDensity(i, layerWaterVapor); }

vector<NumberDensity> AtmProfile::st76 ( const Length ha,
unsigned int  tip 
) const
private
bool AtmProfile::updateAtmProfile ( const Length altitude,
const Pressure groundPressure,
const Temperature groundTemperature,
double  tropoLapseRate,
const Humidity relativeHumidity,
const Length wvScaleHeight 
)
protected

returns error code: <0 unsuccessful

Method to update an atmospheric profile based on one or more new basic parameter(s)

Parameters
altitudethe new altitude, a Length
groundPressurethe Pressure at the ground level
groundTemperaturethe Temperature at the ground level
tropoLapseRatethe tropospheric lapse rate
relativeHumiditythe relative Humidity
wvScaleHeightthe scale height of the water vapor, a Length
Returns
true if the atmospheric profile has been update, else false because the basic parameters have not changed
Postcondition
the atmospheric profile has been updated only if at least one of the basic parameters has changed

Member Data Documentation

Length AtmProfile::altitude_
protected

Multiplicative factor for presure steps.

Example of pressure parameters: P_ground=550; DP: 10; DP1: 1.2 ==> The pressure levels will then be 550, 560, 572, 586.4, .... Altitude of the site (km)

Definition at line 495 of file ATMProfile.h.

Referenced by getAltitude(), and getGroundAltitude().

Length AtmProfile::altitudeThreshold_
protected

Definition at line 515 of file ATMProfile.h.

Referenced by getAltitudeThreshold(), and setAltitudeThreshold().

double AtmProfile::fractionLast_
protected

Fraction of last layer needed for some calculations.

Definition at line 498 of file ATMProfile.h.

Pressure AtmProfile::groundPressure_
protected

Ground pressure at the site.

Definition at line 483 of file ATMProfile.h.

Referenced by getGroundPressure().

Pressure AtmProfile::groundPressureThreshold_
protected

Definition at line 516 of file ATMProfile.h.

Referenced by getGroundPressureThreshold(), and setGroundPressureThreshold().

Temperature AtmProfile::groundTemperature_
protected

Ambient temperature at the site (K)

Definition at line 478 of file ATMProfile.h.

Referenced by getGroundTemperature().

Temperature AtmProfile::groundTemperatureThreshold_
protected

Definition at line 517 of file ATMProfile.h.

Referenced by getGroundTemperatureThreshold().

unsigned int AtmProfile::ier_
protected

Definition at line 522 of file ATMProfile.h.

bool AtmProfile::newBasicParam_
protected

Definition at line 499 of file ATMProfile.h.

unsigned int AtmProfile::numLayer_
protected

Total number of layers in the output atmospheric profiles.

Definition at line 497 of file ATMProfile.h.

Referenced by getNumLayer().

Pressure AtmProfile::pressureStep_
protected

Pressure basic step (mb)

Definition at line 488 of file ATMProfile.h.

Referenced by getPressureStep().

Pressure AtmProfile::pressureStep_default_
staticprivate

Definition at line 564 of file ATMProfile.h.

double AtmProfile::pressureStepFactor_
protected

Definition at line 489 of file ATMProfile.h.

Referenced by getPressureStepFactor().

double AtmProfile::pressureStepFactor_default_
staticprivate

Definition at line 567 of file ATMProfile.h.

Humidity AtmProfile::relativeHumidity_
protected

Definition at line 484 of file ATMProfile.h.

Referenced by getRelativeHumidity().

Humidity AtmProfile::relativeHumidityThreshold_
protected

Definition at line 519 of file ATMProfile.h.

Referenced by getRelativeHumidityThreshold().

Length AtmProfile::topAtmProfile_
protected

Top of atmospheric profile (km)

Definition at line 496 of file ATMProfile.h.

Referenced by getTopAtmProfile().

Length AtmProfile::topAtmProfile_default_
staticprivate

static double pSFd; // = 1.2;

Definition at line 572 of file ATMProfile.h.

Length AtmProfile::tropoAltitude_
protected

Altitude where tropopause starts.

Definition at line 482 of file ATMProfile.h.

Referenced by getTropopauseAltitude().

double AtmProfile::tropoLapseRate_
protected

tropospheric lapse rate in K/km

Definition at line 479 of file ATMProfile.h.

Referenced by getTropoLapseRate().

double AtmProfile::tropoLapseRateThreshold_
protected

Definition at line 518 of file ATMProfile.h.

Referenced by getTropoLapseRateThreshold().

unsigned int AtmProfile::tropoLayer_
protected

Layer where tropopause starts.

Definition at line 481 of file ATMProfile.h.

Temperature AtmProfile::tropoTemperature_
protected

Temperature at the tropopause.

Definition at line 480 of file ATMProfile.h.

Referenced by getTropopauseTemperature().

unsigned int AtmProfile::typeAtm_
protected

1: tropical, 2: midlatSummer, 3: midlatWinter, 4: subarcticSummer, 5: subarcticWinter

Definition at line 471 of file ATMProfile.h.

vector<double> AtmProfile::v_layerCO_
protected

CO in molecules per m**3.

Definition at line 510 of file ATMProfile.h.

Referenced by getLayerCO(), and setLayerCO().

vector<double> AtmProfile::v_layerN2O_
protected

N2O in molecules per m**3.

Definition at line 512 of file ATMProfile.h.

Referenced by getLayerN2O(), and setLayerN2O().

vector<double> AtmProfile::v_layerNO2_
protected

NO2 in molecules per m**3.

Definition at line 513 of file ATMProfile.h.

Referenced by getLayerNO2(), and setLayerNO2().

vector<double> AtmProfile::v_layerO3_
protected

O3 in molecules per m**3.

Definition at line 511 of file ATMProfile.h.

Referenced by getLayerO3(), and setLayerO3().

vector<double> AtmProfile::v_layerPressure0_
protected

Pressure at bottom of layers (mb)

Definition at line 508 of file ATMProfile.h.

vector<double> AtmProfile::v_layerPressure1_
protected

Pressure at top of layers (mb)

Definition at line 509 of file ATMProfile.h.

vector<double> AtmProfile::v_layerPressure_
protected

Pressure of layers (mb)

Definition at line 507 of file ATMProfile.h.

Referenced by setLayerPressure().

vector<double> AtmProfile::v_layerSO2_
protected

SO2 in molecules per m**3.

Definition at line 514 of file ATMProfile.h.

Referenced by getLayerSO2(), and setLayerSO2().

vector<double> AtmProfile::v_layerTemperature0_
protected

Temp. at bottom of layers (K)

Definition at line 502 of file ATMProfile.h.

vector<double> AtmProfile::v_layerTemperature1_
protected

Temp. at top of layer (K)

Definition at line 503 of file ATMProfile.h.

vector<double> AtmProfile::v_layerTemperature_
protected

Temp. of layers (K)

Definition at line 501 of file ATMProfile.h.

vector<double> AtmProfile::v_layerThickness_
protected

Thickness of layer (m)

Definition at line 500 of file ATMProfile.h.

vector<double> AtmProfile::v_layerWaterVapor0_
protected

Water vapor kg/m**3 at bottom of layer.

Definition at line 505 of file ATMProfile.h.

vector<double> AtmProfile::v_layerWaterVapor1_
protected

Water vapor kg/m**3 at top of layer.

Definition at line 506 of file ATMProfile.h.

vector<double> AtmProfile::v_layerWaterVapor_
protected

Average water vapor kg/m**3 in the layer.

Definition at line 504 of file ATMProfile.h.

Length AtmProfile::wvScaleHeight_
protected

                          Relative humidity at the site (%)

used only to make an estimate of the water vapor column, first guess)

scale height of water vapor distribution (km)

Definition at line 487 of file ATMProfile.h.

Referenced by getWvScaleHeight().

Length AtmProfile::wvScaleHeightThreshold_
protected

Definition at line 520 of file ATMProfile.h.

Referenced by getWvScaleHeightThreshold().


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