ARTS  2.3.1285(git:92a29ea9-dirty)
constants.cc
Go to the documentation of this file.
1 
2 /* Copyright (C) 2000-2012
3  Stefan Buehler <sbuehler@ltu.se>
4  Patrick Eriksson <patrick.eriksson@chalmers.se>
5 
6  This program is free software; you can redistribute it and/or modify it
7  under the terms of the GNU General Public License as published by the
8  Free Software Foundation; either version 2, or (at your option) any
9  later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
19  USA. */
20 
22 // File description
24 
40 // External declarations
43 
44 #include "constants.h"
45 #include "matpackI.h"
46 #include "mystring.h"
47 
49 // The constants
51 
57 extern const Numeric ATM2PA = 1.01325e5;
58 
63 extern const Numeric AVOGADROS_NUMB = Constant::NA;
64 
69 extern const Numeric BOHR_MAGNETON = Constant::bohr_magneton;
70 
75 extern const Numeric BOLTZMAN_CONST = Constant::k;
76 
81 extern const Numeric COSMIC_BG_TEMP = 2.735;
82 
91 extern const Numeric DEG2RAD = 0.017453292519943;
92 
100 extern const Numeric DENSITY_OF_ICE = 0.9167e3;
101 
109 extern const Numeric DENSITY_OF_WATER = 1e3;
110 
115 extern const Numeric EARTH_RADIUS = 6.3781e6;
116 
123 extern const Numeric ELECTRON_CHARGE = -Constant::e;
124 
129 extern const Numeric ELECTRON_MASS = Constant::m_e;
130 
135 // reference: http://thesapps.com/Doug/exp/
136 extern const Numeric EULER_NUMBER = 2.7182818284590452;
137 
142 extern const Numeric GAS_CONSTANT = Constant::R;
143 
150 extern const Numeric LANDE_GS = 2.0023193043622;
151 
156 extern const Numeric LOG10_EULER_NUMBER = 0.43429448190325176;
157 
162 extern const Numeric NAT_LOG_TEN = 2.3025850929940459;
163 
168 extern const Numeric NAT_LOG_2 = 0.69314718055994;
169 
174 extern const Numeric PI = Constant::pi;
175 
180 extern const Numeric PLANCK_CONST = Constant::h;
181 
190 extern const Numeric RAD2DEG = 57.295779513082323;
191 
196 extern const Numeric SPEED_OF_LIGHT = Constant::c;
197 
205 extern const Numeric HZ2CM = 0.01 / SPEED_OF_LIGHT;
206 
211 extern const Numeric SQRT_NAT_LOG_2 = 0.832554611;
212 
218 extern const Numeric TEMP_0_C = 273.15;
219 
227 extern const Numeric TORR2PA = 133.3227;
228 
236 extern const Numeric VACUUM_PERMITTIVITY = Constant::vacuum_permittivity;
237 
238 extern const Numeric DOPPLER_CONST =
239  std::sqrt(Constant::doppler_broadening_const_squared);
240 
246 extern const Index GFIELD1_F_GRID = 0;
247 
253 extern const Index GFIELD3_P_GRID = 0;
254 
260 extern const Index GFIELD3_LAT_GRID = 1;
261 
267 extern const Index GFIELD3_LON_GRID = 2;
268 
274 extern const Index GFIELD4_FIELD_NAMES = 0;
275 
281 extern const Index GFIELD4_IA_GRID = 0;
282 
288 extern const Index GFIELD4_P_GRID = 1;
289 
295 extern const Index GFIELD4_F_GRID = 1;
296 
302 extern const Index GFIELD4_LAT_GRID = 2;
303 
309 extern const Index GFIELD4_ZA_GRID = 2;
310 
316 extern const Index GFIELD4_LON_GRID = 3;
317 
323 extern const Index GFIELD4_AA_GRID = 3;
324 
330 extern const Numeric LAT_LON_MIN = 20;
331 
332 /*===========================================================================
333  === Definition of retrieval quantity tag strings
334  ===========================================================================*/
335 
336 extern const String ABSSPECIES_MAINTAG = "Absorption species";
337 extern const String SCATSPECIES_MAINTAG = "Scattering species";
338 extern const String PARTICULATES_MAINTAG = "Particulate species";
339 extern const String ELECTRONS_MAINTAG = "Electron species";
340 
341 extern const String FREQUENCY_MAINTAG = "Frequency";
342 extern const String FREQUENCY_SUBTAG_0 = "Shift";
343 extern const String FREQUENCY_SUBTAG_1 = "Stretch";
344 
345 extern const String POINTING_MAINTAG = "Sensor pointing";
346 extern const String POINTING_SUBTAG_A = "Zenith angle off-set";
347 extern const String POINTING_CALCMODE_A = "Recalculate iyb";
348 extern const String POINTING_CALCMODE_B = "Interpolate iyb";
349 
350 extern const String POLYFIT_MAINTAG = "Polynomial baseline fit";
351 extern const String SINEFIT_MAINTAG = "Sinusoidal baseline fit";
352 
353 extern const String TEMPERATURE_MAINTAG = "Atmospheric temperatures";
354 extern const String NLTE_MAINTAG = "NLTE temperatures";
355 
356 extern const String WIND_MAINTAG = "Wind";
357 extern const String MAGFIELD_MAINTAG = "Magnetic field";
358 extern const String FLUX_MAINTAG = "Beam flux";
359 
360 extern const String SURFACE_MAINTAG = "Surface";
361 
362 // New tags for only propmat jacobians
363 extern const String PROPMAT_SUBSUBTAG = "From propagation matrix";
364 extern const String CATALOGPARAMETER_MAINTAG = "Catalog parameter";
365 
366 // Generic modes
367 extern const String LINESTRENGTH_MODE = "Line Strength";
368 extern const String LINECENTER_MODE = "Line Center";
369 
370 // Modes for "some" catalogs
371 // Pressure Broadening
372 extern const String SELFBROADENING_MODE = "PB Self Gamma";
373 extern const String FOREIGNBROADENING_MODE = "PB Foreign Gamma";
374 extern const String WATERBROADENING_MODE = "PB Water Gamma";
375 extern const String SELFBROADENINGEXPONENT_MODE = "PB Self Exponent";
376 extern const String FOREIGNBROADENINGEXPONENT_MODE = "PB Foreign Exponent";
377 extern const String WATERBROADENINGEXPONENT_MODE = "PB Water Exponent";
378 extern const String SELFPRESSURESHIFT_MODE = "PB Self Pressure Shift";
379 extern const String FOREIGNPRESSURESHIFT_MODE = "PB Foreign Pressure Shift";
380 extern const String WATERPRESSURESHIFT_MODE = "PB Water Pressure Shift";
381 
382 // Line Mixing
383 extern const String LINEMIXINGY0_MODE = "LM Y Zeroth";
384 extern const String LINEMIXINGG0_MODE = "LM G Zeroth";
385 extern const String LINEMIXINGDF0_MODE = "LM DF Zeroth";
386 extern const String LINEMIXINGY1_MODE = "LM Y First";
387 extern const String LINEMIXINGG1_MODE = "LM G First";
388 extern const String LINEMIXINGDF1_MODE = "LM DF First";
389 extern const String LINEMIXINGYEXPONENT_MODE = "LM Y Exponent";
390 extern const String LINEMIXINGGEXPONENT_MODE = "LM G Exponent";
391 extern const String LINEMIXINGDFEXPONENT_MODE = "LM DF Exponent";
const Index GFIELD3_LAT_GRID
Global constant, Index of the latitude grid in GriddedField3.
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
const Index GFIELD4_FIELD_NAMES
Global constant, Index of the field names in GriddedField4.
const Numeric PLANCK_CONST
Global constant, the Planck constant [Js].
const String WATERPRESSURESHIFT_MODE
const Numeric VACUUM_PERMITTIVITY
Global constant, the vacuum permittivity [F m-1].
const String FREQUENCY_SUBTAG_0
const String LINEMIXINGYEXPONENT_MODE
const String NLTE_MAINTAG
const Numeric LAT_LON_MIN
Global constant, minimum distance of cloudbox to lat/lon_grid edges.
const Numeric SPEED_OF_LIGHT
Global constant, speed of light in vaccum [m/s].
const String FLUX_MAINTAG
const Numeric BOLTZMAN_CONST
Global constant, the Boltzmann constant [J/K].
const Numeric ELECTRON_MASS
Global constant, the mass of an electron [kg].
const Index GFIELD4_AA_GRID
Global constant, Index of the azimuth angle grid in GriddedField4.
const Numeric NAT_LOG_2
Global constant, ln(2)
const Numeric ELECTRON_CHARGE
Global constant, the charge of an electron [As] N.B.
const Numeric GAS_CONSTANT
Global constant, universal gas constant.
const String WATERBROADENINGEXPONENT_MODE
const String LINEMIXINGY0_MODE
const String SELFBROADENING_MODE
Constants of physical expressions as constexpr.
const String FOREIGNBROADENING_MODE
const Index GFIELD3_LON_GRID
Global constant, Index of the longitude grid in GriddedField3.
const String FOREIGNBROADENINGEXPONENT_MODE
const String WIND_MAINTAG
const String FREQUENCY_SUBTAG_1
const String SCATSPECIES_MAINTAG
const String FOREIGNPRESSURESHIFT_MODE
const Numeric LANDE_GS
Global constant, Lande factor gs.
const Numeric TORR2PA
Global constant, converts torr to Pa.
const Numeric EULER_NUMBER
Global constant, e (Euler&#39;s number)
const Index GFIELD4_LON_GRID
Global constant, Index of the longitude grid in GriddedField4.
const Numeric LOG10_EULER_NUMBER
Global constant, log10(Euler&#39;s number)
const String LINEMIXINGDFEXPONENT_MODE
const Index GFIELD4_ZA_GRID
Global constant, Index of the zenith angle grid in GriddedField4.
const Index GFIELD4_IA_GRID
Global constant, Index of incidence angles in GriddedField4.
const String SELFBROADENINGEXPONENT_MODE
const String LINEMIXINGG1_MODE
const Numeric EARTH_RADIUS
Global constant, the radius of the Earth [m].
const Index GFIELD1_F_GRID
Global constant, Index of the frequency grid in GriddedField1.
const String LINEMIXINGDF0_MODE
const Numeric COSMIC_BG_TEMP
Global constant, Planck temperature for cosmic background radiation [K].
const Index GFIELD4_P_GRID
Global constant, Index of the pressure grid in GriddedField4.
const String LINEMIXINGDF1_MODE
const Numeric DENSITY_OF_ICE
Global constant, Density of water ice at 0C [kg/m3].
const String CATALOGPARAMETER_MAINTAG
const String WATERBROADENING_MODE
const String LINESTRENGTH_MODE
const String POINTING_CALCMODE_A
const Numeric SQRT_NAT_LOG_2
Global constant, sqrt(ln(2))
const Numeric DENSITY_OF_WATER
Global constant, Density of liquid water +4C [kg/m3].
const Numeric HZ2CM
Global constant, converts Hz to cm-1.
const String LINEMIXINGY1_MODE
const Index GFIELD4_F_GRID
Global constant, Index of the frequency grid in GriddedField4.
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
const String LINECENTER_MODE
const String SURFACE_MAINTAG
const String ABSSPECIES_MAINTAG
Implementation of Matrix, Vector, and such stuff.
const String FREQUENCY_MAINTAG
const String POLYFIT_MAINTAG
const Numeric DEG2RAD
Global constant, conversion from degrees to radians.
const String LINEMIXINGG0_MODE
const Numeric AVOGADROS_NUMB
Global constant, the Avogadro&#39;s number [molec/kg].
const String PROPMAT_SUBSUBTAG
const String SELFPRESSURESHIFT_MODE
const Numeric BOHR_MAGNETON
Bohr Magneton.
const Numeric PI
Global constant, pi.
const String SINEFIT_MAINTAG
const Numeric NAT_LOG_TEN
Global constant, ln(10)
const String POINTING_SUBTAG_A
const String PARTICULATES_MAINTAG
const String ELECTRONS_MAINTAG
const String POINTING_MAINTAG
const String TEMPERATURE_MAINTAG
const Index GFIELD3_P_GRID
Global constant, Index of the pressure grid in GriddedField3.
const Numeric ATM2PA
Global constant, converts atm to Pa.
const String MAGFIELD_MAINTAG
const Numeric DOPPLER_CONST
const Numeric TEMP_0_C
Global constant, Temperature in Celsius of 0 Kelvin.
const String LINEMIXINGGEXPONENT_MODE
const String POINTING_CALCMODE_B
const Numeric RAD2DEG
Global constant, conversion from radians to degrees.
This file contains the definition of String, the ARTS string class.
Numeric sqrt(const Rational r)
Square root.
Definition: rational.h:620
const Index GFIELD4_LAT_GRID
Global constant, Index of the latitude grid in GriddedField4.