ARTS  2.4.0(git:4fb77825)
gridded_fields.h
Go to the documentation of this file.
1 /* Copyright (C) 2008-2012 Oliver Lemke <olemke@core-dump.info>
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 
33 #ifndef gridded_fields_h
34 #define gridded_fields_h
35 
36 #include <stdexcept>
37 #include "array.h"
38 #include "matpackVI.h"
39 #include "mystring.h"
40 
43 
45 
46 #define CHECK_ERROR_BOILERPLATE \
47  "size mismatch between grids and data.\n" \
48  "Note that a grid is allowed to be empty, but in the\n" \
49  "data that dimension must have exactly one element.\n"
50 
52 class GriddedField {
53  private:
60 
61  protected:
63 
68  : dim(0),
69  mname(),
70  mgridtypes(),
71  mgridnames(),
72  mstringgrids(),
73  mnumericgrids() { /* Nothing to do here */
74  }
75 
77 
86  GriddedField(const Index d, const String& s)
87  : dim(d),
88  mname(s),
90  mgridnames(d),
91  mstringgrids(d),
92  mnumericgrids(d) { /* Nothing to do here */
93  }
94 
95  public:
97 
98  Index get_dim() const { return dim; }
99 
100  void copy_grids(const GriddedField& gf);
101 
103 
109  const String& get_grid_name(Index i) const { return mgridnames[i]; }
110 
112 
119  Index ret = 0;
120  assert(i < dim);
121  switch (mgridtypes[i]) {
122  case GRID_TYPE_NUMERIC:
123  ret = mnumericgrids[i].nelem();
124  break;
125  case GRID_TYPE_STRING:
126  ret = mstringgrids[i].nelem();
127  break;
128  }
129 
130  return ret;
131  }
132 
134 
140  GridType get_grid_type(Index i) const { return mgridtypes[i]; }
141 
142  const Vector& get_numeric_grid(Index i) const;
143 
145 
146  const ArrayOfString& get_string_grid(Index i) const;
147 
149 
151 
152  const String& get_name() const { return mname; }
153 
154  void set_grid(Index i, const Vector& g);
155 
156  void set_grid(Index i, const ArrayOfString& g);
157 
159 
165  void set_grid_name(Index i, const String& s) {
166  assert(i < dim);
167  mgridnames[i] = s;
168  }
169 
171 
172  void set_name(const String& s) { mname = s; }
173 
175 
182  virtual bool checksize() const = 0;
183 
185 
188  virtual void checksize_strict() const = 0;
189 
191  virtual ~GriddedField() {}
192 
193  friend std::ostream& operator<<(std::ostream& os, const GriddedField& gf);
194 };
195 
196 class GriddedField1 final : public GriddedField {
197  public:
201 
202  GriddedField1(const String& s) : GriddedField(1, s) {}
203 
204  bool checksize() const final {
205  return (!get_grid_size(0) && data.nelem() == 1) ||
206  data.nelem() == get_grid_size(0);
207  }
208 
209  void checksize_strict() const final {
210  if (!checksize()) {
211  std::ostringstream os;
212  os << "GriddedField1 ";
213  if (get_name().length()) os << "(" << get_name() << ") ";
215  os << "Grid";
216  if (get_grid_name(0).nelem()) os << " (" << get_grid_name(0) << ")";
217  os << " = " << get_grid_size(0) << "\n";
218  os << "Data";
219  os << " = " << data.nelem();
220  throw std::runtime_error(os.str());
221  }
222  }
223 
225 
226  void resize(const GriddedField1& gf) { data.resize(gf.get_grid_size(0)); }
227 
229 
230  void resize(Index n) { data.resize(n); }
231 
232  friend std::ostream& operator<<(std::ostream& os, const GriddedField1& gf);
233 
235 };
236 
237 class GriddedField2 final : public GriddedField {
238  public:
242 
243  GriddedField2(const String& s) : GriddedField(2, s) {}
244 
245  bool checksize() const final {
246  return ((!get_grid_size(1) && data.ncols() == 1) ||
247  data.ncols() == get_grid_size(1)) &&
248  ((!get_grid_size(0) && data.nrows() == 1) ||
249  data.nrows() == get_grid_size(0));
250  }
251 
252  void checksize_strict() const final {
253  if (!checksize()) {
254  std::ostringstream os;
255  os << "GriddedField2 ";
256  if (get_name().length()) os << "(" << get_name() << ") ";
258  for (Index i = 0; i < 2; i++) {
259  os << "Grid " << i;
260  if (get_grid_name(i).nelem()) os << " (" << get_grid_name(i) << ")";
261  os << " = " << get_grid_size(i) << "\n";
262  }
263  os << "Data";
264  os << " = " << data.nrows() << ", " << data.ncols();
265  throw std::runtime_error(os.str());
266  }
267  }
268 
270 
271  void resize(const GriddedField2& gf) {
272  data.resize(gf.get_grid_size(0), gf.get_grid_size(1));
273  }
274 
276 
277  void resize(Index r, Index c) { data.resize(r, c); }
278 
279  friend std::ostream& operator<<(std::ostream& os, const GriddedField2& gf);
280 
282 };
283 
284 class GriddedField3 final : public GriddedField {
285  public:
289 
290  GriddedField3(const String& s) : GriddedField(3, s) {}
291 
293  data = n;
294 
295  return *this;
296  }
297 
298  bool checksize() const final {
299  return ((!get_grid_size(2) && data.ncols() == 1) ||
300  data.ncols() == get_grid_size(2)) &&
301  ((!get_grid_size(1) && data.nrows() == 1) ||
302  data.nrows() == get_grid_size(1)) &&
303  ((!get_grid_size(0) && data.npages() == 1) ||
304  data.npages() == get_grid_size(0));
305  }
306 
307  void checksize_strict() const final {
308  if (!checksize()) {
309  std::ostringstream os;
310  os << "GriddedField3 ";
311  if (get_name().length()) os << "(" << get_name() << ") ";
313  for (Index i = 0; i < 3; i++) {
314  os << "Grid " << i;
315  if (get_grid_name(i).nelem()) os << " (" << get_grid_name(i) << ")";
316  os << " = " << get_grid_size(i) << "\n";
317  }
318  os << "Data";
319  os << " = " << data.npages() << ", " << data.nrows() << ", "
320  << data.ncols();
321  throw std::runtime_error(os.str());
322  }
323  }
324 
326 
327  void resize(const GriddedField3& gf) {
328  data.resize(gf.get_grid_size(0), gf.get_grid_size(1), gf.get_grid_size(2));
329  }
330 
332 
333  void resize(Index p, Index r, Index c) { data.resize(p, r, c); }
334 
335  friend std::ostream& operator<<(std::ostream& os, const GriddedField3& gf);
336 
338 };
339 
340 class GriddedField4 final : public GriddedField {
341  public:
345 
346  GriddedField4(const String& s) : GriddedField(4, s) {}
347 
348  bool checksize() const final {
349  return ((!get_grid_size(3) && data.ncols() == 1) ||
350  data.ncols() == get_grid_size(3)) &&
351  ((!get_grid_size(2) && data.nrows() == 1) ||
352  data.nrows() == get_grid_size(2)) &&
353  ((!get_grid_size(1) && data.npages() == 1) ||
354  data.npages() == get_grid_size(1)) &&
355  ((!get_grid_size(0) && data.nbooks() == 1) ||
356  data.nbooks() == get_grid_size(0));
357  }
358 
359  void checksize_strict() const final {
360  if (!checksize()) {
361  std::ostringstream os;
362  os << "GriddedField4 ";
363  if (get_name().length()) os << "(" << get_name() << ") ";
365  for (Index i = 0; i < 4; i++) {
366  os << "Grid " << i;
367  if (get_grid_name(i).nelem()) os << " (" << get_grid_name(i) << ")";
368  os << " = " << get_grid_size(i) << "\n";
369  }
370  os << "Data";
371  os << " = " << data.nbooks() << ", " << data.npages() << ", ";
372  os << data.nrows() << ", " << data.ncols();
373  throw std::runtime_error(os.str());
374  }
375  }
376 
378 
379  void resize(const GriddedField4& gf) {
380  data.resize(gf.get_grid_size(0),
381  gf.get_grid_size(1),
382  gf.get_grid_size(2),
383  gf.get_grid_size(3));
384  }
385 
387 
388  void resize(Index b, Index p, Index r, Index c) { data.resize(b, p, r, c); }
389 
390  friend std::ostream& operator<<(std::ostream& os, const GriddedField4& gf);
391 
393 };
394 
395 class GriddedField5 final : public GriddedField {
396  public:
400 
401  GriddedField5(const String& s) : GriddedField(5, s) {}
402 
403  bool checksize() const final {
404  return ((!get_grid_size(4) && data.ncols() == 1) ||
405  data.ncols() == get_grid_size(4)) &&
406  ((!get_grid_size(3) && data.nrows() == 1) ||
407  data.nrows() == get_grid_size(3)) &&
408  ((!get_grid_size(2) && data.npages() == 1) ||
409  data.npages() == get_grid_size(2)) &&
410  ((!get_grid_size(1) && data.nbooks() == 1) ||
411  data.nbooks() == get_grid_size(1)) &&
412  ((!get_grid_size(0) && data.nshelves() == 1) ||
413  data.nshelves() == get_grid_size(0));
414  }
415 
416  void checksize_strict() const final {
417  if (!checksize()) {
418  std::ostringstream os;
419  os << "GriddedField5 ";
420  if (get_name().length()) os << "(" << get_name() << ") ";
422  for (Index i = 0; i < 5; i++) {
423  os << "Grid " << i;
424  if (get_grid_name(i).nelem()) os << " (" << get_grid_name(i) << ")";
425  os << " = " << get_grid_size(i) << "\n";
426  }
427  os << "Data";
428  os << " = " << data.nshelves() << ", " << data.nbooks() << ", ";
429  os << data.npages() << ", " << data.nrows() << ", " << data.ncols();
430  throw std::runtime_error(os.str());
431  }
432  }
433 
435 
436  void resize(const GriddedField5& gf) {
437  data.resize(gf.get_grid_size(0),
438  gf.get_grid_size(1),
439  gf.get_grid_size(2),
440  gf.get_grid_size(3),
441  gf.get_grid_size(4));
442  }
443 
445 
446  void resize(Index s, Index b, Index p, Index r, Index c) {
447  data.resize(s, b, p, r, c);
448  }
449 
450  friend std::ostream& operator<<(std::ostream& os, const GriddedField5& gf);
451 
453 };
454 
455 class GriddedField6 final : public GriddedField {
456  public:
460 
461  GriddedField6(const String& s) : GriddedField(6, s) {}
462 
463  bool checksize() const final {
464  return ((!get_grid_size(5) && data.ncols() == 1) ||
465  data.ncols() == get_grid_size(5)) &&
466  ((!get_grid_size(4) && data.nrows() == 1) ||
467  data.nrows() == get_grid_size(4)) &&
468  ((!get_grid_size(3) && data.npages() == 1) ||
469  data.npages() == get_grid_size(3)) &&
470  ((!get_grid_size(2) && data.nbooks() == 1) ||
471  data.nbooks() == get_grid_size(2)) &&
472  ((!get_grid_size(1) && data.nshelves() == 1) ||
473  data.nshelves() == get_grid_size(1)) &&
474  ((!get_grid_size(0) && data.nvitrines() == 1) ||
475  data.nvitrines() == get_grid_size(0));
476  }
477 
478  void checksize_strict() const final {
479  if (!checksize()) {
480  std::ostringstream os;
481  os << "GriddedField6 ";
482  if (get_name().length()) os << "(" << get_name() << ") ";
484  for (Index i = 0; i < 5; i++) {
485  os << "Grid " << i;
486  if (get_grid_name(i).nelem()) os << " (" << get_grid_name(i) << ")";
487  os << " = " << get_grid_size(i) << "\n";
488  }
489  os << "Data";
490  os << " = " << data.nvitrines() << data.nshelves() << ", "
491  << data.nbooks() << ", ";
492  os << data.npages() << ", " << data.nrows() << ", " << data.ncols();
493  throw std::runtime_error(os.str());
494  }
495  }
496 
498 
499  void resize(const GriddedField6& gf) {
500  data.resize(gf.get_grid_size(0),
501  gf.get_grid_size(1),
502  gf.get_grid_size(2),
503  gf.get_grid_size(3),
504  gf.get_grid_size(4),
505  gf.get_grid_size(5));
506  }
507 
509 
510  void resize(Index v, Index s, Index b, Index p, Index r, Index c) {
511  data.resize(v, s, b, p, r, c);
512  }
513 
514  friend std::ostream& operator<<(std::ostream& os, const GriddedField6& gf);
515 
517 };
518 
519 /********** Output operators **********/
520 
521 std::ostream& operator<<(std::ostream& os, const GriddedField& gf);
522 std::ostream& operator<<(std::ostream& os, const GriddedField1& gf);
523 std::ostream& operator<<(std::ostream& os, const GriddedField2& gf);
524 std::ostream& operator<<(std::ostream& os, const GriddedField3& gf);
525 std::ostream& operator<<(std::ostream& os, const GriddedField4& gf);
526 std::ostream& operator<<(std::ostream& os, const GriddedField5& gf);
527 std::ostream& operator<<(std::ostream& os, const GriddedField6& gf);
528 
529 /************ Array types *************/
530 
539 
540 #undef CHECK_ERROR_BOILERPLATE
541 
542 #endif
GriddedField2
Definition: gridded_fields.h:237
ArrayOfGriddedField5
Array< GriddedField5 > ArrayOfGriddedField5
Definition: gridded_fields.h:535
Matrix
The Matrix class.
Definition: matpackI.h:1193
GriddedField::get_string_grid
const ArrayOfString & get_string_grid(Index i) const
Get a string grid.
Definition: gridded_fields.cc:145
GriddedField::checksize_strict
virtual void checksize_strict() const =0
Strict consistency check.
GriddedField::mname
String mname
Definition: gridded_fields.h:55
GriddedField::set_grid_name
void set_grid_name(Index i, const String &s)
Set grid name.
Definition: gridded_fields.h:165
GriddedField6::checksize
bool checksize() const final
Consistency check.
Definition: gridded_fields.h:463
Tensor4::resize
void resize(Index b, Index p, Index r, Index c)
Resize function.
Definition: matpackIV.cc:1064
GriddedField6::resize
void resize(const GriddedField6 &gf)
Make this GriddedField6 the same size as the given one.
Definition: gridded_fields.h:499
GriddedField1::resize
void resize(Index n)
Resize the data vector.
Definition: gridded_fields.h:230
ConstTensor6View::nshelves
Index nshelves() const
Returns the number of shelves.
Definition: matpackVI.cc:45
ConstTensor5View::nbooks
Index nbooks() const
Returns the number of books.
Definition: matpackV.cc:47
GriddedField5::checksize
bool checksize() const final
Consistency check.
Definition: gridded_fields.h:403
GriddedField5::resize
void resize(Index s, Index b, Index p, Index r, Index c)
Resize the data tensor.
Definition: gridded_fields.h:446
Tensor6::resize
void resize(Index v, Index s, Index b, Index p, Index r, Index c)
Resize function.
Definition: matpackVI.cc:2175
ArrayOfGriddedField3
Array< GriddedField3 > ArrayOfGriddedField3
Definition: gridded_fields.h:533
GriddedField4::resize
void resize(Index b, Index p, Index r, Index c)
Resize the data tensor.
Definition: gridded_fields.h:388
GriddedField
Definition: gridded_fields.h:52
Tensor3
The Tensor3 class.
Definition: matpackIII.h:339
GriddedField::mgridtypes
Array< GridType > mgridtypes
Definition: gridded_fields.h:56
ConstTensor5View::ncols
Index ncols() const
Returns the number of columns.
Definition: matpackV.cc:56
ConstTensor6View::npages
Index npages() const
Returns the number of pages.
Definition: matpackVI.cc:51
GriddedField6
Definition: gridded_fields.h:455
GriddedField2::GriddedField2
GriddedField2()
Construct an empty GriddedField2.
Definition: gridded_fields.h:240
ArrayOfGridType
Array< GridType > ArrayOfGridType
Definition: gridded_fields.h:44
ConstTensor6View::nrows
Index nrows() const
Returns the number of rows.
Definition: matpackVI.cc:54
GRID_TYPE_NUMERIC
@ GRID_TYPE_NUMERIC
Definition: gridded_fields.h:42
GriddedField3::operator=
GriddedField3 & operator=(Numeric n)
Definition: gridded_fields.h:292
Vector::resize
void resize(Index n)
Resize function.
Definition: matpackI.cc:404
GriddedField::get_dim
Index get_dim() const
Get the dimension of this gridded field.
Definition: gridded_fields.h:98
GriddedField::checksize
virtual bool checksize() const =0
Consistency check.
GriddedField1::data
Vector data
Definition: gridded_fields.h:234
GriddedField::GriddedField
GriddedField(const Index d, const String &s)
Construct a GriddedField.
Definition: gridded_fields.h:86
ConstMatrixView::nrows
Index nrows() const
Returns the number of rows.
Definition: matpackI.cc:429
GriddedField::mnumericgrids
ArrayOfVector mnumericgrids
Definition: gridded_fields.h:59
GriddedField5::checksize_strict
void checksize_strict() const final
Strict consistency check.
Definition: gridded_fields.h:416
GriddedField5::data
Tensor5 data
Definition: gridded_fields.h:452
GriddedField2::data
Matrix data
Definition: gridded_fields.h:281
Tensor4
The Tensor4 class.
Definition: matpackIV.h:421
array.h
This file contains the definition of Array.
GriddedField2::resize
void resize(Index r, Index c)
Resize the data matrix.
Definition: gridded_fields.h:277
GriddedField3::GriddedField3
GriddedField3(const String &s)
Construct an empty GriddedField3 with the given name.
Definition: gridded_fields.h:290
Tensor3::resize
void resize(Index p, Index r, Index c)
Resize function.
Definition: matpackIII.cc:664
ConstTensor5View::npages
Index npages() const
Returns the number of pages.
Definition: matpackV.cc:50
GriddedField3
Definition: gridded_fields.h:284
GriddedField5::operator<<
friend std::ostream & operator<<(std::ostream &os, const GriddedField5 &gf)
ConstTensor3View::npages
Index npages() const
Returns the number of pages.
Definition: matpackIII.h:144
GriddedField::dim
Index dim
Definition: gridded_fields.h:54
GriddedField6::GriddedField6
GriddedField6(const String &s)
Construct an empty GriddedField6 with the given name.
Definition: gridded_fields.h:461
GriddedField::get_grid_size
Index get_grid_size(Index i) const
Get the size of a grid.
Definition: gridded_fields.h:118
GriddedField2::GriddedField2
GriddedField2(const String &s)
Construct an empty GriddedField2 with the given name.
Definition: gridded_fields.h:243
GriddedField3::checksize_strict
void checksize_strict() const final
Strict consistency check.
Definition: gridded_fields.h:307
GriddedField::get_grid_type
GridType get_grid_type(Index i) const
Get grid type.
Definition: gridded_fields.h:140
Array< GridType >
GriddedField::mstringgrids
Array< ArrayOfString > mstringgrids
Definition: gridded_fields.h:58
GriddedField3::resize
void resize(Index p, Index r, Index c)
Resize the data tensor.
Definition: gridded_fields.h:333
Absorption::nelem
Index nelem(const Lines &l)
Number of lines.
Definition: absorptionlines.h:1820
GriddedField3::data
Tensor3 data
Definition: gridded_fields.h:337
ConstTensor6View::nvitrines
Index nvitrines() const
Returns the number of vitrines.
Definition: matpackVI.cc:42
GriddedField::GriddedField
GriddedField()
Construct an empty GriddedField.
Definition: gridded_fields.h:67
GriddedField::get_numeric_grid
const Vector & get_numeric_grid(Index i) const
Get a numeric grid.
Definition: gridded_fields.cc:87
Tensor5::resize
void resize(Index s, Index b, Index p, Index r, Index c)
Resize function.
Definition: matpackV.cc:1743
GriddedField::mgridnames
ArrayOfString mgridnames
Definition: gridded_fields.h:57
ConstMatrixView::ncols
Index ncols() const
Returns the number of columns.
Definition: matpackI.cc:432
my_basic_string< char >
GriddedField5::GriddedField5
GriddedField5(const String &s)
Construct an empty GriddedField5 with the given name.
Definition: gridded_fields.h:401
ArrayOfGriddedField4
Array< GriddedField4 > ArrayOfGriddedField4
Definition: gridded_fields.h:534
ConstVectorView::nelem
Index nelem() const
Returns the number of elements.
Definition: matpackI.cc:51
CHECK_ERROR_BOILERPLATE
#define CHECK_ERROR_BOILERPLATE
Definition: gridded_fields.h:46
GridType
GridType
Definition: gridded_fields.h:42
GriddedField6::checksize_strict
void checksize_strict() const final
Strict consistency check.
Definition: gridded_fields.h:478
GriddedField3::GriddedField3
GriddedField3()
Construct an empty GriddedField3.
Definition: gridded_fields.h:287
ConstTensor4View::ncols
Index ncols() const
Returns the number of columns.
Definition: matpackIV.cc:66
operator<<
std::ostream & operator<<(std::ostream &os, const GriddedField &gf)
Output operator for GriddedField.
Definition: gridded_fields.cc:229
GRID_TYPE_STRING
@ GRID_TYPE_STRING
Definition: gridded_fields.h:42
GriddedField1::operator<<
friend std::ostream & operator<<(std::ostream &os, const GriddedField1 &gf)
GriddedField4::GriddedField4
GriddedField4(const String &s)
Construct an empty GriddedField4 with the given name.
Definition: gridded_fields.h:346
Numeric
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
GriddedField1::GriddedField1
GriddedField1(const String &s)
Construct an empty GriddedField1 with the given name.
Definition: gridded_fields.h:202
ConstTensor4View::npages
Index npages() const
Returns the number of pages.
Definition: matpackIV.cc:60
GriddedField4
Definition: gridded_fields.h:340
GriddedField::copy_grids
void copy_grids(const GriddedField &gf)
Copy grids.
Definition: gridded_fields.cc:59
GriddedField::set_name
void set_name(const String &s)
Set name of this gridded field.
Definition: gridded_fields.h:172
ConstTensor4View::nbooks
Index nbooks() const
Returns the number of books.
Definition: matpackIV.cc:57
GriddedField::get_name
const String & get_name() const
Get the name of this gridded field.
Definition: gridded_fields.h:152
GriddedField3::resize
void resize(const GriddedField3 &gf)
Make this GriddedField3 the same size as the given one.
Definition: gridded_fields.h:327
GriddedField2::operator<<
friend std::ostream & operator<<(std::ostream &os, const GriddedField2 &gf)
GriddedField4::resize
void resize(const GriddedField4 &gf)
Make this GriddedField4 the same size as the given one.
Definition: gridded_fields.h:379
GriddedField6::GriddedField6
GriddedField6()
Construct an empty GriddedField6.
Definition: gridded_fields.h:458
Matrix::resize
void resize(Index r, Index c)
Resize function.
Definition: matpackI.cc:1056
ConstTensor3View::nrows
Index nrows() const
Returns the number of rows.
Definition: matpackIII.h:147
GriddedField2::checksize
bool checksize() const final
Consistency check.
Definition: gridded_fields.h:245
ConstTensor6View::nbooks
Index nbooks() const
Returns the number of books.
Definition: matpackVI.cc:48
GriddedField4::checksize
bool checksize() const final
Consistency check.
Definition: gridded_fields.h:348
Tensor5
The Tensor5 class.
Definition: matpackV.h:506
ConstTensor4View::nrows
Index nrows() const
Returns the number of rows.
Definition: matpackIV.cc:63
GriddedField6::data
Tensor6 data
Definition: gridded_fields.h:516
GriddedField2::checksize_strict
void checksize_strict() const final
Strict consistency check.
Definition: gridded_fields.h:252
GriddedField::set_grid
void set_grid(Index i, const Vector &g)
Set a numeric grid.
Definition: gridded_fields.cc:201
ConstTensor5View::nrows
Index nrows() const
Returns the number of rows.
Definition: matpackV.cc:53
GriddedField6::operator<<
friend std::ostream & operator<<(std::ostream &os, const GriddedField6 &gf)
GriddedField1::GriddedField1
GriddedField1()
Construct an empty GriddedField1.
Definition: gridded_fields.h:199
GriddedField1::checksize_strict
void checksize_strict() const final
Strict consistency check.
Definition: gridded_fields.h:209
GriddedField3::operator<<
friend std::ostream & operator<<(std::ostream &os, const GriddedField3 &gf)
ConstTensor5View::nshelves
Index nshelves() const
Returns the number of shelves.
Definition: matpackV.cc:44
ConstTensor3View::ncols
Index ncols() const
Returns the number of columns.
Definition: matpackIII.h:150
GriddedField4::GriddedField4
GriddedField4()
Construct an empty GriddedField4.
Definition: gridded_fields.h:343
ArrayOfGriddedField1
Array< GriddedField1 > ArrayOfGriddedField1
Definition: gridded_fields.h:531
GriddedField1::checksize
bool checksize() const final
Consistency check.
Definition: gridded_fields.h:204
GriddedField1
Definition: gridded_fields.h:196
GriddedField::~GriddedField
virtual ~GriddedField()
GriddedField virtual destructor.
Definition: gridded_fields.h:191
GriddedField::operator<<
friend std::ostream & operator<<(std::ostream &os, const GriddedField &gf)
GriddedField4::operator<<
friend std::ostream & operator<<(std::ostream &os, const GriddedField4 &gf)
GriddedField1::resize
void resize(const GriddedField1 &gf)
Make this GriddedField1 the same size as the given one.
Definition: gridded_fields.h:226
GriddedField3::checksize
bool checksize() const final
Consistency check.
Definition: gridded_fields.h:298
ArrayOfArrayOfGriddedField3
Array< Array< GriddedField3 > > ArrayOfArrayOfGriddedField3
Definition: gridded_fields.h:538
ArrayOfGriddedField2
Array< GriddedField2 > ArrayOfGriddedField2
Definition: gridded_fields.h:532
Index
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
GriddedField::get_grid_name
const String & get_grid_name(Index i) const
Get grid name.
Definition: gridded_fields.h:109
GriddedField5::GriddedField5
GriddedField5()
Construct an empty GriddedField5.
Definition: gridded_fields.h:398
Tensor6
The Tensor6 class.
Definition: matpackVI.h:1088
GriddedField4::data
Tensor4 data
Definition: gridded_fields.h:392
GriddedField5::resize
void resize(const GriddedField5 &gf)
Make this GriddedField5 the same size as the given one.
Definition: gridded_fields.h:436
Vector
The Vector class.
Definition: matpackI.h:860
ArrayOfArrayOfGriddedField2
Array< Array< GriddedField2 > > ArrayOfArrayOfGriddedField2
Definition: gridded_fields.h:537
GriddedField6::resize
void resize(Index v, Index s, Index b, Index p, Index r, Index c)
Resize the data tensor.
Definition: gridded_fields.h:510
GriddedField5
Definition: gridded_fields.h:395
ArrayOfArrayOfGriddedField1
Array< Array< GriddedField1 > > ArrayOfArrayOfGriddedField1
Definition: gridded_fields.h:536
Array::nelem
Index nelem() const
Number of elements.
Definition: array.h:195
ConstTensor6View::ncols
Index ncols() const
Returns the number of columns.
Definition: matpackVI.cc:57
matpackVI.h
mystring.h
This file contains the definition of String, the ARTS string class.
GriddedField2::resize
void resize(const GriddedField2 &gf)
Make this GriddedField2 the same size as the given one.
Definition: gridded_fields.h:271
GriddedField4::checksize_strict
void checksize_strict() const final
Strict consistency check.
Definition: gridded_fields.h:359