118 const String& description,
152 const Index& ind_lsn,
204 mqcoeffinterporder(-1)
211 mabundance(x.mabundance),
213 mmytrantag(x.mmytrantag),
214 mhitrantag(x.mhitrantag),
215 mjpltags(x.mjpltags),
226 const Index& mytrantag,
227 const Index& hitrantag,
230 mabundance(abundance),
232 mmytrantag(mytrantag),
233 mhitrantag(hitrantag),
236 mqcoefftype(PF_NOTHING),
246 assert( (0<mmytrantag) || (-1==mmytrantag) );
247 assert( (0<mhitrantag) || (-1==mhitrantag) );
248 for (
Index i=0; i<mjpltags.nelem(); ++i )
249 assert( (0<mjpltags[i]) || (-1==mjpltags[i]) );
251 #endif // ifndef NDEBUG 279 mqcoefftype = qcoefftype;
296 Numeric actual_temperature )
const 299 Numeric qcoeff_at_t_ref, qtemp;
305 CalculatePartitionFctAtTempFromCoeff( reference_temperature );
307 CalculatePartitionFctAtTempFromCoeff( actual_temperature );
311 CalculatePartitionFctAtTempFromData( actual_temperature );
313 CalculatePartitionFctAtTempFromData( actual_temperature );
316 throw runtime_error(
"The partition functions are incorrect.\n");
325 return qcoeff_at_t_ref / qtemp;
329 os <<
"Partition function of " 330 <<
"Isotopologue " <<
mname 332 <<
" at T=" << actual_temperature <<
"K is zero or negative.";
333 throw runtime_error(os.str());
348 Numeric CalculatePartitionFctAtTempFromCoeff(
Numeric temperature )
const;
349 Numeric CalculatePartitionFctAtTempFromData(
Numeric temperature )
const;
381 misotopologue(isotopologue)
390 for (
Index i=0; i<misotopologue.nelem()-1; ++i )
392 assert(isnan(misotopologue[i].Abundance()) || isnan(misotopologue[i+1].Abundance())
393 || misotopologue[i].Abundance() >= misotopologue[i+1].Abundance());
397 for (
Index i=0; i<misotopologue.nelem()-1; ++i )
399 if ( (0<misotopologue[i].MytranTag()) && (0<misotopologue[i+1].MytranTag()) )
401 assert( misotopologue[i].MytranTag() < misotopologue[i+1].MytranTag() );
404 assert( misotopologue[i].MytranTag()/10 == misotopologue[i].MytranTag()/10 );
409 for (
Index i=0; i<misotopologue.nelem()-1; ++i )
411 if ( (0<misotopologue[i].HitranTag()) && (0<misotopologue[i+1].HitranTag()) )
416 assert( misotopologue[i].HitranTag()/10 == misotopologue[i+1].HitranTag()/10 );
420 #endif // #ifndef NDEBUG 446 void initParams(
Index nparams);
451 return mparams[species](isotopologue, col);
457 mparams[species](isotopologue, col) = v;
464 bool ReadFromStream(
String& artsid, istream& is,
Index nparams,
485 const Index& isotopologueindex)
486 : mspeciesindex(speciesindex),
487 misotopologueindex(isotopologueindex)
527 const Index this_species,
545 const Index this_species,
563 const Index this_species,
623 #endif // absorption_h INDEX Index
The type to use for all integer numbers and indices.
lsf_type mfunction
Pointer to lineshape function.
void xsec_species(MatrixView xsec_attenuation, MatrixView xsec_phase, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstMatrixView all_vmrs, const ArrayOfArrayOfSpeciesTag &abs_species, const Index this_species, const ArrayOfLineRecord &abs_lines, const Index ind_ls, const Index ind_lsn, const Numeric cutoff, const SpeciesAuxData &isotopologue_ratios, const Verbosity &verbosity)
Calculate line absorption cross sections for one tag group.
const Index & MytranTag() const
MYTRAN2 tag numbers for all isotopologues.
Array< LineshapeSpec > ArrayOfLineshapeSpec
Holds a list of lineshape specifications: function, normalization, cutoff.
ostream & operator<<(ostream &os, const LineshapeSpec &lsspec)
void(* lsnf_type)(Vector &, const Numeric, ConstVectorView, const Numeric)
The type that is used to store pointers to lineshape normalization functions.
String mname
Name of the function (e.g., linear).
bool isContinuum() const
Check if isotopologue is actually a continuum.
const String & Name() const
Return the name of this lineshape.
const Numeric & Mass() const
Mass of the isotopologue.
void xsec_species_line_mixing_wrapper(MatrixView xsec_attenuation, MatrixView xsec_phase, const ArrayOfArrayOfLineMixingRecord &line_mixing_data, const ArrayOfArrayOfIndex &line_mixing_data_lut, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstMatrixView all_vmrs, const ArrayOfArrayOfSpeciesTag &abs_species, const Index this_species, const ArrayOfLineRecord &abs_lines, const Index ind_ls, const Index ind_lsn, const Numeric cutoff, const SpeciesAuxData &isotopologue_ratios, const Verbosity &verbosity)
This will work as a wrapper for linemixing when abs_species contain relevant data.
String species_name_from_species_index(const Index spec_ind)
Return species name for given species index.
bool mphase
Does this lineshape calculate phase information?
Explicit construction of Arrays.
Declarations having to do with the four output streams.
String mdescription
Short description.
Lineshape related specification like which lineshape to use, the normalizationfactor, and the cutoff.
Index mdegfr
Degrees of freedom.
const String & Description() const
Return the description text.
Array< IsotopologueRecord > & Isotopologue()
void SetPartitionFctCoeff(const ArrayOfNumeric &qcoeff, const Index &qcoefftype)
SpeciesRecord(const char name[], const Index degfr, const MakeArray< IsotopologueRecord > &isotopologue)
The constructor used in define_species_data.
void(* lsf_type)(Vector &, Vector &, Vector &, const Numeric, const Numeric, const Numeric, ConstVectorView)
The type that is used to store pointers to lineshape functions.
void convHitranIERSH(Numeric &mdh, const Index &dh)
const Index & Isotopologueindex() const
lsnf_type mfunction
Pointer to lineshape normalization function.
void convHitranIERF(Numeric &mdf, const Index &df)
IsotopologueRecord(const String &name, const Numeric &abundance, const Numeric &mass, const Index &mytrantag, const Index &hitrantag, const MakeArray< Index > &jpltags)
Constructor that sets the values.
const Index & Ind_lsn() const
Return the index of the normalization factor.
LineshapeNormRecord()
Default constructor.
void setParam(Index species, Index isotopologue, Index col, Numeric v)
Set parameter.
String mdescription
Short description.
void convMytranIER(Numeric &mdh, const Index &dh)
const Index & HitranTag() const
HITRAN-96 tag numbers for all isotopologues.
This file contains the definition of Array.
String mname
Species name.
const Array< IsotopologueRecord > & Isotopologue() const
const ArrayOfIndex & JplTags() const
JPL tag numbers for all isotopologues.
Lineshape related normalization function information.
lsf_type Function() const
Return pointer to lineshape function.
SpeciesAuxData()
Default constructor.
LineMixingRecord class for storing line mixing data.
Contains the lookup data for one species.
const ArrayOfMatrix & getParams() const
Return a constant reference to the parameters.
void checkIsotopologueRatios(const ArrayOfArrayOfSpeciesTag &abs_species, const SpeciesAuxData &sad)
Check that isotopologue ratios for the given species are correctly defined.
bool Phase() const
Returns true if lineshape function calculates phase information.
void define_species_map()
Define the species data map.
LineshapeRecord(const String &name, const String &description, lsf_type function, const bool phase)
Initializing constructor, used to build the lookup table.
SpecIsoMap(const Index &speciesindex, const Index &isotopologueindex)
IsotopologueRecord()
Default constructor.
const Numeric & Cutoff() const
Return the cutoff frequency (in Hz).
void SetInd_ls(Index ind_ls)
Set it.
NUMERIC Numeric
The type to use for all floating point numbers.
IsotopologueRecord(const IsotopologueRecord &x)
Copy constructor.
void xsec_species_line_mixing_2nd_order(MatrixView xsec_attenuation, MatrixView xsec_phase, const ArrayOfArrayOfLineMixingRecord &line_mixing_data, const ArrayOfArrayOfIndex &line_mixing_data_lut, ConstVectorView f_grid, ConstVectorView abs_p, ConstVectorView abs_t, ConstMatrixView all_vmrs, const ArrayOfArrayOfSpeciesTag &abs_species, const Index this_species, const ArrayOfLineRecord &abs_lines, const Index ind_ls, const Index ind_lsn, const Numeric cutoff, const SpeciesAuxData &isotopologue_ratios, const Verbosity &verbosity)
This is the second order line mixing correction as presented by: Makarov, D.S, M.Yu.
Implements the class MakeArray, which is a derived class of Array, allowing explicit initialization...
const Index & Ind_ls() const
Return the index of this lineshape.
const String & Name() const
Index species_index_from_species_name(String name)
Return species index for given species name.
This can be used to make arrays out of anything.
Contains the lookup data for one isotopologue.
LineshapeSpec(const Index &ind_ls, const Index &ind_lsn, const Numeric &cutoff)
Initializing constructor.
Numeric wavenumber_to_joule(Numeric e)
A little helper function to convert energy from units of wavenumber (cm^-1) to Joule (J)...
const String & Name() const
Return the name of this lineshape.
void SetInd_lsn(Index ind_lsn)
Set it.
SpeciesRecord()
Default constructor.
A constant view of a Vector.
Lineshape related information.
LineshapeRecord()
Default constructor.
LineRecord class for managing line catalog data.
A constant view of a Matrix.
LineshapeNormRecord(const String &name, const String &description, lsnf_type function)
Initializing constructor, used to build the lookup table.
void abs_n2Set(Vector &abs_n2, const ArrayOfArrayOfSpeciesTag &abs_species, const Matrix &abs_vmrs, const Verbosity &)
abs_n2Set.
Array< IsotopologueRecord > misotopologue
Isotopologue data.
const Index & Speciesindex() const
void abs_h2oSet(Vector &abs_h2o, const ArrayOfArrayOfSpeciesTag &abs_species, const Matrix &abs_vmrs, const Verbosity &)
abs_h2oSet.
Numeric getParam(Index species, Index isotopologue, Index col) const
Get single parameter value.
const String & Description() const
Return the description text.
void SetCutoff(Numeric cutoff)
Set it.
void fillSpeciesAuxDataWithIsotopologueRatiosFromSpeciesData(SpeciesAuxData &sad)
Fill SpeciesAuxData with default isotopologue ratios from species data.
const Numeric & Abundance() const
Normal abundance ( = isotopologue ratio).
Auxiliary data for isotopologues.
const String & Name() const
Isotopologue name.
Numeric CalculatePartitionFctRatio(Numeric reference_temperature, Numeric actual_temperature) const
Calculate partition function ratio.
LineshapeSpec()
Default constructor.
lsnf_type Function() const
Return pointer to lineshape normalization function.
This file contains the definition of String, the ARTS string class.
String mname
Name of the function (e.g., Lorentz).