ARTS 2.5.4 (git: 4c0d3b4d)
test_cia.cc
Go to the documentation of this file.
1/* Copyright (C) 2012 Stefan Buehler <sbuehler@ltu.se>
2
3 This program is free software; you can redistribute it and/or modify it
4 under the terms of the GNU General Public License as published by the
5 Free Software Foundation; either version 2, or (at your option) any
6 later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12
13 You should have received a copy of the GNU General Public License
14 along with this program; if not, write to the Free Software
15 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16 USA. */
17
26#include "cia.h"
27
28void test01() {
29 cout << "Testing CIA Interpolation.\n";
30 GriddedField2 cia_data;
31
32 Matrix A(5, 3, 0.);
33 A(2, 1) = 1;
34 // cout << "A:" << A << endl;
35
36 cia_data.data = A;
37 cia_data.set_grid(0, {1, 2, 3, 4, 5});
38 cia_data.set_grid(1, {100, 200, 300});
39
40 cout << "cia_data:" << cia_data << endl;
41
42 // Output frequencies and temperature:
43 Vector f_out(1, 9, 0.5);
44 cout << "f_out:" << f_out << endl;
45 Numeric T_out = 150;
46 cout << "T_out:" << T_out << endl;
47
48 Vector result(9);
49 cia_interpolation(result, f_out, T_out, cia_data, 0.5, 0, Verbosity(3, 3, 0));
50 cout << "result:" << result << endl;
51}
52
53int main() {
54 test01();
55 return 0;
56}
void cia_interpolation(VectorView result, ConstVectorView f_grid, const Numeric &temperature, const GriddedField2 &cia_data, const Numeric &T_extrapolfac, const Index &robust, const Verbosity &verbosity)
Interpolate CIA data.
Definition: cia.cc:54
Header file for work with HITRAN collision induced absorption (CIA).
void set_grid(Index i, const Vector &g)
Set a numeric grid.
The Matrix class.
Definition: matpackI.h:1270
The Vector class.
Definition: matpackI.h:908
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
void test01()
Definition: test_cia.cc:28
int main()
Definition: test_cia.cc:53