Mf2005ObsExtractor

  • Scroll to top of this topic Scroll to Top of Page

  • Print the current topic Print Topic

  • No expanding elements on this page Show/Hide Expanders

Mf2005ObsExtractor is a program for extracting simulated values from a variety of MODFLOW-2005 output files at particular times. Ultimately Mf2005ObsExtractor produces an output file consisting of observation names (within quotes) followed by their simulated values or an instruction file for PEST that can be used to read the observation names and values. Mf2005ObsExtractor can also be used with MODFLOW-NWT and other versions of MODFLOW derived from MODFLOW-2005.

The following file types are supported. MNWI output files. Gage package output files for individual streams and lakes, and output files for the Subsidence, SFR, SWI, SUB, SWT, HOB, CHOB, DROB, RVOB, GBOB, and STOB packages.

The following file types are supported:

MNWI output files.

Gage package output files for individual streams and lakes,

output files for the Subsidence, SFR, SWI, SUB, SWT, HOB, CHOB, DROB, RVOB, GBOB, and STOB packages.

The input for Mf2005ObsExtractor consists of two types of files. The first is a name file as in MODFLOW. It contains the names of the listings output file from Mf2005ObsExtractor, the observations output file and one or more observation definition files or observation package output files.

Mf2005ObsExtractor is run from the command line with the name of the name file as a command line parameter. The following are all valid ways of passing the name of the name file to Mf2005ObsExtractor where <filename> is the name of the file. If the file name contains spaces, it must be surrounded by single or double quotation marks.

Mf2005ObsExtractor <filename>

Mf2005ObsExtractor -f <filename>

Mf2005ObsExtractor --file <filename>

MF2005ObsExtractor Name File

The Mf2005ObsExtractor name file lists the input and output files for Mf2005ObsExtractor. Items in square brackets are optional. Items in angled brackets are input variables.

The name file for Mf2005ObsExtractor is specified in blocks. Each block starts with the keyword "Begin" followed by the block name. Each block ends with the keyword "End" followed by the block name. The keywords and block names are not case sensitive. Any line whose first non-whitespace character is "#" will be treated as a comment. Comments are printed to the listing file.

Structure of Blocks

BEGIN OUTPUT_FILES

LIST <filename>

[INSTRUCTION_FILE <filename>]

[OBSERVATIONS_FILE <filename>]

END OUTPUT_FILES

 

BEGIN INPUT_FILES

[<file_type> <filename>]

[MNW2 <filename>]

[LAK <filename>]

[SFR <filename>]

[SUB <filename>]

[SWT <filename>]

[SWI <filename>]

[HOB <filename>]

[CHOB <filename>]

[DROB <filename>]

[RVOB <filename>]

[GBOB <filename>]

[STOB <filename>]

[DERIVED <filename>]

END INPUT_FILES

Explanation of Variables

Block: OUTPUT_FILES

The OUTPUT_FILES block is required.

LIST is a keyword to indicate that the following file name is the listing file for Mf2005ObsExtractor. The listing file provides a record of what Mf2005ObsExtractor has done. The listing file can be useful for helping to find errors in the input for Mf2005ObsExtractor.

<filename> is the name of a file. <filename> may be enclosed in single or double quotation marks.

INSTRUCTION_FILE is an optional keyword to indicate that the following output file will be an instruction file for PEST to read the simulated values from the model. Typically, Mf2005ObsExtractor will be run with INSTRUCTION_FILE after that model has run successfully once but before starting PEST.

OBSERVATIONS_FILE is an optional keyword to indicate that the following output file will contain the extracted values from the model output files. Typically, the PEST command to run the model will contain a command to run Mf2005ObsExtractor with the OBSERVATIONS_FILE keyword.

Block: INPUT_FILES

The INPUT_FILES block is required. All the items in the INPUT_FILES block are optional, but at least one item in the block must be present.

file_type is an optional keyword

MNW2 indicates that the file in the following <filename> defines observations extracted from the output of the MNWI package.

LAK indicates that the file in the following <filename> defines observations related to lakes extracted from the output of the GAGE package.

SFR indicates that the file in the following <filename> defines observations related to streams extracted from the output of the GAGE package.

SUB indicates that the file in the following <filename> defines observations related to subsidence extracted from the output of the SUB package.

SWT indicates that the file in the following <filename> defines observations related to subsidence extracted from the output of the SWT package.

SWI indicates that the file in the following <filename> defines observations related to seawater intrusion extracted from the output of the SWI package.

HOB indicates that the file in the following <filename> is the output file of the HOB package.

CHOB indicates that the file in the following <filename> is the output file of the CHOB package.

DROB indicates that the file in the following <filename> is the output file of the DROB package.

RVOB indicates that the file in the following <filename> is the output file of the RVOB package.

GBOB indicates that the file in the following <filename> is the output file of the GBOB package.

STOB indicates that the file in the following <filename> is the output file of the STOB package.

DERIVED indicates that the file in the following <filename> defines observations derived from previously defined observations.

<filename> is the name of a file. <filename> may be enclosed in single or double quotation marks.

Example

BEGIN OUTPUT_FILES

     LIST DryCells.Mf2005ObsExtInsLst

     INSTRUCTION_FILE DryCells.PestIns

END OUTPUT_FILES

 

BEGIN INPUT_FILES

     DROB DryCells.drob_out

     SFR DryCells.Sfr_script

     HOB DryCells.hob_out

END INPUT_FILES

Observation Definition Files

The input observation definition files for Mf2005ObsExtractor are specified in blocks. Each block starts with the keyword "Begin" followed by the block name. Each block ends with the keyword "End" followed by the block name. The keywords and block names are not case sensitive. Any line whose first non-whitespace character is "#" will be treated as a comment. Comments are printed to the listing file.

Structure of Observation Definition Files

BEGIN OBSERVATIONS

FILENAME <filename>

OBSERVATION  <Observation_name> <Observation_type> <Observation_time> <Observed_value> <Weight> [PRINT|NO_PRINT]

[NUMBER_OF_ZETA_SURFACES <number_of_zeta_surfaces>]

[TOTAL_NUMBER_OF_OBSERVATIONS <number_of_observation_locations_in_SWI_observation_file>]

[SWI_OBS_FORMAT (ASCII | BINARY SINGLE | BINARY DOUBLE)]

OBSERVATION  <Observation_name> <Observation_type> <Observation_time> <Observed_value> <Weight> [PRINT|NO_PRINT]

[ZETA_SURFACE_NUMBER <zeta_surface_number>]

[SWI_OBSERVATION <number> <fraction> <name>]

FILENAME <filename>

OBSERVATION  <Observation_name> <Observation_type> <Observation_time> <Observed_value> <Weight> [PRINT|NO_PRINT]

OBSERVATION  <Observation_name> <Observation_type> <Observation_time> <Observed_value> <Weight> [PRINT|NO_PRINT]

[CELL <layer_or_interbed_system> <row> <column> <cellweight>]

END OBSERVATIONS

 

[BEGIN DERIVED_OBSERVATIONS]

[DIFFERENCE <Observation_name> <Prior_observation_name> <Prior_observation_name>] <Observed value> <Weight> [PRINT|NO_PRINT]

[SUM <Observation_name> <Prior_observation_name1> <Prior_observation_name2> ... <Prior_observation_nameN>] <Observed value> <Weight> [PRINT|NO_PRINT]

[END DERIVED_OBSERVATIONS]

Explanation of Variables

Block: OBSERVATIONS

The OBSERVATIONS block is required in all but the DERIVED input file. The OBSERVATIONS block cannot be included in the DERIVED input file.

FILENAME is a keyword indicating that the filename that follows is the name of an output file containing the data from which simulated values will be extracted. A FILENAME line can be followed by one or more OBSERVATION lines.

<filename> is the name of a file. It may be enclosed in either single or double quotation marks.

NUMBER_OF_ZETA_SURFACES is a keyword indicating that the integer that follows is the number of zeta surfaces defined in the Seawater Intrusion (SWI) package. NUMBER_OF_ZETA_SURFACES can only be used with SWI observation files. NUMBER_OF_ZETA_SURFACES is required for SWI observation files.

<number_of_zeta_surfaces> is the number of zeta surfaces defined in the Seawater Intrusion (SWI) package.

TOTAL_NUMBER_OF_OBSERVATIONS is a keyword indicating that the integer that follows is the number of observation locations in the SWI Observation output file. TOTAL_NUMBER_OF_OBSERVATIONS can only be used with SWI observation files. TOTAL_NUMBER_OF_OBSERVATIONS is required for SWI observation files.

<number_of_observation_locations_in_SWI_observation_file> is the number of observation locations in the SWI Observation output file.

SWI_OBS_FORMAT is a keyword indicating that the text that follows designates the file type of the SWI Observation output file. SWI_OBS_FORMAT must be followed by either "ASCII", "BINARY SINGLE", or "BINARY DOUBLE".  SWI_OBS_FORMAT can only be used with SWI observation files. SWI_OBS_FORMAT is required for SWI observation files.

"ASCII" is a keyword indicating that the SWI Observation output file is a text file.

"BINARY SINGLE" is a pair of keywords indicating that the SWI Observation output file is a single-precision binary file.

"BINARY DOUBLE" is a pair of keywords indicating that the SWI Observation output file is a double-precision binary file.

OBSERVATION is a keyword indicating that the values that follow define a simulated value that should be extracted from the previously specified output file. An OBSERVATION line must follow a FILENAME line.

<Observation_name> is the name of an observation. All observation names must be unique. Observation names are not case sensitive. An observation name can contain white space if the name is enclosed in double quotation marks. However, observation names containing spaces are not recommended.

<Observation_type> The observation type indicates the type of data to be extracted from the output file. Valid observation types depend on the type of file from which the observations are extracted. Note that the names of the observation types contain periods.

For MNWI, the type must be one of the following: "Qin", "Qout", "Qnet", "QCumu", or "hwell". (Other observation types may be included in the MNWI output file but they are not included here.)

For lake gage output files, the type must be one of the following: "Stage(H)", "Volume", "Precip.", "Evap.", "Runoff", "GW-Inflw", "GW-Outflw", "SW-Inflw", "SW-Outflw", "Withdrawal", "Lake-Inflx", "Total-Cond.", "Del-H-TS", "Del-V-TS", "Del-H-Cum", or "Del-V-Cum".

For Stream Gage output files, the type must be one of the following: "Stage", "Flow", "Depth", "Width", "Midpt-Flow", "Precip.", "ET", "Runoff", "Conductance", "HeadDiff", "Hyd.Grad." or "GW_FLOW". GW_FLOW is not part of the stream gage output file but will be calculated by multiplying the values for Conductance and HeadDiff.

For Subsidence observations, the type must be one of the following: "LAYER COMPACTION", "NDSYS COMPACTION", "DSYS COMPACTION", "Z DISPLACEMENT", "ND CRITICAL HEAD", or "D CRITICAL HEAD".

For SWT observations, the type must be one of the following: “SUBSIDENCE”, “LAYER COMPACTION”, “SYSTM COMPACTION”, “Z DISPLACEMENT”, “PRECONSOL STRESS”, “CHANGE IN PCSTRS”, “GEOSTATIC STRESS”, “CHANGE IN G-STRS”, “EFFECTIVE STRESS”, “CHANGE IN EFF-ST”, “VOID RATIO”, “THICKNESS”, or “CENTER ELEVATION”.

For SWI observations, the observation type must be "ZETA".

Observation types are not case sensitive. If an observation type contains any space characters, the observation type must be enclosed in single or double quotation marks.

<Observation_time> is the time for which a simulated value is desired. If the time at which a simulated value is desired is not included in the MNWI output file, linear interpolation will be used to calculate a simulated value at the observation time. If the observation time is before the first time recorded in the output file, the first value from the file will be used. If the time is after the last time recorded in the MNWI output file, a value of -1E31 will be used to indicate that the data are missing

<Observed_value> is the measured value for the observation.

<Weight> is the weight assigned to the observation.

PRINT and NO_PRINT are optional keywords used to indicate that a simulated value either should or should not be printed in the OBSERVATIONS_FILE. If these keywords are omitted, the simulated value will be printed. Regardless of the PRINT or NO_PRINT options, all simulated values are printed in the listing file.

ZETA_SURFACE_NUMBER is a keyword indicating that the zeta surface number from a SWI observation output file will be specified.

<zeta_surface_number> is the number of the zeta surface that is used for the observation.

SWI_OBSERVATION is a keyword indicating that the following three pieces of data specify an observation series in the SWI output file that will be used for interpolating the simulated value to the location and time of the observation. Each observation from an SWI output file includes one or more observation series from which the observed value will be interpolated. SWI_OBSERVATION can only be used with SWI observation files. SWI_OBSERVATION is required for SWI observation files.

<number> indicates the position of the observation series in the list of observation series stored in the SWI output file.

<fraction> indicates the fractional weight applied to this observation used to interpolate among all the SWI values extracted from the SWI observation output file.

<name> indicates the name of the observation series used for interpolating to the observation location. <name> is only used for ASCII SWI observation files but must be specified for all observations.

CELL is a keyword indicating that one or more cell locations will be specified. Cells can only be specified for subsidence and SWT observations. Each subsidence or SWT observation must include one or more cell locations. Cell locations are used to spatially interpolate to the observation location. The first cell listed must contain the observation location.

<layer_or_interbed_system> is the layer number or interbed system of the cell used for spatial interpolation to the observation location. <layer_or_interbed_system> must be specified for all observation types but is only used for LAYER COMPACTION, Z DISPLACEMENT, NDSYS COMPACTION, and DSYS COMPACTION among subsidence observations. It is used for all but the SUBSIDENCE SWT observation types. <layer_or_interbed_system> represents a layer for LAYER COMPACTION, Z DISPLACEMENT among subsidence observations. It represents an interbed system for NDSYS COMPACTION and DSYS COMPACTION among subsidence observations. <layer_or_interbed_system> represents an interbed system for 'SYSTM COMPACTION', 'VOID RATIO', and 'THICKNESS' among SWT observations.

<row> is the row number of the cell used for spatial interpolation to the observation location.

<column> is the column number of the cell used for spatial interpolation to the observation location.

<cellweight> is the weight used for spatial interpolation for this cell.

Block: DERIVED_OBSERVATIONS

The DERIVED_OBSERVATIONS block is optional. If present, it must follow the OBSERVATIONS block unless the file type is DERIVED.

DIFFERENCE is a keyword indicating that the derived observation will be calculated as the difference between two previously defined observations.

SUM is a keyword indicating that the derived observation will be calculated as the sum of two or more previously defined observations.

<Observation_name> is the name of an observation. All observation names must be unique. Observation names are not case sensitive. An observation name can contain white space if the name is enclosed in double quotation marks. However, observation names containing spaces are not recommended.

<Prior_observation_name> is the name of a previously defined observation. Two prior observation names must be specified. The simulated value will be the simulated value for the first observation minus the simulated value for the second observation.

<Prior_observation_name1>, <Prior_observation_name2>, through <Prior_observation_nameN> are the names of a previously defined observations. Two or more prior observation names must be specified. The simulated value will be the sum of the simulated values of the prior observations.

<Observed value> is the measured value for the derived observation.

<Weight> is the weight assigned to the derived observation.

[PRINT|NO_PRINT] PRINT and NO_PRINT are optional keywords used to indicate that a simulated value either should or should not be printed in the OBSERVATIONS_FILE. If these keywords are omitted, the simulated value will be printed. Regardless of the PRINT or NO_PRINT options, all simulated values are printed in the listing file.

Examples

Observation Definition file for MNW2

BEGIN OBSERVATIONS

     # Observations defined in Well3

     FILENAME Mnw2ObsTest_Well3.mnwi_out

     OBSERVATION Mnw2_1MnwObs Hwell   1.000000000000E+000   1.000000000000E+000   1.000000000000E+000  PRINT

END OBSERVATIONS

Observation Definition file for SUB

BEGIN OBSERVATIONS

     FILENAME "SubObs.SubSubOut"

     OBSERVATION Sub_1SubObs0 "SUBSIDENCE"   1.000000000000E+003   1.000000000000E-002   1.000000000000E+000  PRINT

     CELL      1     5     5  6.966249525976E-001 

     CELL      1     5     6  3.167880496423E-015 

     CELL      1     4     6  1.379588675633E-015 

     CELL      1     4     5  3.033750474023E-001 

     OBSERVATION Sub_2SubObs1 "SUBSIDENCE"   5.000000000000E+003   5.000000000000E-001   0.000000000000E+000  PRINT

     CELL      1     5     5  6.966249525976E-001 

     CELL      1     5     6  3.167880496423E-015 

     CELL      1     4     6  1.379588675633E-015 

     CELL      1     4     5  3.033750474023E-001 

     OBSERVATION Sub_3SubObs2 "SUBSIDENCE"   1.096000000000E+004   1.000000000000E+000   0.000000000000E+000  PRINT

     CELL      1     5     5  6.966249525976E-001 

     CELL      1     5     6  3.167880496423E-015 

     CELL      1     4     6  1.379588675633E-015 

     CELL      1     4     5  3.033750474023E-001 

END OBSERVATIONS

 

BEGIN DERIVED_OBSERVATIONS

     # Observation comparisons defined in Object6

     DIFFERENCE Sub_1SubComp Sub_3SubObs2 Sub_2SubObs1  5.000000000000E-001   1.000000000000E+000  PRINT

END DERIVED_OBSERVATIONS

Observation Definition file for SWT

BEGIN OBSERVATIONS

     FILENAME "SwtObsTest.Swt_Out"

     OBSERVATION Swt_1SwtObs "SUBSIDENCE"   4.383100000000E+004   1.000000000000E+000   1.000000000000E+000  PRINT

     CELL      1    14     5  2.956578414865E-002 

     CELL      1    14     6  7.863713651218E-001 

     CELL      1    13     6  1.773932653095E-001 

     CELL      1    13     5  6.669585420053E-003 

END OBSERVATIONS

Observation Definition file for LAK

BEGIN OBSERVATIONS

     # Observations defined in Object4

     FILENAME C:\ModelingTools\ModelMuse\PestTest\lakeTestObs.lakg2

     OBSERVATION Lak_2Lake Stage(H)  1.000000000000E+000   1.000000000000E+000   1.000000000000E+000  PRINT

END OBSERVATIONS

Observation Definition file for SWI

BEGIN OBSERVATIONS

     FILENAME "SWI1.swi_obs"

     SWI_OBS_FORMAT ASCII

     TOTAL_NUMBER_OF_OBSERVATIONS     2

     NUMBER_OF_ZETA_SURFACES     1

  OBSERVATION SwiObs "Zeta"   4.000000000000E+002   2.000000000000E+001   1.000000000000E+002  PRINT

     ZETA_SURFACE_NUMBER      1

       SWI_OBSERVATION     1  1.082862523540E-001  Obs_1

       SWI_OBSERVATION     2  8.917137476460E-001  Obs_2

END OBSERVATIONS

Observation Definition file for SFR

BEGIN OBSERVATIONS

     # Observations defined in Object10

     FILENAME C:\ModelingTools\ModelMuse\PestTest\DryCells.sfrg1

     OBSERVATION SFR_1sfr Stage  1.000000000000E+000   0.000000000000E+000   1.000000000000E+000  PRINT

END OBSERVATIONS