ARTS  1.0.222
absorption.h
Go to the documentation of this file.
1 /* Copyright (C) 2000, 2001 Stefan Buehler <sbuehler@uni-bremen.de>
2  Axel von Engeln <engeln@uni-bremen.de>
3 
4  This program is free software; you can redistribute it and/or modify it
5  under the terms of the GNU General Public License as published by the
6  Free Software Foundation; either version 2, or (at your option) any
7  later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program; if not, write to the Free Software
16  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
17  USA. */
18 
25 // This file contains
26 
27 #ifndef absorption_h
28 #define absorption_h
29 
30 #include <stdexcept>
31 #include "matpackI.h"
32 #include "array.h"
33 #include "mystring.h"
34 #include "make_array.h"
35 
38 typedef void (*lsf_type)(Vector&,
39  Vector&,
40  Numeric,
41  Numeric,
42  Numeric,
43  VectorView,
44  const Index);
45 
52 public:
53 
56 
58  LineshapeRecord(const String& name,
59  const String& description,
60  lsf_type function)
61  : mname(name),
62  mdescription(description),
63  mfunction(function)
64  { /* Nothing to do here. */ }
66  const String& Name() const { return mname; }
68  const String& Description() const { return mdescription; }
70  lsf_type Function() const { return mfunction; }
71 private:
75 
76 };
77 
80 typedef void (*lsnf_type)(Vector&,
81  Numeric,
82  VectorView,
83  const Numeric,
84  const Index);
85 
93 public:
94 
97 
100  const String& description,
101  lsnf_type function)
102  : mname(name),
103  mdescription(description),
104  mfunction(function)
105  { /* Nothing to do here. */ }
107  const String& Name() const { return mname; }
109  const String& Description() const { return mdescription; }
111  lsnf_type Function() const { return mfunction; }
112 private:
116 };
117 
124 public:
125 
128 
130  LineshapeSpec(const Index& ind_ls,
131  const Index& ind_lsn,
132  const Numeric& cutoff)
133  : mind_ls(ind_ls),
134  mind_lsn(ind_lsn),
135  mcutoff(cutoff)
136  { /* Nothing to do here. */ }
137 
139  const Index& Ind_ls() const { return mind_ls; }
141  void SetInd_ls( Index ind_ls ) { mind_ls = ind_ls; }
142 
144  const Index& Ind_lsn() const { return mind_lsn; }
146  void SetInd_lsn( Index ind_lsn ) { mind_lsn = ind_lsn; }
147 
151  const Numeric& Cutoff() const { return mcutoff; }
153  void SetCutoff( Numeric cutoff ) { mcutoff = cutoff; }
154 private:
158 };
159 
163 
164 
165 
169 public:
170 
172  IsotopeRecord() { /* Nothing to do here */ }
173 
177  mname(x.mname),
179  mmass(x.mmass),
182  mjpltags(x.mjpltags)
183  { /* Nothing left to do here. */ }
184 
186  IsotopeRecord(const String& name,
187  const Numeric& abundance,
188  const Numeric& mass,
189  const Index& mytrantag,
190  const Index& hitrantag,
191  const MakeArray<Index>& jpltags) :
192  mname(name),
193  mabundance(abundance),
194  mmass(mass),
195  mmytrantag(mytrantag),
196  mhitrantag(hitrantag),
197  mjpltags(jpltags)
198  {
199  // With Matpack, initialization of mjpltags from jpltags should now work correctly.
200 
201  // Some consistency checks whether the given data makes sense.
202 #ifndef NDEBUG
203  {
204  /* 1. All the tags must be positive or -1 */
205  assert( (0<mmytrantag) || (-1==mmytrantag) );
206  assert( (0<mhitrantag) || (-1==mhitrantag) );
207  for ( Index i=0; i<mjpltags.nelem(); ++i )
208  assert( (0<mjpltags[i]) || (-1==mjpltags[i]) );
209  }
210 #endif // ifndef NDEBUG
211  }
212 
214  const String& Name() const { return mname; }
216  const Numeric& Abundance() const { return mabundance; }
219  const Numeric& Mass() const { return mmass; }
221  const Index& MytranTag() const { return mmytrantag; }
223  const Index& HitranTag() const { return mhitrantag; }
227  const ArrayOfIndex& JplTags() const { return mjpltags; }
228 
229  void SetPartitionFctCoeff( const ArrayOfNumeric& qcoeff )
230  {
231  mqcoeff = qcoeff;
232  }
233 
235 
248  Numeric actual_temperature ) const
249  {
250  Numeric qcoeff_at_t_ref =
251  CalculatePartitionFctAtTemp( reference_temperature );
252  Numeric qtemp =
253  CalculatePartitionFctAtTemp( actual_temperature );
254 
255  if ( qtemp <= 0. )
256  {
257  ostringstream os;
258  os << "Negative value of partition function was obtained for "
259  << mname << ".\nProbably caused by low or negative temperature.";
260  throw runtime_error(os.str());
261  }
262  return qcoeff_at_t_ref / qtemp;
263  }
264 
265 private:
266 
267  // calculate the partition fct at a certain temperature
268  // this is only the prototyping
269  Numeric CalculatePartitionFctAtTemp( Numeric temperature ) const;
270 
278 };
279 
280 
285 public:
286 
289 
291  SpeciesRecord(const char name[],
292  const Index degfr,
293  const MakeArray<IsotopeRecord>& isotope)
294  : mname(name),
295  mdegfr(degfr),
296  misotope(isotope)
297  {
298 
299  // Thanks to Matpack, initialization of misotope with isotope
300  // should now work correctly.
301 
302 #ifndef NDEBUG
303  {
304  /* Check that the isotopes are correctly sorted. */
305  for ( Index i=0; i<misotope.nelem()-1; ++i )
306  {
307  assert( misotope[i].Abundance() >= misotope[i+1].Abundance() );
308  }
309 
310  /* Check that the Mytran tags are correctly sorted. */
311  for ( Index i=0; i<misotope.nelem()-1; ++i )
312  {
313  if ( (0<misotope[i].MytranTag()) && (0<misotope[i+1].MytranTag()) )
314  {
315  assert( misotope[i].MytranTag() < misotope[i+1].MytranTag() );
316 
317  // Also check that the tags have the same base number:
318  assert( misotope[i].MytranTag()/10 == misotope[i].MytranTag()/10 );
319  }
320  }
321 
322  /* Check that the Hitran tags are correctly sorted. */
323  for ( Index i=0; i<misotope.nelem()-1; ++i )
324  {
325  if ( (0<misotope[i].HitranTag()) && (0<misotope[i+1].HitranTag()) )
326  {
327  assert( misotope[i].HitranTag() < misotope[i+1].HitranTag() );
328 
329  // Also check that the tags have the same base number:
330  assert( misotope[i].HitranTag()/10 == misotope[i+1].HitranTag()/10 );
331  }
332  }
333  }
334 #endif // #ifndef NDEBUG
335  }
336 
337  const String& Name() const { return mname; }
338  Index Degfr() const { return mdegfr; }
339  const Array<IsotopeRecord>& Isotope() const { return misotope; }
341 
342 private:
349 };
350 
438 class LineRecord {
439 public:
440 
444  friend void linesElowToJoule(Array<LineRecord>& lines);
445 
450  : mspecies (1000000),
451  misotope (1000000),
452  mf (0. ),
453  mpsf (0. ),
454  mi0 (0. ),
455  mti0 (0. ),
456  melow (0. ),
457  magam (0. ),
458  msgam (0. ),
459  mnair (0. ),
460  mnself (0. ),
461  mtgam (0. ),
462  maux ( ),
463  mdf (-1. ),
464  mdi0 (-1. ),
465  mdagam (-1. ),
466  mdsgam (-1. ),
467  mdnair (-1. ),
468  mdnself (-1. ),
469  mdpsf (-1. )
470  { /* Nothing to do here. */ }
471 
476  LineRecord( Index species,
477  Index isotope,
478  Numeric f,
479  Numeric psf,
480  Numeric i0,
481  Numeric ti0,
482  Numeric elow,
483  Numeric agam,
484  Numeric sgam,
485  Numeric nair,
486  Numeric nself,
487  Numeric tgam,
488  const ArrayOfNumeric& aux,
489  Numeric /* df */,
490  Numeric /* di0 */,
491  Numeric /* dagam */,
492  Numeric /* dsgam */,
493  Numeric /* dnair */,
494  Numeric /* dnself */,
495  Numeric /* dpsf */)
496  : mspecies (species ),
497  misotope (isotope ),
498  mf (f ),
499  mpsf (psf ),
500  mi0 (i0 ),
501  mti0 (ti0 ),
502  melow (elow ),
503  magam (agam ),
504  msgam (sgam ),
505  mnair (nair ),
506  mnself (nself ),
507  mtgam (tgam ),
508  maux (aux )
509  {
510  // Thanks to Matpack, initialization of misotope with isotope
511  // should now work correctly.
512 
513  // Check if this species is legal, i.e., if species and isotope
514  // data exists.
516  assert( mspecies < species_data.nelem() );
517  assert( misotope < species_data[mspecies].Isotope().nelem() );
518  }
519 
521  String Version() const
522  {
523  ostringstream os;
524  os << "ARTSCAT-" << mversion;
525  return os.str();
526  }
527 
530  Index Species() const { return mspecies; }
531 
535  Index Isotope() const { return misotope; }
536 
540  String Name() const {
541  // The species lookup data:
542  extern const Array<SpeciesRecord> species_data;
543  const SpeciesRecord& sr = species_data[mspecies];
544  return sr.Name() + "-" + sr.Isotope()[misotope].Name();
545  }
546 
556  const SpeciesRecord& SpeciesData() const {
557  // The species lookup data:
558  extern const Array<SpeciesRecord> species_data;
559  return species_data[mspecies];
560  }
561 
573  const IsotopeRecord& IsotopeData() const {
574  // The species lookup data:
575  extern const Array<SpeciesRecord> species_data;
576  return species_data[mspecies].Isotope()[misotope];
577  }
578 
580  Numeric F() const { return mf; }
581 
583  void setF( Numeric new_mf ) { mf = new_mf; }
584 
586  Numeric Psf() const { return mpsf; }
587 
589  void setPsf( Numeric new_mpsf ) { mpsf = new_mpsf; }
590 
603  Numeric I0() const { return mi0; }
604 
606  void setI0( Numeric new_mi0 ) { mi0 = new_mi0; }
607 
609  Numeric Ti0() const { return mti0; }
610 
612  Numeric Elow() const { return melow; }
613 
615  Numeric Agam() const { return magam; }
616 
618  void setAgam( Numeric new_agam ) { magam = new_agam; }
619 
621  Numeric Sgam() const { return msgam; }
622 
624  void setSgam( Numeric new_sgam ) { msgam = new_sgam; }
625 
627  Numeric Nair() const { return mnair; }
628 
630  void setNair( Numeric new_mnair ) { mnair = new_mnair; }
631 
633  Numeric Nself() const { return mnself; }
634 
636  void setNself( Numeric new_mnself ) { mnself = new_mnself; }
637 
639  Numeric Tgam() const { return mtgam; }
640 
646  Index Naux() const { return maux.nelem(); }
647 
649  const ArrayOfNumeric& Aux() const { return maux; }
650  //
651 
653  Numeric dF() const { return mdf; }
654 
656  Numeric dI0() const { return mdi0; }
657 
659  Numeric dAgam() const { return mdagam; }
660 
662  Numeric dSgam() const { return mdsgam; }
663 
665  Numeric dNair() const { return mdnair; }
666 
668  Numeric dNself() const { return mdnself; }
669 
671  Numeric dPsf() const { return mdpsf; }
672 
673 
733  bool ReadFromHitranStream(istream& is);
734 
735 
736 
806  bool ReadFromHitran2004Stream(istream& is);
807 
808 
809 
810 
879  bool ReadFromMytran2Stream(istream& is);
880 
881 
934  bool ReadFromJplStream(istream& is);
935 
957  bool ReadFromArtsStream(istream& is);
958 
959 
960 private:
961  // Versin number:
962  static const Index mversion = 3;
963  // Molecular species index:
965  // Isotopic species index:
967  // The line center frequency in Hz:
969  // The pressure shift parameter in Hz/Pa:
971  // The line intensity in m^2/Hz:
973  // Reference temperature for I0 in K:
975  // Lower state energy in cm^-1:
977  // Air broadened width in Hz/Pa:
979  // Self broadened width in Hz/Pa:
981  // AGAM temperature exponent (dimensionless):
983  // SGAM temperature exponent (dimensionless):
985  // Reference temperature for AGAM and SGAM in K:
987  // Array to hold auxiliary parameters:
989  //
990  // Fields for the spectroscopic parameters accuracies
991  //
992  // Accuracy for line center frequency in Hz:
994  // Accuracy for line intensity in %:
996  // Accuracy for air broadened width in %:
998  // Accuracy for self broadened width in %:
1000  // Accuracy for AGAM temperature exponent in %:
1002  // Accuracy for SGAM temperature exponent in %:
1004  // Accuracy for pressure shift in %:
1006 };
1007 
1008 // is needed to map jpl tags/arts identifier to the species/isotope data within arts
1010 public:
1012  SpecIsoMap(const Index& speciesindex,
1013  const Index& isotopeindex)
1014  : mspeciesindex(speciesindex),
1015  misotopeindex(isotopeindex)
1016  {}
1017 
1018  // Return the index to the species
1019  const Index& Speciesindex() const { return mspeciesindex; }
1020  // Return the index to the isotope
1021  const Index& Isotopeindex() const { return misotopeindex; }
1022 
1023 private:
1026 };
1027 
1028 
1029 
1033 
1038 
1039 
1040 
1045 ostream& operator << (ostream& os, const LineRecord& lr);
1046 
1047 
1048 
1052 void define_species_map();
1053 
1054 
1055 
1056 //------------------------------< Tag Group Stuff >------------------------------
1057 
1061 class OneTag {
1062 public:
1064  OneTag() { /* Nothing to be done here. */ }
1065 
1071  OneTag(String def);
1072 
1080  String Name() const;
1081 
1083  Index Species() const { return mspecies; }
1084 
1088  Index Isotope() const { return misotope; }
1089 
1092  Numeric Lf() const { return mlf; }
1093 
1096  Numeric Uf() const { return muf; }
1097 
1098 private:
1099  // Molecular species index:
1101  // Isotopic species index.
1102  // If this is equal to the number of isotopes (one more than
1103  // allowed) it means all isotopes of this species.
1105  // The lower line center frequency in Hz.
1106  // If this is <0 it means no lower limit.
1108  // The upper line center frequency in Hz:
1109  // If this is <0 it means no upper limit.
1111 };
1112 
1113 
1117 ostream& operator << (ostream& os, const OneTag& ot);
1118 
1119 
1127 
1128 
1130  ArrayOfIndex& tags1_index,
1131  const TagGroups& tags1,
1132  const ArrayOfString& tags2_Strings );
1133 
1135  Index& tags1_index,
1136  const TagGroups& tags1,
1137  const Array<OneTag>& tags2 );
1138 
1140 
1141 // Doc header in absorption.cc
1142 void write_lines_to_stream(ostream& os,
1143  const ArrayOfLineRecord& lines);
1144 
1145 
1146 void xsec_species( MatrixView xsec,
1147  ConstVectorView f_mono,
1148  ConstVectorView p_abs,
1149  ConstVectorView t_abs,
1150  ConstVectorView h2o_abs,
1151  ConstVectorView vmr,
1152  const ArrayOfLineRecord& lines,
1153  const Index ind_ls,
1154  const Index ind_lsn,
1155  const Numeric cutoff);
1156 
1157 
1158 // A helper function for energy conversion:
1160 
1161 
1162 //======================================================================
1163 // Functions related to refraction
1164 //======================================================================
1165 
1167  Vector& refr_index,
1168  ConstVectorView p_abs,
1169  ConstVectorView t_abs );
1170 
1171 void refr_index_Boudouris (
1172  Vector& refr_index,
1173  ConstVectorView p_abs,
1174  ConstVectorView t_abs,
1175  ConstVectorView h2o_abs );
1176 
1177 //======================================================================
1178 // Functions to convert the accuracy index
1179 //======================================================================
1180 
1181 // ********* for HITRAN database *************
1182 // convert index for the frequency accuracy.
1183 void convHitranIERF(
1184  Numeric& mdf,
1185  const Index& df
1186  );
1187 
1188 // convert to percents index for intensity and halfwidth accuracy.
1189 
1190 void convHitranIERSH(
1191  Numeric& mdh,
1192  const Index& dh
1193  );
1194 
1195 // ********* for MYTRAN database *************
1196 // convert index for the halfwidth accuracy.
1197 void convMytranIER(
1198  Numeric& mdh,
1199  const Index & dh
1200  );
1201 
1202 #endif // absorption_h
IsotopeRecord::IsotopeRecord
IsotopeRecord(const String &name, const Numeric &abundance, const Numeric &mass, const Index &mytrantag, const Index &hitrantag, const MakeArray< Index > &jpltags)
Constructor that sets the values.
Definition: absorption.h:186
LineRecord::mdnair
Numeric mdnair
Definition: absorption.h:1001
LineRecord::IsotopeData
const IsotopeRecord & IsotopeData() const
The matching IsotopeRecord from species_data.
Definition: absorption.h:573
LineRecord::Ti0
Numeric Ti0() const
Reference temperature for I0 in K:
Definition: absorption.h:609
IsotopeRecord::CalculatePartitionFctAtTemp
Numeric CalculatePartitionFctAtTemp(Numeric temperature) const
Definition: absorption.cc:48
LineRecord::dNair
Numeric dNair() const
Accuracy for AGAM temperature exponent in relative value :
Definition: absorption.h:665
OneTag::Uf
Numeric Uf() const
The upper line center frequency in Hz: If this is <0 it means no upper limit.
Definition: absorption.h:1096
LineshapeNormRecord::Description
const String & Description() const
Return the description text.
Definition: absorption.h:109
SpeciesRecord::Degfr
Index Degfr() const
Definition: absorption.h:338
MatrixView
The MatrixView class.
Definition: matpackI.h:476
ArrayOfLineshapeSpec
Array< LineshapeSpec > ArrayOfLineshapeSpec
Holds a list of lineshape specifications: function, normalization, cutoff.
Definition: absorption.h:162
LineRecord::Sgam
Numeric Sgam() const
Self broadened width in Hz/Pa:
Definition: absorption.h:621
SpecIsoMap
Definition: absorption.h:1009
IsotopeRecord::mmass
Numeric mmass
Definition: absorption.h:273
LineshapeNormRecord::mfunction
lsnf_type mfunction
Pointer to lineshape normalization function.
Definition: absorption.h:115
LineRecord::melow
Numeric melow
Definition: absorption.h:976
OneTag::OneTag
OneTag()
Default constructor.
Definition: absorption.h:1064
SpecIsoMap::misotopeindex
Index misotopeindex
Definition: absorption.h:1025
IsotopeRecord::JplTags
const ArrayOfIndex & JplTags() const
JPL tag numbers for all isotopes.
Definition: absorption.h:227
ArrayOfLineRecord
Array< LineRecord > ArrayOfLineRecord
Holds a list of spectral line data.
Definition: absorption.h:1032
LineshapeRecord::mfunction
lsf_type mfunction
Pointer to lineshape function.
Definition: absorption.h:74
LineshapeRecord::Description
const String & Description() const
Return the description text.
Definition: absorption.h:68
refr_index_Boudouris
void refr_index_Boudouris(Vector &refr_index, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView h2o_abs)
Calculates the refractive index at microwave frequncies following Boudouris 1963.
Definition: absorption.cc:2842
LineRecord::setSgam
void setSgam(Numeric new_sgam)
Set Self broadened width in Hz/Pa:
Definition: absorption.h:624
LineshapeNormRecord::Function
lsnf_type Function() const
Return pointer to lineshape normalization function.
Definition: absorption.h:111
LineRecord::LineRecord
LineRecord(Index species, Index isotope, Numeric f, Numeric psf, Numeric i0, Numeric ti0, Numeric elow, Numeric agam, Numeric sgam, Numeric nair, Numeric nself, Numeric tgam, const ArrayOfNumeric &aux, Numeric, Numeric, Numeric, Numeric, Numeric, Numeric, Numeric)
Constructor that sets all data elements explicitly.
Definition: absorption.h:476
LineshapeSpec::Ind_ls
const Index & Ind_ls() const
Return the index of this lineshape.
Definition: absorption.h:139
LineRecord::Agam
Numeric Agam() const
Air broadened width in Hz/Pa:
Definition: absorption.h:615
LineshapeNormRecord::Name
const String & Name() const
Return the name of this lineshape.
Definition: absorption.h:107
LineRecord::mi0
Numeric mi0
Definition: absorption.h:972
LineRecord::Nself
Numeric Nself() const
SGAM temperature exponent (dimensionless):
Definition: absorption.h:633
LineshapeNormRecord::LineshapeNormRecord
LineshapeNormRecord(const String &name, const String &description, lsnf_type function)
Initializing constructor, used to build the lookup table.
Definition: absorption.h:99
LineRecord::Version
String Version() const
Return the version String.
Definition: absorption.h:521
lsnf_type
void(* lsnf_type)(Vector &, Numeric, VectorView, const Numeric, const Index)
The type that is used to store pointers to lineshape normalization functions.
Definition: absorption.h:80
get_tag_group_name
String get_tag_group_name(const Array< OneTag > &tg)
Print the name of a tag group.
Definition: absorption.cc:2286
LineshapeRecord
Lineshape related information.
Definition: absorption.h:51
OneTag::Species
Index Species() const
Molecular species index.
Definition: absorption.h:1083
LineRecord::mdpsf
Numeric mdpsf
Definition: absorption.h:1005
LineRecord::mpsf
Numeric mpsf
Definition: absorption.h:970
IsotopeRecord::Abundance
const Numeric & Abundance() const
Normal abundance ( = isotopic ratio).
Definition: absorption.h:216
LineRecord::ReadFromHitran2004Stream
bool ReadFromHitran2004Stream(istream &is)
Read one line from a stream associated with a HITRAN 2004 file.
Definition: absorption.cc:609
LineshapeRecord::Function
lsf_type Function() const
Return pointer to lineshape function.
Definition: absorption.h:70
array.h
This file contains the definition of Array.
LineRecord::mnself
Numeric mnself
Definition: absorption.h:984
IsotopeRecord::Name
const String & Name() const
Isotope name.
Definition: absorption.h:214
LineshapeSpec::Cutoff
const Numeric & Cutoff() const
Return the cutoff frequency (in Hz).
Definition: absorption.h:151
OneTag::Name
String Name() const
Return the full name of this tag according to Bredbeck convention.
Definition: absorption.cc:2087
LineRecord::ReadFromJplStream
bool ReadFromJplStream(istream &is)
Read one line from a stream associated with a JPL file.
Definition: absorption.cc:1474
matpackI.h
IsotopeRecord::MytranTag
const Index & MytranTag() const
MYTRAN2 tag numers for all isotopes.
Definition: absorption.h:221
LineshapeSpec::Ind_lsn
const Index & Ind_lsn() const
Return the index of the normalization factor.
Definition: absorption.h:144
convHitranIERF
void convHitranIERF(Numeric &mdf, const Index &df)
Definition: absorption.cc:2901
Array< LineshapeSpec >
IsotopeRecord::HitranTag
const Index & HitranTag() const
HITRAN-96 tag numers for all isotopes.
Definition: absorption.h:223
write_lines_to_stream
void write_lines_to_stream(ostream &os, const ArrayOfLineRecord &lines)
A helper function that writes lines in a line list to a stream.
Definition: absorption.cc:2309
convMytranIER
void convMytranIER(Numeric &mdh, const Index &dh)
Definition: absorption.cc:3007
LineRecord::Elow
Numeric Elow() const
Lower state energy in cm^-1:
Definition: absorption.h:612
LineshapeRecord::mdescription
String mdescription
Short description.
Definition: absorption.h:73
SpeciesRecord::misotope
Array< IsotopeRecord > misotope
Isotope data.
Definition: absorption.h:348
IsotopeRecord::mqcoeff
ArrayOfNumeric mqcoeff
Definition: absorption.h:277
wavenumber_to_joule
Numeric wavenumber_to_joule(Numeric e)
A little helper function to convert energy from units of wavenumber (cm^-1) to Joule (J).
Definition: absorption.cc:2879
LineRecord::Psf
Numeric Psf() const
The pressure shift parameter in Hz/Pa.
Definition: absorption.h:586
convHitranIERSH
void convHitranIERSH(Numeric &mdh, const Index &dh)
Definition: absorption.cc:2948
species_data
Array< SpeciesRecord > species_data
Definition: species_data.cc:36
LineRecord::ReadFromMytran2Stream
bool ReadFromMytran2Stream(istream &is)
Read one line from a stream associated with a MYTRAN2 file.
Definition: absorption.cc:1075
SpeciesRecord::SpeciesRecord
SpeciesRecord()
Default constructor.
Definition: absorption.h:288
LineRecord::Name
String Name() const
The full name of the species and isotope.
Definition: absorption.h:540
IsotopeRecord::mhitrantag
Index mhitrantag
Definition: absorption.h:275
SpeciesRecord::Isotope
Array< IsotopeRecord > & Isotope()
Definition: absorption.h:340
my_basic_string< char >
SpecIsoMap::Isotopeindex
const Index & Isotopeindex() const
Definition: absorption.h:1021
LineRecord::ReadFromHitranStream
bool ReadFromHitranStream(istream &is)
Read one line from a stream associated with a HITRAN 1986-2001 file.
Definition: absorption.cc:159
LineRecord::mf
Numeric mf
Definition: absorption.h:968
LineRecord::mti0
Numeric mti0
Definition: absorption.h:974
LineRecord::misotope
Index misotope
Definition: absorption.h:966
LineRecord::mdnself
Numeric mdnself
Definition: absorption.h:1003
LineRecord::setNair
void setNair(Numeric new_mnair)
Set AGAM temperature exponent (dimensionless):
Definition: absorption.h:630
LineRecord::dNself
Numeric dNself() const
Accuracy for SGAM temperature exponent in relative value:
Definition: absorption.h:668
Numeric
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: arts.h:147
TagGroups
Array< Array< OneTag > > TagGroups
Contains the available tag groups.
Definition: absorption.h:1126
IsotopeRecord
Contains the lookup data for one isotope.
Definition: absorption.h:168
define_species_map
void define_species_map()
Define the species data map.
Definition: absorption.cc:64
VectorView
The VectorView class.
Definition: matpackI.h:281
ArrayOfArrayOfLineRecord
Array< Array< LineRecord > > ArrayOfArrayOfLineRecord
Holds a lists of spectral line data for each tag group.
Definition: absorption.h:1037
LineRecord::Isotope
Index Isotope() const
The index of the isotopic species that this line belongs to.
Definition: absorption.h:535
LineshapeSpec::SetInd_ls
void SetInd_ls(Index ind_ls)
Set it.
Definition: absorption.h:141
SpeciesRecord::Isotope
const Array< IsotopeRecord > & Isotope() const
Definition: absorption.h:339
SpecIsoMap::Speciesindex
const Index & Speciesindex() const
Definition: absorption.h:1019
IsotopeRecord::SetPartitionFctCoeff
void SetPartitionFctCoeff(const ArrayOfNumeric &qcoeff)
Definition: absorption.h:229
refr_index_BoudourisDryAir
void refr_index_BoudourisDryAir(Vector &refr_index, ConstVectorView p_abs, ConstVectorView t_abs)
Calculates the refractive index for dry air at microwave frequncies following Boudouris 1963.
Definition: absorption.cc:2810
make_array.h
Implements the class MakeArray, which is a derived class of Array, allowing explicit initialization.
LineRecord::setPsf
void setPsf(Numeric new_mpsf)
Set the pressure shift parameter in Hz/Pa.
Definition: absorption.h:589
get_tag_group_index_for_tag_group
void get_tag_group_index_for_tag_group(Index &tags1_index, const TagGroups &tags1, const Array< OneTag > &tags2)
Returns the index of the tag group tg2 within the array of tag groups tgs1.
Definition: absorption.cc:2233
LineRecord
Spectral line catalog data.
Definition: absorption.h:438
IsotopeRecord::mmytrantag
Index mmytrantag
Definition: absorption.h:274
LineRecord::mdf
Numeric mdf
Definition: absorption.h:993
SpecIsoMap::SpecIsoMap
SpecIsoMap(const Index &speciesindex, const Index &isotopeindex)
Definition: absorption.h:1012
IsotopeRecord::mjpltags
ArrayOfIndex mjpltags
Definition: absorption.h:276
operator<<
ostream & operator<<(ostream &os, const LineRecord &lr)
Output operator for LineRecord.
Definition: absorption.cc:76
LineshapeSpec::SetCutoff
void SetCutoff(Numeric cutoff)
Set it.
Definition: absorption.h:153
LineRecord::magam
Numeric magam
Definition: absorption.h:978
LineRecord::setF
void setF(Numeric new_mf)
Set the line center frequency in Hz.
Definition: absorption.h:583
LineRecord::Species
Index Species() const
The index of the molecular species that this line belongs to.
Definition: absorption.h:530
SpecIsoMap::mspeciesindex
Index mspeciesindex
Definition: absorption.h:1024
LineRecord::maux
ArrayOfNumeric maux
Definition: absorption.h:988
SpeciesRecord
Contains the lookup data for one species.
Definition: absorption.h:284
LineshapeSpec
Lineshape related specification like which lineshape to use, the normalizationfactor,...
Definition: absorption.h:123
lsf_type
void(* lsf_type)(Vector &, Vector &, Numeric, Numeric, Numeric, VectorView, const Index)
The type that is used to store pointers to lineshape functions.
Definition: absorption.h:38
IsotopeRecord::IsotopeRecord
IsotopeRecord(const IsotopeRecord &x)
Copy constructor.
Definition: absorption.h:176
LineRecord::mspecies
Index mspecies
Definition: absorption.h:964
xsec_species
void xsec_species(MatrixView xsec, ConstVectorView f_mono, ConstVectorView p_abs, ConstVectorView t_abs, ConstVectorView h2o_abs, ConstVectorView vmr, const ArrayOfLineRecord &lines, const Index ind_ls, const Index ind_lsn, const Numeric cutoff)
Calculate line absorption cross sections for one tag group.
Definition: absorption.cc:2379
OneTag
A tag group can consist of the sum of several of these.
Definition: absorption.h:1061
get_tagindex_for_Strings
void get_tagindex_for_Strings(ArrayOfIndex &tags1_index, const TagGroups &tags1, const ArrayOfString &tags2_Strings)
Returns the index among some tag groups for an array of tag Strings.
Definition: absorption.cc:2176
LineRecord::dSgam
Numeric dSgam() const
Accuracy for self broadened width in relative value :
Definition: absorption.h:662
SpeciesRecord::mdegfr
Index mdegfr
Degrees of freedom.
Definition: absorption.h:346
LineshapeRecord::mname
String mname
Name of the function (e.g., Lorentz).
Definition: absorption.h:72
LineRecord::dAgam
Numeric dAgam() const
Accuracy for air broadened width in relative value :
Definition: absorption.h:659
LineRecord::dF
Numeric dF() const
Accuracy for line position in Hz :
Definition: absorption.h:653
SpeciesRecord::mname
String mname
Species name.
Definition: absorption.h:344
LineshapeRecord::Name
const String & Name() const
Return the name of this lineshape.
Definition: absorption.h:66
LineshapeSpec::SetInd_lsn
void SetInd_lsn(Index ind_lsn)
Set it.
Definition: absorption.h:146
LineRecord::LineRecord
LineRecord()
Default constructor.
Definition: absorption.h:449
IsotopeRecord::Mass
const Numeric & Mass() const
Mass of the isotope.
Definition: absorption.h:219
OneTag::misotope
Index misotope
Definition: absorption.h:1104
IsotopeRecord::mabundance
Numeric mabundance
Definition: absorption.h:272
Index
INDEX Index
The type to use for all integer numbers and indices.
Definition: arts.h:153
LineshapeRecord::LineshapeRecord
LineshapeRecord(const String &name, const String &description, lsf_type function)
Initializing constructor, used to build the lookup table.
Definition: absorption.h:58
LineRecord::mtgam
Numeric mtgam
Definition: absorption.h:986
LineRecord::ReadFromArtsStream
bool ReadFromArtsStream(istream &is)
Read one line from a stream associated with an Arts file.
Definition: absorption.cc:1718
SpeciesRecord::Name
const String & Name() const
Definition: absorption.h:337
LineRecord::Naux
Index Naux() const
Number of auxiliary parameters.
Definition: absorption.h:646
LineshapeNormRecord::mdescription
String mdescription
Short description.
Definition: absorption.h:114
LineRecord::setNself
void setNself(Numeric new_mnself)
Set SGAM temperature exponent (dimensionless):
Definition: absorption.h:636
LineRecord::SpeciesData
const SpeciesRecord & SpeciesData() const
The matching SpeciesRecord from species_data.
Definition: absorption.h:556
SpecIsoMap::SpecIsoMap
SpecIsoMap()
Definition: absorption.h:1011
LineshapeNormRecord::LineshapeNormRecord
LineshapeNormRecord()
Default constructor.
Definition: absorption.h:96
OneTag::mspecies
Index mspecies
Definition: absorption.h:1100
LineshapeSpec::LineshapeSpec
LineshapeSpec(const Index &ind_ls, const Index &ind_lsn, const Numeric &cutoff)
Initializing constructor.
Definition: absorption.h:130
LineshapeSpec::LineshapeSpec
LineshapeSpec()
Default constructor.
Definition: absorption.h:127
OneTag::Isotope
Index Isotope() const
Isotopic species index.
Definition: absorption.h:1088
LineRecord::msgam
Numeric msgam
Definition: absorption.h:980
LineRecord::setAgam
void setAgam(Numeric new_agam)
Set Air broadened width in Hz/Pa:
Definition: absorption.h:618
OneTag::Lf
Numeric Lf() const
The lower line center frequency in Hz.
Definition: absorption.h:1092
IsotopeRecord::mname
String mname
Definition: absorption.h:271
OneTag::mlf
Numeric mlf
Definition: absorption.h:1107
LineshapeSpec::mind_ls
Index mind_ls
Definition: absorption.h:155
MakeArray
Explicit construction of Arrays.
Definition: make_array.h:52
LineRecord::mdi0
Numeric mdi0
Definition: absorption.h:995
LineRecord::mdagam
Numeric mdagam
Definition: absorption.h:997
IsotopeRecord::IsotopeRecord
IsotopeRecord()
Default constructor.
Definition: absorption.h:172
LineshapeNormRecord::mname
String mname
Name of the function (e.g., linear).
Definition: absorption.h:113
LineRecord::Tgam
Numeric Tgam() const
Reference temperature for AGAM and SGAM in K:
Definition: absorption.h:639
Vector
The Vector class.
Definition: matpackI.h:389
LineRecord::F
Numeric F() const
The line center frequency in Hz.
Definition: absorption.h:580
LineRecord::Aux
const ArrayOfNumeric & Aux() const
Auxiliary parameters.
Definition: absorption.h:649
LineshapeRecord::LineshapeRecord
LineshapeRecord()
Default constructor.
Definition: absorption.h:55
LineshapeSpec::mcutoff
Numeric mcutoff
Definition: absorption.h:157
LineRecord::mdsgam
Numeric mdsgam
Definition: absorption.h:999
ConstVectorView
A constant view of a Vector.
Definition: matpackI.h:232
LineRecord::linesElowToJoule
friend void linesElowToJoule(Array< LineRecord > &lines)
Make the helper function linesElowToJoule a friend, so that it can change the lower state energy.
Definition: m_abs.cc:319
LineshapeNormRecord
Lineshape related normalization function information.
Definition: absorption.h:92
Array::nelem
Index nelem() const
Number of elements.
Definition: array.h:115
LineRecord::mnair
Numeric mnair
Definition: absorption.h:982
LineRecord::I0
Numeric I0() const
The line intensity in m^2*Hz at the reference temperature Ti0.
Definition: absorption.h:603
LineRecord::setI0
void setI0(Numeric new_mi0)
Set Intensity.
Definition: absorption.h:606
LineRecord::dPsf
Numeric dPsf() const
Accuracy for pressure shift in relative value :
Definition: absorption.h:671
LineshapeSpec::mind_lsn
Index mind_lsn
Definition: absorption.h:156
LineRecord::dI0
Numeric dI0() const
Accuracy for line intensity in relative value :
Definition: absorption.h:656
mystring.h
This file contains the definition of String, the ARTS string class.
SpeciesRecord::SpeciesRecord
SpeciesRecord(const char name[], const Index degfr, const MakeArray< IsotopeRecord > &isotope)
The constructor used in define_species_data.
Definition: absorption.h:291
LineRecord::Nair
Numeric Nair() const
AGAM temperature exponent (dimensionless):
Definition: absorption.h:627
LineRecord::mversion
static const Index mversion
Definition: absorption.h:962
OneTag::muf
Numeric muf
Definition: absorption.h:1110
IsotopeRecord::CalculatePartitionFctRatio
Numeric CalculatePartitionFctRatio(Numeric reference_temperature, Numeric actual_temperature) const
Calculate partition function ratio.
Definition: absorption.h:247