ARTS 2.5.4 (git: 4c0d3b4d)
predefined.cc
Go to the documentation of this file.
1#include "gui/plot.h"
3
4int main(int argc, char** argv) try {
5 constexpr Index minargs = 9;
6 ARTS_USER_ERROR_IF(argc < minargs,
7 "Call as ",
8 argv[0],
9 " TAG F0 NF DF T P VMR_O2 VMR_H2O [GUI]");
10
11 SpeciesTag tag(argv[1]);
12 Numeric F0 = std::stod(argv[2]);
13 Index NF = std::stoi(argv[3]);
14 Numeric DF = std::stod(argv[4]);
15 Numeric T = std::stod(argv[5]);
16 Numeric P = std::stod(argv[6]);
17
19 vmr.O2 = std::stod(argv[7]);
20 vmr.H2O = std::stod(argv[8]);
21
22 bool gui = argc > minargs ? std::stoi(argv[minargs - 1]) : false;
23
24 const Vector f_grid(F0, NF, DF);
25 PropagationMatrix propmat_clearsky(NF);
27
29 propmat_clearsky, x, tag.Isotopologue(), f_grid, P, T, vmr, {});
30
31 if (not gui)
32 std::cout << std::setprecision(15) << propmat_clearsky << '\n';
33 else
34 ARTSGUI::plot(f_grid, propmat_clearsky.Kjj());
35 return EXIT_SUCCESS;
36} catch (std::exception& e) {
37 std::cerr << e.what() << '\n';
38 return EXIT_FAILURE;
39}
This can be used to make arrays out of anything.
Definition: array.h:108
VectorView Kjj(const Index iz=0, const Index ia=0)
Vector view to diagonal elements.
The Vector class.
Definition: matpackI.h:908
#define ARTS_USER_ERROR_IF(condition,...)
Definition: debug.h:134
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
void compute(PropagationMatrix &propmat_clearsky, ArrayOfPropagationMatrix &dpropmat_clearsky_dx, const SpeciesIsotopeRecord &model, const Vector &f_grid, const Numeric &rtp_pressure, const Numeric &rtp_temperature, const VMRS &vmr, const ArrayOfRetrievalQuantity &jacobian_quantities)
Compute the predefined model.
int main(int argc, char **argv)
Definition: predefined.cc:4
Species::Tag SpeciesTag
Definition: species_tags.h:101
Contains known required VMR values.