Go to the documentation of this file.
33 #ifndef gridded_fields_h
34 #define gridded_fields_h
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"
211 std::ostringstream os;
212 os <<
"GriddedField1 ";
220 throw std::runtime_error(os.str());
254 std::ostringstream os;
255 os <<
"GriddedField2 ";
258 for (
Index i = 0; i < 2; i++) {
265 throw std::runtime_error(os.str());
309 std::ostringstream os;
310 os <<
"GriddedField3 ";
313 for (
Index i = 0; i < 3; i++) {
321 throw std::runtime_error(os.str());
361 std::ostringstream os;
362 os <<
"GriddedField4 ";
365 for (
Index i = 0; i < 4; i++) {
373 throw std::runtime_error(os.str());
418 std::ostringstream os;
419 os <<
"GriddedField5 ";
422 for (
Index i = 0; i < 5; i++) {
430 throw std::runtime_error(os.str());
480 std::ostringstream os;
481 os <<
"GriddedField6 ";
484 for (
Index i = 0; i < 5; i++) {
493 throw std::runtime_error(os.str());
540 #undef CHECK_ERROR_BOILERPLATE
Array< GriddedField5 > ArrayOfGriddedField5
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.
bool checksize() const final
Consistency check.
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.
bool checksize() const final
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
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.
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
void checksize_strict() const final
Strict 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.
void checksize_strict() const final
Strict consistency check.
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.
Index nelem(const Lines &l)
Number of lines.
Index nvitrines() const
Returns the number of vitrines.
GriddedField()
Construct an empty GriddedField.
const Vector & get_numeric_grid(Index i) const
Get a numeric grid.
void resize(Index s, Index b, Index p, Index r, Index c)
Resize function.
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.
#define CHECK_ERROR_BOILERPLATE
void checksize_strict() const final
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.
void resize(Index r, Index c)
Resize function.
Index nrows() const
Returns the number of rows.
bool checksize() const final
Consistency check.
Index nbooks() const
Returns the number of books.
bool checksize() const final
Consistency check.
Index nrows() const
Returns the number of rows.
void checksize_strict() const final
Strict 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)
GriddedField1()
Construct an empty GriddedField1.
void checksize_strict() const final
Strict consistency check.
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
bool checksize() const final
Consistency check.
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.
bool checksize() const final
Consistency check.
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.
void resize(const GriddedField5 &gf)
Make this GriddedField5 the same size as the given one.
Array< Array< GriddedField2 > > ArrayOfArrayOfGriddedField2
void resize(Index v, Index s, Index b, Index p, Index r, Index c)
Resize the data tensor.
Array< Array< GriddedField1 > > ArrayOfArrayOfGriddedField1
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.
void checksize_strict() const final
Strict consistency check.