ARTS  2.0.49
absorption.h
Go to the documentation of this file.
1 /* Copyright (C) 2000-2008
2  Stefan Buehler <sbuehler@ltu.se>
3  Axel von Engeln <engeln@uni-bremen.de>
4 
5  This program is free software; you can redistribute it and/or modify it
6  under the terms of the GNU General Public License as published by the
7  Free Software Foundation; either version 2, or (at your option) any
8  later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program; if not, write to the Free Software
17  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
18  USA. */
19 
28 #ifndef absorption_h
29 #define absorption_h
30 
31 #include <stdexcept>
32 #include "matpackI.h"
33 #include "array.h"
34 #include "mystring.h"
35 #include "make_array.h"
36 #include "messages.h"
37 
40 typedef void (*lsf_type)(Vector&,
41  Vector&,
42  Numeric,
43  Numeric,
44  Numeric,
45  VectorView,
46  const Index);
47 
54 public:
55 
58  mdescription(),
59  mfunction()
60  { /* Nothing to do here. */ }
61 
63  LineshapeRecord(const String& name,
64  const String& description,
65  lsf_type function)
66  : mname(name),
67  mdescription(description),
68  mfunction(function)
69  { /* Nothing to do here. */ }
71  const String& Name() const { return mname; }
73  const String& Description() const { return mdescription; }
75  lsf_type Function() const { return mfunction; }
76 private:
80 
81 };
82 
85 typedef void (*lsnf_type)(Vector&,
86  Numeric,
87  VectorView,
88  const Numeric,
89  const Index);
90 
98 public:
99 
102  mdescription(),
103  mfunction()
104  { /* Nothing to do here. */ }
105 
108  const String& description,
109  lsnf_type function)
110  : mname(name),
111  mdescription(description),
112  mfunction(function)
113  { /* Nothing to do here. */ }
115  const String& Name() const { return mname; }
117  const String& Description() const { return mdescription; }
119  lsnf_type Function() const { return mfunction; }
120 private:
124 };
125 
132 public:
133 
136  mind_lsn(-1),
137  mcutoff(0.)
138  { /* Nothing to do here. */ }
139 
141  LineshapeSpec(const Index& ind_ls,
142  const Index& ind_lsn,
143  const Numeric& cutoff)
144  : mind_ls(ind_ls),
145  mind_lsn(ind_lsn),
146  mcutoff(cutoff)
147  { /* Nothing to do here. */ }
148 
150  const Index& Ind_ls() const { return mind_ls; }
152  void SetInd_ls( Index ind_ls ) { mind_ls = ind_ls; }
153 
155  const Index& Ind_lsn() const { return mind_lsn; }
157  void SetInd_lsn( Index ind_lsn ) { mind_lsn = ind_lsn; }
158 
162  const Numeric& Cutoff() const { return mcutoff; }
164  void SetCutoff( Numeric cutoff ) { mcutoff = cutoff; }
165 private:
169 };
170 
171 ostream& operator<< (ostream& os, const LineshapeSpec& lsspec);
172 
176 
177 
178 
182 public:
183 
186  mabundance(0.),
187  mmass(0.),
188  mmytrantag(-1),
189  mhitrantag(-1),
190  mjpltags(),
191  mqcoeff()
192  { /* Nothing left to do here. */ }
193 
197  mname(x.mname),
199  mmass(x.mmass),
202  mjpltags(x.mjpltags),
203  mqcoeff()
204  { /* Nothing left to do here. */ }
205 
207  IsotopeRecord(const String& name,
208  const Numeric& abundance,
209  const Numeric& mass,
210  const Index& mytrantag,
211  const Index& hitrantag,
212  const MakeArray<Index>& jpltags) :
213  mname(name),
214  mabundance(abundance),
215  mmass(mass),
216  mmytrantag(mytrantag),
217  mhitrantag(hitrantag),
218  mjpltags(jpltags),
219  mqcoeff()
220  {
221  // With Matpack, initialization of mjpltags from jpltags should now work correctly.
222 
223  // Some consistency checks whether the given data makes sense.
224 #ifndef NDEBUG
225  {
226  /* 1. All the tags must be positive or -1 */
227  assert( (0<mmytrantag) || (-1==mmytrantag) );
228  assert( (0<mhitrantag) || (-1==mhitrantag) );
229  for ( Index i=0; i<mjpltags.nelem(); ++i )
230  assert( (0<mjpltags[i]) || (-1==mjpltags[i]) );
231  }
232 #endif // ifndef NDEBUG
233  }
234 
236  const String& Name() const { return mname; }
238  const Numeric& Abundance() const { return mabundance; }
241  const Numeric& Mass() const { return mmass; }
243  const Index& MytranTag() const { return mmytrantag; }
245  const Index& HitranTag() const { return mhitrantag; }
249  const ArrayOfIndex& JplTags() const { return mjpltags; }
250 
251  void SetPartitionFctCoeff( const ArrayOfNumeric& qcoeff )
252  {
253  mqcoeff = qcoeff;
254  }
255 
257 
270  Numeric actual_temperature ) const
271  {
272  Numeric qcoeff_at_t_ref =
273  CalculatePartitionFctAtTemp( reference_temperature );
274  Numeric qtemp =
275  CalculatePartitionFctAtTemp( actual_temperature );
276 
277  if ( qtemp < 0. )
278  {
279  ostringstream os;
280  os << "Partition function of "
281  << "Isotope = " << mname
282  << "is unknown.";
283  throw runtime_error(os.str());
284  }
285  return qcoeff_at_t_ref / qtemp;
286  }
287 
288 private:
289 
290  // calculate the partition fct at a certain temperature
291  // this is only the prototyping
292  Numeric CalculatePartitionFctAtTemp( Numeric temperature ) const;
293 
301 };
302 
303 
308 public:
309 
312  mdegfr(-1),
313  misotope() { /* Nothing to do here */ }
314 
316  SpeciesRecord(const char name[],
317  const Index degfr,
318  const MakeArray<IsotopeRecord>& isotope)
319  : mname(name),
320  mdegfr(degfr),
321  misotope(isotope)
322  {
323 
324  // Thanks to Matpack, initialization of misotope with isotope
325  // should now work correctly.
326 
327 #ifndef NDEBUG
328  {
329  /* Check that the isotopes are correctly sorted. */
330  for ( Index i=0; i<misotope.nelem()-1; ++i )
331  {
332  assert( misotope[i].Abundance() >= misotope[i+1].Abundance() );
333  }
334 
335  /* Check that the Mytran tags are correctly sorted. */
336  for ( Index i=0; i<misotope.nelem()-1; ++i )
337  {
338  if ( (0<misotope[i].MytranTag()) && (0<misotope[i+1].MytranTag()) )
339  {
340  assert( misotope[i].MytranTag() < misotope[i+1].MytranTag() );
341 
342  // Also check that the tags have the same base number:
343  assert( misotope[i].MytranTag()/10 == misotope[i].MytranTag()/10 );
344  }
345  }
346 
347  /* Check that the Hitran tags are correctly sorted. */
348  for ( Index i=0; i<misotope.nelem()-1; ++i )
349  {
350  if ( (0<misotope[i].HitranTag()) && (0<misotope[i+1].HitranTag()) )
351  {
352  assert( misotope[i].HitranTag() < misotope[i+1].HitranTag() );
353 
354  // Also check that the tags have the same base number:
355  assert( misotope[i].HitranTag()/10 == misotope[i+1].HitranTag()/10 );
356  }
357  }
358  }
359 #endif // #ifndef NDEBUG
360  }
361 
362  const String& Name() const { return mname; }
363  Index Degfr() const { return mdegfr; }
364  const Array<IsotopeRecord>& Isotope() const { return misotope; }
366 
367 private:
374 };
375 
481 class LineRecord {
482 public:
483 
487  friend void linesElowToJoule(Array<LineRecord>& abs_lines);
488 
493  : mversion (3),
494  mspecies (1000000),
495  misotope (1000000),
496  mf (0. ),
497  mpsf (0. ),
498  mi0 (0. ),
499  mti0 (0. ),
500  melow (0. ),
501  magam (0. ),
502  msgam (0. ),
503  mnair (0. ),
504  mnself (0. ),
505  mtgam (0. ),
506  maux ( ),
507  mdf (-1. ),
508  mdi0 (-1. ),
509  mdagam (-1. ),
510  mdsgam (-1. ),
511  mdnair (-1. ),
512  mdnself (-1. ),
513  mdpsf (-1. )
514  { /* Nothing to do here. */ }
515 
520  LineRecord( Index species,
521  Index isotope,
522  Numeric f,
523  Numeric psf,
524  Numeric i0,
525  Numeric ti0,
526  Numeric elow,
527  Numeric agam,
528  Numeric sgam,
529  Numeric nair,
530  Numeric nself,
531  Numeric tgam,
532  const ArrayOfNumeric& aux,
533  Numeric /* df */,
534  Numeric /* di0 */,
535  Numeric /* dagam */,
536  Numeric /* dsgam */,
537  Numeric /* dnair */,
538  Numeric /* dnself */,
539  Numeric /* dpsf */)
540  : mversion (3),
541  mspecies (species ),
542  misotope (isotope ),
543  mf (f ),
544  mpsf (psf ),
545  mi0 (i0 ),
546  mti0 (ti0 ),
547  melow (elow ),
548  magam (agam ),
549  msgam (sgam ),
550  mnair (nair ),
551  mnself (nself ),
552  mtgam (tgam ),
553  maux (aux ),
554  mdf (-1. ),
555  mdi0 (-1. ),
556  mdagam (-1. ),
557  mdsgam (-1. ),
558  mdnair (-1. ),
559  mdnself (-1. ),
560  mdpsf (-1. )
561  {
562  // Thanks to Matpack, initialization of misotope with isotope
563  // should now work correctly.
564 
565  // Check if this species is legal, i.e., if species and isotope
566  // data exists.
568  //assert( mspecies < species_data.nelem() );
569  //assert( misotope < species_data[mspecies].Isotope().nelem() );
570  }
571 
574  {
575  ostringstream os;
576  os << "ARTSCAT-" << mversion;
577  return os.str();
578  }
579 
581  Index Version() const { return mversion; }
582 
585  Index Species() const { return mspecies; }
586 
590  Index Isotope() const { return misotope; }
591 
592  String Name() const;
593 
594  const SpeciesRecord& SpeciesData() const;
595 
596  const IsotopeRecord& IsotopeData() const;
597 
599  Numeric F() const { return mf; }
600 
602  void setF( Numeric new_mf ) { mf = new_mf; }
603 
605  Numeric Psf() const { return mpsf; }
606 
608  void setPsf( Numeric new_mpsf ) { mpsf = new_mpsf; }
609 
622  Numeric I0() const { return mi0; }
623 
625  void setI0( Numeric new_mi0 ) { mi0 = new_mi0; }
626 
628  Numeric Ti0() const { return mti0; }
629 
631  Numeric Elow() const { return melow; }
632 
634  Numeric Agam() const { return magam; }
635 
637  void setAgam( Numeric new_agam ) { magam = new_agam; }
638 
640  Numeric Sgam() const { return msgam; }
641 
643  void setSgam( Numeric new_sgam ) { msgam = new_sgam; }
644 
646  Numeric Nair() const { return mnair; }
647 
649  void setNair( Numeric new_mnair ) { mnair = new_mnair; }
650 
652  Numeric Nself() const { return mnself; }
653 
655  void setNself( Numeric new_mnself ) { mnself = new_mnself; }
656 
658  Numeric Tgam() const { return mtgam; }
659 
665  Index Naux() const { return maux.nelem(); }
666 
668  const ArrayOfNumeric& Aux() const { return maux; }
669  //
670 
672  Numeric dF() const { return mdf; }
673 
675  Numeric dI0() const { return mdi0; }
676 
678  Numeric dAgam() const { return mdagam; }
679 
681  Numeric dSgam() const { return mdsgam; }
682 
684  Numeric dNair() const { return mdnair; }
685 
687  Numeric dNself() const { return mdnself; }
688 
690  Numeric dPsf() const { return mdpsf; }
691 
693  Numeric A() const { return ma; }
694 
696  Numeric G_upper() const { return mgupper; }
697 
699  Numeric G_lower() const { return mglower; }
700 
702  Numeric Gamma_self() const { return mgamma_self; }
703 
705  Numeric Gamma_N2() const { return mgamma_n2; }
706 
708  Numeric Gamma_O2() const { return mgamma_o2; }
709 
711  Numeric Gamma_H2O() const { return mgamma_h2o; }
712 
714  Numeric Gamma_CO2() const { return mgamma_co2; }
715 
717  Numeric Gamma_H2() const { return mgamma_h2; }
718 
720  Numeric Gamma_He() const { return mgamma_he; }
721 
723  Numeric Gam_N_self() const { return mn_self; }
724 
726  Numeric Gam_N_N2() const { return mn_n2; }
727 
729  Numeric Gam_N_O2() const { return mn_o2; }
730 
732  Numeric Gam_N_H2O() const { return mn_h2o; }
733 
735  Numeric Gam_N_CO2() const { return mn_co2; }
736 
738  Numeric Gam_N_H2() const { return mn_h2; }
739 
741  Numeric Gam_N_He() const { return mn_he; }
742 
744  Numeric Delta_N2() const { return mdelta_n2; }
745 
747  Numeric Delta_O2() const { return mdelta_o2; }
748 
750  Numeric Delta_H2O() const { return mdelta_h2o; }
751 
753  Numeric Delta_CO2() const { return mdelta_co2; }
754 
756  Numeric Delta_H2() const { return mdelta_h2; }
757 
759  Numeric Delta_He() const { return mdelta_he; }
760 
820  bool ReadFromHitranStream(istream& is, const Verbosity& verbosity);
821 
822 
823 
893  bool ReadFromHitran2004Stream(istream& is, const Verbosity& verbosity);
894 
895 
896 
897 
966  bool ReadFromMytran2Stream(istream& is, const Verbosity& verbosity);
967 
968 
1021  bool ReadFromJplStream(istream& is, const Verbosity& verbosity);
1022 
1044  bool ReadFromArtscat3Stream(istream& is, const Verbosity& verbosity);
1045 
1063  bool ReadFromArtscat4Stream(istream& is, const Verbosity& verbosity);
1064 
1065 
1066 private:
1067  // Version number:
1069  // Molecular species index:
1071  // Isotopic species index:
1073  // The line center frequency in Hz:
1075  // The pressure shift parameter in Hz/Pa:
1077  // The line intensity in m^2/Hz:
1079  // Reference temperature for I0 in K:
1081  // Lower state energy in cm^-1:
1083  // Air broadened width in Hz/Pa:
1085  // Self broadened width in Hz/Pa:
1087  // AGAM temperature exponent (dimensionless):
1089  // SGAM temperature exponent (dimensionless):
1091  // Reference temperature for AGAM and SGAM in K:
1093  // Array to hold auxiliary parameters:
1095  //
1096  // Fields for the spectroscopic parameters accuracies
1097  //
1098  // Accuracy for line center frequency in Hz:
1100  // Accuracy for line intensity in %:
1102  // Accuracy for air broadened width in %:
1104  // Accuracy for self broadened width in %:
1106  // Accuracy for AGAM temperature exponent in %:
1108  // Accuracy for SGAM temperature exponent in %:
1110  // Accuracy for pressure shift in %:
1112 
1114 
1115  // Einstein A-coefficient in 1/s:
1117  // Upper state stat. weight:
1119  // Lower state stat. weight:
1121 
1122  // Broadening parameter self in Hz/Pa:
1124  // Broadening parameter N2 in Hz/Pa:
1126  // Broadening parameter O2 in Hz/Pa:
1128  // Broadening parameter H2O in Hz/Pa:
1130  // Broadening parameter CO2 in Hz/Pa:
1132  // Broadening parameter H2 in Hz/Pa:
1134  // Broadening parameter He in Hz/Pa:
1136 
1137  // GAM temp. exponent self:
1139  // GAM temp. exponent N2:
1141  // GAM temp. exponent O2:
1143  // GAM temp. exponent H2O:
1145  // GAM temp. exponent CO2:
1147  // GAM temp. exponent H2:
1149  // GAM temp. exponent He:
1151 
1152  // F Pressure shift N2 in Hz/Pa:
1154  // F Pressure shift O2 in Hz/Pa:
1156  // F Pressure shift H2O in Hz/Pa:
1158  // F Pressure shift CO2 in Hz/Pa:
1160  // F Pressure shift H2 in Hz/Pa:
1162  // F Pressure shift He in Hz/Pa:
1164 
1165 };
1166 
1167 // is needed to map jpl tags/arts identifier to the species/isotope data within arts
1169 public:
1171  SpecIsoMap(const Index& speciesindex,
1172  const Index& isotopeindex)
1173  : mspeciesindex(speciesindex),
1174  misotopeindex(isotopeindex)
1175  {}
1176 
1177  // Return the index to the species
1178  const Index& Speciesindex() const { return mspeciesindex; }
1179  // Return the index to the isotope
1180  const Index& Isotopeindex() const { return misotopeindex; }
1181 
1182 private:
1185 };
1186 
1187 
1188 
1192 
1197 
1198 
1199 
1204 ostream& operator<< (ostream& os, const LineRecord& lr);
1205 
1206 
1207 
1211 void define_species_map();
1212 
1213 
1214 // Doc header in absorption.cc
1215 void write_lines_to_stream(ostream& os,
1216  const ArrayOfLineRecord& abs_lines);
1217 
1218 
1219 void xsec_species( MatrixView xsec,
1220  ConstVectorView f_mono,
1221  ConstVectorView abs_p,
1222  ConstVectorView abs_t,
1223  ConstVectorView h2o_abs,
1224  ConstVectorView vmr,
1225  const ArrayOfLineRecord& abs_lines,
1226  const Index ind_ls,
1227  const Index ind_lsn,
1228  const Numeric cutoff,
1229  const Verbosity& verbosity );
1230 
1231 
1232 // A helper function for energy conversion:
1234 
1235 
1236 //======================================================================
1237 // Functions related to refraction
1238 //======================================================================
1239 
1241  Vector& refr_index,
1242  ConstVectorView abs_p,
1243  ConstVectorView abs_t );
1244 
1245 void refr_index_Boudouris (
1246  Vector& refr_index,
1247  ConstVectorView abs_p,
1248  ConstVectorView abs_t,
1249  ConstVectorView h2o_abs );
1250 
1251 //======================================================================
1252 // Functions to convert the accuracy index
1253 //======================================================================
1254 
1255 // ********* for HITRAN database *************
1256 // convert index for the frequency accuracy.
1257 void convHitranIERF(
1258  Numeric& mdf,
1259  const Index& df
1260  );
1261 
1262 // convert to percents index for intensity and halfwidth accuracy.
1263 
1264 void convHitranIERSH(
1265  Numeric& mdh,
1266  const Index& dh
1267  );
1268 
1269 // ********* for MYTRAN database *************
1270 // convert index for the halfwidth accuracy.
1271 void convMytranIER(
1272  Numeric& mdh,
1273  const Index & dh
1274  );
1275 
1276 #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:207
LineRecord::Delta_N2
Numeric Delta_N2() const
F Pressure shift N2 in Hz/Pa :
Definition: absorption.h:744
LineRecord::mdnair
Numeric mdnair
Definition: absorption.h:1107
LineRecord::Ti0
Numeric Ti0() const
Reference temperature for I0 in K:
Definition: absorption.h:628
IsotopeRecord::CalculatePartitionFctAtTemp
Numeric CalculatePartitionFctAtTemp(Numeric temperature) const
Definition: absorption.cc:51
LineRecord::dNair
Numeric dNair() const
Accuracy for AGAM temperature exponent in relative value :
Definition: absorption.h:684
LineshapeNormRecord::Description
const String & Description() const
Return the description text.
Definition: absorption.h:117
LineRecord::ReadFromArtscat3Stream
bool ReadFromArtscat3Stream(istream &is, const Verbosity &verbosity)
Read one line from a stream associated with an ARTSCAT-3 file.
Definition: absorption.cc:1825
LineRecord::Gamma_N2
Numeric Gamma_N2() const
Broadening parameter N2 in Hz/Pa :
Definition: absorption.h:705
SpeciesRecord::Degfr
Index Degfr() const
Definition: absorption.h:363
MatrixView
The MatrixView class.
Definition: matpackI.h:668
ArrayOfLineshapeSpec
Array< LineshapeSpec > ArrayOfLineshapeSpec
Holds a list of lineshape specifications: function, normalization, cutoff.
Definition: absorption.h:175
LineRecord::Sgam
Numeric Sgam() const
Self broadened width in Hz/Pa:
Definition: absorption.h:640
SpecIsoMap
Definition: absorption.h:1168
IsotopeRecord::mmass
Numeric mmass
Definition: absorption.h:296
LineshapeNormRecord::mfunction
lsnf_type mfunction
Pointer to lineshape normalization function.
Definition: absorption.h:123
LineRecord::melow
Numeric melow
Definition: absorption.h:1082
xsec_species
void xsec_species(MatrixView xsec, ConstVectorView f_mono, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView h2o_abs, ConstVectorView vmr, const ArrayOfLineRecord &abs_lines, const Index ind_ls, const Index ind_lsn, const Numeric cutoff, const Verbosity &verbosity)
Calculate line absorption cross sections for one tag group.
Definition: absorption.cc:2240
LineRecord::mgamma_self
Numeric mgamma_self
Definition: absorption.h:1123
LineRecord::mgamma_he
Numeric mgamma_he
Definition: absorption.h:1135
LineRecord::Gam_N_H2O
Numeric Gam_N_H2O() const
GAM temp.
Definition: absorption.h:732
LineRecord::mn_co2
Numeric mn_co2
Definition: absorption.h:1146
SpecIsoMap::misotopeindex
Index misotopeindex
Definition: absorption.h:1184
IsotopeRecord::JplTags
const ArrayOfIndex & JplTags() const
JPL tag numbers for all isotopes.
Definition: absorption.h:249
ArrayOfLineRecord
Array< LineRecord > ArrayOfLineRecord
Holds a list of spectral line data.
Definition: absorption.h:1191
LineRecord::mn_h2
Numeric mn_h2
Definition: absorption.h:1148
LineshapeRecord::mfunction
lsf_type mfunction
Pointer to lineshape function.
Definition: absorption.h:79
LineshapeRecord::Description
const String & Description() const
Return the description text.
Definition: absorption.h:73
LineRecord::setSgam
void setSgam(Numeric new_sgam)
Set Self broadened width in Hz/Pa:
Definition: absorption.h:643
LineshapeNormRecord::Function
lsnf_type Function() const
Return pointer to lineshape normalization function.
Definition: absorption.h:119
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:520
LineshapeSpec::Ind_ls
const Index & Ind_ls() const
Return the index of this lineshape.
Definition: absorption.h:150
LineRecord::Agam
Numeric Agam() const
Air broadened width in Hz/Pa:
Definition: absorption.h:634
LineshapeNormRecord::Name
const String & Name() const
Return the name of this lineshape.
Definition: absorption.h:115
LineRecord::mi0
Numeric mi0
Definition: absorption.h:1078
LineRecord::Nself
Numeric Nself() const
SGAM temperature exponent (dimensionless):
Definition: absorption.h:652
LineRecord::Delta_O2
Numeric Delta_O2() const
F Pressure shift O2 in Hz/Pa :
Definition: absorption.h:747
LineRecord::Gam_N_CO2
Numeric Gam_N_CO2() const
GAM temp.
Definition: absorption.h:735
LineRecord::mn_he
Numeric mn_he
Definition: absorption.h:1150
LineshapeNormRecord::LineshapeNormRecord
LineshapeNormRecord(const String &name, const String &description, lsnf_type function)
Initializing constructor, used to build the lookup table.
Definition: absorption.h:107
LineRecord::A
Numeric A() const
Einstein A-coefficient in 1/s :
Definition: absorption.h:693
LineRecord::Gam_N_H2
Numeric Gam_N_H2() const
GAM temp.
Definition: absorption.h:738
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:85
LineshapeRecord
Lineshape related information.
Definition: absorption.h:53
LineRecord::mdpsf
Numeric mdpsf
Definition: absorption.h:1111
LineRecord::mpsf
Numeric mpsf
Definition: absorption.h:1076
IsotopeRecord::Abundance
const Numeric & Abundance() const
Normal abundance ( = isotopic ratio).
Definition: absorption.h:238
LineRecord::mn_self
Numeric mn_self
Definition: absorption.h:1138
LineRecord::IsotopeData
const IsotopeRecord & IsotopeData() const
The matching IsotopeRecord from species_data.
Definition: absorption.cc:242
LineshapeRecord::Function
lsf_type Function() const
Return pointer to lineshape function.
Definition: absorption.h:75
array.h
This file contains the definition of Array.
LineRecord::mnself
Numeric mnself
Definition: absorption.h:1090
IsotopeRecord::Name
const String & Name() const
Isotope name.
Definition: absorption.h:236
LineshapeSpec::Cutoff
const Numeric & Cutoff() const
Return the cutoff frequency (in Hz).
Definition: absorption.h:162
LineRecord::Delta_H2
Numeric Delta_H2() const
F Pressure shift H2 in Hz/Pa :
Definition: absorption.h:756
LineRecord::Delta_He
Numeric Delta_He() const
F Pressure shift He in Hz/Pa :
Definition: absorption.h:759
refr_index_BoudourisDryAir
void refr_index_BoudourisDryAir(Vector &refr_index, ConstVectorView abs_p, ConstVectorView abs_t)
Calculates the refractive index for dry air at microwave frequncies following Boudouris 1963.
Definition: absorption.cc:2776
matpackI.h
IsotopeRecord::MytranTag
const Index & MytranTag() const
MYTRAN2 tag numbers for all isotopes.
Definition: absorption.h:243
LineshapeSpec::Ind_lsn
const Index & Ind_lsn() const
Return the index of the normalization factor.
Definition: absorption.h:155
LineRecord::mdelta_o2
Numeric mdelta_o2
Definition: absorption.h:1155
convHitranIERF
void convHitranIERF(Numeric &mdf, const Index &df)
Definition: absorption.cc:2867
LineRecord::mgamma_h2
Numeric mgamma_h2
Definition: absorption.h:1133
Array
This can be used to make arrays out of anything.
Definition: array.h:103
IsotopeRecord::HitranTag
const Index & HitranTag() const
HITRAN-96 tag numbers for all isotopes.
Definition: absorption.h:245
LineRecord::ReadFromHitranStream
bool ReadFromHitranStream(istream &is, const Verbosity &verbosity)
Read one line from a stream associated with a HITRAN 1986-2001 file.
Definition: absorption.cc:255
convMytranIER
void convMytranIER(Numeric &mdh, const Index &dh)
Definition: absorption.cc:2973
LineRecord::Elow
Numeric Elow() const
Lower state energy in cm^-1:
Definition: absorption.h:631
LineshapeRecord::mdescription
String mdescription
Short description.
Definition: absorption.h:78
SpeciesRecord::misotope
Array< IsotopeRecord > misotope
Isotope data.
Definition: absorption.h:373
IsotopeRecord::mqcoeff
ArrayOfNumeric mqcoeff
Definition: absorption.h:300
LineRecord::SpeciesData
const SpeciesRecord & SpeciesData() const
The matching SpeciesRecord from species_data.
Definition: absorption.cc:224
LineRecord::mgamma_co2
Numeric mgamma_co2
Definition: absorption.h:1131
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:2845
operator<<
ostream & operator<<(ostream &os, const LineshapeSpec &lsspec)
Definition: absorption.cc:3034
LineRecord::Psf
Numeric Psf() const
The pressure shift parameter in Hz/Pa.
Definition: absorption.h:605
LineRecord::mgamma_o2
Numeric mgamma_o2
Definition: absorption.h:1127
convHitranIERSH
void convHitranIERSH(Numeric &mdh, const Index &dh)
Definition: absorption.cc:2914
messages.h
Declarations having to do with the four output streams.
SpeciesRecord::SpeciesRecord
SpeciesRecord()
Default constructor.
Definition: absorption.h:311
LineRecord::Name
String Name() const
The full name of the species and isotope.
Definition: absorption.cc:207
LineRecord::mdelta_co2
Numeric mdelta_co2
Definition: absorption.h:1159
IsotopeRecord::mhitrantag
Index mhitrantag
Definition: absorption.h:298
SpeciesRecord::Isotope
Array< IsotopeRecord > & Isotope()
Definition: absorption.h:365
my_basic_string< char >
SpecIsoMap::Isotopeindex
const Index & Isotopeindex() const
Definition: absorption.h:1180
LineRecord::linesElowToJoule
friend void linesElowToJoule(Array< LineRecord > &abs_lines)
Make the helper function linesElowToJoule a friend, so that it can change the lower state energy.
Definition: m_abs.cc:420
LineRecord::mf
Numeric mf
Definition: absorption.h:1074
LineRecord::mti0
Numeric mti0
Definition: absorption.h:1080
LineRecord::misotope
Index misotope
Definition: absorption.h:1072
LineRecord::mdnself
Numeric mdnself
Definition: absorption.h:1109
LineRecord::Gamma_H2O
Numeric Gamma_H2O() const
Broadening parameter H2O in Hz/Pa :
Definition: absorption.h:711
LineRecord::setNair
void setNair(Numeric new_mnair)
Set AGAM temperature exponent (dimensionless):
Definition: absorption.h:649
LineRecord::dNself
Numeric dNself() const
Accuracy for SGAM temperature exponent in relative value:
Definition: absorption.h:687
LineRecord::Gamma_H2
Numeric Gamma_H2() const
Broadening parameter H2 in Hz/Pa :
Definition: absorption.h:717
LineRecord::G_upper
Numeric G_upper() const
Upper state stat.
Definition: absorption.h:696
IsotopeRecord
Contains the lookup data for one isotope.
Definition: absorption.h:181
define_species_map
void define_species_map()
Define the species data map.
Definition: absorption.cc:70
LineRecord::ReadFromJplStream
bool ReadFromJplStream(istream &is, const Verbosity &verbosity)
Read one line from a stream associated with a JPL file.
Definition: absorption.cc:1579
VectorView
The VectorView class.
Definition: matpackI.h:373
ArrayOfArrayOfLineRecord
Array< Array< LineRecord > > ArrayOfArrayOfLineRecord
Holds a lists of spectral line data for each tag group.
Definition: absorption.h:1196
LineRecord::Isotope
Index Isotope() const
The index of the isotopic species that this line belongs to.
Definition: absorption.h:590
LineshapeSpec::SetInd_ls
void SetInd_ls(Index ind_ls)
Set it.
Definition: absorption.h:152
LineRecord::Delta_CO2
Numeric Delta_CO2() const
F Pressure shift CO2 in Hz/Pa :
Definition: absorption.h:753
SpeciesRecord::Isotope
const Array< IsotopeRecord > & Isotope() const
Definition: absorption.h:364
Numeric
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
Verbosity
Definition: messages.h:50
LineRecord::mdelta_h2o
Numeric mdelta_h2o
Definition: absorption.h:1157
SpecIsoMap::Speciesindex
const Index & Speciesindex() const
Definition: absorption.h:1178
IsotopeRecord::SetPartitionFctCoeff
void SetPartitionFctCoeff(const ArrayOfNumeric &qcoeff)
Definition: absorption.h:251
LineRecord::Gam_N_O2
Numeric Gam_N_O2() const
GAM temp.
Definition: absorption.h:729
LineRecord::mn_o2
Numeric mn_o2
Definition: absorption.h:1142
make_array.h
Implements the class MakeArray, which is a derived class of Array, allowing explicit initialization.
LineRecord::VersionString
String VersionString() const
Return the version String.
Definition: absorption.h:573
LineRecord::setPsf
void setPsf(Numeric new_mpsf)
Set the pressure shift parameter in Hz/Pa.
Definition: absorption.h:608
LineRecord
Spectral line catalog data.
Definition: absorption.h:481
IsotopeRecord::mmytrantag
Index mmytrantag
Definition: absorption.h:297
LineRecord::mdf
Numeric mdf
Definition: absorption.h:1099
SpecIsoMap::SpecIsoMap
SpecIsoMap(const Index &speciesindex, const Index &isotopeindex)
Definition: absorption.h:1171
IsotopeRecord::mjpltags
ArrayOfIndex mjpltags
Definition: absorption.h:299
LineshapeSpec::SetCutoff
void SetCutoff(Numeric cutoff)
Set it.
Definition: absorption.h:164
LineRecord::Gam_N_self
Numeric Gam_N_self() const
GAM temp.
Definition: absorption.h:723
LineRecord::magam
Numeric magam
Definition: absorption.h:1084
LineRecord::setF
void setF(Numeric new_mf)
Set the line center frequency in Hz.
Definition: absorption.h:602
LineRecord::ReadFromArtscat4Stream
bool ReadFromArtscat4Stream(istream &is, const Verbosity &verbosity)
Read one line from a stream associated with an ARTSCAT-4 file.
Definition: absorption.cc:2020
LineRecord::Species
Index Species() const
The index of the molecular species that this line belongs to.
Definition: absorption.h:585
SpecIsoMap::mspeciesindex
Index mspeciesindex
Definition: absorption.h:1183
LineRecord::mgamma_h2o
Numeric mgamma_h2o
Definition: absorption.h:1129
LineRecord::maux
ArrayOfNumeric maux
Definition: absorption.h:1094
SpeciesRecord
Contains the lookup data for one species.
Definition: absorption.h:307
LineshapeSpec
Lineshape related specification like which lineshape to use, the normalizationfactor,...
Definition: absorption.h:131
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:40
IsotopeRecord::IsotopeRecord
IsotopeRecord(const IsotopeRecord &x)
Copy constructor.
Definition: absorption.h:196
LineRecord::mspecies
Index mspecies
Definition: absorption.h:1070
LineRecord::mgupper
Numeric mgupper
Definition: absorption.h:1118
LineRecord::dSgam
Numeric dSgam() const
Accuracy for self broadened width in relative value :
Definition: absorption.h:681
SpeciesRecord::mdegfr
Index mdegfr
Degrees of freedom.
Definition: absorption.h:371
LineshapeRecord::mname
String mname
Name of the function (e.g., Lorentz).
Definition: absorption.h:77
LineRecord::dAgam
Numeric dAgam() const
Accuracy for air broadened width in relative value :
Definition: absorption.h:678
LineRecord::dF
Numeric dF() const
Accuracy for line position in Hz :
Definition: absorption.h:672
LineRecord::G_lower
Numeric G_lower() const
Lower state stat.
Definition: absorption.h:699
SpeciesRecord::mname
String mname
Species name.
Definition: absorption.h:369
LineshapeRecord::Name
const String & Name() const
Return the name of this lineshape.
Definition: absorption.h:71
LineshapeSpec::SetInd_lsn
void SetInd_lsn(Index ind_lsn)
Set it.
Definition: absorption.h:157
LineRecord::LineRecord
LineRecord()
Default constructor.
Definition: absorption.h:492
IsotopeRecord::Mass
const Numeric & Mass() const
Mass of the isotope.
Definition: absorption.h:241
LineRecord::mgamma_n2
Numeric mgamma_n2
Definition: absorption.h:1125
LineRecord::Gamma_CO2
Numeric Gamma_CO2() const
Broadening parameter CO2 in Hz/Pa :
Definition: absorption.h:714
IsotopeRecord::mabundance
Numeric mabundance
Definition: absorption.h:295
LineRecord::ma
Numeric ma
Definition: absorption.h:1116
LineRecord::Gamma_self
Numeric Gamma_self() const
Broadening parameter self in Hz/Pa :
Definition: absorption.h:702
LineshapeRecord::LineshapeRecord
LineshapeRecord(const String &name, const String &description, lsf_type function)
Initializing constructor, used to build the lookup table.
Definition: absorption.h:63
LineRecord::mtgam
Numeric mtgam
Definition: absorption.h:1092
SpeciesRecord::Name
const String & Name() const
Definition: absorption.h:362
LineRecord::Naux
Index Naux() const
Number of auxiliary parameters.
Definition: absorption.h:665
LineRecord::mn_h2o
Numeric mn_h2o
Definition: absorption.h:1144
LineshapeNormRecord::mdescription
String mdescription
Short description.
Definition: absorption.h:122
LineRecord::setNself
void setNself(Numeric new_mnself)
Set SGAM temperature exponent (dimensionless):
Definition: absorption.h:655
LineRecord::Delta_H2O
Numeric Delta_H2O() const
F Pressure shift H2O in Hz/Pa :
Definition: absorption.h:750
SpecIsoMap::SpecIsoMap
SpecIsoMap()
Definition: absorption.h:1170
LineshapeNormRecord::LineshapeNormRecord
LineshapeNormRecord()
Default constructor.
Definition: absorption.h:101
LineRecord::Version
Index Version() const
Return the version number.
Definition: absorption.h:581
LineshapeSpec::LineshapeSpec
LineshapeSpec(const Index &ind_ls, const Index &ind_lsn, const Numeric &cutoff)
Initializing constructor.
Definition: absorption.h:141
refr_index_Boudouris
void refr_index_Boudouris(Vector &refr_index, ConstVectorView abs_p, ConstVectorView abs_t, ConstVectorView h2o_abs)
Calculates the refractive index at microwave frequncies following Boudouris 1963.
Definition: absorption.cc:2808
LineRecord::Gam_N_He
Numeric Gam_N_He() const
GAM temp.
Definition: absorption.h:741
LineshapeSpec::LineshapeSpec
LineshapeSpec()
Default constructor.
Definition: absorption.h:135
LineRecord::msgam
Numeric msgam
Definition: absorption.h:1086
LineRecord::Gamma_O2
Numeric Gamma_O2() const
Broadening parameter O2 in Hz/Pa :
Definition: absorption.h:708
LineRecord::setAgam
void setAgam(Numeric new_agam)
Set Air broadened width in Hz/Pa:
Definition: absorption.h:637
IsotopeRecord::mname
String mname
Definition: absorption.h:294
LineshapeSpec::mind_ls
Index mind_ls
Definition: absorption.h:166
MakeArray
Explicit construction of Arrays.
Definition: make_array.h:52
LineRecord::mdi0
Numeric mdi0
Definition: absorption.h:1101
Index
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
LineRecord::mdelta_n2
Numeric mdelta_n2
Definition: absorption.h:1153
LineRecord::mdagam
Numeric mdagam
Definition: absorption.h:1103
IsotopeRecord::IsotopeRecord
IsotopeRecord()
Default constructor.
Definition: absorption.h:185
LineshapeNormRecord::mname
String mname
Name of the function (e.g., linear).
Definition: absorption.h:121
LineRecord::mdelta_h2
Numeric mdelta_h2
Definition: absorption.h:1161
LineRecord::Tgam
Numeric Tgam() const
Reference temperature for AGAM and SGAM in K:
Definition: absorption.h:658
Vector
The Vector class.
Definition: matpackI.h:555
LineRecord::mglower
Numeric mglower
Definition: absorption.h:1120
LineRecord::F
Numeric F() const
The line center frequency in Hz.
Definition: absorption.h:599
LineRecord::Aux
const ArrayOfNumeric & Aux() const
Auxiliary parameters.
Definition: absorption.h:668
LineshapeRecord::LineshapeRecord
LineshapeRecord()
Default constructor.
Definition: absorption.h:57
LineshapeSpec::mcutoff
Numeric mcutoff
Definition: absorption.h:168
LineRecord::mdsgam
Numeric mdsgam
Definition: absorption.h:1105
ConstVectorView
A constant view of a Vector.
Definition: matpackI.h:300
LineRecord::ReadFromHitran2004Stream
bool ReadFromHitran2004Stream(istream &is, const Verbosity &verbosity)
Read one line from a stream associated with a HITRAN 2004 file.
Definition: absorption.cc:708
LineRecord::Gam_N_N2
Numeric Gam_N_N2() const
GAM temp.
Definition: absorption.h:726
LineshapeNormRecord
Lineshape related normalization function information.
Definition: absorption.h:97
Array::nelem
Index nelem() const
Number of elements.
Definition: array.h:172
LineRecord::mnair
Numeric mnair
Definition: absorption.h:1088
LineRecord::I0
Numeric I0() const
The line intensity in m^2*Hz at the reference temperature Ti0.
Definition: absorption.h:622
LineRecord::setI0
void setI0(Numeric new_mi0)
Set Intensity.
Definition: absorption.h:625
LineRecord::dPsf
Numeric dPsf() const
Accuracy for pressure shift in relative value :
Definition: absorption.h:690
LineshapeSpec::mind_lsn
Index mind_lsn
Definition: absorption.h:167
LineRecord::ReadFromMytran2Stream
bool ReadFromMytran2Stream(istream &is, const Verbosity &verbosity)
Read one line from a stream associated with a MYTRAN2 file.
Definition: absorption.cc:1177
LineRecord::dI0
Numeric dI0() const
Accuracy for line intensity in relative value :
Definition: absorption.h:675
mystring.h
This file contains the definition of String, the ARTS string class.
write_lines_to_stream
void write_lines_to_stream(ostream &os, const ArrayOfLineRecord &abs_lines)
SpeciesRecord::SpeciesRecord
SpeciesRecord(const char name[], const Index degfr, const MakeArray< IsotopeRecord > &isotope)
The constructor used in define_species_data.
Definition: absorption.h:316
LineRecord::Gamma_He
Numeric Gamma_He() const
Broadening parameter He in Hz/Pa :
Definition: absorption.h:720
LineRecord::Nair
Numeric Nair() const
AGAM temperature exponent (dimensionless):
Definition: absorption.h:646
LineRecord::mversion
Index mversion
Definition: absorption.h:1068
LineRecord::mn_n2
Numeric mn_n2
Definition: absorption.h:1140
IsotopeRecord::CalculatePartitionFctRatio
Numeric CalculatePartitionFctRatio(Numeric reference_temperature, Numeric actual_temperature) const
Calculate partition function ratio.
Definition: absorption.h:269
LineRecord::mdelta_he
Numeric mdelta_he
Definition: absorption.h:1163