Go to the documentation of this file.
52 const Index& apply_tfit,
65 if (n_tgs != n_xsec) {
67 os <<
"The following variables must all have the same dimension:\n"
68 <<
"abs_species: " << n_tgs <<
"\n"
69 <<
"abs_xsec_per_species: " << n_xsec;
70 throw runtime_error(os.str());
110 os <<
"The following variables must all have the same dimension:\n"
111 <<
"abs_p: " << n_p <<
"\n"
113 throw runtime_error(os.str());
131 bool do_abort =
false;
146 out0 <<
"HITRAN XSEC Warning: No FFTW library support enabled, "
147 <<
"convolution will be extremely slow\n";
150 Index this_xdata_index =
152 if (this_xdata_index < 0) {
154 os <<
"Cross-section species " << this_species.
Name()
155 <<
" not found in *hitran_xsec_data*.";
156 throw std::runtime_error(os.str());
163 #pragma omp parallel for if (!arts_omp_in_parallel() && abs_p.nelem() >= 1) \
164 firstprivate(xsec_temp, dxsec_temp_dF)
165 for (
Index ip = 0; ip <
abs_p.nelem(); ip++) {
166 if (do_abort)
continue;
167 const Numeric current_p = force_p < 0 ?
abs_p[ip] : force_p;
168 const Numeric current_t = force_t < 0 ?
abs_t[ip] : force_t;
175 this_xdata.
Extract(dxsec_temp_dF,
185 }
catch (runtime_error& e) {
187 os <<
"Problem with HITRAN cross section species "
188 << this_species.
Name() <<
" at pressure level " << ip <<
" ("
189 <<
abs_p[ip] / 100. <<
" hPa):\n"
191 #pragma omp critical(abs_xsec_per_speciesAddHitranXsec)
194 fail_msg.push_back(os.str());
200 this_xsec(
joker, ip) += xsec_temp;
202 for (
Index iv = 0; iv < xsec_temp.
nelem(); iv++) {
203 this_xsec(iv, ip) += xsec_temp[iv];
204 for (
Index iq = 0; iq < jac_pos.
nelem(); iq++) {
206 this_dxsec[iq](iv, ip) +=
207 (dxsec_temp_dF[iv] - xsec_temp[iv]) / df;
212 JacPropMatType::VMR) {
215 this_dxsec[iq](iv, ip) += xsec_temp[iv];
231 std::ostringstream os;
232 os <<
"Error messages from failures:\n";
233 for (
const auto& msg : fail_msg) {
236 throw std::runtime_error(os.str());
Methods and classes for HITRAN absorption cross section data.
ArrayOfRetrievalQuantity jacobian_quantities(Workspace &ws) noexcept
Declarations required for the calculation of absorption coefficients.
void abs_xsec_per_speciesAddHitranXsec(ArrayOfMatrix &abs_xsec_per_species, ArrayOfArrayOfMatrix &dabs_xsec_per_species_dx, const ArrayOfArrayOfSpeciesTag &abs_species, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfIndex &abs_species_active, const Vector &f_grid, const Vector &abs_p, const Vector &abs_t, const ArrayOfXsecRecord &hitran_xsec_data, const Index &apply_tfit, const Numeric &force_p, const Numeric &force_t, const Verbosity &verbosity)
WORKSPACE METHOD: abs_xsec_per_speciesAddHitranXsec.
Verbosity verbosity(Workspace &ws) noexcept
String Name() const
Return the full name of the tag.
void resize(Index n)
Resize function.
ArrayOfMatrix abs_xsec_per_species(Workspace &ws) noexcept
ArrayOfXsecRecord hitran_xsec_data(Workspace &ws) noexcept
Numeric frequency_perturbation(const ArrayOfRetrievalQuantity &js) noexcept
Returns the frequency perturbation if it exists.
void Extract(VectorView result, ConstVectorView f_grid, const Numeric &pressure, const Numeric &temperature, const Index &apply_tfit, const Verbosity &verbosity) const
Interpolate cross section data.
This can be used to make arrays out of anything.
A tag group can consist of the sum of several of these.
Declarations having to do with the four output streams.
ArrayOfIndex equivalent_propmattype_indexes(const ArrayOfRetrievalQuantity &js)
Returns a list of positions for the derivatives in Propagation Matrix calculations.
Index nelem() const
Returns the number of elements.
const Numeric SPEED_OF_LIGHT
This file contains declerations of functions of physical character.
ArrayOfArrayOfSpeciesTag abs_species(Workspace &ws) noexcept
NUMERIC Numeric
The type to use for all floating point numbers.
bool do_frequency_jacobian(const ArrayOfRetrievalQuantity &js) noexcept
Returns if the array wants a frequency derivative.
Vector f_grid(Workspace &ws) noexcept
Vector abs_t(Workspace &ws) noexcept
ArrayOfIndex abs_species_active(Workspace &ws) noexcept
bool supports_hitran_xsec(const ArrayOfRetrievalQuantity &js)
Returns if the array supports HITRAN cross-section derivatives.
INDEX Index
The type to use for all integer numbers and indices.
Vector abs_p(Workspace &ws) noexcept
ArrayOfArrayOfMatrix dabs_xsec_per_species_dx(Workspace &ws) noexcept
bool is_frequency_parameter(const RetrievalQuantity &t) noexcept
Returns if the Retrieval quantity is a frequency parameter in propagation matrix calculations.
Index Type() const
Return the type of this tag.
Index Species() const
Molecular species index.
bool species_match(const RetrievalQuantity &rq, const ArrayOfSpeciesTag &ast)
Returns if the Retrieval quantity is VMR derivative for all the species in the species tags.
Index nelem() const
Number of elements.
Index hitran_xsec_get_index(const ArrayOfXsecRecord &xsec_data, const Index species)
Get the index in hitran_xsec_data for the given species.
The global header file for ARTS.
This file contains basic functions to handle XML data files.