![]() |
MODFLOW 6 version 6.9.0.dev0
USGS Modular Hydrologic Model
|

Public Member Functions | |
| procedure, public | initialize (this, iu) |
| Initialize the grid file reader. | |
| procedure, public | finalize (this) |
| Finalize the grid file reader. | |
| procedure, public | has_variable (this, name) |
| Check whether the grid file contains a variable. | |
| procedure, public | read_int (this, name) |
| Read an integer scalar from a grid file. | |
| procedure, public | read_dbl (this, name) |
| Read a double precision scalar from a grid file. | |
| procedure, public | read_grid_shape (this) |
| Read the grid shape from a grid file. | |
| procedure, public | read_int_1d (this, name) |
| Read a 1D integer array from a grid file. | |
| procedure, public | read_dbl_1d (this, name) |
| Read a 1D double array from a grid file. | |
| procedure, public | read_charstr (this, name) |
| Read a character string from a grid file. | |
| procedure, public | read_int_1d_into (this, name, v) |
| Read a 1D integer array into a preallocated array. | |
| procedure, public | read_dbl_1d_into (this, name, v) |
| Read a 1D double array into a preallocated array. | |
| procedure, public | read_charstr_into (this, name, charstr) |
| Read a character string into a preallocated string. | |
Public Attributes | |
| integer(i4b), public | inunit |
| file unit | |
| character(len=10), public | grid_type |
| DIS, DISV, DISU, etc. | |
| integer(i4b), public | version |
| binary grid file format version | |
| integer(i4b) | ntxt |
| number of variables | |
| integer(i4b) | lentxt |
| header line length per variable | |
| type(hashtabletype), pointer | idx |
| map variable name to variable index | |
| character(len=10), dimension(:), allocatable, public | names |
| variable names | |
| integer(i4b), dimension(:), allocatable | ndims |
| variable number of dims | |
| integer(i4b), dimension(:), allocatable | typs |
| variable type (TYP_INT, TYP_DBL, TYP_CHR) | |
| integer(i4b), dimension(:), allocatable | shp_start |
| variable shape start in shp | |
| integer(i8b), dimension(:), allocatable | pos |
| variable position in file | |
| integer(i4b), dimension(:), allocatable | shp |
| flat array of variable shapes | |
Private Member Functions | |
| procedure, private | read_header (this) |
| Read the file's self-describing header. Internal use only. | |
| procedure, private | read_header_meta (this) |
| Read self-describing metadata (first four lines). Internal use only. | |
| procedure, private | read_header_body (this) |
| Read the header body section (text following first. | |
| procedure, private | lookup (this, name, ndim, typ, desc) |
| Look up a variable and check its rank and type. | |
Definition at line 19 of file GridFileReader.f90.
| procedure, public gridfilereadermodule::gridfilereadertype::finalize | ( | class(gridfilereadertype) | this | ) |
Definition at line 37 of file GridFileReader.f90.
| procedure, public gridfilereadermodule::gridfilereadertype::has_variable | ( | class(gridfilereadertype) | this, |
| character(len=*), intent(in) | name ) |
Definition at line 38 of file GridFileReader.f90.
| procedure, public gridfilereadermodule::gridfilereadertype::initialize | ( | class(gridfilereadertype) | this, |
| integer(i4b), intent(in) | iu ) |
Definition at line 36 of file GridFileReader.f90.
|
private |
Returns the variable's index. Terminates with an error if the variable does not exist or does not have the expected rank and type. Internal use only.
| [in] | ndim | expected number of dims |
| [in] | typ | expected type |
| [in] | desc | expected kind, for error messages |
Definition at line 43 of file GridFileReader.f90.
| procedure, public gridfilereadermodule::gridfilereadertype::read_charstr | ( | class(gridfilereadertype), intent(inout) | this, |
| character(len=*), intent(in) | name ) |
Allocates and returns a new character string containing the data.
Definition at line 51 of file GridFileReader.f90.
| procedure, public gridfilereadermodule::gridfilereadertype::read_charstr_into | ( | class(gridfilereadertype), intent(inout) | this, |
| character(len=*), intent(in) | name, | ||
| character(len=:), intent(inout), allocatable | charstr ) |
Populates a preallocated character string. If the string is not allocated or is the wrong length, it will be (re)allocated to the correct length.
Definition at line 55 of file GridFileReader.f90.
| procedure, public gridfilereadermodule::gridfilereadertype::read_dbl | ( | class(gridfilereadertype), intent(inout) | this, |
| character(len=*), intent(in) | name ) |
Definition at line 46 of file GridFileReader.f90.
| procedure, public gridfilereadermodule::gridfilereadertype::read_dbl_1d | ( | class(gridfilereadertype), intent(inout) | this, |
| character(len=*), intent(in) | name ) |
Allocates and returns a new array containing the data.
Definition at line 50 of file GridFileReader.f90.
| procedure, public gridfilereadermodule::gridfilereadertype::read_dbl_1d_into | ( | class(gridfilereadertype), intent(inout) | this, |
| character(len=*), intent(in) | name, | ||
| real(dp), dimension(:), intent(inout) | v ) |
Populates a preallocated array. Array must already be allocated to the correct size. This version is compatible with both allocatable arrays and memory-manager-allocated pointer targets.
Definition at line 54 of file GridFileReader.f90.
| procedure, public gridfilereadermodule::gridfilereadertype::read_grid_shape | ( | class(gridfilereadertype) | this | ) |
Definition at line 47 of file GridFileReader.f90.
|
private |
Definition at line 40 of file GridFileReader.f90.
|
private |
Definition at line 42 of file GridFileReader.f90.
|
private |
Definition at line 41 of file GridFileReader.f90.
| procedure, public gridfilereadermodule::gridfilereadertype::read_int | ( | class(gridfilereadertype), intent(inout) | this, |
| character(len=*), intent(in) | name ) |
Definition at line 45 of file GridFileReader.f90.
| procedure, public gridfilereadermodule::gridfilereadertype::read_int_1d | ( | class(gridfilereadertype), intent(inout) | this, |
| character(len=*), intent(in) | name ) |
Allocates and returns a new array containing the data.
Definition at line 49 of file GridFileReader.f90.
| procedure, public gridfilereadermodule::gridfilereadertype::read_int_1d_into | ( | class(gridfilereadertype), intent(inout) | this, |
| character(len=*), intent(in) | name, | ||
| integer(i4b), dimension(:), intent(inout) | v ) |
Populates a preallocated array. Array must already be allocated to the correct size. This version is compatible with both allocatable arrays and memory-manager-allocated pointer targets.
Definition at line 53 of file GridFileReader.f90.
| character(len=10), public gridfilereadermodule::gridfilereadertype::grid_type |
Definition at line 23 of file GridFileReader.f90.
| type(hashtabletype), pointer gridfilereadermodule::gridfilereadertype::idx |
Definition at line 28 of file GridFileReader.f90.
| integer(i4b), public gridfilereadermodule::gridfilereadertype::inunit |
Definition at line 21 of file GridFileReader.f90.
| integer(i4b) gridfilereadermodule::gridfilereadertype::lentxt |
Definition at line 26 of file GridFileReader.f90.
| character(len=10), dimension(:), allocatable, public gridfilereadermodule::gridfilereadertype::names |
Definition at line 29 of file GridFileReader.f90.
| integer(i4b), dimension(:), allocatable gridfilereadermodule::gridfilereadertype::ndims |
Definition at line 30 of file GridFileReader.f90.
| integer(i4b) gridfilereadermodule::gridfilereadertype::ntxt |
Definition at line 25 of file GridFileReader.f90.
| integer(i8b), dimension(:), allocatable gridfilereadermodule::gridfilereadertype::pos |
Definition at line 33 of file GridFileReader.f90.
| integer(i4b), dimension(:), allocatable gridfilereadermodule::gridfilereadertype::shp |
Definition at line 34 of file GridFileReader.f90.
| integer(i4b), dimension(:), allocatable gridfilereadermodule::gridfilereadertype::shp_start |
Definition at line 32 of file GridFileReader.f90.
| integer(i4b), dimension(:), allocatable gridfilereadermodule::gridfilereadertype::typs |
Definition at line 31 of file GridFileReader.f90.
| integer(i4b), public gridfilereadermodule::gridfilereadertype::version |
Definition at line 24 of file GridFileReader.f90.