44 throw std::runtime_error(
"Mismatch dimensions on pressure and VMR inputs");
45 }
else if (abs_t.
nelem() not_eq abs_p.
nelem()) {
46 throw std::runtime_error(
"Mismatch dimensions on pressure and temperature inputs");
47 }
else if (abs_vmrs.
nrows() not_eq abs_species.
nelem()) {
48 throw std::runtime_error(
"Mismatch dimensions on species and VMR inputs");
49 }
else if (abs_xsec_per_species.
nelem() not_eq abs_species.
nelem()) {
50 throw std::runtime_error(
"Mismatch dimensions on xsec and VMR inputs");
51 }
else if (std::any_of(abs_xsec_per_species.cbegin(), abs_xsec_per_species.cend(),
52 [&abs_p](
auto x){
return x.ncols() not_eq abs_p.
nelem();})) {
53 throw std::runtime_error(
"Mismatch dimensions on internal matrices of xsec and pressure");
54 }
else if (std::any_of(abs_xsec_per_species.cbegin(), abs_xsec_per_species.cend(),
55 [&f_grid](
auto x){
return x.nrows() not_eq f_grid.
nelem();})) {
56 throw std::runtime_error(
"Mismatch dimensions on internal matrices of xsec and frequency");
61 if (dabs_xsec_per_species_dx.
nelem()) {
62 if(dabs_xsec_per_species_dx.
nelem() not_eq abs_species.
nelem()) {
63 throw std::runtime_error(
"Mismatch dimensions on species inputs and xsec derivatives");
64 }
else if (std::any_of(dabs_xsec_per_species_dx.cbegin(), dabs_xsec_per_species_dx.cend(),
65 [&jac_pos](
auto x){
return x.
nelem() not_eq jac_pos.nelem();})) {
66 throw std::runtime_error(
"Mismatch dimensions on xsec derivatives and Jacobian grids");
67 }
else if (std::any_of(dabs_xsec_per_species_dx.cbegin(), dabs_xsec_per_species_dx.cend(),
68 [&abs_p](
auto x1){
return std::any_of(
x1.cbegin(),
x1.cend(),
69 [&abs_p](
auto x2){
return x2.ncols() not_eq abs_p.
nelem();});})) {
70 throw std::runtime_error(
"Mismatch dimensions on internal matrices of xsec derivatives and pressure");
71 }
else if (std::any_of(dabs_xsec_per_species_dx.cbegin(), dabs_xsec_per_species_dx.cend(),
72 [&f_grid](
auto x1){
return std::any_of(
x1.cbegin(),
x1.cend(),
73 [&f_grid](
auto x2){
return x2.nrows() not_eq f_grid.
nelem();});})) {
74 throw std::runtime_error(
"Mismatch dimensions on internal matrices of xsec derivatives and frequency");
85 if (o2_mpm2020 >= 0 and o2_mpm2020 < abs_xsec_per_species.
nelem()) {
87 dabs_xsec_per_species_dx.
nelem() ? dabs_xsec_per_species_dx[o2_mpm2020] : empty,
88 f_grid, abs_p, abs_t, h2o_vmr, jacobian_quantities, jac_pos);
ArrayOfIndex equivalent_propmattype_indexes(const ArrayOfRetrievalQuantity &js)
Returns a list of positions for the derivatives in Propagation Matrix calculations.
Index nelem() const
Number of elements.
QuantumIdentifier::QType Index LowerQuantumNumbers Species
invlib::Vector< ArtsVector > Vector
invlib wrapper type for ARTS vectors.
Index nelem() const
Returns the number of elements.
Index ncols() const
Returns the number of columns.
void makarov2020_o2_lines_mpm(Matrix &xsec, ArrayOfMatrix &dxsec, const Vector &f, const Vector &p, const Vector &t, const Vector &water_vmr, const ArrayOfRetrievalQuantity &jacs, const ArrayOfIndex &jacs_pos)
Adds Makarov MPM2020 O2 absorption lines to the absorption matrix.
A tag group can consist of the sum of several of these.
This can be used to make arrays out of anything.
void abs_xsec_per_speciesAddPredefinedO2MPM2020(ArrayOfMatrix &abs_xsec_per_species, ArrayOfArrayOfMatrix &dabs_xsec_per_species_dx, const ArrayOfArrayOfSpeciesTag &abs_species, const ArrayOfRetrievalQuantity &jacobian_quantities, const Vector &f_grid, const Vector &abs_p, const Vector &abs_t, const Matrix &abs_vmrs, const Verbosity &)
WORKSPACE METHOD: abs_xsec_per_speciesAddPredefinedO2MPM2020.
Index nrows() const
Returns the number of rows.