GMS:Importing MODFLOW Files: Difference between revisions
From XMS Wiki
Jump to navigationJump to search
No edit summary |
|||
(47 intermediate revisions by 8 users not shown) | |||
Line 1: | Line 1: | ||
{{MODFLOW Links}} | {{MODFLOW Links}} | ||
GMS imports standard MODFLOW 88, 96, 2000, 2005<ref name="GMS8">Supported starting at GMS version 8.0</ref>, | GMS imports standard MODFLOW 88, 96, 2000, 2005<ref name="GMS8">Supported starting at GMS version 8.0</ref>, MODFLOW-NWT<ref name="GMS8.2">Supported starting at GMS version 8.2</ref>, MODFLOW-LGR, and MODFLOW-USG files. GMS supports saving of MODFLOW 2000, 2005, and MODFLOW-NWT so other versions will be converted to MODFLOW 2000, 2005, or NWT. MODFLOW 88 and 96 files will be automatically translated when imported, and will not use the [[#MODFLOW Translator dialog|''MODFLOW Translator'' dialog]]. | ||
If GMS created the MODFLOW simulation then | If GMS created the MODFLOW simulation then open the corresponding GMS project file (*.gpr). If there is no GMS project file, import the MODFLOW simulation into GMS as described below. GMS will create a new copy of the imported MODFLOW simulation in its own modified MODFLOW file format. See [[GMS:MODFLOW with HDF5|MODFLOW with HDF5]] for more information on the modified MODFLOW file format. | ||
Native MODFLOW files (ascii/text) can be exported from GMS. | Native MODFLOW files (ascii/text) can be exported from GMS. See [[GMS:MODFLOW_with_HDF5#Exporting_Native_MODFLOW_Files|Exporting Native MODFLOW Files]] for more information on exporting MODFLOW files. | ||
==How to import a MODFLOW model into GMS== | ==How to import a MODFLOW model into GMS== | ||
Follow these steps when importing a MODFLOW simulation into GMS. | |||
# Were the MODFLOW files created by GMS? | # Were the MODFLOW files created by GMS? | ||
#* Yes | #* Yes | ||
#*: If the files were created by GMS, and | #*: If the files were created by GMS, and the user has the GMS project file (.gpr), read that into GMS using the standard ''File'' | '''Open''' command. If the user doesn't have the *.gpr file, import the MODFLOW model into GMS by opening the "super file" (*.mfs) using the standard ''File'' | '''Open''' command. The super file is a non-standard file that GMS creates along with the standard MODFLOW files. If the user doesn't have a super file, proceed to step 2 below. | ||
#* No | #* No | ||
#*: Proceed to step 2 below. | #*: Proceed to step 2 below. | ||
#* Don't know | #* Don't know | ||
#*: If | #*: If the user has a *.gpr file or a *.mfs file, then it's almost certain that the files were created by GMS. If the user doesn't have these files, proceed to step 2 below. | ||
# Determine whether | # Determine whether the model is MODFLOW 88, 96 or 2000. If unsure, refer to the section below entitled [[GMS:Importing MODFLOW Files#Determining the MODFLOW version|Determining the MODFLOW version]] which describes each one. | ||
#* MODFLOW 88 | #* MODFLOW 88 | ||
#*: Read the basic package file into GMS (using the standard ''File|Open'' dialog). GMS will attempt to import all the other files. | #*: Read the basic package file into GMS (using the standard ''File'' | '''Open''' dialog). GMS will attempt to import all the other files. | ||
#* MODFLOW 96 | #* MODFLOW 96 | ||
#*: Read the name file. | #*: Read the name file. | ||
Line 28: | Line 28: | ||
#* MODFLOW-NWT | #* MODFLOW-NWT | ||
#*: Read the name file. | #*: Read the name file. | ||
#* MODFLOW-LGR | |||
#*: Read the *.lgr file. | |||
#* MODFLOW-USG | |||
:::Read the name file. Note: For GMS to import the native MODFLOW-USG files a [[GMS:GSF_File_Format|*.gsf file]] (Grid Specification File) or a *.vtu file (VTK unstructured grid file) must exist to define the grid used with the MODFLOW simulation because the native MODFLOW-USG files do not include locations of the grid nodes, [https://answers.usgs.gov/ unfortunately]. | |||
===MODFLOW Translator dialog=== | |||
[[File:GMS MODFLOW Translator dialog.png|thumb|right|The ''MODFLOW Translator'' dialog.]] | |||
When importing a MODFLOW file into GMS, the ''MODFLOW Translator'' dialog may appear. If the MODFLOW file was not created in GMS 6.5 or later, the file must be translated into a format fully compatible with all of GMS' features and tools. GMS copies the file before performing the translation, so the original file is not changed by this translation process. | |||
Select from the list of MODFLOW version so the translator knows how to interpret the file. The versions currently supported within the dialog are: | |||
*MODFLOW 2000 | |||
*MODFLOW 2005 | |||
*MODFLOW-NWT | |||
*MODFLOW-LGR | |||
*MODFLOW-USG | |||
===Troubleshooting=== | ===Troubleshooting=== | ||
If | If having trouble reading the files into GMS, first verify that MODFLOW can read the files by launching MODFLOW at a command prompt and giving it the name of the file to read. If MODFLOW can read the files but GMS cannot, it may be because the package is not support by GMS; see [[GMS:MODFLOW Packages Supported in GMS|MODFLOW Packages Supported in GMS]] for more information. | ||
Contact [http://www.aquaveo.com/technical-support/ tech support] for additional help. | Contact [http://www.aquaveo.com/technical-support/ tech support] for additional help. | ||
Line 52: | Line 68: | ||
For a MODFLOW 88 file the third line of the basic package file will include an IUNIT array with 24 slots. There may also be an IUNIT array with only 12 slots, if so just ok the warning GMS gives. These slots include the unit numbers for packages included in the file. Every number must be unique to its package. If the number does not correspond to a file then the file is an external array which must be matched by the user. If the basic package file includes an IUNIT array as described it is a MODFLOW 88 file. | For a MODFLOW 88 file the third line of the basic package file will include an IUNIT array with 24 slots. There may also be an IUNIT array with only 12 slots, if so just ok the warning GMS gives. These slots include the unit numbers for packages included in the file. Every number must be unique to its package. If the number does not correspond to a file then the file is an external array which must be matched by the user. If the basic package file includes an IUNIT array as described it is a MODFLOW 88 file. | ||
To import the MODFLOW 88 file locate the *.mfs file. If there is no *.mfs file then select the *.bas file. Then simply use the ''''' | To import the MODFLOW 88 file locate the *.mfs file. If there is no *.mfs file then select the *.bas file. Then simply use the ''File'' | '''Open''' command to read the file into GMS. | ||
====More about MODFLOW 88 files==== | ====More about MODFLOW 88 files==== | ||
Line 59: | Line 75: | ||
GMS makes a few assumptions when reading in MODFLOW 88 files: | GMS makes a few assumptions when reading in MODFLOW 88 files: | ||
#All files must have the same prefix. | #All files must have the same prefix. | ||
# | #*Example: If the files are named bas.dat, drain.dat, and river.dat they all must be converted to run1.bas, run1.drn, and run1.riv | ||
#All files use the standard GMS suffixes as shown in the table below. | #All files use the standard GMS suffixes as shown in the table below. | ||
# | #*If these are not the suffixes in use, the user will need to rename the files. | ||
#IUNIT slots must be standard with standard ID #'s according to MODFLOW documentation. | #IUNIT slots must be standard with standard ID #'s according to MODFLOW documentation. | ||
#It is up to the user to know what external arrays go to which MODFLOW files. Otherwise the files will not be properly read in. | #It is up to the user to know what external arrays go to which MODFLOW files. Otherwise the files will not be properly read in. | ||
# | #*GMS can import external arrays but is unable to import external binary arrays | ||
#MODFLOW 88 files use a fixed format. | #MODFLOW 88 files use a fixed format. | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 122: | Line 137: | ||
If the basic package file says FREE as described it is a MODFLOW 96 file. A name file (typically with a *.mfn or *.nam extension) should also exist. If one does not it must be created as described below. | If the basic package file says FREE as described it is a MODFLOW 96 file. A name file (typically with a *.mfn or *.nam extension) should also exist. If one does not it must be created as described below. | ||
To open a MODFLOW 96 file locate the name file and use the ''''' | To open a MODFLOW 96 file locate the name file and use the ''File'' | '''Open''' command to read the file into GMS. | ||
====More about MODFLOW 96 files==== | ====More about MODFLOW 96 files==== | ||
Line 141: | Line 156: | ||
===MODFLOW 2000, 2005<ref name="GMS8"/>, & MODFLOW-NWT<ref name="GMS8.2"/>=== | ===MODFLOW 2000, 2005<ref name="GMS8"/>, & MODFLOW-NWT<ref name="GMS8.2"/>=== | ||
Like the MODFLOW 96 files, MODFLOW 2000, 2005 and MODFLOW-NWT use name files rather than an IUNIT array. To know if a file is a MODFLOW 2000, 2005, or MODFLOW-NWT file look for a discretization file (*.dis). If a *.dis file exists then | Like the MODFLOW 96 files, MODFLOW 2000, 2005 and MODFLOW-NWT use name files rather than an IUNIT array. To know if a file is a MODFLOW 2000, 2005, or MODFLOW-NWT file look for a discretization file (*.dis). If a *.dis file exists then it is a 2000, 2005 or NWT model (though it may not specify), so the ''File'' | '''Open''' command is used and the name file (*.nam or *.mfn) is selected and read into GMS. | ||
Sample *.mfn file: | Sample *.mfn file: | ||
Line 175: | Line 190: | ||
==Changes in GMS 7.0== | ==Changes in GMS 7.0== | ||
When GMS 7.0 or later reads a MODFLOW simulation it checks if the simulation files are in the modified GMS format. MODFLOW files created by GMS 6.5 or a later use this format. If the simulation is not in the GMS format then GMS converts it into this format. | When GMS 7.0 or later reads a MODFLOW simulation it checks if the simulation files are in the modified GMS format. MODFLOW files created by GMS 6.5 or a later use this format. If the simulation is not in the GMS format then GMS converts it into this format. | ||
Line 182: | Line 196: | ||
===Conversion Steps=== | ===Conversion Steps=== | ||
Depending on the version of | Depending on the version of the model, GMS will perform all or some of the following steps to convert the model into the standard GMS format. | ||
# '''Convert MODFLOW 88 to MODFLOW 96'''. If importing a MODFLOW 88 model, GMS creates a MODFLOW 96 Name file by examining the Basic package file or the GMS super file. The name file is put in the same directory where the Basic package file or super file is found. In creating the MODFLOW 96 name file, GMS assumes the unit numbers in the IUNIT array in the Basic package file are ordered according to the standard MODFLOW 88 order (as found in the MODFLOW 88 source code). GMS uses the lowest unit number not used in the IUNIT array for the List file added to the name file. If external arrays are being used, the unit number GMS uses for the List file may be the same as one used for an external array. | # '''Convert MODFLOW 88 to MODFLOW 96'''. If importing a MODFLOW 88 model, GMS creates a MODFLOW 96 Name file by examining the Basic package file or the GMS super file. The name file is put in the same directory where the Basic package file or super file is found. In creating the MODFLOW 96 name file, GMS assumes the unit numbers in the IUNIT array in the Basic package file are ordered according to the standard MODFLOW 88 order (as found in the MODFLOW 88 source code). GMS uses the lowest unit number not used in the IUNIT array for the List file added to the name file. If external arrays are being used, the unit number GMS uses for the List file may be the same as one used for an external array. | ||
Line 197: | Line 211: | ||
When mf96to2k.exe converts a MODFLOW 88/96 model it also asks the user if a layer confining bed exists beneath each of the grid layers. When mf96to2k.exe is run by GMS no confining beds will be defined beneath the model layer. If the user wishes to include confining beds these can be edited in the ''Global/Basic'' dialog under the ''MODFLOW'' menu. | When mf96to2k.exe converts a MODFLOW 88/96 model it also asks the user if a layer confining bed exists beneath each of the grid layers. When mf96to2k.exe is run by GMS no confining beds will be defined beneath the model layer. If the user wishes to include confining beds these can be edited in the ''Global/Basic'' dialog under the ''MODFLOW'' menu. | ||
==Files | ==Unsupported Packages== | ||
When a simulation with unsupported package files is imported into GMS the associated package file is copied from the old simulation folder to the new project simulation folder. Once imported into GMS unsupported package files can be edited or removed using the [[GMS:MODFLOW Name File Dialog| ''Name File'' dialog]]. If there are associated package files that contain package data using the ''EXTERNAL'' or ''OPEN/CLOSE'' keywords, they will need to be manually copied to the project's MODFLOW folder once the project is saved. | |||
==Files Generated by Other Software== | |||
Other software such as Groundwater Vistas, Visual MODFLOW, and PM Win use their own file formats. However they do write out native MODFLOW files which GMS can read in. To use them make sure that the other software is saving out the files properly and then follow the steps above for the proper version of MODFLOW files. | Other software such as Groundwater Vistas, Visual MODFLOW, and PM Win use their own file formats. However they do write out native MODFLOW files which GMS can read in. To use them make sure that the other software is saving out the files properly and then follow the steps above for the proper version of MODFLOW files. | ||
Line 205: | Line 222: | ||
#Open the simulation in Groundwater Vistas | #Open the simulation in Groundwater Vistas | ||
##Select | ##Select ''File'' | '''Open''' | ||
##Navigate to and select the “*.gwv” file, then select “Open” | ##Navigate to and select the “*.gwv” file, then select “Open” | ||
#Export the native MODFLOW files from Groundwater Vistas | #Export the native MODFLOW files from Groundwater Vistas | ||
##Select | ##Select ''Model | MODFLOW (or MODFLOW 2000)'' | '''Create Datasets''' | ||
#Import the name file into GMS | #Import the name file into GMS | ||
##Select | ##Select ''File'' |''' Open''', the '''Open''' macro, or just drag and drop the *.nam file in the GMS main screen. | ||
===PM Win=== | ===PM Win=== | ||
#Select ''Models | MODFLOW'' | '''Run''' | |||
#Prior to MODFLOW running the model inputs will be generated. | |||
===Visual MODFLOW=== | ===Visual MODFLOW=== | ||
Visual MODFLOW files can not be read into GMS. To use Visual MODFLOW files, | Visual MODFLOW files can not be read into GMS. To use Visual MODFLOW files, the user will need to run MODFLOW from within Visual MODFLOW, and then modify the *.mfi file. See below for details. | ||
#Run MODFLOW from Visual MODFLOW | #Run MODFLOW from Visual MODFLOW | ||
##Open the Visual MODFLOW project (vmf file if using the latest version of Visual MODFLOW) in Visual MODFLOW | ##Open the Visual MODFLOW project (vmf file if using the latest version of Visual MODFLOW) in Visual MODFLOW | ||
##Select | ##Select '''Run''' in the top menu | ||
##Select | ##Select '''Run''' again from the top menu | ||
##Select | ##Select ''MODFLOW 2000'' in the ''Engines to Run'' dialog, then select ''Translate & Run'' | ||
##Select the | ##Select the '''Close''' button in the ''VMEngine'' window when the model is finished running | ||
#Modify and rename the “*.mfi” file | #Modify and rename the “*.mfi” file | ||
##Go to the directory where the simulation is saved on | ##Go to the directory where the simulation is saved on the computer | ||
##Create a copy of the “*.mfi” file. Change the extension of the copy to “*.mfn” | ##Create a copy of the “*.mfi” file. Change the extension of the copy to “*.mfn” | ||
##Open the *.mfn file in a text editor | ##Open the *.mfn file in a text editor | ||
##Comment out packages that are not supported by the USGS release of MODFLOW (for example, the “WHS” and “NDC” lines)^ | ##Comment out packages that are not supported by the USGS release of MODFLOW (for example, the “WHS” and “NDC” lines)^ | ||
##If necessary, modify the directory that each MODFLOW file is referencing. This is necessary if the Visual MODFLOW files were not created on the computer | ##If necessary, modify the directory that each MODFLOW file is referencing. This is necessary if the Visual MODFLOW files were not created on the computer being used | ||
##Save the *.mfn file | ##Save the *.mfn file | ||
#Open the *.mfn file in GMS | #Open the *.mfn file in GMS | ||
##Select | ##Select ''File'' | '''Open''', the '''Open''' macro, or just drag and drop the *.mfn file in the GMS main screen | ||
##The | ##The ''MODFLOW Translator'' will most likely appear. Select '''OK''' after selecting the appropriate version of MODFLOW | ||
##Select “Done” when the MODFLOW Translator is finished | ##Select “Done” when the ''MODFLOW Translator'' is finished | ||
##A dialog will appear saying that a supported solver was not found in the name file and that the PCG solver has been added. This is because the solver that Visual MODFLOW uses is not compatible with the USGS version of MODFLOW, and so GMS does not use it either. Select | ##A dialog will appear saying that a supported solver was not found in the name file and that the PCG solver has been added. This is because the solver that Visual MODFLOW uses is not compatible with the USGS version of MODFLOW, and so GMS does not use it either. Select '''OK''' | ||
^Note: to comment out a package, place a pound/number sign in front of a line. See the [http://water.usgs.gov/nrp/gwsoftware/modflow2000/MFDOC/index.html?introduction.htm Online Guide to MODFLOW] for packages that the USGS version of MODFLOW supports. | :^Note: to comment out a package, place a pound/number sign in front of a line. See the [http://water.usgs.gov/nrp/gwsoftware/modflow2000/MFDOC/index.html?introduction.htm Online Guide to MODFLOW] for packages that the USGS version of MODFLOW supports. | ||
==USGS MODFLOW Documentation== | ==USGS MODFLOW Documentation== | ||
Line 254: | Line 274: | ||
| MODFLOW-NWT | | MODFLOW-NWT | ||
| [http://gmsdocs.aquaveo.com/MF_NWT.pdf MODFLOW-NWT, A Newton Formulation for MODFLOW-2005] | | [http://gmsdocs.aquaveo.com/MF_NWT.pdf MODFLOW-NWT, A Newton Formulation for MODFLOW-2005] | ||
|- | |||
| MODFLOW-LGR | |||
|[http://gmsdocs.aquaveo.com/MF-LGR.pdf MODFLOW-LGR], [http://gmsdocs.aquaveo.com/MF-LGR-mult.pdf MODFLOW-LGR Multiple Refined Areas], [http://gmsdocs.aquaveo.com/MF-LGR-SFR.pdf MODFLOW-LGR with SFR] | |||
|- | |||
| MODFLOW-USG | |||
|[http://gmsdocs.aquaveo.com/tm6-A45.pdf MODFLOW-USG], [http://gmsdocs.aquaveo.com/mfusg_io_v_1_0.pdf MODFLOW-USG I/O], [http://gmsdocs.aquaveo.com/zonbudusg.pdf ZONBUDUSG] | |||
|} | |} | ||
Line 261: | Line 287: | ||
{{Navbox GMS}} | {{Navbox GMS}} | ||
[[Category:MODFLOW]] | [[Category:MODFLOW]] | ||
[[Category:Importing Data]] | [[Category:Importing Data|Mod]] | ||
[[Category:External Links]] |