GMS:MODFLOW with HDF5: Difference between revisions
From XMS Wiki
Jump to navigationJump to search
(→Advantages to HDF5: library) |
(→Changes to MODFLOW 2000 & 2005 Code: rm big from headers) |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 19: | Line 19: | ||
In one example a river file that was 437 MB was saved to HDF5 format with a compression level of 1; the resulting file was 14 MB. In another example an HDF5 file that contained drain and general head data was 8 MB while the drain file was 253 MB and the general head 141 MB. Not only do the files compress extremely well but the read/write times for the HDF5 file are much faster than the ASCII files. | In one example a river file that was 437 MB was saved to HDF5 format with a compression level of 1; the resulting file was 14 MB. In another example an HDF5 file that contained drain and general head data was 8 MB while the drain file was 253 MB and the general head 141 MB. Not only do the files compress extremely well but the read/write times for the HDF5 file are much faster than the ASCII files. | ||
==Changes to MODFLOW 2000 & 2005 | ==Changes to MODFLOW 2000 & 2005 Code== | ||
The following subroutines in ult6.f were modified: U2DREL, U2DINT, and ULSTRD. The stream package reading routines were also modified in the str6.f file. | The following subroutines in ult6.f were modified:<ref name="GMS8"/> U2DREL, U2DINT, and ULSTRD. The stream package reading routines were also modified in the str6.f file. | ||
=== | ===ult.f Modifications=== | ||
U2DREL and U2DINT were modified so that if the key word HDF5 was encountered when attempting to read an array then an external procedure is called to read in the data. We have added support for the following: | U2DREL and U2DINT were modified so that if the key word HDF5 was encountered when attempting to read an array then an external procedure is called to read in the data. We have added support for the following: | ||
Line 122: | Line 122: | ||
|} | |} | ||
=== | ===str6.f Modifications=== | ||
Since the STR package does not use the ULSTRD utility the str6.f file had to be modified to read the same data that ULSTRD was modified to read: '''GMS_HDF5_01 "FNAME" "pathInFile" SP'''. | Since the STR package does not use the ULSTRD utility the str6.f file had to be modified to read the same data that ULSTRD was modified to read: '''GMS_HDF5_01 "FNAME" "pathInFile" SP'''. | ||
Line 130: | Line 130: | ||
In previous versions of GMS, [[GMS:Pilot Points|pilot points]] were supported by using the multiplier arrays in MODFLOW. Beginning with version 6.5 the pilot point interpolation takes place with in our external routine that is called by MODFLOW. For example, if MODFLOW calls our routine to read an HK array and that array has parameter ''key'' values that are associated with a parameter that is defined using pilot points then our routine will perform the pilot point interpolation and substitute the appropriate value. This includes any log interpolation that the user has specified. | In previous versions of GMS, [[GMS:Pilot Points|pilot points]] were supported by using the multiplier arrays in MODFLOW. Beginning with version 6.5 the pilot point interpolation takes place with in our external routine that is called by MODFLOW. For example, if MODFLOW calls our routine to read an HK array and that array has parameter ''key'' values that are associated with a parameter that is defined using pilot points then our routine will perform the pilot point interpolation and substitute the appropriate value. This includes any log interpolation that the user has specified. | ||
==Reading MODFLOW | ==Reading MODFLOW Files which Include HDF5 Data== | ||
When GMS writes out the MODFLOW files for the list based packages, the first item written to the file is #GMS_HDF5_01. When GMS reads these MODFLOW files with this special comment, it does not read any more of the package file and the data from the *.h5 file will be used. | When GMS writes out the MODFLOW files for the list based packages, the first item written to the file is #GMS_HDF5_01. When GMS reads these MODFLOW files with this special comment, it does not read any more of the package file and the data from the *.h5 file will be used. | ||
When GMS saves the RCH or EVT package with parameter that are defined with cluster (and instances). Then a different special comment is written to the top of the file: #GMS_PARAM_CLUSTERS. If GMS is reading a project file that includes a MODFLOW simulation then when this special comment is encountered GMS will not read any more of the package file. However, if a user is reading a MODFLOW model (not a project file) then the rest of this package file will be read and new datasets will be created on the 3D grid that are used to define the clusters used by the parameters. | When GMS saves the RCH or EVT package with parameter that are defined with cluster (and instances). Then a different special comment is written to the top of the file: #GMS_PARAM_CLUSTERS. If GMS is reading a project file that includes a MODFLOW simulation then when this special comment is encountered GMS will not read any more of the package file. However, if a user is reading a MODFLOW model (not a project file) then the rest of this package file will be read and new datasets will be created on the 3D grid that are used to define the clusters used by the parameters. | ||
==Exporting Native MODFLOW Files== | ==Exporting Native MODFLOW Files== | ||
Line 157: | Line 157: | ||
==External links== | ==External links== | ||
*More information about [ | *More information about [https://portal.hdfgroup.org/display/knowledge/What+is+HDF5 HDF5] | ||