LCOV - code coverage report
Current view: top level - atmosphere/ATM - ATMRefractiveIndexProfile.h (source / functions) Hit Total Coverage
Test: casacpp_coverage.info Lines: 17 17 100.0 %
Date: 2024-12-11 20:54:31 Functions: 9 9 100.0 %

          Line data    Source code
       1             : #ifndef _ATM_REFRACTIVEINDEXPROFILE_H
       2             : #define _ATM_REFRACTIVEINDEXPROFILE_H
       3             : /*******************************************************************************
       4             :  * ALMA - Atacama Large Millimiter Array
       5             :  * (c) Instituto de Estructura de la Materia, 2009
       6             :  *
       7             :  * This library is free software; you can redistribute it and/or
       8             :  * modify it under the terms of the GNU Lesser General Public
       9             :  * License as published by the Free Software Foundation; either
      10             :  * version 2.1 of the License, or (at your option) any later version.
      11             :  *
      12             :  * This library is distributed in the hope that it will be useful,
      13             :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      14             :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      15             :  * Lesser General Public License for more details.
      16             :  *
      17             :  * You should have received a copy of the GNU Lesser General Public
      18             :  * License along with this library; if not, write to the Free Software
      19             :  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
      20             :  *
      21             :  * "@(#) $Id: ATMRefractiveIndexProfile.h Exp $"
      22             :  *
      23             :  * who       when      what
      24             :  * --------  --------  ----------------------------------------------
      25             :  * pardo     24/03/09  created
      26             :  */
      27             : 
      28             : #ifndef __cplusplus
      29             : #error This is a C++ include file and cannot be used from plain C
      30             : #endif
      31             : 
      32             : #include "ATMAngle.h"
      33             : #include "ATMCommon.h"
      34             : #include "ATMInverseLength.h"
      35             : #include "ATMOpacity.h"
      36             : #include "ATMProfile.h"
      37             : #include "ATMSpectralGrid.h"
      38             : #include "ATMRefractiveIndex.h"
      39             : 
      40             : #include <complex>
      41             : 
      42             : ATM_NAMESPACE_BEGIN
      43             : 
      44             : /**  \brief Profile of the absorption and Phase coefficient(s) at given frequency(ies) for an
      45             :  *   atmospheric profile (P/T/gas densities).
      46             :  *
      47             :  *   Using the ATM library the vertical profile of the absorption
      48             :  *   coefficient corresponding to an atmospheric P/T/gas profile are build
      49             :  *   The absorption coefficient in each layer can be used
      50             :  *   later for radiative transfer purposes. The atmospheric P/T/gas profile is inherited
      51             :  *   from an object of type AtmProfile. The absorption coefficient profile
      52             :  *   is provided separately for O2 lines, H2O lines, CO lines, O3 lines, N2O lines, NO2 lines,
      53             :  *   SO2 lines dry and wet continuum. The total absorption coefficient profile (addition of
      54             :  *   those just described) is also available, since it is the only profile really needed
      55             :  *   for the WaterVaporRetrieval class which derives from this
      56             :  *   RefractiveIndexProfile class.
      57             :  */
      58             : class RefractiveIndexProfile: public AtmProfile, public SpectralGrid
      59             : {
      60             : public:
      61             : 
      62             :   //@{
      63             :   /** A full constructor for the case of a profile of absorption coefficients
      64             :    *  at a single frequency
      65             :    */
      66             :   RefractiveIndexProfile(const Frequency &frequency,
      67             :                          const AtmProfile &atmProfile);
      68             : 
      69             :   /** A full constructor for the case of a profile of absorption coefficients
      70             :    *  for a set of frequency points.
      71             :    */
      72             :   RefractiveIndexProfile(const SpectralGrid &spectralGrid,
      73             :                          const AtmProfile &atmProfile);
      74             : 
      75             :   /** A copy constructor for deep copy
      76             :    */
      77             :   RefractiveIndexProfile(const RefractiveIndexProfile &);
      78             : 
      79             :   RefractiveIndexProfile();
      80             : 
      81             :   virtual ~RefractiveIndexProfile();
      82             : 
      83             :   //@}
      84             : 
      85             :   //@{
      86             :   /** Setter to update the AtmProfile and RefractiveIndexProfile if some basic atmospheric parameter has changed.
      87             :    * @pre   an RefractiveIndexProfile already exists
      88             :    * @param altitude          the new altitude, a Length
      89             :    * @param groundPressure    the Pressure at the ground level
      90             :    * @param groundTemperature the Temperature at the ground level
      91             :    * @param tropoLapseRate    the tropospheric lapse rate
      92             :    * @param relativeHumidity  the relative Humidity
      93             :    * @param wvScaleHeight     the scale height of the water vapor, a Length
      94             :    * @return true if the atmospheric profile has been updated, else false because the basic parameters have not changed
      95             :    * @post   the atmospheric profile, and accordingly the absorption phase profile, have been updated, unless none
      96             :    *         of all the input basic parameters correspond to new values.
      97             :    *
      98             :    * \note  there is an overriding on this method in the sub-class in WaterVaporRadiance sub-class. Hence this method
      99             :    *        must not be overloaded in this RefractiveIndexProfile class.
     100             :    */
     101             :   bool setBasicAtmosphericParameters(const Length &altitude,
     102             :                                      const Pressure &groundPressure,
     103             :                                      const Temperature &groundTemperature,
     104             :                                      double tropoLapseRate,
     105             :                                      const Humidity &relativeHumidity,
     106             :                                      const Length &wvScaleHeight);
     107             :   //@}
     108             : 
     109             :   //@{
     110             : 
     111             :   /** Setter of new spectral windows (adds frequencies to the SpectralGrid and calculates the corresponding absorption coefficients) */
     112             :   inline void addNewSpectralWindow(unsigned int numChan,
     113             :                                    unsigned int refChan,
     114             :                                    const Frequency &refFreq,
     115             :                                    const Frequency &chanSep)
     116             :   {
     117             :     SpectralGrid::add(numChan, refChan, refFreq, chanSep);
     118             :     mkRefractiveIndexProfile();
     119             :   }
     120             :   /** Setter of new spectral windows (adds frequencies to the SpectralGrid and calculates the corresponding absorption coefficients) */
     121             :   inline void addNewSpectralWindow(unsigned int numChan,
     122             :                                    unsigned int refChan,
     123             :                                    double* chanFreq,
     124             :                                    Frequency::Units freqUnits)
     125             :   {
     126             :     SpectralGrid::add(numChan, refChan, chanFreq, freqUnits);
     127             :     mkRefractiveIndexProfile();
     128             :   }
     129             :   /** Setter of new spectral windows (adds frequencies to the SpectralGrid and calculates the corresponding absorption coefficients) */
     130             :   inline void addNewSpectralWindow(unsigned int numChan,
     131             :                                    double refFreq,
     132             :                                    double* chanFreq,
     133             :                                    Frequency::Units freqUnits)
     134             :   {
     135             :     SpectralGrid::add(numChan, refFreq, chanFreq, freqUnits);
     136             :     mkRefractiveIndexProfile();
     137             :   }
     138             :   /** Setter of new spectral windows (adds frequencies to the SpectralGrid and calculates the corresponding absorption coefficients) */
     139             :   inline void addNewSpectralWindow(unsigned int numChan,
     140             :                                    double refFreq,
     141             :                                    const vector<double> &chanFreq,
     142             :                                    Frequency::Units freqUnits)
     143             :   {
     144             :     SpectralGrid::add(numChan, refFreq, chanFreq, freqUnits);
     145             :     mkRefractiveIndexProfile();
     146             :   }
     147             :   /** Setter of new spectral windows (adds frequencies to the SpectralGrid and calculates the corresponding absorption coefficients) */
     148             :   inline void addNewSpectralWindow(unsigned int numChan,
     149             :                                    unsigned int refChan,
     150             :                                    const Frequency &refFreq,
     151             :                                    const Frequency &chanSep,
     152             :                                    const Frequency &intermediateFreq,
     153             :                                    const SidebandSide &sbSide,
     154             :                                    const SidebandType &sbType)
     155             :   {
     156             :     SpectralGrid::add(numChan,
     157             :                       refChan,
     158             :                       refFreq,
     159             :                       chanSep,
     160             :                       intermediateFreq,
     161             :                       sbSide,
     162             :                       sbType);
     163             :     mkRefractiveIndexProfile();
     164             :   }
     165             :   inline void addNewSpectralWindow(const vector<Frequency> &chanFreq)
     166             :   {
     167             :     SpectralGrid::add(chanFreq);
     168             :     mkRefractiveIndexProfile();
     169             :   }
     170             : 
     171             :   /** Accessor to total number of Frequency points in the SpectralGrid object */
     172             :   inline unsigned int getNumIndividualFrequencies() const
     173             :   {
     174             :     return v_chanFreq_.size();
     175             :   }
     176             : 
     177             :   /** Accessor to the single frequency (or the frequency of the first grid point
     178             :    *  in case of a spectrum) in Hz (SI default unit)*/
     179             :   inline double getFrequency() const
     180             :   {
     181             :     return getChanFreq(0).get();
     182             :   }
     183             : 
     184             :   /** Accessor to the single frequency (or the frequency of the first grid point
     185             :    *  in case of a spectrum) in specified unit
     186             :    */
     187             :   inline double getFrequency(Frequency::Units freqUnits) const
     188             :   {
     189             :     return getChanFreq(0).get(freqUnits);
     190             :   }
     191             :   //@}
     192             : 
     193             :   //@{
     194             :   /** Accessor to get H2O lines Absorption Coefficient at layer nl, for single frequency RefractiveIndexProfile object */
     195             :   InverseLength getAbsH2OLines(unsigned int nl) const
     196             :   {
     197             :     return InverseLength(imag((vv_N_H2OLinesPtr_[0]->at(nl))), InverseLength::UnitInverseMeter);
     198             :   }
     199             :   /** Accessor to get H2O lines Absorption Coefficient at layer nl and frequency channel nf, for RefractiveIndexProfile object with a spectral grid */
     200             :   InverseLength getAbsH2OLines(unsigned int nf, unsigned int nl) const
     201             :   {
     202             :     return InverseLength(imag((vv_N_H2OLinesPtr_[nf]->at(nl))), InverseLength::UnitInverseMeter);
     203             :   }
     204             :   /** Accessor to get H2O Continuum Absorption Coefficient at layer nl, spectral window spwid and channel nf */
     205             :   InverseLength getAbsH2OLines(unsigned int spwid,
     206             :                                unsigned int nf,
     207             :                                unsigned int nl) const
     208             :   {
     209             :     unsigned int j = v_transfertId_[spwid] + nf;
     210             :     return InverseLength(imag((vv_N_H2OLinesPtr_[j]->at(nl))), InverseLength::UnitInverseMeter);
     211             :   }
     212             : 
     213             :   /** Accessor to get H2O Continuum Absorption Coefficient at layer nl, for single frequency RefractiveIndexProfile object */
     214             :   InverseLength getAbsH2OCont(unsigned int nl) const
     215             :   {
     216             :     return InverseLength(imag((vv_N_H2OContPtr_[0]->at(nl))), InverseLength::UnitInverseMeter);
     217             :   }
     218             :   /** Accessor to get H2O Continuum Absorption Coefficient at layer nl and frequency channel nf, for RefractiveIndexProfile object with a spectral grid */
     219             :   InverseLength getAbsH2OCont(unsigned int nf, unsigned int nl) const
     220             :   {
     221             :     return InverseLength(imag((vv_N_H2OContPtr_[nf]->at(nl))), InverseLength::UnitInverseMeter);
     222             :   }
     223             :   /** Accessor to get H2O Continuum Absorption Coefficient at layer nl, spectral window spwid and channel nf */
     224             :   InverseLength getAbsH2OCont(unsigned int spwid,
     225             :                               unsigned int nf,
     226             :                               unsigned int nl) const
     227             :   {
     228             :     unsigned int j = v_transfertId_[spwid] + nf;
     229             :     return InverseLength(imag((vv_N_H2OContPtr_[j]->at(nl))), InverseLength::UnitInverseMeter);
     230             :   }
     231             : 
     232             :   /** Function to retrieve O2 lines Absorption Coefficient at layer nl, for single frequency RefractiveIndexProfile object */
     233             :   InverseLength getAbsO2Lines(unsigned int nl) const
     234             :   {
     235             :     return InverseLength(imag((vv_N_O2LinesPtr_[0]->at(nl))), InverseLength::UnitInverseMeter);
     236             :   }
     237             :   /** Function to retrieve O2 lines Absorption Coefficient at layer nl and frequency channel nf, for RefractiveIndexProfile object with a spectral grid */
     238             :   InverseLength getAbsO2Lines(unsigned int nf, unsigned int nl) const
     239             :   {
     240             :     return InverseLength(imag((vv_N_O2LinesPtr_[nf]->at(nl))), InverseLength::UnitInverseMeter);
     241             :   }
     242             :   /** Function to retrieve O2 lines Absorption Coefficient at layer nl, spectral window spwid and channel nf */
     243             :   InverseLength getAbsO2Lines(unsigned int spwid,
     244             :                               unsigned int nf,
     245             :                               unsigned int nl) const
     246             :   {
     247             :     unsigned int j = v_transfertId_[spwid] + nf;
     248             :     return InverseLength(imag((vv_N_O2LinesPtr_[j]->at(nl))), InverseLength::UnitInverseMeter);
     249             :   }
     250             : 
     251             :   /** Function to retrieve Dry continuum Absorption Coefficient at layer nl, for single frequency RefractiveIndexProfile object */
     252             :   InverseLength getAbsDryCont(unsigned int nl) const
     253             :   {
     254             :     return InverseLength(imag((vv_N_DryContPtr_[0]->at(nl))), InverseLength::UnitInverseMeter);
     255             :   }
     256             :   /** Function to retrieve Dry continuum Absorption Coefficient at layer nl and frequency channel nf, for RefractiveIndexProfile object with a spectral grid */
     257             :   InverseLength getAbsDryCont(unsigned int nf, unsigned int nl) const
     258             :   {
     259             :     return InverseLength(imag((vv_N_DryContPtr_[nf]->at(nl))), InverseLength::UnitInverseMeter);
     260             :   }
     261             :   /** Function to retrieve Dry continuum Absorption Coefficient at layer nl, spectral window spwid and channel nf */
     262             :   InverseLength getAbsDryCont(unsigned int spwid,
     263             :                               unsigned int nf,
     264             :                               unsigned int nl) const
     265             :   {
     266             :     unsigned int j = v_transfertId_[spwid] + nf;
     267             :     return InverseLength(imag((vv_N_DryContPtr_[j]->at(nl))), InverseLength::UnitInverseMeter);
     268             :   }
     269             : 
     270             :   /** Function to retrieve O3 lines Absorption Coefficient at layer nl, for single frequency RefractiveIndexProfile object */
     271             :   InverseLength getAbsO3Lines(unsigned int nl) const
     272             :   {
     273             :     return InverseLength(imag((vv_N_O3LinesPtr_[0]->at(nl))), InverseLength::UnitInverseMeter);
     274             :   }
     275             :   /** Function to retrieve O3 lines Absorption Coefficient at layer nl and frequency channel nf, for RefractiveIndexProfile object with a spectral grid */
     276             :   InverseLength getAbsO3Lines(unsigned int nf, unsigned int nl) const
     277             :   {
     278             :     return InverseLength(imag((vv_N_O3LinesPtr_[nf]->at(nl))), InverseLength::UnitInverseMeter);
     279             :   }
     280             :   /** Function to retrieve O3 lines Absorption Coefficient at layer nl, spectral window spwid and channel nf */
     281             :   InverseLength getAbsO3Lines(unsigned int spwid,
     282             :                               unsigned int nf,
     283             :                               unsigned int nl) const
     284             :   {
     285             :     unsigned int j = v_transfertId_[spwid] + nf;
     286             :     return InverseLength(imag((vv_N_O3LinesPtr_[j]->at(nl))), InverseLength::UnitInverseMeter);
     287             :   }
     288             : 
     289             :   /** Function to retrieve CO lines Absorption Coefficient at layer nl, for single frequency RefractiveIndexProfile object */
     290             :   InverseLength getAbsCOLines(unsigned int nl) const
     291             :   {
     292             :     return InverseLength(imag((vv_N_COLinesPtr_[0]->at(nl))), InverseLength::UnitInverseMeter);
     293             :   }
     294             :   /** Function to retrieve CO lines Absorption Coefficient at layer nl and frequency channel nf, for RefractiveIndexProfile object with a spectral grid */
     295             :   InverseLength getAbsCOLines(unsigned int nf, unsigned int nl) const
     296             :   {
     297             :     return InverseLength(imag((vv_N_COLinesPtr_[nf]->at(nl))), InverseLength::UnitInverseMeter);
     298             :   }
     299             :   /** Function to retrieve CO lines Absorption Coefficient at layer nl, spectral window spwid and channel nf */
     300             :   InverseLength getAbsCOLines(unsigned int spwid,
     301             :                               unsigned int nf,
     302             :                               unsigned int nl) const
     303             :   {
     304             :     unsigned int j = v_transfertId_[spwid] + nf;
     305             :     return InverseLength(imag((vv_N_COLinesPtr_[j]->at(nl))), InverseLength::UnitInverseMeter);
     306             :   }
     307             : 
     308             : 
     309             : 
     310             :   /** Function to retrieve N2O lines Absorption Coefficient at layer nl, for single frequency RefractiveIndexProfile object */
     311             :   InverseLength getAbsN2OLines(unsigned int nl) const
     312             :   {
     313             :     return InverseLength(imag((vv_N_N2OLinesPtr_[0]->at(nl))), InverseLength::UnitInverseMeter);
     314             :   }
     315             :   /** Function to retrieve N2O lines Absorption Coefficient at layer nl and frequency channel nf, for RefractiveIndexProfile object with a spectral grid */
     316             :   InverseLength getAbsN2OLines(unsigned int nf, unsigned int nl) const
     317             :   {
     318             :     return InverseLength(imag((vv_N_N2OLinesPtr_[nf]->at(nl))), InverseLength::UnitInverseMeter);
     319             :   }
     320             :   /** Function to retrieve N2O lines Absorption Coefficient at layer nl, spectral window spwid and channel nf */
     321             :   InverseLength getAbsN2OLines(unsigned int spwid,
     322             :                                unsigned int nf,
     323             :                                unsigned int nl) const
     324             :   {
     325             :     unsigned int j = v_transfertId_[spwid] + nf;
     326             :     return InverseLength(imag((vv_N_N2OLinesPtr_[j]->at(nl))), InverseLength::UnitInverseMeter);
     327             :   }
     328             : 
     329             :   /** Function to retrieve NO2 lines Absorption Coefficient at layer nl, for single frequency RefractiveIndexProfile object */
     330             :   InverseLength getAbsNO2Lines(unsigned int nl) const
     331             :   {
     332             :     return InverseLength(imag((vv_N_NO2LinesPtr_[0]->at(nl))), InverseLength::UnitInverseMeter);
     333             :   }
     334             :   /** Function to retrieve NO2 lines Absorption Coefficient at layer nl and frequency channel nf, for RefractiveIndexProfile object with a spectral grid */
     335             :   InverseLength getAbsNO2Lines(unsigned int nf, unsigned int nl) const
     336             :   {
     337             :     return InverseLength(imag((vv_N_NO2LinesPtr_[nf]->at(nl))), InverseLength::UnitInverseMeter);
     338             :   }
     339             :   /** Function to retrieve NO2 lines Absorption Coefficient at layer nl, spectral window spwid and channel nf */
     340             :   InverseLength getAbsNO2Lines(unsigned int spwid,
     341             :                                unsigned int nf,
     342             :                                unsigned int nl) const
     343             :   {
     344             :     unsigned int j = v_transfertId_[spwid] + nf;
     345             :     return InverseLength(imag((vv_N_NO2LinesPtr_[j]->at(nl))), InverseLength::UnitInverseMeter);
     346             :   }
     347             : 
     348             : 
     349             :   /** Function to retrieve SO2 lines Absorption Coefficient at layer nl, for single frequency RefractiveIndexProfile object */
     350             :   InverseLength getAbsSO2Lines(unsigned int nl) const
     351             :   {
     352             :     return InverseLength(imag((vv_N_SO2LinesPtr_[0]->at(nl))), InverseLength::UnitInverseMeter);
     353             :   }
     354             :   /** Function to retrieve SO2 lines Absorption Coefficient at layer nl and frequency channel nf, for RefractiveIndexProfile object with a spectral grid */
     355             :   InverseLength getAbsSO2Lines(unsigned int nf, unsigned int nl) const
     356             :   {
     357             :     return InverseLength(imag((vv_N_SO2LinesPtr_[nf]->at(nl))), InverseLength::UnitInverseMeter);
     358             :   }
     359             :   /** Function to retrieve SO2 lines Absorption Coefficient at layer nl, spectral window spwid and channel nf */
     360             :   InverseLength getAbsSO2Lines(unsigned int spwid,
     361             :                                unsigned int nf,
     362             :                                unsigned int nl) const
     363             :   {
     364             :     unsigned int j = v_transfertId_[spwid] + nf;
     365             :     return InverseLength(imag((vv_N_SO2LinesPtr_[j]->at(nl))), InverseLength::UnitInverseMeter);
     366             :   }
     367             : 
     368             : 
     369             : 
     370             : 
     371             : 
     372             :   /** Function to retrieve total Dry Absorption Coefficient at layer nl, for single frequency RefractiveIndexProfile object */
     373             :   InverseLength getAbsTotalDry(unsigned int nl) const
     374             :   {
     375             :     return getAbsTotalDry(nl, 0);
     376             :   }
     377             :   /** Function to retrieve total Dry Absorption Coefficient at layer nl and frequency channel nf, for RefractiveIndexProfile object with a spectral grid */
     378             :   InverseLength getAbsTotalDry(unsigned int nf, unsigned int nl) const
     379             :   {
     380             :     return InverseLength(imag(
     381             :                               vv_N_O2LinesPtr_[nf]->at(nl)
     382             :                               + vv_N_DryContPtr_[nf]->at(nl) + vv_N_O3LinesPtr_[nf]->at(nl)
     383             :                               + vv_N_COLinesPtr_[nf]->at(nl) + vv_N_N2OLinesPtr_[nf]->at(nl)
     384             :                               + vv_N_NO2LinesPtr_[nf]->at(nl) + vv_N_SO2LinesPtr_[nf]->at(nl)), InverseLength::UnitInverseMeter);
     385             :   }
     386             :   /** Function to retrieve total Dry Absorption Coefficient at layer nl, spectral window spwid and channel nf */
     387   427454868 :   InverseLength getAbsTotalDry(unsigned int spwid,
     388             :                                unsigned int nf,
     389             :                                unsigned int nl) const
     390             :   {
     391   427454868 :     unsigned int j = v_transfertId_[spwid] + nf;
     392             :     return InverseLength(imag(
     393   427454868 :                               vv_N_O2LinesPtr_[j]->at(nl)
     394   854909736 :                               + vv_N_DryContPtr_[j]->at(nl) + vv_N_O3LinesPtr_[j]->at(nl)
     395   854909736 :                               + vv_N_COLinesPtr_[j]->at(nl) + vv_N_N2OLinesPtr_[j]->at(nl)
     396  1282364604 :                               + vv_N_NO2LinesPtr_[j]->at(nl) + vv_N_SO2LinesPtr_[j]->at(nl)), InverseLength::UnitInverseMeter);
     397             :   }
     398             : 
     399             :   /** Function to retrieve total Wet Absorption Coefficient at layer nl, for single frequency RefractiveIndexProfile object */
     400             :   InverseLength getAbsTotalWet(unsigned int nl) const
     401             :   {
     402             :     return getAbsTotalWet(nl, 0);
     403             :   }
     404             :   /** Function to retrieve total Wet Absorption Coefficient at layer nl and frequency channel nf, for RefractiveIndexProfile object with a spectral grid */
     405             :   InverseLength getAbsTotalWet(unsigned int nf, unsigned int nl) const
     406             :   {
     407             :     return InverseLength(imag((vv_N_H2OLinesPtr_[nf]->at(nl)
     408             :         + vv_N_H2OContPtr_[nf]->at(nl))), InverseLength::UnitInverseMeter);
     409             :   }
     410             :   /** Function to retrieve total Wet Absorption Coefficient at layer nl, spectral window spwid and channel nf */
     411   427454868 :   InverseLength getAbsTotalWet(unsigned int spwid,
     412             :                                unsigned int nf,
     413             :                                unsigned int nl) const
     414             :   {
     415   427454868 :     unsigned int j = v_transfertId_[spwid] + nf;
     416   427454868 :     return InverseLength(imag((vv_N_H2OLinesPtr_[j]->at(nl)
     417  1282364604 :         + vv_N_H2OContPtr_[j]->at(nl))), InverseLength::UnitInverseMeter);
     418             :   }
     419             : 
     420             :   Opacity getAverageO2LinesOpacity(unsigned int spwid);
     421             :   Opacity getAverageO3LinesOpacity(unsigned int spwid);
     422             :   Opacity getAverageN2OLinesOpacity(unsigned int spwid);
     423             :   Opacity getAverageNO2LinesOpacity(unsigned int spwid);
     424             :   Opacity getAverageSO2LinesOpacity(unsigned int spwid);
     425             :   Opacity getAverageCOLinesOpacity(unsigned int spwid);
     426             :   Opacity getAverageDryContOpacity(unsigned int spwid);
     427             : 
     428             :   /** Function to retrieve the integrated Dry Opacity along the atmospheric path for single frequency RefractiveIndexProfile object */
     429           1 :   Opacity getDryOpacity(){return getDryOpacity(0);}
     430             :   Opacity getDryOpacityUpTo(Length refalti){return getDryOpacityUpTo(0,refalti);}
     431             :   /** Function to retrieve the integrated Dry Opacity along the atmospheric path for channel nc in an RefractiveIndexProfile object with a spectral grid */
     432             :   Opacity getDryOpacity(unsigned int nc);
     433             :   Opacity getDryOpacityUpTo(unsigned int nc, Length refalti);
     434       11228 :   Opacity getDryOpacity(unsigned int spwid, unsigned int nc){ if(!spwidAndIndexAreValid(spwid, nc)) return Opacity(-999.0); return getDryOpacity(v_transfertId_[spwid] + nc);}
     435             :   Opacity getDryOpacityUpTo(unsigned int spwid, unsigned int nc, Length refalti)
     436             :   {
     437             :     if(!spwidAndIndexAreValid(spwid, nc))return Opacity(-999.0);
     438             :     return getDryOpacityUpTo(v_transfertId_[spwid] + nc, refalti);
     439             :   }
     440             :   Opacity getAverageDryOpacity(unsigned int spwid);
     441             : 
     442             :   /** Function to retrieve the integrated Dry Continuum Opacity along the atmospheric path for single frequency RefractiveIndexProfile object */
     443             :   Opacity getDryContOpacity();
     444             :   /** Function to retrieve the integrated Dry Continuum Opacity along the atmospheric path for channel nc in an RefractiveIndexProfile object with a spectral grid */
     445             :   Opacity getDryContOpacity(unsigned int nc);
     446             :   Opacity getDryContOpacity(unsigned int spwid, unsigned int nc);
     447             :   /** Function to retrieve the integrated O2 Lines Opacity along the atmospheric path for single frequency RefractiveIndexProfile object */
     448             :   Opacity getO2LinesOpacity();
     449             :   /** Function to retrieve the integrated O2 Lines Opacity along the atmospheric path for channel nc in an RefractiveIndexProfile object with a spectral grid */
     450             :   Opacity getO2LinesOpacity(unsigned int nc);
     451             :   Opacity getO2LinesOpacity(unsigned int spwid, unsigned int nc);
     452             :   /** Function to retrieve the integrated O3 Lines Opacity along the atmospheric path for single frequency RefractiveIndexProfile object */
     453             :   Opacity getO3LinesOpacity();
     454             :   /** Function to retrieve the integrated O3 Lines Opacity along the atmospheric path for channel nc in an RefractiveIndexProfile object with a spectral grid */
     455             :   Opacity getO3LinesOpacity(unsigned int nc);
     456             :   Opacity getO3LinesOpacity(unsigned int spwid, unsigned int nc);
     457             :   /** Function to retrieve the integrated CO Lines Opacity along the atmospheric path for single frequency RefractiveIndexProfile object */
     458             :   Opacity getCOLinesOpacity();
     459             :   /** Function to retrieve the integrated CO Lines Opacity along the atmospheric path for channel nc in an RefractiveIndexProfile object with a spectral grid */
     460             :   Opacity getCOLinesOpacity(unsigned int nc);
     461             :   Opacity getCOLinesOpacity(unsigned int spwid, unsigned int nc);
     462             :   /** Function to retrieve the integrated N2O Lines Opacity along the atmospheric path for single frequency RefractiveIndexProfile object */
     463             :   Opacity getN2OLinesOpacity();
     464             :   /** Function to retrieve the integrated N2O Lines Opacity along the atmospheric path for channel nc in an RefractiveIndexProfile object with a spectral grid */
     465             :   Opacity getN2OLinesOpacity(unsigned int nc);
     466             :   Opacity getN2OLinesOpacity(unsigned int spwid, unsigned int nc);
     467             :   /** Function to retrieve the integrated NO2 Lines Opacity along the atmospheric path for single frequency RefractiveIndexProfile object */
     468             :   Opacity getNO2LinesOpacity();
     469             :   /** Function to retrieve the integrated NO2 Lines Opacity along the atmospheric path for channel nc in an RefractiveIndexProfile object with a spectral grid */
     470             :   Opacity getNO2LinesOpacity(unsigned int nc);
     471             :   Opacity getNO2LinesOpacity(unsigned int spwid, unsigned int nc);
     472             :   /** Function to retrieve the integrated SO2 Lines Opacity along the atmospheric path for single frequency RefractiveIndexProfile object */
     473             :   Opacity getSO2LinesOpacity();
     474             :   /** Function to retrieve the integrated SO2 Lines Opacity along the atmospheric path for channel nc in an RefractiveIndexProfile object with a spectral grid */
     475             :   Opacity getSO2LinesOpacity(unsigned int nc);
     476             :   Opacity getSO2LinesOpacity(unsigned int spwid, unsigned int nc);
     477             : 
     478             :   /** Function to retrieve the integrated Wet Opacity along the atmospheric path
     479             :    corresponding to the 1st guess water column (from AtmProfile object) or the
     480             :     for single frequency RefractiveIndexProfile object */
     481           2 :   Opacity getWetOpacity() {return getWetOpacity(getGroundWH2O());}
     482             :   /** Function to retrieve the integrated Wet Opacity along the atmospheric path
     483             :    for a given integratedwatercolumn */
     484             :   Opacity getWetOpacity(const Length &integratedwatercolumn);
     485             :   /** Function to retrieve the integrated Wet Opacity along the atmospheric path
     486             :    corresponding to a given water vapor column
     487             :     for channel nc in an RefractiveIndexProfile
     488             :    object with a spectral grid */
     489             :   Opacity getWetOpacity(const Length &integratedwatercolumn, unsigned int nc);
     490             :   /** Function to retrieve the integrated Wet Opacity along the atmospheric path
     491             :    corresponding to a given water vapor column
     492             :     for channel nc in an RefractiveIndexProfile
     493             :    object with a spectral grid */
     494             :   Opacity getWetOpacity(const Length &integratedwatercolumn, unsigned int spwid, unsigned int nc);
     495             :   /** Function to retrieve the integrated H2O Lines Opacity along the atmospheric path
     496             :    corresponding to a given water vapor column
     497             :     for single frequency RefractiveIndexProfile object */
     498             : 
     499             : 
     500             :   /** Function to retrieve the integrated H2O Lines Opacity along the atmospheric path
     501             :    corresponding to the 1st guess water column (from AtmProfile object)  */
     502           2 :   Opacity getH2OLinesOpacity() {return getH2OLinesOpacity(getGroundWH2O());}
     503             :   /** Function to retrieve the integrated H2O Lines Opacity along the atmospheric path
     504             :    corresponding to a given water vapor column */
     505             :   Opacity getH2OLinesOpacity(const Length &integratedwatercolumn);
     506             :   /** Function to retrieve the integrated H2O Lines Opacity along the atmospheric path
     507             :    corresponding to a given water vapor column
     508             :     for channel nc in an RefractiveIndexProfile object with a spectral grid */
     509             :   Opacity getH2OLinesOpacity(const Length &integratedwatercolumn, unsigned int nc);
     510             :   /** Function to retrieve the integrated H2O Lines Opacity along the atmospheric path
     511             :    corresponding to a given water vapor column
     512             :     for channel nc in an RefractiveIndexProfile object of a spectral window */
     513             :   Opacity getH2OLinesOpacity(const Length &integratedwatercolumn, unsigned int spwid, unsigned int nc);
     514             :   /** Function to retrieve the integrated H2O Continuum Opacity along the atmospheric path
     515             :    corresponding to a given water vapor column
     516             :     for single frequency RefractiveIndexProfile object */
     517             : 
     518             :   /** Function to retrieve the integrated H2O Continuum Opacity along the atmospheric path
     519             :    corresponding to the 1st guess water column (from AtmProfile object)  */
     520           2 :   Opacity getH2OContOpacity() {return getH2OContOpacity(getGroundWH2O());}
     521             :   /** Function to retrieve the integrated H2O Continuum Opacity along the atmospheric path
     522             :    corresponding to a given water vapor column */
     523             :   Opacity getH2OContOpacity(const Length &integratedwatercolumn);
     524             :   /** Function to retrieve the integrated H2O Continuum Opacity along the atmospheric path
     525             :    corresponding to a given water vapor column
     526             :     for channel nc in an RefractiveIndexProfile object with a spectral grid */
     527             :   Opacity getH2OContOpacity(const Length &integratedwatercolumn, unsigned int nc);
     528             :   /** Function to retrieve the integrated H2O Continuum Opacity along the atmospheric path
     529             :    corresponding to a given water vapor column
     530             :     for channel nc in an RefractiveIndexProfile object of a spectral window */
     531             :   Opacity getH2OContOpacity(const Length &integratedwatercolumn, unsigned int spwid, unsigned int nc);
     532             : 
     533             : 
     534             : 
     535             : 
     536             : 
     537             :   Opacity getAverageWetOpacity(const Length &integratedwatercolumn, unsigned int spwid);
     538             :   Opacity getAverageH2OLinesOpacity(const Length &integratedwatercolumn, unsigned int spwid);
     539             :   Opacity getAverageH2OContOpacity(const Length &integratedwatercolumn, unsigned int spwid);
     540             : 
     541             :   /** Function to retrieve the integrated Atmospheric Phase Delay (Dry part) along the atmospheric path
     542             :    corresponding to a given water vapor column
     543             :     for single frequency RefractiveIndexProfile object */
     544             :   Angle getNonDispersiveDryPhaseDelay();
     545             :   /** Function to retrieve the integrated Atmospheric Path length (Dry part) along the atmospheric path
     546             :    corresponding to a given water vapor column
     547             :     for single frequency RefractiveIndexProfile object */
     548             :   Length getNonDispersiveDryPathLength();
     549             :   /** Function to retrieve the integrated Atmospheric Phase Delay (Dry part) along the atmospheric path
     550             :    corresponding to a given water vapor column
     551             :     for channel nc in an RefractiveIndexProfile object with a spectral grid */
     552             :   Angle getNonDispersiveDryPhaseDelay(unsigned int nc);
     553             :   /** Function to retrieve the integrated Atmospheric Path length (Dry part) along the atmospheric path
     554             :    corresponding to a given water vapor column
     555             :     for channel nc in an RefractiveIndexProfile object with a spectral grid */
     556             :   Length getNonDispersiveDryPathLength(unsigned int nc);
     557             :   /** Function to retrieve the integrated Atmospheric Phase Delay (Dry part) along the atmospheric path
     558             :    corresponding to a given water vapor column
     559             :     for single frequency RefractiveIndexProfile object with several Spectral Grids */
     560             :   Angle getNonDispersiveDryPhaseDelay(unsigned int spwid, unsigned int nc);
     561             :   /** Function to retrieve the integrated Atmospheric Path length (Dry part) along the atmospheric path
     562             :    corresponding to a given water vapor column
     563             :     for channel nc in an RefractiveIndexProfile object with everal Spectral Grids */
     564             :   Length getNonDispersiveDryPathLength(unsigned int spwid, unsigned int nc);
     565             : 
     566             :   /** Function to retrieve the integrated Atmospheric Phase Delay (Dry part) along the atmospheric path
     567             :    corresponding to a given water vapor column
     568             :     for single frequency RefractiveIndexProfile object */
     569             :   Angle getDispersiveDryPhaseDelay();
     570             :   /** Function to retrieve the integrated Atmospheric Path length (Dry part) along the atmospheric path
     571             :    corresponding to a given water vapor column
     572             :     for single frequency RefractiveIndexProfile object */
     573             :   Length getDispersiveDryPathLength();
     574             :   /** Function to retrieve the integrated Atmospheric Phase Delay (Dry part) along the atmospheric path
     575             :    corresponding to a given water vapor column
     576             :     for channel nc in an RefractiveIndexProfile object with a spectral grid */
     577             :   Angle getDispersiveDryPhaseDelay(unsigned int nc);
     578             :   /** Function to retrieve the integrated Atmospheric Path length (Dry part) along the atmospheric path
     579             :    corresponding to a given water vapor column
     580             :     for channel nc in an RefractiveIndexProfile object with a spectral grid */
     581             :   Length getDispersiveDryPathLength(unsigned int nc);
     582             :   /** Function to retrieve the integrated Atmospheric Phase Delay (Dry part) along the atmospheric path
     583             :    corresponding to a given water vapor column
     584             :     for single frequency RefractiveIndexProfile object with several Spectral Grids */
     585             :   Angle getDispersiveDryPhaseDelay(unsigned int spwid, unsigned int nc);
     586             :   /** Function to retrieve the integrated Atmospheric Path length (Dry part) along the atmospheric path
     587             :    corresponding to a given water vapor column
     588             :     for channel nc in an RefractiveIndexProfile object with everal Spectral Grids */
     589             :   Length getDispersiveDryPathLength(unsigned int spwid, unsigned int nc);
     590             : 
     591             :   /** Function to retrieve the average integrated Atmospheric Path Length (Dry part) in spectral Window spwid */
     592             :   Length getAverageNonDispersiveDryPathLength(unsigned int spwid);
     593             :   /** Function to retrieve the average integrated Atmospheric Path Length (Dry part) in spectral Window spwid */
     594             :   Length getAverageDispersiveDryPathLength(unsigned int spwid);
     595             :   /** Function to retrieve the average integrated Atmospheric Phase Delay (Dry part) in spectral Window spwid */
     596             :   Angle getAverageNonDispersiveDryPhaseDelay(unsigned int spwid);
     597             :   /** Function to retrieve the average integrated Atmospheric Phase Delay (Dry part) in spectral Window spwid */
     598             :   Angle getAverageDispersiveDryPhaseDelay(unsigned int spwid);
     599             : 
     600             :   /** Function to retrieve the integrated Atmospheric Phase Delay (due to O2 lines) along the atmospheric path
     601             :    corresponding to a given water vapor column
     602             :     for single frequency RefractiveIndexProfile object */
     603             :   Angle getO2LinesPhaseDelay();
     604             :   /** Function to retrieve the integrated Atmospheric Path length (due to O2 Lines) along the atmospheric path
     605             :    corresponding to a given water vapor column
     606             :     for single frequency RefractiveIndexProfile object */
     607             :   Length getO2LinesPathLength();
     608             :   /** Function to retrieve the integrated Atmospheric Phase Delay (due to O2 Lines) along the atmospheric path
     609             :    corresponding to a given water vapor column
     610             :     for channel nc in an RefractiveIndexProfile object with a spectral grid */
     611             :   Angle getO2LinesPhaseDelay(unsigned int nc);
     612             :   /** Function to retrieve the integrated Atmospheric Path length (due to O2 Lines) along the atmospheric path
     613             :    corresponding to a given water vapor column
     614             :     for channel nc in an RefractiveIndexProfile object with a spectral grid */
     615             :   Length getO2LinesPathLength(unsigned int nc);
     616             :   /** Function to retrieve the integrated Atmospheric Phase Delay (due to O2 Lines) along the atmospheric path
     617             :    corresponding to a given water vapor column
     618             :     for single frequency RefractiveIndexProfile object with several Spectral Grids */
     619             :   Angle getO2LinesPhaseDelay(unsigned int spwid, unsigned int nc);
     620             :   /** Function to retrieve the average integrated Atmospheric Phase Delay (due to O2 Lines) in spectral Window spwid */
     621             :   Angle getAverageO2LinesPhaseDelay(unsigned int spwid);
     622             :   /** Function to retrieve the integrated Atmospheric Path length (due to O2 Lines) along the atmospheric path
     623             :    corresponding to a given water vapor column
     624             :     for channel nc in an RefractiveIndexProfile object with everal Spectral Grids */
     625             :   Length getO2LinesPathLength(unsigned int spwid, unsigned int nc);
     626             :   /** Function to retrieve the average integrated Atmospheric Path Length (due to O2 Lines) in spectral Window spwid */
     627             :   Length getAverageO2LinesPathLength(unsigned int spwid);
     628             : 
     629             :   /** Function to retrieve the integrated Atmospheric Phase Delay (due to O3 lines) along the atmospheric path
     630             :    corresponding to a given water vapor column
     631             :     for single frequency RefractiveIndexProfile object */
     632             :   Angle getO3LinesPhaseDelay();
     633             :   /** Function to retrieve the integrated Atmospheric Path length (due to O3 Lines) along the atmospheric path
     634             :    corresponding to a given water vapor column
     635             :     for single frequency RefractiveIndexProfile object */
     636             :   Length getO3LinesPathLength();
     637             :   /** Function to retrieve the integrated Atmospheric Phase Delay (due to O3 Lines) along the atmospheric path
     638             :    corresponding to a given water vapor column
     639             :     for channel nc in an RefractiveIndexProfile object with a spectral grid */
     640             :   Angle getO3LinesPhaseDelay(unsigned int nc);
     641             :   /** Function to retrieve the integrated Atmospheric Path length (due to O3 Lines) along the atmospheric path
     642             :    corresponding to a given water vapor column
     643             :     for channel nc in an RefractiveIndexProfile object with a spectral grid */
     644             :   Length getO3LinesPathLength(unsigned int nc);
     645             :   /** Function to retrieve the integrated Atmospheric Phase Delay (due to O3 Lines) along the atmospheric path
     646             :    corresponding to a given water vapor column
     647             :     for single frequency RefractiveIndexProfile object with several Spectral Grids */
     648             :   Angle getO3LinesPhaseDelay(unsigned int spwid, unsigned int nc);
     649             :   /** Function to retrieve the average integrated Atmospheric Phase Delay (due to O3 Lines) in spectral Window spwid */
     650             :   Angle getAverageO3LinesPhaseDelay(unsigned int spwid);
     651             :   /** Function to retrieve the integrated Atmospheric Path length (due to O3 Lines) along the atmospheric path
     652             :    corresponding to a given water vapor column
     653             :     for channel nc in an RefractiveIndexProfile object with everal Spectral Grids */
     654             :   Length getO3LinesPathLength(unsigned int spwid, unsigned int nc);
     655             :   /** Function to retrieve the average integrated Atmospheric Path Length (due to O3 Lines) in spectral Window spwid */
     656             :   Length getAverageO3LinesPathLength(unsigned int spwid);
     657             : 
     658             :   /** Function to retrieve the integrated Atmospheric Phase Delay (due to CO lines) along the atmospheric path
     659             :    corresponding to a given water vapor column
     660             :     for single frequency RefractiveIndexProfile object */
     661             :   Angle getCOLinesPhaseDelay();
     662             :   /** Function to retrieve the integrated Atmospheric Path length (due to CO Lines) along the atmospheric path
     663             :    corresponding to a given water vapor column
     664             :     for single frequency RefractiveIndexProfile object */
     665             :   Length getCOLinesPathLength();
     666             :   /** Function to retrieve the integrated Atmospheric Phase Delay (due to CO Lines) along the atmospheric path
     667             :    corresponding to a given water vapor column
     668             :     for channel nc in an RefractiveIndexProfile object with a spectral grid */
     669             :   Angle getCOLinesPhaseDelay(unsigned int nc);
     670             :   /** Function to retrieve the integrated Atmospheric Path length (due to CO Lines) along the atmospheric path
     671             :    corresponding to a given water vapor column
     672             :     for channel nc in an RefractiveIndexProfile object with a spectral grid */
     673             :   Length getCOLinesPathLength(unsigned int nc);
     674             :   /** Function to retrieve the integrated Atmospheric Phase Delay (due to CO Lines) along the atmospheric path
     675             :    corresponding to a given water vapor column
     676             :     for single frequency RefractiveIndexProfile object with several Spectral Grids */
     677             :   Angle getCOLinesPhaseDelay(unsigned int spwid, unsigned int nc);
     678             :   /** Function to retrieve the average integrated Atmospheric Phase Delay (due to CO Lines) in spectral Window spwid */
     679             :   Angle getAverageCOLinesPhaseDelay(unsigned int spwid);
     680             :   /** Function to retrieve the integrated Atmospheric Path length (due to CO Lines) along the atmospheric path
     681             :    corresponding to a given water vapor column
     682             :     for channel nc in an RefractiveIndexProfile object with everal Spectral Grids */
     683             :   Length getCOLinesPathLength(unsigned int spwid, unsigned int nc);
     684             :   /** Function to retrieve the average integrated Atmospheric Path Length (due to CO Lines) in spectral Window spwid */
     685             :   Length getAverageCOLinesPathLength(unsigned int spwid);
     686             : 
     687             : 
     688             : 
     689             : 
     690             :   /** Function to retrieve the integrated Atmospheric Phase Delay (due to N2O lines) along the atmospheric path
     691             :    corresponding to a given water vapor column
     692             :     for single frequency RefractiveIndexProfile object */
     693             :   Angle getN2OLinesPhaseDelay();
     694             :   /** Function to retrieve the integrated Atmospheric Path length (due to N2O Lines) along the atmospheric path
     695             :    corresponding to a given water vapor column
     696             :     for single frequency RefractiveIndexProfile object */
     697             :   Length getN2OLinesPathLength();
     698             :   /** Function to retrieve the integrated Atmospheric Phase Delay (due to N2O Lines) along the atmospheric path
     699             :    corresponding to a given water vapor column
     700             :     for channel nc in an RefractiveIndexProfile object with a spectral grid */
     701             :   Angle getN2OLinesPhaseDelay(unsigned int nc);
     702             :   /** Function to retrieve the integrated Atmospheric Path length (due to N2O Lines) along the atmospheric path
     703             :    corresponding to a given water vapor column
     704             :     for channel nc in an RefractiveIndexProfile object with a spectral grid */
     705             :   Length getN2OLinesPathLength(unsigned int nc);
     706             :   /** Function to retrieve the integrated Atmospheric Phase Delay (due to N2O Lines) along the atmospheric path
     707             :    corresponding to a given water vapor column
     708             :     for single frequency RefractiveIndexProfile object with several Spectral Grids */
     709             :   Angle getN2OLinesPhaseDelay(unsigned int spwid, unsigned int nc);
     710             :   /** Function to retrieve the average integrated Atmospheric Phase Delay (due to N2O Lines) in spectral Window spwid */
     711             :   Angle getAverageN2OLinesPhaseDelay(unsigned int spwid);
     712             :   /** Function to retrieve the integrated Atmospheric Path length (due to N2O Lines) along the atmospheric path
     713             :    corresponding to a given water vapor column
     714             :     for channel nc in an RefractiveIndexProfile object with everal Spectral Grids */
     715             :   Length getN2OLinesPathLength(unsigned int spwid, unsigned int nc);
     716             :   /** Function to retrieve the average integrated Atmospheric Path Length (due to N2O Lines) in spectral Window spwid */
     717             :   Length getAverageN2OLinesPathLength(unsigned int spwid);
     718             : 
     719             : 
     720             : 
     721             :   /** Function to retrieve the integrated Atmospheric Phase Delay (due to NO2 lines) along the atmospheric path
     722             :    corresponding to a given water vapor column
     723             :     for single frequency RefractiveIndexProfile object */
     724             :   Angle getNO2LinesPhaseDelay();
     725             :   /** Function to retrieve the integrated Atmospheric Path length (due to NO2 Lines) along the atmospheric path
     726             :    corresponding to a given water vapor column
     727             :     for single frequency RefractiveIndexProfile object */
     728             :   Length getNO2LinesPathLength();
     729             :   /** Function to retrieve the integrated Atmospheric Phase Delay (due to NO2 Lines) along the atmospheric path
     730             :    corresponding to a given water vapor column
     731             :     for channel nc in an RefractiveIndexProfile object with a spectral grid */
     732             :   Angle getNO2LinesPhaseDelay(unsigned int nc);
     733             :   /** Function to retrieve the integrated Atmospheric Path length (due to NO2 Lines) along the atmospheric path
     734             :    corresponding to a given water vapor column
     735             :     for channel nc in an RefractiveIndexProfile object with a spectral grid */
     736             :   Length getNO2LinesPathLength(unsigned int nc);
     737             :   /** Function to retrieve the integrated Atmospheric Phase Delay (due to NO2 Lines) along the atmospheric path
     738             :    corresponding to a given water vapor column
     739             :     for single frequency RefractiveIndexProfile object with several Spectral Grids */
     740             :   Angle getNO2LinesPhaseDelay(unsigned int spwid, unsigned int nc);
     741             :   /** Function to retrieve the average integrated Atmospheric Phase Delay (due to NO2 Lines) in spectral Window spwid */
     742             :   Angle getAverageNO2LinesPhaseDelay(unsigned int spwid);
     743             :   /** Function to retrieve the integrated Atmospheric Path length (due to NO2 Lines) along the atmospheric path
     744             :    corresponding to a given water vapor column
     745             :     for channel nc in an RefractiveIndexProfile object with everal Spectral Grids */
     746             :   Length getNO2LinesPathLength(unsigned int spwid, unsigned int nc);
     747             :   /** Function to retrieve the average integrated Atmospheric Path Length (due to NO2 Lines) in spectral Window spwid */
     748             :   Length getAverageNO2LinesPathLength(unsigned int spwid);
     749             : 
     750             : 
     751             :   /** Function to retrieve the integrated Atmospheric Phase Delay (due to SO2 lines) along the atmospheric path
     752             :    corresponding to a given water vapor column
     753             :     for single frequency RefractiveIndexProfile object */
     754             :   Angle getSO2LinesPhaseDelay();
     755             :   /** Function to retrieve the integrated Atmospheric Path length (due to SO2 Lines) along the atmospheric path
     756             :    corresponding to a given water vapor column
     757             :     for single frequency RefractiveIndexProfile object */
     758             :   Length getSO2LinesPathLength();
     759             :   /** Function to retrieve the integrated Atmospheric Phase Delay (due to SO2 Lines) along the atmospheric path
     760             :    corresponding to a given water vapor column
     761             :     for channel nc in an RefractiveIndexProfile object with a spectral grid */
     762             :   Angle getSO2LinesPhaseDelay(unsigned int nc);
     763             :   /** Function to retrieve the integrated Atmospheric Path length (due to SO2 Lines) along the atmospheric path
     764             :    corresponding to a given water vapor column
     765             :     for channel nc in an RefractiveIndexProfile object with a spectral grid */
     766             :   Length getSO2LinesPathLength(unsigned int nc);
     767             :   /** Function to retrieve the integrated Atmospheric Phase Delay (due to SO2 Lines) along the atmospheric path
     768             :    corresponding to a given water vapor column
     769             :     for single frequency RefractiveIndexProfile object with several Spectral Grids */
     770             :   Angle getSO2LinesPhaseDelay(unsigned int spwid, unsigned int nc);
     771             :   /** Function to retrieve the average integrated Atmospheric Phase Delay (due to SO2 Lines) in spectral Window spwid */
     772             :   Angle getAverageSO2LinesPhaseDelay(unsigned int spwid);
     773             :   /** Function to retrieve the integrated Atmospheric Path length (due to SO2 Lines) along the atmospheric path
     774             :    corresponding to a given water vapor column
     775             :     for channel nc in an RefractiveIndexProfile object with everal Spectral Grids */
     776             :   Length getSO2LinesPathLength(unsigned int spwid, unsigned int nc);
     777             :   /** Function to retrieve the average integrated Atmospheric Path Length (due to SO2 Lines) in spectral Window spwid */
     778             :   Length getAverageSO2LinesPathLength(unsigned int spwid);
     779             : 
     780             : 
     781             : 
     782             : 
     783             : 
     784             : 
     785             : 
     786             : 
     787             : 
     788             :   /** Function to retrieve the integrated Atmospheric Phase Delay (Dispersive part) along the atmospheric path
     789             :    corresponding to the 1st guess water column (from AtmProfile object)
     790             :     for single frequency RefractiveIndexProfile object */
     791             :   Angle getDispersiveH2OPhaseDelay() {return getDispersiveH2OPhaseDelay(getGroundWH2O());}
     792             :   /** Function to retrieve the integrated Atmospheric Phase Delay (Dispersive part) along the atmospheric path
     793             :    corresponding to a given water vapor column
     794             :     for single frequency RefractiveIndexProfile object */
     795             :   Angle getDispersiveH2OPhaseDelay(const Length &integratedwatercolumn);
     796             :   /** Function to retrieve the integrated Atmospheric Path length (Dispersive part) along the atmospheric path
     797             :    corresponding to the 1st guess water column (from AtmProfile object)
     798             :     for single frequency RefractiveIndexProfile object */
     799           4 :   Length getDispersiveH2OPathLength() {return getDispersiveH2OPathLength(getGroundWH2O());}
     800             :   /** Function to retrieve the integrated Atmospheric Path length (Dispersive part) along the atmospheric path
     801             :    corresponding to a given water vapor column
     802             :     for single frequency RefractiveIndexProfile object */
     803             :   Length getDispersiveH2OPathLength(const Length &integratedwatercolumn);
     804             :   /** Function to retrieve the integrated Atmospheric Phase Delay (Dispersive part) along the atmospheric path
     805             :    corresponding to a given water vapor column
     806             :     for channel nc in an RefractiveIndexProfile object with a spectral grid */
     807             :   Angle getDispersiveH2OPhaseDelay(const Length &integratedwatercolumn, unsigned int nc);
     808             :   /** Function to retrieve the integrated Atmospheric Path length (Dispersive part) along the atmospheric path
     809             :    corresponding to a given water vapor column
     810             :     for channel nc in an RefractiveIndexProfile object with a spectral grid */
     811             :   Length getDispersiveH2OPathLength(const Length &integratedwatercolumn, unsigned int nc);
     812             :   /** Function to retrieve the integrated Atmospheric Phase Delay (Dispersive part) along the atmospheric path
     813             :    corresponding to a given water vapor column
     814             :     for single frequency RefractiveIndexProfile object with several Spectral Grids */
     815             :   Angle getDispersiveH2OPhaseDelay(const Length &integratedwatercolumn, unsigned int spwid, unsigned int nc);
     816             :   /** Function to retrieve the average integrated Atmospheric Phase Delay (Dispersive part) in spectral Window spwid */
     817             :   Angle getAverageDispersiveH2OPhaseDelay(const Length &integratedwatercolumn, unsigned int spwid);
     818             :   /** Function to retrieve the integrated Atmospheric Path length (Dispersive part) along the atmospheric path
     819             :    corresponding to a given water vapor column
     820             :     for channel nc in an RefractiveIndexProfile object with everal Spectral Grids */
     821             :   Length getDispersiveH2OPathLength(const Length &integratedwatercolumn, unsigned int spwid, unsigned int nc);
     822             :   /** Function to retrieve the average integrated Atmospheric Path Length (Dispersive part) in spectral Window spwid */
     823             :   Length getAverageDispersiveH2OPathLength(const Length &integratedwatercolumn, unsigned int spwid);
     824             :   /** Function to retrieve the integrated Atmospheric Phase Delay (Non-Dispersive part) along the atmospheric path
     825             :    corresponding to the 1st guess water column (from AtmProfile object)
     826             :     for single frequency RefractiveIndexProfile object */
     827             :   Angle getNonDispersiveH2OPhaseDelay() {return getNonDispersiveH2OPhaseDelay(getGroundWH2O());}
     828             :   /** Function to retrieve the integrated Atmospheric Phase Delay (Non-Dispersive part) along the atmospheric path
     829             :    corresponding to a given water vapor column
     830             :     for single frequency RefractiveIndexProfile object */
     831             :   Angle getNonDispersiveH2OPhaseDelay(const Length &integratedwatercolumn);
     832             :   /** Function to retrieve the integrated Atmospheric Path Length (Non-Dispersive part) along the atmospheric path
     833             :    corresponding to the 1st guess water column (from AtmProfile object)
     834             :     for single frequency RefractiveIndexProfile object */
     835           4 :   Length getNonDispersiveH2OPathLength() {return getNonDispersiveH2OPathLength(getGroundWH2O());}
     836             :   /** Function to retrieve the integrated Atmospheric Path Length (Non-Dispersive part) along the atmospheric path
     837             :    corresponding to a given water vapor column
     838             :     for single frequency RefractiveIndexProfile object */
     839             :   Length getNonDispersiveH2OPathLength(const Length &integratedwatercolumn);
     840             :   /** Function to retrieve the integrated Atmospheric Phase Delay (Non-Dispersive part) along the atmospheric path
     841             :    corresponding to a given water vapor column
     842             :     for channel nc in an RefractiveIndexProfile object with a spectral grid */
     843             :   Angle getNonDispersiveH2OPhaseDelay(const Length &integratedwatercolumn, unsigned int nc);
     844             :   /** Function to retrieve the integrated Atmospheric Path Length (Non-Dispersive part) along the atmospheric path
     845             :    corresponding to a given water vapor column
     846             :     for channel nc in an RefractiveIndexProfile object with a spectral grid */
     847             :   Length getNonDispersiveH2OPathLength(const Length &integratedwatercolumn, unsigned int nc);
     848             :   /** Function to retrieve the integrated Atmospheric Phase Delay (Non-Dispersive part) along the atmospheric path
     849             :    corresponding to a given water vapor column
     850             :     for channel nc in an RefractiveIndexProfile object with several spectral grids */
     851             :   Angle getNonDispersiveH2OPhaseDelay(const Length &integratedwatercolumn, unsigned int spwid, unsigned int nc);
     852             :   /** Function to retrieve the average integrated Atmospheric Path Length (Non-Dispersive part) in spectral Window spwid */
     853             :   Length getAverageNonDispersiveH2OPathLength(const Length &integratedwatercolumn, unsigned int spwid);
     854             :   /** Function to retrieve the average integrated Atmospheric Phase Delay (Non-Dispersive part) in spectral Window spwid */
     855             :   Angle getAverageNonDispersiveH2OPhaseDelay(const Length &integratedwatercolumn, unsigned int spwid);
     856             :   /** Function to retrieve the integrated Atmospheric Path Length (Non-Dispersive part) along the atmospheric path
     857             :    corresponding to a given water vapor column
     858             :     for channel nc in an RefractiveIndexProfile object with several spectral grids */
     859             :   Length getNonDispersiveH2OPathLength(const Length &integratedwatercolumn, unsigned int spwid, unsigned int nc);
     860             : 
     861             :   void updateNewSpectralWindows();
     862             : 
     863             :   //@}
     864             : 
     865             : protected:
     866             : 
     867             :   vector<vector<std::complex<double> >*> vv_N_H2OLinesPtr_; //!< H2O lines absorption coefficient and delay term (rad m^-1,m^-1)
     868             :   vector<vector<std::complex<double> >*> vv_N_H2OContPtr_; //!< H2O continuum absorption coefficient and delay term  (rad m^-1,m^-1)
     869             :   vector<vector<std::complex<double> >*> vv_N_O2LinesPtr_; //!< O2 lines absorption coefficient and delay term (rad m^-1,m^-1)
     870             :   vector<vector<std::complex<double> >*> vv_N_DryContPtr_; //!< Dry continuum absorption coefficient and delay term  (rad m^-1,m^-1)
     871             :   vector<vector<std::complex<double> >*> vv_N_O3LinesPtr_; //!< O3 lines absorption coefficient and delay term  (rad m^-1,m^-1)
     872             :   vector<vector<std::complex<double> >*> vv_N_COLinesPtr_; //!< CO lines absorption coefficient and delay term  (rad m^-1,m^-1)
     873             :   vector<vector<std::complex<double> >*> vv_N_N2OLinesPtr_; //!< N2O lines absorption coefficient and delay term  (rad m^-1,m^-1)
     874             :   vector<vector<std::complex<double> >*> vv_N_NO2LinesPtr_; //!< NO2 lines absorption coefficient and delay term  (rad m^-1,m^-1)
     875             :   vector<vector<std::complex<double> >*> vv_N_SO2LinesPtr_; //!< SO2 lines absorption coefficient and delay term  (rad m^-1,m^-1)
     876             : 
     877             :   /* vecteur de vecteurs ???? */
     878             : 
     879             :   /**
     880             :    * Method to build the profile of the absorption coefficients,
     881             :    */
     882             :   void mkRefractiveIndexProfile(); //!<  builds the absorption profiles, returns error code: <0 unsuccessful
     883             :   void rmRefractiveIndexProfile(); //!<  deletes all the layer profiles for all the frequencies
     884             : 
     885             :   bool updateRefractiveIndexProfile(const Length &altitude,
     886             :                                     const Pressure &groundPressure,
     887             :                                     const Temperature &groundTemperature,
     888             :                                     double tropoLapseRate,
     889             :                                     const Humidity &relativeHumidity,
     890             :                                     const Length &wvScaleHeight);
     891             : 
     892             :   /** Method to assess if a channel frequency index is valid. A spectral grid has a certain number of
     893             :    *  frequency points. Hence the index is not valid if it is equal or greater than this number. Would
     894             :    *  the spectral grid correspond to a single spectral window this index is the channel frequency index of
     895             :    *  that window. When ther are more than a single spectral window in the spectral grid it is recommended
     896             :    *  to use the method which include a spectral window identifier.
     897             :    *  @param nc channel frequency index in the spectral grid.
     898             :    *  @ret   true if the index is smaller than the number of grid points, else false.
     899             :    *  @post  update the state of the RefractiveIndexProfile object for ALL the frequency grid points
     900             :    *         which have not yet their profiles determined, then return true, else return true
     901             :    *         directly, the object being already up-to-date.
     902             :    */
     903             :   bool chanIndexIsValid(unsigned int nc);
     904             :   /** Method to assess if a channel frequency index of a given spectral window is valid.
     905             :    *  @param spwid spectral window identifier
     906             :    *  @param nc channel frequency index relative to that spectral window (e.g. if a spectral window has
     907             :    *         1024 frequency channels then the index nc must be in the range 0 to 1023 in order to return
     908             :    *         true).
     909             :    *  @ret   true if the index is smaller than the number of grid points for that spectral window, else false.
     910             :    *  @post  update the state of the RefractiveIndexProfile object for all the frequency grid points if
     911             :    *         there was not yet profiles determined for that index, then return true, else return true
     912             :    *         directly, the object being already up-to-date.
     913             :    */
     914             :   bool spwidAndIndexAreValid(unsigned int spwid, unsigned int idx);
     915             : }; // class RefractiveIndexProfile
     916             : 
     917             : ATM_NAMESPACE_END
     918             : 
     919             : #endif /*!_ATM_REFRACTIVEINDEXPROFILE_H*/

Generated by: LCOV version 1.16