Go to the documentation of this file.
33 #ifndef gridded_fields_h
34 #define gridded_fields_h
49 #define CHECK_ERROR_BOILERPLATE \
50 "size mismatch between grids and data.\n" \
51 "Note that a grid is allowed to be empty, but in the\n" \
52 "data that dimension must have exactly one element.\n"
217 std::ostringstream os;
218 os <<
"GriddedField1 ";
226 throw std::runtime_error(os.str());
270 std::ostringstream os;
271 os <<
"GriddedField2 ";
274 for (
Index i = 0; i < 2; i++)
282 throw std::runtime_error(os.str());
336 std::ostringstream os;
337 os <<
"GriddedField3 ";
340 for (
Index i = 0; i < 3; i++)
348 throw std::runtime_error(os.str());
398 std::ostringstream os;
399 os <<
"GriddedField4 ";
402 for (
Index i = 0; i < 4; i++)
411 throw std::runtime_error(os.str());
464 std::ostringstream os;
465 os <<
"GriddedField5 ";
468 for (
Index i = 0; i < 5; i++)
477 throw std::runtime_error(os.str());
533 std::ostringstream os;
534 os <<
"GriddedField6 ";
537 for (
Index i = 0; i < 5; i++)
546 throw std::runtime_error(os.str());
596 #undef CHECK_ERROR_BOILERPLATE
virtual bool checksize() const
Consistency check.
const ArrayOfString & get_string_grid(Index i) const
Get a string grid.
virtual void checksize_strict() const =0
Strict consistency check.
void set_grid_name(Index i, const String &s)
Set grid name.
void resize(Index b, Index p, Index r, Index c)
Resize function.
void resize(const GriddedField6 &gf)
Make this GriddedField6 the same size as the given one.
void resize(Index n)
Resize the data vector.
Index nshelves() const
Returns the number of shelves.
Index nbooks() const
Returns the number of books.
virtual void checksize_strict() const
Strict consistency check.
void resize(Index s, Index b, Index p, Index r, Index c)
Resize the data tensor.
void resize(Index v, Index s, Index b, Index p, Index r, Index c)
Resize function.
Array< GriddedField3 > ArrayOfGriddedField3
void resize(Index b, Index p, Index r, Index c)
Resize the data tensor.
Array< GridType > mgridtypes
virtual void checksize_strict() const
Strict consistency check.
Index ncols() const
Returns the number of columns.
Index npages() const
Returns the number of pages.
GriddedField2()
Construct an empty GriddedField2.
Array< GridType > ArrayOfGridType
Index nrows() const
Returns the number of rows.
GriddedField3 & operator=(Numeric n)
void resize(Index n)
Resize function.
Index get_dim() const
Get the dimension of this gridded field.
Array< Array< GriddedField1 > > ArrayOfArrayOfGriddedField1
virtual bool checksize() const =0
Consistency check.
GriddedField(const Index d, const String &s)
Construct a GriddedField.
Index nrows() const
Returns the number of rows.
ArrayOfVector mnumericgrids
ConstVectorView get_numeric_grid(Index i) const
Get a numeric grid.
virtual bool checksize() const
Consistency check.
This file contains the definition of Array.
void resize(Index r, Index c)
Resize the data matrix.
GriddedField3(const String &s)
Construct an empty GriddedField3 with the given name.
void resize(Index p, Index r, Index c)
Resize function.
Index npages() const
Returns the number of pages.
friend std::ostream & operator<<(std::ostream &os, const GriddedField5 &gf)
Index npages() const
Returns the number of pages.
GriddedField6(const String &s)
Construct an empty GriddedField6 with the given name.
Index get_grid_size(Index i) const
Get the size of a grid.
GriddedField2(const String &s)
Construct an empty GriddedField2 with the given name.
GridType get_grid_type(Index i) const
Get grid type.
Array< ArrayOfString > mstringgrids
void resize(Index p, Index r, Index c)
Resize the data tensor.
virtual void checksize_strict() const
Strict consistency check.
Index nvitrines() const
Returns the number of vitrines.
GriddedField()
Construct an empty GriddedField.
void resize(Index s, Index b, Index p, Index r, Index c)
Resize function.
virtual void checksize_strict() const
Strict consistency check.
Index ncols() const
Returns the number of columns.
GriddedField5(const String &s)
Construct an empty GriddedField5 with the given name.
Array< GriddedField4 > ArrayOfGriddedField4
Index nelem() const
Returns the number of elements.
virtual void checksize_strict() const
Strict consistency check.
#define CHECK_ERROR_BOILERPLATE
virtual void checksize_strict() const
Strict consistency check.
GriddedField3()
Construct an empty GriddedField3.
Index ncols() const
Returns the number of columns.
std::ostream & operator<<(std::ostream &os, const GriddedField &gf)
Output operator for GriddedField.
friend std::ostream & operator<<(std::ostream &os, const GriddedField1 &gf)
GriddedField4(const String &s)
Construct an empty GriddedField4 with the given name.
NUMERIC Numeric
The type to use for all floating point numbers.
GriddedField1(const String &s)
Construct an empty GriddedField1 with the given name.
Index npages() const
Returns the number of pages.
void copy_grids(const GriddedField &gf)
Copy grids.
void set_name(const String &s)
Set name of this gridded field.
Index nbooks() const
Returns the number of books.
const String & get_name() const
Get the name of this gridded field.
void resize(const GriddedField3 &gf)
Make this GriddedField3 the same size as the given one.
friend std::ostream & operator<<(std::ostream &os, const GriddedField2 &gf)
void resize(const GriddedField4 &gf)
Make this GriddedField4 the same size as the given one.
GriddedField6()
Construct an empty GriddedField6.
Array< Array< GriddedField2 > > ArrayOfArrayOfGriddedField2
void resize(Index r, Index c)
Resize function.
Index nrows() const
Returns the number of rows.
Index nbooks() const
Returns the number of books.
Index nrows() const
Returns the number of rows.
virtual bool checksize() const
Consistency check.
void set_grid(Index i, const Vector &g)
Set a numeric grid.
Index nrows() const
Returns the number of rows.
friend std::ostream & operator<<(std::ostream &os, const GriddedField6 &gf)
virtual bool checksize() const
Consistency check.
GriddedField1()
Construct an empty GriddedField1.
friend std::ostream & operator<<(std::ostream &os, const GriddedField3 &gf)
Index nshelves() const
Returns the number of shelves.
Index ncols() const
Returns the number of columns.
GriddedField4()
Construct an empty GriddedField4.
Array< GriddedField1 > ArrayOfGriddedField1
virtual ~GriddedField()
GriddedField virtual destructor.
friend std::ostream & operator<<(std::ostream &os, const GriddedField &gf)
friend std::ostream & operator<<(std::ostream &os, const GriddedField4 &gf)
void resize(const GriddedField1 &gf)
Make this GriddedField1 the same size as the given one.
Array< Array< GriddedField3 > > ArrayOfArrayOfGriddedField3
Array< GriddedField2 > ArrayOfGriddedField2
INDEX Index
The type to use for all integer numbers and indices.
const String & get_grid_name(Index i) const
Get grid name.
GriddedField5()
Construct an empty GriddedField5.
virtual bool checksize() const
Consistency check.
void resize(const GriddedField5 &gf)
Make this GriddedField5 the same size as the given one.
virtual bool checksize() const
Consistency check.
void resize(Index v, Index s, Index b, Index p, Index r, Index c)
Resize the data tensor.
A constant view of a Vector.
Index nelem() const
Number of elements.
Index ncols() const
Returns the number of columns.
This file contains the definition of String, the ARTS string class.
void resize(const GriddedField2 &gf)
Make this GriddedField2 the same size as the given one.