Fields¶
ModelGrid
inherits several useful methods for creating new data
fields and adding new data fields to a ModelGrid
instance. Methods to add or
create a new data array follow the numpy
syntax for creating arrays. The
following methods create and, optionally, initialize new arrays. The size of the
new array is determined by the at keyword, which indicates on which element
the array is defined. Methods with the prefix add_
will add the newly created
field to the grid, otherwise a newly-created array is not added to the grid.
Create and add an uninitialized array of values to the field. |
|
Add an array of values to the field. |
|
Create and add an array of values, initialized to 1, to the field. |
|
Create and add an array of values, initialized to 0, to the field. |
|
Erases an existing field. |
|
Uninitialized array whose size is that of the field. |
|
Array, initialized to 1, whose size is that of the field. |
|
Array, initialized to 0, whose size is that of the field. |
Return the values of a field. |
|
Return field given a field name, or array of with the correct shape. |
Return the size of the arrays stored in a group. |
|
Return the field names in a group. |
|
Check if a group exists. |
|
Check if a field is in a group. |
|
Get units for a field. |
|
Return the values of a field. |
|
List of group names. |