ARTS  2.4.0(git:4fb77825)
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";
POINTING_SUBTAG_A
const String POINTING_SUBTAG_A
WIND_MAINTAG
const String WIND_MAINTAG
DOPPLER_CONST
const Numeric DOPPLER_CONST
AVOGADROS_NUMB
const Numeric AVOGADROS_NUMB
Global constant, the Avogadro's number [molec/kg].
LINEMIXINGDF0_MODE
const String LINEMIXINGDF0_MODE
LINEMIXINGDFEXPONENT_MODE
const String LINEMIXINGDFEXPONENT_MODE
MAGFIELD_MAINTAG
const String MAGFIELD_MAINTAG
LINEMIXINGDF1_MODE
const String LINEMIXINGDF1_MODE
GFIELD4_IA_GRID
const Index GFIELD4_IA_GRID
Global constant, Index of incidence angles in GriddedField4.
EARTH_RADIUS
const Numeric EARTH_RADIUS
Global constant, the radius of the Earth [m].
RAD2DEG
const Numeric RAD2DEG
Global constant, conversion from radians to degrees.
PLANCK_CONST
const Numeric PLANCK_CONST
Global constant, the Planck constant [Js].
LINEMIXINGGEXPONENT_MODE
const String LINEMIXINGGEXPONENT_MODE
SELFBROADENINGEXPONENT_MODE
const String SELFBROADENINGEXPONENT_MODE
LINEMIXINGG1_MODE
const String LINEMIXINGG1_MODE
POINTING_CALCMODE_B
const String POINTING_CALCMODE_B
COSMIC_BG_TEMP
const Numeric COSMIC_BG_TEMP
Global constant, Planck temperature for cosmic background radiation [K].
GFIELD3_LAT_GRID
const Index GFIELD3_LAT_GRID
Global constant, Index of the latitude grid in GriddedField3.
FLUX_MAINTAG
const String FLUX_MAINTAG
GFIELD4_LAT_GRID
const Index GFIELD4_LAT_GRID
Global constant, Index of the latitude grid in GriddedField4.
DEG2RAD
const Numeric DEG2RAD
Global constant, conversion from degrees to radians.
LINEMIXINGG0_MODE
const String LINEMIXINGG0_MODE
GFIELD4_FIELD_NAMES
const Index GFIELD4_FIELD_NAMES
Global constant, Index of the field names in GriddedField4.
NAT_LOG_2
const Numeric NAT_LOG_2
Global constant, ln(2)
VACUUM_PERMITTIVITY
const Numeric VACUUM_PERMITTIVITY
Global constant, the vacuum permittivity [F m-1].
sqrt
Numeric sqrt(const Rational r)
Square root.
Definition: rational.h:620
LAT_LON_MIN
const Numeric LAT_LON_MIN
Global constant, minimum distance of cloudbox to lat/lon_grid edges.
LINESTRENGTH_MODE
const String LINESTRENGTH_MODE
PARTICULATES_MAINTAG
const String PARTICULATES_MAINTAG
matpackI.h
Implementation of Matrix, Vector, and such stuff.
LINECENTER_MODE
const String LINECENTER_MODE
FREQUENCY_MAINTAG
const String FREQUENCY_MAINTAG
FOREIGNPRESSURESHIFT_MODE
const String FOREIGNPRESSURESHIFT_MODE
SINEFIT_MAINTAG
const String SINEFIT_MAINTAG
TORR2PA
const Numeric TORR2PA
Global constant, converts torr to Pa.
my_basic_string< char >
SURFACE_MAINTAG
const String SURFACE_MAINTAG
LINEMIXINGYEXPONENT_MODE
const String LINEMIXINGYEXPONENT_MODE
SPEED_OF_LIGHT
const Numeric SPEED_OF_LIGHT
Global constant, speed of light in vaccum [m/s].
GFIELD4_ZA_GRID
const Index GFIELD4_ZA_GRID
Global constant, Index of the zenith angle grid in GriddedField4.
GFIELD3_P_GRID
const Index GFIELD3_P_GRID
Global constant, Index of the pressure grid in GriddedField3.
GFIELD1_F_GRID
const Index GFIELD1_F_GRID
Global constant, Index of the frequency grid in GriddedField1.
LANDE_GS
const Numeric LANDE_GS
Global constant, Lande factor gs.
Numeric
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
WATERBROADENINGEXPONENT_MODE
const String WATERBROADENINGEXPONENT_MODE
LINEMIXINGY0_MODE
const String LINEMIXINGY0_MODE
EULER_NUMBER
const Numeric EULER_NUMBER
Global constant, e (Euler's number)
GFIELD4_LON_GRID
const Index GFIELD4_LON_GRID
Global constant, Index of the longitude grid in GriddedField4.
FOREIGNBROADENING_MODE
const String FOREIGNBROADENING_MODE
ATM2PA
const Numeric ATM2PA
Global constant, converts atm to Pa.
ELECTRONS_MAINTAG
const String ELECTRONS_MAINTAG
POINTING_MAINTAG
const String POINTING_MAINTAG
TEMP_0_C
const Numeric TEMP_0_C
Global constant, Temperature in Celsius of 0 Kelvin.
FREQUENCY_SUBTAG_1
const String FREQUENCY_SUBTAG_1
FREQUENCY_SUBTAG_0
const String FREQUENCY_SUBTAG_0
GFIELD4_P_GRID
const Index GFIELD4_P_GRID
Global constant, Index of the pressure grid in GriddedField4.
DENSITY_OF_WATER
const Numeric DENSITY_OF_WATER
Global constant, Density of liquid water +4C [kg/m3].
WATERBROADENING_MODE
const String WATERBROADENING_MODE
LOG10_EULER_NUMBER
const Numeric LOG10_EULER_NUMBER
Global constant, log10(Euler's number)
DENSITY_OF_ICE
const Numeric DENSITY_OF_ICE
Global constant, Density of water ice at 0C [kg/m3].
WATERPRESSURESHIFT_MODE
const String WATERPRESSURESHIFT_MODE
LINEMIXINGY1_MODE
const String LINEMIXINGY1_MODE
constants.h
Constants of physical expressions as constexpr.
POINTING_CALCMODE_A
const String POINTING_CALCMODE_A
ABSSPECIES_MAINTAG
const String ABSSPECIES_MAINTAG
NLTE_MAINTAG
const String NLTE_MAINTAG
GFIELD3_LON_GRID
const Index GFIELD3_LON_GRID
Global constant, Index of the longitude grid in GriddedField3.
HZ2CM
const Numeric HZ2CM
Global constant, converts Hz to cm-1.
POLYFIT_MAINTAG
const String POLYFIT_MAINTAG
CATALOGPARAMETER_MAINTAG
const String CATALOGPARAMETER_MAINTAG
ELECTRON_MASS
const Numeric ELECTRON_MASS
Global constant, the mass of an electron [kg].
SELFPRESSURESHIFT_MODE
const String SELFPRESSURESHIFT_MODE
Index
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
GAS_CONSTANT
const Numeric GAS_CONSTANT
Global constant, universal gas constant.
ELECTRON_CHARGE
const Numeric ELECTRON_CHARGE
Global constant, the charge of an electron [As] N.B.
NAT_LOG_TEN
const Numeric NAT_LOG_TEN
Global constant, ln(10)
SELFBROADENING_MODE
const String SELFBROADENING_MODE
SQRT_NAT_LOG_2
const Numeric SQRT_NAT_LOG_2
Global constant, sqrt(ln(2))
TEMPERATURE_MAINTAG
const String TEMPERATURE_MAINTAG
FOREIGNBROADENINGEXPONENT_MODE
const String FOREIGNBROADENINGEXPONENT_MODE
SCATSPECIES_MAINTAG
const String SCATSPECIES_MAINTAG
BOHR_MAGNETON
const Numeric BOHR_MAGNETON
Bohr Magneton.
mystring.h
This file contains the definition of String, the ARTS string class.
PI
const Numeric PI
Global constant, pi.
BOLTZMAN_CONST
const Numeric BOLTZMAN_CONST
Global constant, the Boltzmann constant [J/K].
GFIELD4_F_GRID
const Index GFIELD4_F_GRID
Global constant, Index of the frequency grid in GriddedField4.
PROPMAT_SUBSUBTAG
const String PROPMAT_SUBSUBTAG
GFIELD4_AA_GRID
const Index GFIELD4_AA_GRID
Global constant, Index of the azimuth angle grid in GriddedField4.