ARTS  2.2.66
cloudbox.h
Go to the documentation of this file.
1 /* Copyright (C) 2002-2012 Claudia Emde <claudia.emde@dlr.de>
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 
28 #ifndef cloudbox_h
29 #define cloudbox_h
30 
31 #include "matpackVII.h"
32 #include "interpolation.h"
33 #include "optproperties.h"
34 #include "array.h"
35 #include "gridded_fields.h"
36 #include "ppath.h"
37 #include "messages.h"
38 
39 void chk_if_pnd_zero_p (const Index& i_p,
40  const GriddedField3& pnd_field_raw,
41  const String& pnd_field_file,
42  const Verbosity& verbosity);
43 
44 void chk_if_pnd_zero_lat (const Index& i_lat,
45  const GriddedField3& pnd_field_raw,
46  const String& pnd_field_file,
47  const Verbosity& verbosity);
48 
49 void chk_if_pnd_zero_lon (const Index& i_lon,
50  const GriddedField3& pnd_field_raw,
51  const String& pnd_field_file,
52  const Verbosity& verbosity);
53 
54 void chk_pnd_data (const GriddedField3& pnd_field_raw,
55  const String& pnd_field_file,
56  const Index& atmosphere_dim,
57  const Verbosity& verbosity);
58 
59 void chk_pnd_raw_data (const ArrayOfGriddedField3& pnd_field_raw,
60  const String& pnd_field_file,
61  const Index& atmosphere_dim,
62  const Verbosity& verbosity);
63 
65  const Index& dim,
66  const ArrayOfGriddedField3& pnd_field_raw,
67  ConstVectorView p_grid,
68  ConstVectorView lat_grid,
69  ConstVectorView lon_grid,
70  const ArrayOfIndex& cloudbox_limits);
71 
72 void chk_part_species (const ArrayOfString& part_species,
73  const String& delim);
74 
75 void chk_scattering_data (const ArrayOfSingleScatteringData& scat_data_array,
76  const ArrayOfScatteringMetaData& scat_meta_array,
77  const Verbosity& verbosity);
78 
79 void chk_scattering_meta_data (const ScatteringMetaData& scat_meta,
80  const String& scat_meta_file,
81  const Verbosity& verbosity);
82 
83 void chk_scat_data (const SingleScatteringData& scat_data_array,
84  const String& scat_data_file,
85  ConstVectorView f_grid,
86  const Verbosity& verbosity);
87 
89  const GridPos& gp_p,
90  const GridPos& gp_lat,
91  const GridPos& gp_lon,
92  const ArrayOfIndex& cloudbox_limits,
93  const bool& include_boundaries,
94  const Index& atmosphere_dim=3 );
95 
96 bool is_inside_cloudbox (const Ppath& ppath_step,
97  const ArrayOfIndex& cloudbox_limits,
98  const bool include_boundaries);
99 
100 
101 void pnd_fieldMH97 (Tensor4View pnd_field,
102  const Tensor3& IWC_field,
103  const Tensor3& t_field,
104  const ArrayOfIndex& limits,
105  const ArrayOfScatteringMetaData& scat_meta_array,
106  const Index& scat_data_start,
107  const Index& npart,
108  const String& part_string,
109  const String& delim,
110  const Verbosity& verbosity);
111 
112 void pnd_fieldH11 (Tensor4View pnd_field,
113  const Tensor3& IWC_field,
114  const Tensor3& t_field,
115  const ArrayOfIndex& limits,
116  const ArrayOfScatteringMetaData& scat_meta_array,
117  const Index& scat_data_start,
118  const Index& npart,
119  const String& part_string,
120  const String& delim,
121  const Verbosity& verbosity);
122 
123 void pnd_fieldH13 (Tensor4View pnd_field,
124  const Tensor3& IWC_field,
125  const Tensor3& t_field,
126  const ArrayOfIndex& limits,
127  const ArrayOfScatteringMetaData& scat_meta_array,
128  const Index& scat_data_start,
129  const Index& npart,
130  const String& part_string,
131  const String& delim,
132  const Verbosity& verbosity);
133 
134 void pnd_fieldH13Shape (Tensor4View pnd_field,
135  const Tensor3& IWC_field,
136  const Tensor3& t_field,
137  const ArrayOfIndex& limits,
138  const ArrayOfScatteringMetaData& scat_meta_array,
139  const Index& scat_data_start,
140  const Index& npart,
141  const String& part_string,
142  const String& delim,
143  const Verbosity& verbosity);
144 
145 void pnd_fieldF07TR (Tensor4View pnd_field,
146  const Tensor3& SWC_field,
147  const Tensor3& t_field,
148  const ArrayOfIndex& limits,
149  const ArrayOfScatteringMetaData& scat_meta_array,
150  const Index& scat_data_start,
151  const Index& npart,
152  const String& part_string,
153  const String& delim,
154  const Verbosity& verbosity);
155 
156 void pnd_fieldF07ML (Tensor4View pnd_field,
157  const Tensor3& SWC_field,
158  const Tensor3& t_field,
159  const ArrayOfIndex& limits,
160  const ArrayOfScatteringMetaData& scat_meta_array,
161  const Index& scat_data_start,
162  const Index& npart,
163  const String& part_string,
164  const String& delim,
165  const Verbosity& verbosity);
166 
167 void pnd_fieldMGD_LWC (Tensor4View pnd_field,
168  const Tensor3& LWC_field,
169  const ArrayOfIndex& limits,
170  const ArrayOfScatteringMetaData& scat_meta_array,
171  const Index& scat_data_start,
172  const Index& npart,
173  const String& part_string,
174  const String& delim,
175  const Verbosity& verbosity);
176 
177 void pnd_fieldMGD_IWC (Tensor4View pnd_field,
178  const Tensor3& IWC_field,
179  const ArrayOfIndex& limits,
180  const ArrayOfScatteringMetaData& scat_meta_array,
181  const Index& scat_data_start,
182  const Index& npart,
183  const String& part_string,
184  const String& delim,
185  const Verbosity& verbosity);
186 
187 void pnd_fieldGM58 (Tensor4View pnd_field,
188  const Tensor3& PR_field,
189  const ArrayOfIndex& limits,
190  const ArrayOfScatteringMetaData& scat_meta_array,
191  const Index& scat_data_start,
192  const Index& npart,
193  const String& part_string,
194  const String& delim,
195  const Verbosity& verbosity);
196 
197 void pnd_fieldSS70 (Tensor4View pnd_field,
198  const Tensor3& PR_field,
199  const ArrayOfIndex& limits,
200  const ArrayOfScatteringMetaData& scat_meta_array,
201  const Index& scat_data_start,
202  const Index& npart,
203  const String& part_string,
204  const String& delim,
205  const Verbosity& verbosity);
206 
207 void pnd_fieldMP48 (Tensor4View pnd_field,
208  const Tensor3& PR_field,
209  const ArrayOfIndex& limits,
210  const ArrayOfScatteringMetaData& scat_meta_array,
211  const Index& scat_data_start,
212  const Index& npart,
213  const String& part_string,
214  const String& delim,
215  const Verbosity& verbosity);
216 
217 void pnd_fieldH98 (Tensor4View pnd_field,
218  const Tensor3& LWC_field,
219  const ArrayOfIndex& limits,
220  const ArrayOfScatteringMetaData& scat_meta_array,
221  const Index& scat_data_start,
222  const Index& npart,
223  const String& part_string,
224  const String& delim,
225  const Verbosity& verbosity);
226 
227 Numeric IWCtopnd_MH97 (const Numeric iwc,
228  Numeric dm,
229  const Numeric t,
230  const Numeric density,
231  const bool noisy);
232 
233 Numeric IWCtopnd_H11 ( const Numeric d,
234  const Numeric t);
235 
236 Numeric IWCtopnd_H13 ( const Numeric d,
237  const Numeric t);
238 
240  const Numeric t);
241 
242 Numeric area_ratioH13 ( const Numeric d,
243  const Numeric t);
244 
245 Numeric IWCtopnd_F07TR ( const Numeric d, const Numeric t,
246  const Numeric swc,const Numeric alpha,
247  const Numeric beta );
248 
249 Numeric IWCtopnd_F07ML ( const Numeric d, const Numeric t,
250  const Numeric swc,const Numeric alpha,
251  const Numeric beta );
252 
253 Numeric LWCtopnd (const Numeric lwc,
254  const Numeric density,
255  const Numeric r);
256 
257 // ONLY FOR TESTING PURPOSES
258 Numeric LWCtopnd2 (//const Numeric density,
259  const Numeric r);
260 
261 
262 Numeric LWCtopnd_MGD_LWC ( const Numeric d, const Numeric rho,
263  const Numeric lwc);
264 
265 Numeric IWCtopnd_MGD_IWC ( const Numeric d, const Numeric rho,
266  const Numeric iwc);
267 
268 Numeric PRtopnd_MP48 ( const Numeric R,
269  const Numeric D);
270 
271 
272 void scale_pnd (Vector& w,
273  const Vector& x,
274  const Vector& y);
275 
276 void chk_pndsum (Vector& pnd,
277  const Numeric xwc,
278  const Vector& vol,
279  const Vector& density,
280  const Index& p,
281  const Index& lat,
282  const Index& lon,
283  const String& part_type,
284  const Verbosity& verbosity);
285 
286 void scale_H11 (Vector& pnd,
287  const Numeric xwc,
288  const Vector& density,
289  const Vector& vol);
290 
291 void scale_H13 (Vector& pnd,
292  const Numeric xwc,
293  const Vector& density,
294  const Vector& vol);
295 
296 void chk_massdensity_field(bool& x,
297  const Index& dim,
298  const Tensor3& massdensity,
299  const Vector& p_grid,
300  const Vector& lat_grid,
301  const Vector& lon_grid);
302 
303 void parse_partfield_name (String& partfield_name,
304  const String& part_string,
305  const String& delim);
306 
307 void parse_psd_param (String& psd_param,
308  const String& part_string,
309  const String& delim);
310 
311 void parse_part_material (String& part_material,
312  const String& part_string,
313  const String& delim);
314 
315 void parse_part_size (Numeric& sizemin,
316  Numeric& sizemax,
317  const String& part_string,
318  const String& delim);
319 
320 #endif //cloudbox_h
321 
gridded_fields.h
Implementation of gridded fields.
IWCtopnd_F07ML
Numeric IWCtopnd_F07ML(const Numeric d, const Numeric t, const Numeric swc, const Numeric alpha, const Numeric beta)
Definition: cloudbox.cc:3215
chk_scattering_meta_data
void chk_scattering_meta_data(const ScatteringMetaData &scat_meta, const String &scat_meta_file, const Verbosity &verbosity)
Check scattering data meta files.
Definition: cloudbox.cc:567
scale_H11
void scale_H11(Vector &pnd, const Numeric xwc, const Vector &density, const Vector &vol)
Definition: cloudbox.cc:3604
Tensor3
The Tensor3 class.
Definition: matpackIII.h:348
LWCtopnd_MGD_LWC
Numeric LWCtopnd_MGD_LWC(const Numeric d, const Numeric rho, const Numeric lwc)
Definition: cloudbox.cc:3363
interpolation.h
Header file for interpolation.cc.
pnd_fieldH98
void pnd_fieldH98(Tensor4View pnd_field, const Tensor3 &LWC_field, const ArrayOfIndex &limits, const ArrayOfScatteringMetaData &scat_meta_array, const Index &scat_data_start, const Index &npart, const String &part_string, const String &delim, const Verbosity &verbosity)
Definition: cloudbox.cc:2638
beta
#define beta
Definition: continua.cc:21194
pnd_fieldMGD_LWC
void pnd_fieldMGD_LWC(Tensor4View pnd_field, const Tensor3 &LWC_field, const ArrayOfIndex &limits, const ArrayOfScatteringMetaData &scat_meta_array, const Index &scat_data_start, const Index &npart, const String &part_string, const String &delim, const Verbosity &verbosity)
Definition: cloudbox.cc:1821
parse_part_material
void parse_part_material(String &part_material, const String &part_string, const String &delim)
Definition: cloudbox.cc:3793
pnd_fieldSS70
void pnd_fieldSS70(Tensor4View pnd_field, const Tensor3 &PR_field, const ArrayOfIndex &limits, const ArrayOfScatteringMetaData &scat_meta_array, const Index &scat_data_start, const Index &npart, const String &part_string, const String &delim, const Verbosity &verbosity)
Definition: cloudbox.cc:2278
chk_massdensity_field
void chk_massdensity_field(bool &x, const Index &dim, const Tensor3 &massdensity, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid)
Check whether hydromet grid size is equal to atmospheric grid size and if hydromet profile is zero (n...
Definition: cloudbox.cc:70
pnd_fieldGM58
void pnd_fieldGM58(Tensor4View pnd_field, const Tensor3 &PR_field, const ArrayOfIndex &limits, const ArrayOfScatteringMetaData &scat_meta_array, const Index &scat_data_start, const Index &npart, const String &part_string, const String &delim, const Verbosity &verbosity)
Definition: cloudbox.cc:2110
parse_partfield_name
void parse_partfield_name(String &partfield_name, const String &part_string, const String &delim)
Definition: cloudbox.cc:3700
pnd_fieldMGD_IWC
void pnd_fieldMGD_IWC(Tensor4View pnd_field, const Tensor3 &IWC_field, const ArrayOfIndex &limits, const ArrayOfScatteringMetaData &scat_meta_array, const Index &scat_data_start, const Index &npart, const String &part_string, const String &delim, const Verbosity &verbosity)
Definition: cloudbox.cc:1970
pnd_fieldH11
void pnd_fieldH11(Tensor4View pnd_field, const Tensor3 &IWC_field, const Tensor3 &t_field, const ArrayOfIndex &limits, const ArrayOfScatteringMetaData &scat_meta_array, const Index &scat_data_start, const Index &npart, const String &part_string, const String &delim, const Verbosity &verbosity)
Definition: cloudbox.cc:1045
IWCtopnd_MGD_IWC
Numeric IWCtopnd_MGD_IWC(const Numeric d, const Numeric rho, const Numeric iwc)
Definition: cloudbox.cc:3402
array.h
This file contains the definition of Array.
IWCtopnd_H13Shape
Numeric IWCtopnd_H13Shape(const Numeric d, const Numeric t)
Definition: cloudbox.cc:3025
area_ratioH13
Numeric area_ratioH13(const Numeric d, const Numeric t)
Definition: cloudbox.cc:3078
Ppath
The structure to describe a propagation path and releated quantities.
Definition: ppath.h:59
chk_if_pnd_zero_lon
void chk_if_pnd_zero_lon(const Index &i_lon, const GriddedField3 &pnd_field_raw, const String &pnd_field_file, const Verbosity &verbosity)
Check whether particle number density is zero at a specified longitude.
Definition: cloudbox.cc:241
pnd_fieldH13Shape
void pnd_fieldH13Shape(Tensor4View pnd_field, const Tensor3 &IWC_field, const Tensor3 &t_field, const ArrayOfIndex &limits, const ArrayOfScatteringMetaData &scat_meta_array, const Index &scat_data_start, const Index &npart, const String &part_string, const String &delim, const Verbosity &verbosity)
Definition: cloudbox.cc:1303
GriddedField3
Definition: gridded_fields.h:307
SingleScatteringData
Structure which describes the single scattering properties of a particle or a particle distribution.
Definition: optproperties.h:84
w
cmplx FADDEEVA() w(cmplx z, double relerr)
Definition: Faddeeva.cc:679
Array
This can be used to make arrays out of anything.
Definition: array.h:107
chk_scattering_data
void chk_scattering_data(const ArrayOfSingleScatteringData &scat_data_array, const ArrayOfScatteringMetaData &scat_meta_array, const Verbosity &verbosity)
Check scattering data general.
Definition: cloudbox.cc:541
messages.h
Declarations having to do with the four output streams.
my_basic_string
The implementation for String, the ARTS string class.
Definition: mystring.h:64
ScatteringMetaData
Definition: optproperties.h:109
chk_pnd_field_raw_only_in_cloudbox
void chk_pnd_field_raw_only_in_cloudbox(const Index &dim, const ArrayOfGriddedField3 &pnd_field_raw, ConstVectorView p_grid, ConstVectorView lat_grid, ConstVectorView lon_grid, const ArrayOfIndex &cloudbox_limits)
chk_pnd_field_raw_only_in_cloudbox
Definition: cloudbox.cc:390
IWCtopnd_H11
Numeric IWCtopnd_H11(const Numeric d, const Numeric t)
Definition: cloudbox.cc:2921
optproperties.h
Scattering database structure and functions.
Numeric
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:29
Verbosity
Definition: messages.h:50
LWCtopnd
Numeric LWCtopnd(const Numeric lwc, const Numeric density, const Numeric r)
Definition: cloudbox.cc:3305
parse_part_size
void parse_part_size(Numeric &sizemin, Numeric &sizemax, const String &part_string, const String &delim)
Definition: cloudbox.cc:3830
chk_pnd_raw_data
void chk_pnd_raw_data(const ArrayOfGriddedField3 &pnd_field_raw, const String &pnd_field_file, const Index &atmosphere_dim, const Verbosity &verbosity)
Check particle number density files (pnd_field_raw)
Definition: cloudbox.cc:352
IWCtopnd_MH97
Numeric IWCtopnd_MH97(const Numeric iwc, Numeric dm, const Numeric t, const Numeric density, const bool noisy)
Definition: cloudbox.cc:2755
chk_pndsum
void chk_pndsum(Vector &pnd, const Numeric xwc, const Vector &vol, const Vector &density, const Index &p, const Index &lat, const Index &lon, const String &part_type, const Verbosity &verbosity)
Definition: cloudbox.cc:3517
chk_if_pnd_zero_lat
void chk_if_pnd_zero_lat(const Index &i_lat, const GriddedField3 &pnd_field_raw, const String &pnd_field_file, const Verbosity &verbosity)
Check whether particle number density is zero at a specified latitude.
Definition: cloudbox.cc:193
scale_H13
void scale_H13(Vector &pnd, const Numeric xwc, const Vector &density, const Vector &vol)
Definition: cloudbox.cc:3652
IWCtopnd_H13
Numeric IWCtopnd_H13(const Numeric d, const Numeric t)
Definition: cloudbox.cc:2972
GridPos
Structure to store a grid position.
Definition: interpolation.h:74
ppath.h
Propagation path structure and functions.
LWCtopnd2
Numeric LWCtopnd2(const Numeric r)
Definition: cloudbox.cc:3331
parse_psd_param
void parse_psd_param(String &psd_param, const String &part_string, const String &delim)
Definition: cloudbox.cc:3749
is_inside_cloudbox
bool is_inside_cloudbox(const Ppath &ppath_step, const ArrayOfIndex &cloudbox_limits, const bool include_boundaries)
Definition: cloudbox.cc:892
chk_scat_data
void chk_scat_data(const SingleScatteringData &scat_data_array, const String &scat_data_file, ConstVectorView f_grid, const Verbosity &verbosity)
Check single scattering data files.
Definition: cloudbox.cc:605
pnd_fieldMH97
void pnd_fieldMH97(Tensor4View pnd_field, const Tensor3 &IWC_field, const Tensor3 &t_field, const ArrayOfIndex &limits, const ArrayOfScatteringMetaData &scat_meta_array, const Index &scat_data_start, const Index &npart, const String &part_string, const String &delim, const Verbosity &verbosity)
Definition: cloudbox.cc:924
chk_if_pnd_zero_p
void chk_if_pnd_zero_p(const Index &i_p, const GriddedField3 &pnd_field_raw, const String &pnd_field_file, const Verbosity &verbosity)
Check whether particle number density is zero at a specified pressure level.
Definition: cloudbox.cc:145
Tensor4View
The Tensor4View class.
Definition: matpackIV.h:243
scale_pnd
void scale_pnd(Vector &w, const Vector &x, const Vector &y)
Definition: cloudbox.cc:3469
pnd_fieldF07ML
void pnd_fieldF07ML(Tensor4View pnd_field, const Tensor3 &SWC_field, const Tensor3 &t_field, const ArrayOfIndex &limits, const ArrayOfScatteringMetaData &scat_meta_array, const Index &scat_data_start, const Index &npart, const String &part_string, const String &delim, const Verbosity &verbosity)
Definition: cloudbox.cc:1674
pnd_fieldMP48
void pnd_fieldMP48(Tensor4View pnd_field, const Tensor3 &PR_field, const ArrayOfIndex &limits, const ArrayOfScatteringMetaData &scat_meta_array, const Index &scat_data_start, const Index &npart, const String &part_string, const String &delim, const Verbosity &verbosity)
Definition: cloudbox.cc:2449
chk_part_species
void chk_part_species(const ArrayOfString &part_species, const String &delim)
Check validity of part_species setting.
Definition: cloudbox.cc:480
Index
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:35
IWCtopnd_F07TR
Numeric IWCtopnd_F07TR(const Numeric d, const Numeric t, const Numeric swc, const Numeric alpha, const Numeric beta)
Definition: cloudbox.cc:3121
Vector
The Vector class.
Definition: matpackI.h:556
chk_pnd_data
void chk_pnd_data(const GriddedField3 &pnd_field_raw, const String &pnd_field_file, const Index &atmosphere_dim, const Verbosity &verbosity)
Check particle number density files.
Definition: cloudbox.cc:294
PRtopnd_MP48
Numeric PRtopnd_MP48(const Numeric R, const Numeric D)
Definition: cloudbox.cc:3438
pnd_fieldF07TR
void pnd_fieldF07TR(Tensor4View pnd_field, const Tensor3 &SWC_field, const Tensor3 &t_field, const ArrayOfIndex &limits, const ArrayOfScatteringMetaData &scat_meta_array, const Index &scat_data_start, const Index &npart, const String &part_string, const String &delim, const Verbosity &verbosity)
Definition: cloudbox.cc:1517
ConstVectorView
A constant view of a Vector.
Definition: matpackI.h:292
matpackVII.h
is_gp_inside_cloudbox
bool is_gp_inside_cloudbox(const GridPos &gp_p, const GridPos &gp_lat, const GridPos &gp_lon, const ArrayOfIndex &cloudbox_limits, const bool &include_boundaries, const Index &atmosphere_dim=3)
Definition: cloudbox.cc:808
pnd_fieldH13
void pnd_fieldH13(Tensor4View pnd_field, const Tensor3 &IWC_field, const Tensor3 &t_field, const ArrayOfIndex &limits, const ArrayOfScatteringMetaData &scat_meta_array, const Index &scat_data_start, const Index &npart, const String &part_string, const String &delim, const Verbosity &verbosity)
Definition: cloudbox.cc:1165