ARTS  2.0.49
m_refraction.cc
Go to the documentation of this file.
1 /* Copyright (C) 2003-2008 Patrick Eriksson <Patrick.Eriksson@rss.chalmers.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 
18 
19 
20 /*===========================================================================
21  === File description
22  ===========================================================================*/
23 
37 /*===========================================================================
38  === External declarations
39  ===========================================================================*/
40 
41 #include "absorption.h"
42 #include "arts.h"
43 #include "check_input.h"
44 #include "matpackI.h"
45 #include "messages.h"
46 #include "refraction.h"
47 #include "special_interp.h"
48 #include "abs_species_tags.h"
49 
50 
51 
52 /*===========================================================================
53  === WSMs
54  ===========================================================================*/
55 
56 
57 /* Workspace method: Doxygen documentation will be auto-generated */
58 void refr_indexIR(// WS Output
59  Numeric& refr_index,
60  // WS Input
61  const Numeric& a_pressure,
62  const Numeric& a_temperature,
63  const Vector& a_vmr_list,
64  const Verbosity&)
65 {
66  //To suppress warning about unused parameter
67  a_vmr_list.nelem();
68 
69  refr_index_ir( refr_index, a_pressure, a_temperature );
70 }
71 
72 
73 /* Workspace method: Doxygen documentation will be auto-generated */
74 void refr_indexThayer(Numeric& refr_index,
75  const Numeric& a_pressure,
76  const Numeric& a_temperature,
77  const Vector& a_vmr_list,
78  const ArrayOfArrayOfSpeciesTag& abs_species,
79  const Verbosity&)
80 {
81  if( abs_species.nelem() != a_vmr_list.nelem() )
82  throw runtime_error( "The number of tag groups differ between "
83  "*a_vmr_list* and *abs_species*." );
84 
85  Index firstH2O = find_first_species_tg( abs_species,
87 
88  if( firstH2O < 0 )
89  throw runtime_error(
90  "Water vapour is a required (must be a tag group in *abs_species*)." );
91 
92  refr_index_thayer_1974( refr_index, a_pressure, a_temperature,
93  a_vmr_list[firstH2O] );
94 }
95 
96 
97 /* Workspace method: Doxygen documentation will be auto-generated */
98 void refr_indexUnit(Numeric& refr_index,
99  const Verbosity&)
100 {
101  refr_index = 1;
102 }
103 
species_index_from_species_name
Index species_index_from_species_name(String name)
Return species index for given species name.
Definition: abs_species_tags.cc:452
absorption.h
Declarations required for the calculation of absorption coefficients.
refr_index_thayer_1974
void refr_index_thayer_1974(Numeric &refr_index, const Numeric &p, const Numeric &t, const Numeric &h2o_vmr)
refr_index_thayer_1974
Definition: refraction.cc:581
matpackI.h
Array
This can be used to make arrays out of anything.
Definition: array.h:103
messages.h
Declarations having to do with the four output streams.
refr_indexIR
void refr_indexIR(Numeric &refr_index, const Numeric &a_pressure, const Numeric &a_temperature, const Vector &a_vmr_list, const Verbosity &)
WORKSPACE METHOD: refr_indexIR.
Definition: m_refraction.cc:58
ConstVectorView::nelem
Index nelem() const
Returns the number of elements.
Definition: matpackI.cc:175
find_first_species_tg
Index find_first_species_tg(const ArrayOfArrayOfSpeciesTag &tgs, const Index &spec)
Find first occurrence of species in tag groups.
Definition: abs_species_tags.cc:393
Numeric
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
Verbosity
Definition: messages.h:50
refr_indexUnit
void refr_indexUnit(Numeric &refr_index, const Verbosity &)
WORKSPACE METHOD: refr_indexUnit.
Definition: m_refraction.cc:98
abs_species_tags.h
Header file for stuff related to absorption species tags.
refraction.h
Refraction functions.
refr_index_ir
void refr_index_ir(Numeric &refr_index, const Numeric &p, const Numeric &t)
refr_index_ir
Definition: refraction.cc:602
special_interp.h
Header file for special_interp.cc.
Index
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
check_input.h
Vector
The Vector class.
Definition: matpackI.h:555
refr_indexThayer
void refr_indexThayer(Numeric &refr_index, const Numeric &a_pressure, const Numeric &a_temperature, const Vector &a_vmr_list, const ArrayOfArrayOfSpeciesTag &abs_species, const Verbosity &)
WORKSPACE METHOD: refr_indexThayer.
Definition: m_refraction.cc:74
Array::nelem
Index nelem() const
Number of elements.
Definition: array.h:172
arts.h
The global header file for ARTS.