ARTS 2.5.4 (git: 4c0d3b4d)
m_linemixing.cc
Go to the documentation of this file.
1/* Copyright (C) 2020
2 * Richard Larsson <ric.larsson@gmail.com>
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
31#include "hitran_species.h"
32#include "linemixing.h"
33#include "linemixing_hitran.h"
34#include "matpack.h"
35#include "propagationmatrix.h"
36
37
39 ArrayOfArrayOfAbsorptionLines& abs_lines_per_species,
40 const ArrayOfArrayOfSpeciesTag& abs_species,
41 const String& basedir,
42 const Numeric& linemixinglimit,
43 const Numeric& fmin,
44 const Numeric& fmax,
45 const Numeric& stot,
46 const String& mode,
47 const Verbosity&)
48{
49 const lm_hitran_2017::ModeOfLineMixing intmode = lm_hitran_2017::toModeOfLineMixingOrThrow(mode);
50
52
53 ARTS_USER_ERROR_IF (abs_species.nelem() not_eq abs_lines_per_species.nelem(),
54 "Bad size of input species+lines");
55
57 lm_hitran_2017::read(abs_hitran_relmat_data, lines, isotopologue_ratios, basedir, linemixinglimit, fmin, fmax, stot, intmode);
58 std::for_each(lines.begin(), lines.end(), [](auto& band){band.sort_by_frequency();}); // Sort so largest frequency is last
59 ArrayOfIndex used(lines.nelem(), false);
60
61 bool emptied=false;
62 for (Index i=0; i<abs_species.nelem(); i++) {
63
64 for (Index j=0; j<abs_species[i].nelem(); j++) {
65 if (abs_species[i][j].Spec() not_eq Species::fromShortName("CO2"))
66 continue;
67
68 if (not emptied) {
69 abs_lines_per_species[i].resize(0);
70 emptied = true;
71 }
72
73 for (Index k=0; k<lines.nelem(); k++) {
74 if (used[k]) continue;
75
76 const Numeric lf{abs_species[i][j].lower_freq > 0 ? abs_species[i][j].lower_freq : -std::numeric_limits<Numeric>::max()};
77 const Numeric uf{abs_species[i][j].upper_freq > 0 ? abs_species[i][j].upper_freq : std::numeric_limits<Numeric>::max()};
78
79 // Select lines with correct Isotopologue and one line center within the range
80 if ((abs_species[i][j].Isotopologue() == lines[k].Isotopologue() or
81 abs_species[i][j].Isotopologue() == Species::select_joker("CO2")) and
82 (lines[k].lines.front().F0 <= uf and lines[k].lines.back().F0 >= lf)) {
83 used[k] = true; // The lines should not be copied into other places
84 abs_lines_per_species[i].push_back(lines[k]);
85 }
86 }
87 }
88 }
89}
90
92 const HitranRelaxationMatrixData& abs_hitran_relmat_data,
93 const ArrayOfArrayOfAbsorptionLines& abs_lines_per_species,
95 const Vector& f_grid,
96 const ArrayOfArrayOfSpeciesTag& abs_species,
97 const ArrayOfRetrievalQuantity& jacobian_quantities,
98 const Numeric& rtp_pressure,
99 const Numeric& rtp_temperature,
100 const Vector& rtp_vmr,
101 const Verbosity&)
102{
103 ARTS_USER_ERROR_IF (jacobian_quantities.nelem(),
104 "Cannot support any Jacobian at this time");
105 ARTS_USER_ERROR_IF (abs_species.nelem() not_eq abs_lines_per_species.nelem(),
106 "Bad size of input species+lines");
107 ARTS_USER_ERROR_IF (abs_species.nelem() not_eq rtp_vmr.nelem(),
108 "Bad size of input species+vmrs");
109
110 // vmrs should be [air, water, co2]
111 Vector vmrs(3, 0);
112 for (Index i=0; i<abs_species.nelem(); i++) {
113 auto& specs = abs_species[i];
114 for (auto& spec: specs) {
115 if (Species::fromShortName("H2O") == spec.Spec()) {
116 vmrs[1] = rtp_vmr[i];
117 }
118 else if (Species::fromShortName("CO2") == spec.Spec()) {
119 vmrs[0] = rtp_vmr[i];
120 }
121 }
122 }
123 vmrs[2] = 1.0 - vmrs[1] - vmrs[0];
124
125 for (Index i=0; i<abs_species.nelem(); i++) {
126 if (abs_lines_per_species[i].nelem() and
127 (abs_lines_per_species[i].front().population == Absorption::PopulationType::ByHITRANFullRelmat or
128 abs_lines_per_species[i].front().population == Absorption::PopulationType::ByHITRANRosenkranzRelmat))
129 propmat_clearsky.Kjj() += lm_hitran_2017::compute(abs_hitran_relmat_data, abs_lines_per_species[i], isotopologue_ratios, rtp_pressure, rtp_temperature, vmrs, f_grid);
130 }
131}
132
134 const HitranRelaxationMatrixData& abs_hitran_relmat_data,
135 const Vector& t_grid,
136 const Numeric& pressure,
137 const Index& order,
138 const Verbosity&)
139{
140 for (auto& abs_lines: abs_lines_per_species) {
141 for (auto& band: abs_lines) {
142 if (band.population == Absorption::PopulationType::ByHITRANFullRelmat or band.population == Absorption::PopulationType::ByHITRANRosenkranzRelmat) {
143 lm_hitran_2017::hitran_lm_eigenvalue_adaptation(band, t_grid, abs_hitran_relmat_data, pressure, order);
144 }
145 }
146 }
147}
148
150 ArrayOfPropagationMatrix& dpropmat_clearsky_dx,
151 const ArrayOfArrayOfAbsorptionLines& abs_lines_per_species,
152 const MapOfErrorCorrectedSuddenData& ecs_data,
154 const Vector& f_grid,
155 const ArrayOfArrayOfSpeciesTag& abs_species,
156 const ArrayOfRetrievalQuantity& jacobian_quantities,
157 const Numeric& rtp_pressure,
158 const Numeric& rtp_temperature,
159 const Vector& rtp_vmr,
160 const Index& lbl_checked,
161 const Verbosity&)
162{
163 ARTS_USER_ERROR_IF(abs_species.nelem() not_eq abs_lines_per_species.nelem(),
164 "Bad size of input species+lines");
165 ARTS_USER_ERROR_IF(abs_species.nelem() not_eq rtp_vmr.nelem(),
166 "Bad size of input species+vmrs");
167 ARTS_USER_ERROR_IF(not lbl_checked,
168 "Please set lbl_checked true to use this function");
169
170 for (Index i = 0; i < abs_species.nelem(); i++) {
171 for (auto& band : abs_lines_per_species[i]) {
172 if (band.OnTheFlyLineMixing() and band.DoLineMixing(rtp_pressure)) {
173 // vmrs should be for the line
174 const Vector line_shape_vmr =
175 band.BroadeningSpeciesVMR(rtp_vmr, abs_species);
176 const Numeric this_vmr =
177 rtp_vmr[i] * isotopologue_ratios[band.Isotopologue()];
178 const auto [abs, dabs, error] = Absorption::LineMixing::ecs_absorption(
179 rtp_temperature,
180 0,
181 rtp_pressure,
182 this_vmr,
183 line_shape_vmr,
184 ecs_data[band.quantumidentity],
185 f_grid,
187 band,
188 jacobian_quantities);
189 propmat_clearsky.Kjj() += abs.real();
190
191 // Sum up the resorted Jacobian
192 for (Index j = 0; j < jacobian_quantities.nelem(); j++) {
193 const auto& deriv = jacobian_quantities[j];
194
195 if (not deriv.propmattype()) continue;
196
197 if (deriv == abs_species[i]) {
198 dpropmat_clearsky_dx[j].Kjj() += abs.real();
199 } else {
200 dpropmat_clearsky_dx[j].Kjj() += dabs[j].real();
201 }
202 }
203 }
204 }
205 }
206}
207
209 ArrayOfPropagationMatrix& dpropmat_clearsky_dx,
210 const ArrayOfArrayOfAbsorptionLines& abs_lines_per_species,
211 const MapOfErrorCorrectedSuddenData& ecs_data,
213 const Vector& f_grid,
214 const ArrayOfArrayOfSpeciesTag& abs_species,
215 const ArrayOfRetrievalQuantity& jacobian_quantities,
216 const Numeric& rtp_pressure,
217 const Numeric& rtp_temperature,
218 const Vector& rtp_vmr,
219 const Vector& rtp_mag,
220 const Vector& rtp_los,
221 const Index& lbl_checked,
222 const Verbosity&)
223{
224 ARTS_USER_ERROR_IF(propmat_clearsky.StokesDimensions() not_eq 4,
225 "Only for stokes dim 4");
226 ARTS_USER_ERROR_IF(abs_species.nelem() not_eq abs_lines_per_species.nelem(),
227 "Bad size of input species+lines");
228 ARTS_USER_ERROR_IF(abs_species.nelem() not_eq rtp_vmr.nelem(),
229 "Bad size of input species+vmrs");
230 ARTS_USER_ERROR_IF(not lbl_checked,
231 "Please set lbl_checked true to use this function");
232
233 // Polarization
234 const auto Z = Zeeman::FromGrids(rtp_mag[0],
235 rtp_mag[1],
236 rtp_mag[2],
237 Conversion::deg2rad(rtp_los[0]),
238 Conversion::deg2rad(rtp_los[1]));
239 const auto polarization_scale_data = Zeeman::AllPolarization(Z.theta, Z.eta);
240 const auto polarization_scale_dtheta_data =
241 Zeeman::AllPolarization_dtheta(Z.theta, Z.eta);
242 const auto polarization_scale_deta_data =
243 Zeeman::AllPolarization_deta(Z.theta, Z.eta);
244
245 for (Index i = 0; i < abs_species.nelem(); i++) {
246 for (auto& band : abs_lines_per_species[i]) {
247 if (band.OnTheFlyLineMixing() and band.DoLineMixing(rtp_pressure)) {
248 // vmrs should be for the line
249 const Vector line_shape_vmr =
250 band.BroadeningSpeciesVMR(rtp_vmr, abs_species);
251 const Numeric this_vmr =
252 rtp_vmr[i] * isotopologue_ratios[band.Isotopologue()];
253 for (Zeeman::Polarization polarization :
257 const auto [abs, dabs, error] =
259 rtp_temperature,
260 Z.H,
261 rtp_pressure,
262 this_vmr,
263 line_shape_vmr,
264 ecs_data[band.quantumidentity],
265 f_grid,
266 polarization,
267 band,
268 jacobian_quantities);
269
270 // Sum up the propagation matrix
271 Zeeman::sum(propmat_clearsky,
272 abs,
273 Zeeman::SelectPolarization(polarization_scale_data,
274 polarization));
275
276 // Sum up the resorted Jacobian
277 for (Index j = 0; j < jacobian_quantities.nelem(); j++) {
278 const auto& deriv = jacobian_quantities[j];
279
280 if (not deriv.propmattype()) continue;
281
282 if (deriv == Jacobian::Atm::MagneticU) {
283 Zeeman::dsum(dpropmat_clearsky_dx[j],
284 abs,
285 dabs[j],
286 Zeeman::SelectPolarization(polarization_scale_data,
287 polarization),
289 polarization_scale_dtheta_data, polarization),
291 polarization_scale_deta_data, polarization),
292 Z.dH_du,
293 Z.dtheta_du,
294 Z.deta_du);
295 } else if (deriv == Jacobian::Atm::MagneticV) {
296 Zeeman::dsum(dpropmat_clearsky_dx[j],
297 abs,
298 dabs[j],
299 Zeeman::SelectPolarization(polarization_scale_data,
300 polarization),
302 polarization_scale_dtheta_data, polarization),
304 polarization_scale_deta_data, polarization),
305 Z.dH_dv,
306 Z.dtheta_dv,
307 Z.deta_dv);
308 } else if (deriv == Jacobian::Atm::MagneticW) {
309 Zeeman::dsum(dpropmat_clearsky_dx[j],
310 abs,
311 dabs[j],
312 Zeeman::SelectPolarization(polarization_scale_data,
313 polarization),
315 polarization_scale_dtheta_data, polarization),
317 polarization_scale_deta_data, polarization),
318 Z.dH_dw,
319 Z.dtheta_dw,
320 Z.deta_dw);
321 } else if (deriv == abs_species[i]) {
322 Zeeman::sum(dpropmat_clearsky_dx[j],
323 abs,
324 Zeeman::SelectPolarization(polarization_scale_data,
325 polarization));
326 } else {
327 dpropmat_clearsky_dx[j].Kjj() += dabs[j].real();
328 }
329 }
330 }
331 }
332 }
333 }
334}
335
337 const MapOfErrorCorrectedSuddenData& ecs_data,
338 const Vector& t_grid,
339 const Numeric& pressure,
340 const Index& order,
341 const Index& robust,
342 const Index& rosenkranz_adaptation,
343 const Verbosity& verbosity) {
344 for (auto& band: abs_lines) {
345 if (band.population == Absorption::PopulationType::ByRovibLinearDipoleLineMixing or band.population == Absorption::PopulationType::ByMakarovFullRelmat) {
346 Absorption::LineMixing::ecs_eigenvalue_adaptation(band, t_grid, ecs_data[band.quantumidentity], pressure, order, robust, rosenkranz_adaptation, verbosity);
347 }
348 }
349}
350
352 const MapOfErrorCorrectedSuddenData& ecs_data,
353 const Vector& t_grid,
354 const Numeric& pressure,
355 const Index& order,
356 const Index& robust,
357 const Index& rosenkranz_adaptation,
358 const Verbosity& verbosity) {
359 for (auto& abs_lines: abs_lines_per_species) {
360 abs_linesAdaptOnTheFlyLineMixing(abs_lines, ecs_data, t_grid, pressure, order, robust, rosenkranz_adaptation, verbosity);
361 }
362}
363
365 const Verbosity&)
366{
367 ecs_data.resize(0);
368}
369
373 const QuantumIdentifier& qid,
374 const String& species,
375 const String& scaling_type,
376 const Vector& scaling,
377 const String& beta_type,
378 const Vector& beta,
379 const String& lambda_type,
380 const Vector& lambda,
381 const String& collisional_distance_type,
382 const Vector& collisional_distance,
383 const Verbosity&)
384{
385 const Species::Species spec = Species::fromShortName(species);
386 ARTS_USER_ERROR_IF(not good_enum(spec), "Invalid species: ", species)
387 auto& data = ecs_data[qid][spec];
388 data.scaling = LineShapeModelParameters(LineShape::toTemperatureModelOrThrow(scaling_type), scaling);
389 data.beta = LineShapeModelParameters(LineShape::toTemperatureModelOrThrow(beta_type), beta);
390 data.lambda = LineShapeModelParameters(LineShape::toTemperatureModelOrThrow(lambda_type), lambda);
391 data.collisional_distance = LineShapeModelParameters(LineShape::toTemperatureModelOrThrow(collisional_distance_type), collisional_distance);
392 data.mass = Species::mean_mass(spec, isotopologue_ratios);
393}
394
397 const Vector& vmrs,
398 const ArrayOfSpeciesTag& specs,
399 const Verbosity&)
400{
401 ARTS_USER_ERROR_IF(specs.nelem() not_eq vmrs.nelem(), "Bad sizes of specs and vmrs\nspecs: [", specs, "]\nvmrs: [", vmrs, "]")
402
403 static_assert(LineShapeModelParameters::N == 4);
404 const auto scale = [](LineShapeModelParameters& mp, Numeric x){mp.X0 *= x; mp.X1 *= x; mp.X2 *= x; mp.X3 *= x;};
405 const auto scale_and_add_or_throw = [](LineShapeModelParameters& mp1, const LineShapeModelParameters& mp2, Numeric x) {
406 ARTS_USER_ERROR_IF(mp1.type not_eq mp2.type, "Can only scale and add same type\nmp1: ", mp1, "\nmp2: ", mp2)
407 mp1.X0 += mp2.X0 * x;
408 mp1.X1 += mp2.X1 * x;
409 mp1.X2 += mp2.X2 * x;
410 mp1.X3 += mp2.X3 * x;
411 };
412
413 for (auto& ecs: ecs_data) {
415
416 bool found=false;
417 Numeric sumvmr = 0;
418 for (Index i=0; i<specs.nelem(); i++) {
419 ARTS_USER_ERROR_IF(not specs[i].Isotopologue().joker(),
420 "Can only have joker species, finds: [", specs, ']')
421
422 auto spec = specs[i].Spec();
423
424 if (spec == Species::Species::Bath) continue;
425
426 auto& data = ecs[spec];
427
428 // This means we never had the data so we should skip
429 if (std::isinf(data.mass)) {
430 continue;
431 }
432
433 const Numeric vmr = vmrs[i];
434 if (not found) {
435 airdata.scaling = data.scaling;
436 airdata.beta = data.beta;
437 airdata.lambda = data.lambda;
438 airdata.collisional_distance = data.collisional_distance;
439 airdata.mass = data.mass * vmr;
440 scale(airdata.scaling, vmr);
441 scale(airdata.beta, vmr);
442 scale(airdata.lambda, vmr);
443 scale(airdata.collisional_distance, vmr);
444
445 found = true;
446 } else {
447 scale_and_add_or_throw(airdata.scaling, data.scaling, vmr);
448 scale_and_add_or_throw(airdata.beta, data.beta, vmr);
449 scale_and_add_or_throw(airdata.lambda, data.lambda, vmr);
450 scale_and_add_or_throw(airdata.collisional_distance, data.collisional_distance, vmr);
451 airdata.mass += data.mass * vmr;
452 }
453
454 sumvmr += vmrs[i];
455 }
456
457 if (sumvmr not_eq 0 and sumvmr not_eq 1) {
458 scale(airdata.scaling, 1.0 / sumvmr);
459 scale(airdata.beta, 1.0 / sumvmr);
460 scale(airdata.lambda, 1.0 / sumvmr);
461 scale(airdata.collisional_distance, 1.0 / sumvmr);
462 airdata.mass /= sumvmr;
463 }
464
465 ecs[Species::Species::Bath] = airdata;
466 }
467}
468
471 const Verbosity&)
472{
473 // The band is ignored
474 auto& ecs = ecs_data[QuantumIdentifier("O2-66")];
475
476 // All species have the same effect, so just copy the values but change the mass (allow new mass for Air)
477
478 ecs[Species::Species::Oxygen].scaling = LineShapeModelParameters(LineShapeTemperatureModel::T0, 1.0, 0, 0, 0);
479 ecs[Species::Species::Oxygen].collisional_distance = LineShapeModelParameters(LineShapeTemperatureModel::T0, Conversion::angstrom2meter(0.61), 0, 0, 0);
480 ecs[Species::Species::Oxygen].lambda = LineShapeModelParameters(LineShapeTemperatureModel::T0, 0.39, 0, 0, 0);
481 ecs[Species::Species::Oxygen].beta = LineShapeModelParameters(LineShapeTemperatureModel::T0, 0.567, 0, 0, 0);
482 ecs[Species::Species::Oxygen].mass = Species::mean_mass(Species::Species::Oxygen, isotopologue_ratios);
483
484 ecs[Species::Species::Nitrogen].scaling = LineShapeModelParameters(LineShapeTemperatureModel::T0, 1.0, 0, 0, 0);
485 ecs[Species::Species::Nitrogen].collisional_distance = LineShapeModelParameters(LineShapeTemperatureModel::T0, Conversion::angstrom2meter(0.61), 0, 0, 0);
486 ecs[Species::Species::Nitrogen].lambda = LineShapeModelParameters(LineShapeTemperatureModel::T0, 0.39, 0, 0, 0);
487 ecs[Species::Species::Nitrogen].beta = LineShapeModelParameters(LineShapeTemperatureModel::T0, 0.567, 0, 0, 0);
488 ecs[Species::Species::Nitrogen].mass = Species::mean_mass(Species::Species::Nitrogen, isotopologue_ratios);
489}
490
493 const Verbosity&)
494{
495 for (const auto *key: {"CO2-626", "CO2-628", "CO2-636"}) {
496 auto& ecs = ecs_data[QuantumIdentifier(key)];
497
498 ecs[Species::Species::Nitrogen].scaling = LineShapeModelParameters(LineShapeTemperatureModel::T1, Conversion::kaycm_per_atm2hz_per_pa(0.0180), 0.85, 0, 0);
499 ecs[Species::Species::Nitrogen].lambda = LineShapeModelParameters(LineShapeTemperatureModel::T1, 0.81, 0.0152, 0, 0);
500 ecs[Species::Species::Nitrogen].beta = LineShapeModelParameters(LineShapeTemperatureModel::T0, 0.008, 0, 0, 0);
501 ecs[Species::Species::Nitrogen].collisional_distance = LineShapeModelParameters(LineShapeTemperatureModel::T0, Conversion::angstrom2meter(2.2), 0, 0, 0);
502 ecs[Species::Species::Nitrogen].mass = Species::mean_mass(Species::Species::Nitrogen, isotopologue_ratios);
503
504 ecs[Species::Species::Oxygen].scaling = LineShapeModelParameters(LineShapeTemperatureModel::T1, Conversion::kaycm_per_atm2hz_per_pa(0.0168), 0.5, 0, 0);
505 ecs[Species::Species::Oxygen].lambda = LineShapeModelParameters(LineShapeTemperatureModel::T1, 0.82, -0.091, 0, 0);
506 ecs[Species::Species::Oxygen].beta = LineShapeModelParameters(LineShapeTemperatureModel::T0, 0.007, 0, 0, 0);
507 ecs[Species::Species::Oxygen].collisional_distance = LineShapeModelParameters(LineShapeTemperatureModel::T0, Conversion::angstrom2meter(2.4), 0, 0, 0);
508 ecs[Species::Species::Oxygen].mass = Species::mean_mass(Species::Species::Oxygen, isotopologue_ratios);
509 }
510}
511
514 const Verbosity&)
515{
516 for (const auto *key: {"CO2-626", "CO2-628", "CO2-636"}) {
517 auto& ecs = ecs_data[QuantumIdentifier(key)];
518
519 ecs[Species::Species::CarbonDioxide].scaling = LineShapeModelParameters(LineShapeTemperatureModel::T0, Conversion::kaycm_per_atm2hz_per_pa(0.019), 0, 0, 0);
520 ecs[Species::Species::CarbonDioxide].lambda = LineShapeModelParameters(LineShapeTemperatureModel::T0, 0.61, 0, 0, 0);
521 ecs[Species::Species::CarbonDioxide].beta = LineShapeModelParameters(LineShapeTemperatureModel::T0, 0.052, 0, 0, 0);
522 ecs[Species::Species::CarbonDioxide].collisional_distance = LineShapeModelParameters(LineShapeTemperatureModel::T0, Conversion::angstrom2meter(5.5), 0, 0, 0);
523 ecs[Species::Species::CarbonDioxide].mass = Species::mean_mass(Species::Species::CarbonDioxide, isotopologue_ratios);
524 }
525}
This can be used to make arrays out of anything.
Definition: array.h:108
Index nelem() const ARTS_NOEXCEPT
Number of elements.
Definition: array.h:197
Index nelem() const noexcept
Returns the number of elements.
Definition: matpackI.h:541
VectorView Kjj(const Index iz=0, const Index ia=0)
Vector view to diagonal elements.
Index StokesDimensions() const
The stokes dimension of the propagation matrix.
The Vector class.
Definition: matpackI.h:908
#define ARTS_USER_ERROR_IF(condition,...)
Definition: debug.h:134
constexpr bool good_enum(EnumType x) noexcept
Checks if the enum number is good.
Definition: enums.h:22
#define abs(x)
#define beta
#define dabs(x)
#define max(a, b)
Namespace and functions to deal with HITRAN linemixing.
LineShape::ModelParameters LineShapeModelParameters
void ecs_dataAddTran2011(MapOfErrorCorrectedSuddenData &ecs_data, const SpeciesIsotopologueRatios &isotopologue_ratios, const Verbosity &)
WORKSPACE METHOD: ecs_dataAddTran2011.
void propmat_clearskyAddOnTheFlyLineMixingWithZeeman(PropagationMatrix &propmat_clearsky, ArrayOfPropagationMatrix &dpropmat_clearsky_dx, const ArrayOfArrayOfAbsorptionLines &abs_lines_per_species, const MapOfErrorCorrectedSuddenData &ecs_data, const SpeciesIsotopologueRatios &isotopologue_ratios, const Vector &f_grid, const ArrayOfArrayOfSpeciesTag &abs_species, const ArrayOfRetrievalQuantity &jacobian_quantities, const Numeric &rtp_pressure, const Numeric &rtp_temperature, const Vector &rtp_vmr, const Vector &rtp_mag, const Vector &rtp_los, const Index &lbl_checked, const Verbosity &)
WORKSPACE METHOD: propmat_clearskyAddOnTheFlyLineMixingWithZeeman.
void abs_lines_per_speciesAdaptOnTheFlyLineMixing(ArrayOfArrayOfAbsorptionLines &abs_lines_per_species, const MapOfErrorCorrectedSuddenData &ecs_data, const Vector &t_grid, const Numeric &pressure, const Index &order, const Index &robust, const Index &rosenkranz_adaptation, const Verbosity &verbosity)
WORKSPACE METHOD: abs_lines_per_speciesAdaptOnTheFlyLineMixing.
void ecs_dataAddMakarov2020(MapOfErrorCorrectedSuddenData &ecs_data, const SpeciesIsotopologueRatios &isotopologue_ratios, const Verbosity &)
WORKSPACE METHOD: ecs_dataAddMakarov2020.
void abs_linesAdaptOnTheFlyLineMixing(ArrayOfAbsorptionLines &abs_lines, const MapOfErrorCorrectedSuddenData &ecs_data, const Vector &t_grid, const Numeric &pressure, const Index &order, const Index &robust, const Index &rosenkranz_adaptation, const Verbosity &verbosity)
WORKSPACE METHOD: abs_linesAdaptOnTheFlyLineMixing.
void propmat_clearskyAddHitranLineMixingLines(PropagationMatrix &propmat_clearsky, const HitranRelaxationMatrixData &abs_hitran_relmat_data, const ArrayOfArrayOfAbsorptionLines &abs_lines_per_species, const SpeciesIsotopologueRatios &isotopologue_ratios, const Vector &f_grid, const ArrayOfArrayOfSpeciesTag &abs_species, const ArrayOfRetrievalQuantity &jacobian_quantities, const Numeric &rtp_pressure, const Numeric &rtp_temperature, const Vector &rtp_vmr, const Verbosity &)
WORKSPACE METHOD: propmat_clearskyAddHitranLineMixingLines.
Definition: m_linemixing.cc:91
void ecs_dataSetSpeciesData(MapOfErrorCorrectedSuddenData &ecs_data, const SpeciesIsotopologueRatios &isotopologue_ratios, const QuantumIdentifier &qid, const String &species, const String &scaling_type, const Vector &scaling, const String &beta_type, const Vector &beta, const String &lambda_type, const Vector &lambda, const String &collisional_distance_type, const Vector &collisional_distance, const Verbosity &)
WORKSPACE METHOD: ecs_dataSetSpeciesData.
void abs_lines_per_speciesAdaptHitranLineMixing(ArrayOfArrayOfAbsorptionLines &abs_lines_per_species, const HitranRelaxationMatrixData &abs_hitran_relmat_data, const Vector &t_grid, const Numeric &pressure, const Index &order, const Verbosity &)
WORKSPACE METHOD: abs_lines_per_speciesAdaptHitranLineMixing.
void ecs_dataInit(MapOfErrorCorrectedSuddenData &ecs_data, const Verbosity &)
WORKSPACE METHOD: ecs_dataInit.
void ecs_dataSetMeanAir(MapOfErrorCorrectedSuddenData &ecs_data, const Vector &vmrs, const ArrayOfSpeciesTag &specs, const Verbosity &)
WORKSPACE METHOD: ecs_dataSetMeanAir.
void ecs_dataAddRodrigues1997(MapOfErrorCorrectedSuddenData &ecs_data, const SpeciesIsotopologueRatios &isotopologue_ratios, const Verbosity &)
WORKSPACE METHOD: ecs_dataAddRodrigues1997.
void propmat_clearskyAddOnTheFlyLineMixing(PropagationMatrix &propmat_clearsky, ArrayOfPropagationMatrix &dpropmat_clearsky_dx, const ArrayOfArrayOfAbsorptionLines &abs_lines_per_species, const MapOfErrorCorrectedSuddenData &ecs_data, const SpeciesIsotopologueRatios &isotopologue_ratios, const Vector &f_grid, const ArrayOfArrayOfSpeciesTag &abs_species, const ArrayOfRetrievalQuantity &jacobian_quantities, const Numeric &rtp_pressure, const Numeric &rtp_temperature, const Vector &rtp_vmr, const Index &lbl_checked, const Verbosity &)
WORKSPACE METHOD: propmat_clearskyAddOnTheFlyLineMixing.
void abs_hitran_relmat_dataReadHitranRelmatDataAndLines(HitranRelaxationMatrixData &abs_hitran_relmat_data, ArrayOfArrayOfAbsorptionLines &abs_lines_per_species, const ArrayOfArrayOfSpeciesTag &abs_species, const String &basedir, const Numeric &linemixinglimit, const Numeric &fmin, const Numeric &fmax, const Numeric &stot, const String &mode, const Verbosity &)
WORKSPACE METHOD: abs_hitran_relmat_dataReadHitranRelmatDataAndLines.
Definition: m_linemixing.cc:38
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
const Joker joker
void ecs_eigenvalue_adaptation(AbsorptionLines &band, const Vector &temperatures, const ErrorCorrectedSuddenData &ecs_data, const Numeric P0, const Index ord, const bool robust, const bool rosenkranz_adaptation, const Verbosity &verbosity)
Definition: linemixing.cc:1394
EcsReturn ecs_absorption(const Numeric T, const Numeric H, const Numeric P, const Numeric this_vmr, const Vector &vmrs, const ErrorCorrectedSuddenData &ecs_data, const Vector &f_grid, const Zeeman::Polarization zeeman_polarization, const AbsorptionLines &band, const ArrayOfRetrievalQuantity &jacobian_quantities)
Definition: linemixing.cc:705
Index nelem(const Lines &l)
Number of lines.
constexpr auto kaycm_per_atm2hz_per_pa(T x) noexcept -> decltype(x *kaycm2freq(pa2atm(1)))
Conversion from cm-1 per atmosphere to Hz per Pascal.
Definition: constants.h:515
constexpr auto angstrom2meter(T x) noexcept -> decltype(x *1e-10)
Conversion from Å to meter.
Definition: constants.h:565
constexpr auto deg2rad(T x) noexcept -> decltype(x *one_degree_in_radians)
Converts degrees to radians.
Definition: constants.h:331
SpeciesIsotopologueRatios isotopologue_ratios()
Vector vmrs(const ConstVectorView &atmospheric_vmrs, const ArrayOfArrayOfSpeciesTag &atmospheric_species, const ArrayOfSpecies &lineshape_species) ARTS_NOEXCEPT
Returns a VMR vector for this model's main calculations.
constexpr Numeric mean_mass(Species spec, const IsotopologueRatios &ir) noexcept
constexpr const IsotopeRecord & select_joker(Species spec) noexcept
const PolarizationVector & SelectPolarization(const AllPolarizationVectors &data, Polarization type) noexcept
Selects the polarization vector depending on polarization type.
Definition: zeemandata.cc:416
Derived FromGrids(Numeric u, Numeric v, Numeric w, Numeric z, Numeric a) noexcept
Computes the derived plane from ARTS grids.
Definition: zeemandata.cc:275
AllPolarizationVectors AllPolarization_deta(Numeric theta, Numeric eta) noexcept
The derivative of AllPolarization wrt eta.
Definition: zeemandata.cc:398
AllPolarizationVectors AllPolarization_dtheta(Numeric theta, const Numeric eta) noexcept
The derivative of AllPolarization wrt theta.
Definition: zeemandata.cc:381
Polarization
Zeeman polarization selection.
Definition: zeemandata.h:44
void dsum(PropagationMatrix &pm, const ComplexVectorView &abs, const ComplexVectorView &dabs, const PolarizationVector &polvec, const PolarizationVector &dpolvec_dtheta, const PolarizationVector &dpolvec_deta, const Numeric dH, const Numeric dt, const Numeric de, const bool do_phase) ARTS_NOEXCEPT
Sums the Zeeman components derivatives into a propagation matrix.
Definition: zeemandata.cc:451
void sum(PropagationMatrix &pm, const ComplexVectorView &abs, const PolarizationVector &polvec, const bool do_phase) ARTS_NOEXCEPT
Sums the Zeeman components into a propagation matrix.
Definition: zeemandata.cc:431
AllPolarizationVectors AllPolarization(Numeric theta, Numeric eta) noexcept
Computes the polarization of each polarization type.
Definition: zeemandata.cc:366
void hitran_lm_eigenvalue_adaptation(AbsorptionLines &band, const Vector &temperatures, const HitranRelaxationMatrixData &hitran, const Numeric P0, const Index ord)
void read(HitranRelaxationMatrixData &hitran, ArrayOfAbsorptionLines &bands, const SpeciesIsotopologueRatios &isotopologue_ratio, const String &basedir, const Numeric linemixinglimit, const Numeric fmin, const Numeric fmax, const Numeric stot, const ModeOfLineMixing mode)
Read from HITRAN online line mixing file.
Vector compute(const Numeric p, const Numeric t, const Numeric xco2, const Numeric xh2o, const ConstVectorView &invcm_grid, const Numeric stotmax, const calctype type)
Stuff related to the propagation matrix.
Quantum::Number::GlobalState QuantumIdentifier
Coefficients and temperature model for SingleSpeciesModel.
static constexpr Index N
A logical struct for global quantum numbers with species identifiers.