ARTS 2.5.0 (git: 9ee3ac6c)
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 "propagationmatrix.h"
35
36
38 ArrayOfArrayOfAbsorptionLines& abs_lines_per_species,
39 const ArrayOfArrayOfSpeciesTag& abs_species,
40 const String& basedir,
41 const Numeric& linemixinglimit,
42 const Numeric& fmin,
43 const Numeric& fmax,
44 const Numeric& stot,
45 const String& mode,
46 const String& hitran_type,
47 const Verbosity&)
48{
49 const lm_hitran_2017::ModeOfLineMixing intmode = lm_hitran_2017::toModeOfLineMixingOrThrow(mode);
50
51 const SpeciesIsotopologueRatios isotopologue_ratios = Hitran::isotopologue_ratios(Hitran::toTypeOrThrow(hitran_type));
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].AllLines().front().F0() <= uf and lines[k].AllLines().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 const ArrayOfArrayOfAbsorptionLines& abs_lines_per_species,
151 const HitranRelaxationMatrixData& abs_hitran_relmat_data,
152 const Vector& t_grid,
153 const Vector& p_grid,
154 const Verbosity&)
155{
156 lm_data.resize(0);
157 for (auto& abs_lines: abs_lines_per_species) {
158 for (auto& band: abs_lines) {
159 if (band.Population() == Absorption::PopulationType::ByHITRANFullRelmat or band.Population() == Absorption::PopulationType::ByHITRANRosenkranzRelmat) {
160 lm_data.emplace_back(lm_hitran_2017::hitran_lm_eigenvalue_adaptation_test(band, t_grid, abs_hitran_relmat_data, p_grid));
161 }
162 }
163 }
164}
165
167 ArrayOfPropagationMatrix& dpropmat_clearsky_dx,
168 const ArrayOfArrayOfAbsorptionLines& abs_lines_per_species,
169 const MapOfErrorCorrectedSuddenData& ecs_data,
171 const Vector& f_grid,
172 const ArrayOfArrayOfSpeciesTag& abs_species,
173 const ArrayOfRetrievalQuantity& jacobian_quantities,
174 const Numeric& rtp_pressure,
175 const Numeric& rtp_temperature,
176 const Vector& rtp_vmr,
177 const Index& lbl_checked,
178 const Verbosity&)
179{
180 ARTS_USER_ERROR_IF (abs_species.nelem() not_eq abs_lines_per_species.nelem(),
181 "Bad size of input species+lines");
182 ARTS_USER_ERROR_IF (abs_species.nelem() not_eq rtp_vmr.nelem(),
183 "Bad size of input species+vmrs");
184 ARTS_USER_ERROR_IF (not lbl_checked,
185 "Please set lbl_checked true to use this function");
186
187 for (Index i=0; i<abs_species.nelem(); i++) {
188 for (auto& band: abs_lines_per_species[i]) {
189 if (band.OnTheFlyLineMixing() and band.DoLineMixing(rtp_pressure)) {
190 // vmrs should be for the line
191 const Vector line_shape_vmr = band.BroadeningSpeciesVMR(rtp_vmr, abs_species);
192 const Numeric this_vmr = rtp_vmr[i] * isotopologue_ratios[band.Isotopologue()];
193 const auto [abs, dabs] = Absorption::LineMixing::ecs_absorption(rtp_temperature,
194 rtp_pressure,
195 this_vmr,
196 line_shape_vmr,
197 ecs_data[band.QuantumIdentity()],
198 f_grid,
199 band,
200 jacobian_quantities);
201 propmat_clearsky.Kjj() += abs.real();
202
203 // Sum up the resorted Jacobian
204 for (Index j=0; j<jacobian_quantities.nelem(); j++) {
205 const auto& deriv = jacobian_quantities[j];
206
207 if (not deriv.propmattype()) continue;
208
209 if (deriv == abs_species[i]) {
210 dpropmat_clearsky_dx[j].Kjj() += abs.real();
211 } else {
212 dpropmat_clearsky_dx[j].Kjj() += dabs[j].real();
213 }
214 }
215 }
216 }
217 }
218}
219
221 ArrayOfPropagationMatrix& dpropmat_clearsky_dx,
222 const ArrayOfArrayOfAbsorptionLines& abs_lines_per_species,
223 const MapOfErrorCorrectedSuddenData& ecs_data,
225 const Vector& f_grid,
226 const ArrayOfArrayOfSpeciesTag& abs_species,
227 const ArrayOfRetrievalQuantity& jacobian_quantities,
228 const Numeric& rtp_pressure,
229 const Numeric& rtp_temperature,
230 const Vector& rtp_vmr,
231 const Vector& rtp_mag,
232 const Vector& rtp_los,
233 const Index& lbl_checked,
234 const Verbosity&)
235{
236 ARTS_USER_ERROR_IF (propmat_clearsky.StokesDimensions() not_eq 4,
237 "Only for stokes dim 4");
238 ARTS_USER_ERROR_IF (abs_species.nelem() not_eq abs_lines_per_species.nelem(),
239 "Bad size of input species+lines");
240 ARTS_USER_ERROR_IF (abs_species.nelem() not_eq rtp_vmr.nelem(),
241 "Bad size of input species+vmrs");
242 ARTS_USER_ERROR_IF (not lbl_checked,
243 "Please set lbl_checked true to use this function");
244
245 // Polarization
246 const auto Z = Zeeman::FromGrids(rtp_mag[0], rtp_mag[1], rtp_mag[2], Conversion::deg2rad(rtp_los[0]), Conversion::deg2rad(rtp_los[1]));
247 const auto polarization_scale_data = Zeeman::AllPolarization(Z.theta, Z.eta);
248 const auto polarization_scale_dtheta_data = Zeeman::AllPolarization_dtheta(Z.theta, Z.eta);
249 const auto polarization_scale_deta_data = Zeeman::AllPolarization_deta(Z.theta, Z.eta);
250
251 for (Index i=0; i<abs_species.nelem(); i++) {
252 for (auto& band: abs_lines_per_species[i]) {
253 if (band.OnTheFlyLineMixing() and band.DoLineMixing(rtp_pressure)) {
254 // vmrs should be for the line
255 const Vector line_shape_vmr = band.BroadeningSpeciesVMR(rtp_vmr, abs_species);
256 const Numeric this_vmr = rtp_vmr[i] * isotopologue_ratios[band.Isotopologue()];
258 const auto [abs, dabs] = Absorption::LineMixing::ecs_absorption_zeeman(rtp_temperature,
259 Z.H,
260 rtp_pressure,
261 this_vmr,
262 line_shape_vmr,
263 ecs_data[band.QuantumIdentity()],
264 f_grid,
265 polarization,
266 band,
267 jacobian_quantities);
268
269 // Sum up the propagation matrix
270 Zeeman::sum(propmat_clearsky, abs, Zeeman::SelectPolarization(polarization_scale_data, polarization));
271
272 // Sum up the resorted Jacobian
273 for (Index j=0; j<jacobian_quantities.nelem(); j++) {
274 const auto& deriv = jacobian_quantities[j];
275
276 if (not deriv.propmattype()) continue;
277
278 if (deriv == Jacobian::Atm::MagneticU) {
279 Zeeman::dsum(dpropmat_clearsky_dx[j], abs, dabs[j],
280 Zeeman::SelectPolarization(polarization_scale_data, polarization),
281 Zeeman::SelectPolarization(polarization_scale_dtheta_data, polarization),
282 Zeeman::SelectPolarization(polarization_scale_deta_data, polarization),
283 Z.dH_du, Z.dtheta_du, Z.deta_du);
284 } else if (deriv == Jacobian::Atm::MagneticV) {
285 Zeeman::dsum(dpropmat_clearsky_dx[j], abs, dabs[j],
286 Zeeman::SelectPolarization(polarization_scale_data, polarization),
287 Zeeman::SelectPolarization(polarization_scale_dtheta_data, polarization),
288 Zeeman::SelectPolarization(polarization_scale_deta_data, polarization),
289 Z.dH_dv, Z.dtheta_dv, Z.deta_dv);
290 } else if (deriv == Jacobian::Atm::MagneticW) {
291 Zeeman::dsum(dpropmat_clearsky_dx[j], abs, dabs[j],
292 Zeeman::SelectPolarization(polarization_scale_data, polarization),
293 Zeeman::SelectPolarization(polarization_scale_dtheta_data, polarization),
294 Zeeman::SelectPolarization(polarization_scale_deta_data, polarization),
295 Z.dH_dw, Z.dtheta_dw, Z.deta_dw);
296 } else if (deriv == abs_species[i]) {
297 Zeeman::sum(dpropmat_clearsky_dx[j], abs, Zeeman::SelectPolarization(polarization_scale_data, polarization));
298 } else {
299 dpropmat_clearsky_dx[j].Kjj() += dabs[j].real();
300 }
301 }
302 }
303 }
304 }
305 }
306}
307
309 const Verbosity&)
310{
311 ecs_data.resize(0);
312}
313
317 const Quantum::Identifier& qid,
318 const String& species,
319 const String& scaling_type,
320 const Vector& scaling,
321 const String& beta_type,
322 const Vector& beta,
323 const String& lambda_type,
324 const Vector& lambda,
325 const String& collisional_distance_type,
326 const Vector& collisional_distance,
327 const Verbosity&)
328{
329 const Species::Species spec = Species::fromShortName(species);
330 ARTS_USER_ERROR_IF(not good_enum(spec), "Invalid species: ", species)
331 auto& data = ecs_data[qid][spec];
332 data.scaling = LineShapeModelParameters(LineShape::toTemperatureModelOrThrow(scaling_type), scaling);
333 data.beta = LineShapeModelParameters(LineShape::toTemperatureModelOrThrow(beta_type), beta);
334 data.lambda = LineShapeModelParameters(LineShape::toTemperatureModelOrThrow(lambda_type), lambda);
335 data.collisional_distance = LineShapeModelParameters(LineShape::toTemperatureModelOrThrow(collisional_distance_type), collisional_distance);
337}
338
341 const Vector& vmrs,
342 const ArrayOfSpeciesTag& specs,
343 const Verbosity&)
344{
345 ARTS_USER_ERROR_IF(specs.nelem() not_eq vmrs.nelem(), "Bad sizes of specs and vmrs\nspecs: [", specs, "]\nvmrs: [", vmrs, "]")
346
347 static_assert(LineShapeModelParameters::N == 4);
348 const auto scale = [](LineShapeModelParameters& mp, Numeric x){mp.X0 *= x; mp.X1 *= x; mp.X2 *= x; mp.X3 *= x;};
349 const auto scale_and_add_or_throw = [](LineShapeModelParameters& mp1, const LineShapeModelParameters& mp2, Numeric x) {
350 ARTS_USER_ERROR_IF(mp1.type not_eq mp2.type, "Can only scale and add same type\nmp1: ", mp1, "\nmp2: ", mp2)
351 mp1.X0 += mp2.X0 * x;
352 mp1.X1 += mp2.X1 * x;
353 mp1.X2 += mp2.X2 * x;
354 mp1.X3 += mp2.X3 * x;
355 };
356
357 for (auto& ecs: ecs_data) {
359
360 bool found=false;
361 Numeric sumvmr = 0;
362 for (Index i=0; i<specs.nelem(); i++) {
363 ARTS_USER_ERROR_IF(not specs[i].Isotopologue().joker(),
364 "Can only have joker species, finds: [", specs, ']')
365
366 auto spec = specs[i].Spec();
367
368 if (spec == Species::Species::Bath) continue;
369
370 auto& data = ecs[spec];
371
372 // This means we never had the data so we should skip
373 if (std::isinf(data.mass)) {
374 continue;
375 }
376
377 const Numeric vmr = vmrs[i];
378 if (not found) {
379 airdata.scaling = data.scaling;
380 airdata.beta = data.beta;
381 airdata.lambda = data.lambda;
382 airdata.collisional_distance = data.collisional_distance;
383 airdata.mass = data.mass * vmr;
384 scale(airdata.scaling, vmr);
385 scale(airdata.beta, vmr);
386 scale(airdata.lambda, vmr);
387 scale(airdata.collisional_distance, vmr);
388
389 found = true;
390 } else {
391 scale_and_add_or_throw(airdata.scaling, data.scaling, vmr);
392 scale_and_add_or_throw(airdata.beta, data.beta, vmr);
393 scale_and_add_or_throw(airdata.lambda, data.lambda, vmr);
394 scale_and_add_or_throw(airdata.collisional_distance, data.collisional_distance, vmr);
395 airdata.mass += data.mass * vmr;
396 }
397
398 sumvmr += vmrs[i];
399 }
400
401 if (sumvmr not_eq 0 and sumvmr not_eq 1) {
402 scale(airdata.scaling, 1.0 / sumvmr);
403 scale(airdata.beta, 1.0 / sumvmr);
404 scale(airdata.lambda, 1.0 / sumvmr);
405 scale(airdata.collisional_distance, 1.0 / sumvmr);
406 airdata.mass /= sumvmr;
407 }
408
409 ecs[Species::Species::Bath] = airdata;
410 }
411}
412
415 const Verbosity&)
416{
417 // The band is ignored
418 auto& ecs = ecs_data[QuantumIdentifier("O2-66 ALL")];
419
420 // All species have the same effect, so just copy the values but change the mass (allow new mass for Air)
421
422 ecs[Species::Species::Oxygen].scaling = LineShapeModelParameters(LineShapeTemperatureModel::T0, 1.0, 0, 0, 0);
423 ecs[Species::Species::Oxygen].collisional_distance = LineShapeModelParameters(LineShapeTemperatureModel::T0, Conversion::angstrom2meter(0.61), 0, 0, 0);
424 ecs[Species::Species::Oxygen].lambda = LineShapeModelParameters(LineShapeTemperatureModel::T0, 0.39, 0, 0, 0);
425 ecs[Species::Species::Oxygen].beta = LineShapeModelParameters(LineShapeTemperatureModel::T0, 0.567, 0, 0, 0);
426 ecs[Species::Species::Oxygen].mass = Species::mean_mass(Species::Species::Oxygen, isotopologue_ratios);
427
428 ecs[Species::Species::Nitrogen].scaling = LineShapeModelParameters(LineShapeTemperatureModel::T0, 1.0, 0, 0, 0);
429 ecs[Species::Species::Nitrogen].collisional_distance = LineShapeModelParameters(LineShapeTemperatureModel::T0, Conversion::angstrom2meter(0.61), 0, 0, 0);
430 ecs[Species::Species::Nitrogen].lambda = LineShapeModelParameters(LineShapeTemperatureModel::T0, 0.39, 0, 0, 0);
431 ecs[Species::Species::Nitrogen].beta = LineShapeModelParameters(LineShapeTemperatureModel::T0, 0.567, 0, 0, 0);
432 ecs[Species::Species::Nitrogen].mass = Species::mean_mass(Species::Species::Nitrogen, isotopologue_ratios);
433}
434
437 const Verbosity&)
438{
439 for (const auto *key: {"CO2-626 ALL", "CO2-628 ALL", "CO2-636 ALL"}) {
440 auto& ecs = ecs_data[QuantumIdentifier(key)];
441
442 ecs[Species::Species::Nitrogen].scaling = LineShapeModelParameters(LineShapeTemperatureModel::T1, Conversion::kaycm_per_atm2hz_per_pa(0.0180), 0.85, 0, 0);
443 ecs[Species::Species::Nitrogen].lambda = LineShapeModelParameters(LineShapeTemperatureModel::T1, 0.81, 0.0152, 0, 0);
444 ecs[Species::Species::Nitrogen].beta = LineShapeModelParameters(LineShapeTemperatureModel::T0, 0.008, 0, 0, 0);
445 ecs[Species::Species::Nitrogen].collisional_distance = LineShapeModelParameters(LineShapeTemperatureModel::T0, Conversion::angstrom2meter(2.2), 0, 0, 0);
446 ecs[Species::Species::Nitrogen].mass = Species::mean_mass(Species::Species::Nitrogen, isotopologue_ratios);
447
448 ecs[Species::Species::Oxygen].scaling = LineShapeModelParameters(LineShapeTemperatureModel::T1, Conversion::kaycm_per_atm2hz_per_pa(0.0168), 0.5, 0, 0);
449 ecs[Species::Species::Oxygen].lambda = LineShapeModelParameters(LineShapeTemperatureModel::T1, 0.82, -0.091, 0, 0);
450 ecs[Species::Species::Oxygen].beta = LineShapeModelParameters(LineShapeTemperatureModel::T0, 0.007, 0, 0, 0);
451 ecs[Species::Species::Oxygen].collisional_distance = LineShapeModelParameters(LineShapeTemperatureModel::T0, Conversion::angstrom2meter(2.4), 0, 0, 0);
452 ecs[Species::Species::Oxygen].mass = Species::mean_mass(Species::Species::Oxygen, isotopologue_ratios);
453 }
454}
455
458 const Verbosity&)
459{
460 for (const auto *key: {"CO2-626 ALL", "CO2-628 ALL", "CO2-636 ALL"}) {
461 auto& ecs = ecs_data[QuantumIdentifier(key)];
462
463 ecs[Species::Species::CarbonDioxide].scaling = LineShapeModelParameters(LineShapeTemperatureModel::T0, Conversion::kaycm_per_atm2hz_per_pa(0.019), 0, 0, 0);
464 ecs[Species::Species::CarbonDioxide].lambda = LineShapeModelParameters(LineShapeTemperatureModel::T0, 0.61, 0, 0, 0);
465 ecs[Species::Species::CarbonDioxide].beta = LineShapeModelParameters(LineShapeTemperatureModel::T0, 0.052, 0, 0, 0);
466 ecs[Species::Species::CarbonDioxide].collisional_distance = LineShapeModelParameters(LineShapeTemperatureModel::T0, Conversion::angstrom2meter(5.5), 0, 0, 0);
467 ecs[Species::Species::CarbonDioxide].mass = Species::mean_mass(Species::Species::CarbonDioxide, isotopologue_ratios);
468 }
469}
void * data
This can be used to make arrays out of anything.
Definition: array.h:107
Index nelem() const ARTS_NOEXCEPT
Number of elements.
Definition: array.h:195
Index nelem() const ARTS_NOEXCEPT
Returns the number of elements.
Definition: matpackI.cc:48
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:876
#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:21
#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 ecs_dataAddMakarov2020(MapOfErrorCorrectedSuddenData &ecs_data, const SpeciesIsotopologueRatios &isotopologue_ratios, const Verbosity &)
WORKSPACE METHOD: ecs_dataAddMakarov2020.
void ecs_dataSetSpeciesData(MapOfErrorCorrectedSuddenData &ecs_data, const SpeciesIsotopologueRatios &isotopologue_ratios, const Quantum::Identifier &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 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 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 abs_lines_per_speciesHitranLineMixingAdaptationData(ArrayOfTensor5 &lm_data, const ArrayOfArrayOfAbsorptionLines &abs_lines_per_species, const HitranRelaxationMatrixData &abs_hitran_relmat_data, const Vector &t_grid, const Vector &p_grid, const Verbosity &)
WORKSPACE METHOD: abs_lines_per_speciesHitranLineMixingAdaptationData.
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 String &hitran_type, const Verbosity &)
WORKSPACE METHOD: abs_hitran_relmat_dataReadHitranRelmatDataAndLines.
Definition: m_linemixing.cc:37
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.
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
const Joker joker
std::pair< ComplexVector, ArrayOfComplexVector > ecs_absorption_zeeman(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:932
std::pair< ComplexVector, ArrayOfComplexVector > ecs_absorption(const Numeric T, const Numeric P, const Numeric this_vmr, const Vector &vmrs, const ErrorCorrectedSuddenData &ecs_data, const Vector &f_grid, const AbsorptionLines &band, const ArrayOfRetrievalQuantity &jacobian_quantities)
Definition: linemixing.cc:654
Index nelem(const Lines &l)
Number of lines.
constexpr auto angstrom2meter(T x) -> decltype(x *1e-10)
Conversion from Å to meter.
Definition: constants.h:532
constexpr auto kaycm_per_atm2hz_per_pa(T x) -> decltype(x *kaycm2freq(pa2atm(1)))
Conversion from cm-1 per atmosphere to Hz per Pascal.
Definition: constants.h:484
constexpr auto deg2rad(T x) -> decltype(x *one_degree_in_radians)
Converts degrees to radians.
Definition: constants.h:328
SpeciesIsotopologueRatios isotopologue_ratios(Type type)
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:362
Derived FromGrids(Numeric u, Numeric v, Numeric w, Numeric z, Numeric a) noexcept
Computes the derived plane from ARTS grids.
Definition: zeemandata.cc:227
AllPolarizationVectors AllPolarization_deta(Numeric theta, Numeric eta) noexcept
The derivative of AllPolarization wrt eta.
Definition: zeemandata.cc:344
AllPolarizationVectors AllPolarization_dtheta(Numeric theta, const Numeric eta) noexcept
The derivative of AllPolarization wrt theta.
Definition: zeemandata.cc:327
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:389
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:375
AllPolarizationVectors AllPolarization(Numeric theta, Numeric eta) noexcept
Computes the polarization of each polarization type.
Definition: zeemandata.cc:311
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.
Tensor5 hitran_lm_eigenvalue_adaptation_test(const AbsorptionLines &band, const Vector &temperatures, const HitranRelaxationMatrixData &hitran, const Vector &pressures)
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::Identifier QuantumIdentifier
Definition: quantum.h:471
Coefficients and temperature model for SingleSpeciesModel.
static constexpr Index N