| 
    ARTS
    2.2.66
    
   | 
 
CIA data for a single pair of molecules. More...
#include <cia.h>
Public Member Functions | |
| String | MoleculeName (const Index i) const | 
| Return each molecule name (as a string) that is associated with this CIARecord.  More... | |
| void | SetMoleculeName (const Index i, const String &name) | 
| Set each molecule name (from a string) that is associated with this CIARecord.  More... | |
| Index | Species (const Index i) const | 
| Return CIA species index.  More... | |
| Index | DatasetCount () const | 
| Return number of datasets in this record.  More... | |
| ConstVectorView | FrequencyGrid (Index dataset) const | 
| Return frequency grid for given dataset.  More... | |
| ConstVectorView | TemperatureGrid (Index dataset) const | 
| Return temperatur grid for given dataset.  More... | |
| const GriddedField2 & | Dataset (Index dataset) const | 
| Return CIA dataset.  More... | |
| const ArrayOfGriddedField2 & | Data () const | 
| Return CIA data.  More... | |
| void | SetSpecies (const Index first, const Index second) | 
| Set CIA species.  More... | |
| void | Extract (VectorView result, ConstVectorView f_grid, const Numeric &temperature, const Index &dataset, const Numeric &T_extrapolfac, const Index &robust, const Verbosity &verbosity) const | 
| Vector version of extract.  More... | |
| Numeric | Extract (const Numeric &frequency, const Numeric &temperature, const Index &dataset, const Numeric &T_extrapolfac, const Index &robust, const Verbosity &verbosity) const | 
| Scalar version of extract.  More... | |
| void | ReadFromCIA (const String &filename, const Verbosity &verbosity) | 
| Read CIA catalog file.  More... | |
Private Member Functions | |
| void | AppendDataset (const Vector &freq, const ArrayOfNumeric &temp, const ArrayOfVector &cia) | 
| Append dataset to mdata.  More... | |
Private Attributes | |
| ArrayOfGriddedField2 | mdata | 
| The data itself, directly from the HITRAN file.  More... | |
| Index | mspecies [2] | 
| The pair of molecules associated with these CIA data.  More... | |
Friends | |
| void | xml_read_from_stream (istream &is_xml, CIARecord &cr, bifstream *pbifs, const Verbosity &verbosity) | 
| Reads CIARecord from XML input stream.  More... | |
CIA data for a single pair of molecules.
A variable of this class can hold the complete information from one HITRAN CIA file. A HITRAN CIA data file can hold several datasets (data for different temperatures but fixed frequency range). But all datasets are for the same pair of molecules.
      
  | 
  private | 
Append dataset to mdata.
Append data dataset to mdata.
Definition at line 515 of file cia.cc.
References GriddedField2::data, joker, mdata, ConstVectorView::nelem(), GriddedField2::resize(), GriddedField::set_grid(), GriddedField::set_grid_name(), and temp.
Referenced by ReadFromCIA().
      
  | 
  inline | 
Return CIA data.
Definition at line 151 of file cia.h.
References mdata.
Referenced by xml_write_to_stream().
      
  | 
  inline | 
Return CIA dataset.
Definition at line 140 of file cia.h.
References mdata, and Array< base >::nelem().
      
  | 
  inline | 
Return number of datasets in this record.
Definition at line 113 of file cia.h.
References mdata, and Array< base >::nelem().
      
  | 
  inline | 
Scalar version of extract.
Use the vector version, if you can, it is more efficient. This is just a convenience wrapper for it.
| [in] | frequency | Scalar frequency | 
| [in] | temperature | Scalar temparature | 
| [in] | dataset | Index of dataset to use | 
| [in] | robust | Set to 1 to suppress runtime errors (and return NAN values instead). | 
| [in] | verbosity | Standard verbosity object. | 
Definition at line 201 of file cia.h.
References Extract().
| void CIARecord::Extract | ( | VectorView | result, | 
| ConstVectorView | f_grid, | ||
| const Numeric & | temperature, | ||
| const Index & | dataset, | ||
| const Numeric & | T_extrapolfac, | ||
| const Index & | robust, | ||
| const Verbosity & | verbosity | ||
| ) | const | 
Vector version of extract.
Check whether there is a suitable dataset in the CIARecord and do the interpolation.
| [out] | result | CIA value for given frequency grid and temperature. | 
| [in] | f_grid | Frequency grid. | 
| [in] | temperature | Scalar temparature. | 
| [in] | dataset | Index of dataset to use. | 
| [in] | robust | Set to 1 to suppress runtime errors (and return NAN values instead). | 
| [in] | verbosity | Standard verbosity object. | 
Definition at line 265 of file cia.cc.
References cia_interpolation(), mdata, and Array< base >::nelem().
Referenced by abs_xsec_per_speciesAddCIA(), and Extract().
      
  | 
  inline | 
Return frequency grid for given dataset.
Definition at line 118 of file cia.h.
References mdata, and Array< base >::nelem().
Return each molecule name (as a string) that is associated with this CIARecord.
The CIARecord is defined for a pair of molecules!
| [in] | i | Must be either 0 or 1. Then the first or second name of the pair is returned. | 
Definition at line 301 of file cia.cc.
References mspecies, and species_name_from_species_index().
Referenced by abs_xsec_per_speciesAddCIA(), and xml_write_to_stream().
Read CIA catalog file.
Reads the given CIA catalog file into this CIARecord.
| [in] | filename | Path of catalog file to read. | 
| [in] | verbosity. | 
Definition at line 345 of file cia.cc.
References AppendDataset(), CREATE_OUT2, mdata, my_basic_string< charT >::nelem(), open_input_file(), Vector::resize(), SPEED_OF_LIGHT, temp, and w().
Referenced by abs_cia_dataReadFromCIA().
Set each molecule name (from a string) that is associated with this CIARecord.
The CIARecord is defined for a pair of molecules. The molecule names are internally stored as species indices.
| [in] | i | Must be either 0 or 1. Then the first or second name of the pair is returned. | 
| [in] | name | The molecule name as a string, e.g., "H2O". | 
Definition at line 313 of file cia.cc.
References mspecies, and species_index_from_species_name().
Set CIA species.
| [in] | first | CIA Species. | 
| [in] | second | CIA Species. | 
Definition at line 161 of file cia.h.
References mspecies.
Referenced by abs_cia_dataReadFromCIA(), and xml_read_from_stream().
Return CIA species index.
| [in] | i | Must be either 0 or 1. Then the first or second species index is returned. | 
Definition at line 101 of file cia.h.
References mspecies.
Referenced by abs_xsec_per_speciesAddCIA().
      
  | 
  inline | 
Return temperatur grid for given dataset.
Definition at line 129 of file cia.h.
References mdata, and Array< base >::nelem().
      
  | 
  friend | 
Reads CIARecord from XML input stream.
| is_xml | XML Input stream | 
| irecord | SpeciesRecord return value | 
| pbifs | Pointer to binary input stream. NULL in case of ASCII file. | 
Definition at line 58 of file xml_io_compound_types.cc.
      
  | 
  private | 
The data itself, directly from the HITRAN file.
Dimensions: Array dimension: Dataset. One file (one molecule pair) can have different datasets, typically for different temperature or frequency ranges. Gridded field dimension 1: Frequency [Hz]. Gridded field dimension 2: Temperature [K]. Data: Binary absorption cross-sections in m^5 molec^(-2)
Definition at line 246 of file cia.h.
Referenced by AppendDataset(), Data(), Dataset(), DatasetCount(), Extract(), FrequencyGrid(), ReadFromCIA(), TemperatureGrid(), and xml_read_from_stream().
      
  | 
  private | 
The pair of molecules associated with these CIA data.
Molecules are specified by their ARTS internal mspecies index! (This has to be determined upon reading from a file. Should it ever be written out, it has to be mapped to a string again.)
We use a plain C array here, since the length of this is always 2.
Definition at line 256 of file cia.h.
Referenced by MoleculeName(), SetMoleculeName(), SetSpecies(), and Species().