Appendix M: MAD#'s Field Manager

MAD#’s Field Manager includes useful tools for creating synthetic projects and prior distributions. The use of the Field Manager to create prior distributions is described in the section “How do I provide prior distributions?” This section will focus on the Field Manager’s other uses, especially with respect to creating and managing data from synthetic projects.

The Field Manager is especially useful for synthetic projects, in which the user wants to generate an artificial field of the inversion target variable using specified structural parameters, then draw Type-A and Type-B data for use in the inversion. The Field Manager can create a baseline field, and can export that field in a format that can be imported to one of the supported forward models. Before using the Field Manager, the domain, spatial discretization, and boundary conditions must be specified in the forward model (see step 1 of the section How do I start a project?), and the user must have loaded a domain in MAD# (through the end of the section How do I set the spatial domain?). If you want to create a baseline field that is conditional to any measured values, those values must be input as Type-A data (see “How do I input measurements?”) before using the field manager.

Field_Manager_Generate_Baseline

Creating a baseline field:

  1.        Click the Field Manager button , located in the ribbon near the top of the MAD# window.
  2.        Click on the tab Generate Baseline.
  3.        If you have already entered Type-A measurements in the Measurements tab, and want to keep them, check the Conditional on Type-A Measurements checkbox to condition your field to these measurements. Select the Type-A variable in the dropdown menu. If the Type-A data are untransformed, and you are generating a transformed parameter field (e.g. you enter K values in Type-A data, but are creating an ln(K) field), check the Apply Log checkbox to apply a log-transform to the Type-A data before using them to condition the field.
  4.        In the Model dropdown menu, choose the covariance model to be used for the baseline field.
  5.        If you want the field to be isotropic, select the Anisotropy checkbox. The section Anisotropy parameters will be activated. See the Gstat documentation (page 65) for a discussion and illustration of anisotropy parameters.
  6.        Enter the Range, Partial Sill, Nugget, and Mean values of the structural model in their respective fields.
  7.        If you would like the baseline field values to be untransformed (e.g. if you are going to import the field to a forward model), check the Apply Exp() to output field box. When unchecked, the Field Manager will report log-transformed values.
  8.        If a multiplier should be applied to the field, enter the value of the multiplier in the Multiplier box.
  9.        Modflow FUnit is the Fortran unit and defaults to (20G14.0).
  10.    Click Generate to create the field. A spreadsheet and visualization of the field will appear. For 3D projects, use the Layer dropdown menu to choose which layer to display.
  11.    Check the Semivariogram checkbox to view the semivariogram of the field.
  12.    There are several options to modify the field.
  • To display the measurement locations, click Options, then Load measurements
  • To transform the values, click Options, then Transform field. Select the transform you would like to apply. This transform will affect the field loaded in MAD#, so if you subsequently use the field to update Type-A measurements and anchor true values (step 13), take care to use the field with the correct transformation.
  1.    To export the field, click Export. A new window will appear. Depending on the type of forward model you’re using, select a file type from the Save as type dropdown menu:
  • dat PMWIN files (*.dat): A text file will be created for each layer in the domain, formatted to import into the appropriate matrix in PMWIN.
  • Modflow Array (*.txt):
  • MAD# index (*.ind): A comma-delimited text file will be created with the columns “col”, “row”, “layer”, “value”. The “row” column is based on the MAD# origin, which may be different from the forward model’s origin. This file can be imported into MAD# later using the Field Manager, as will be described below.
  • Gridded data List (Modelmuse) (*.gdl): A tab-delimited text file will be created with the columns “layer”, “column”, “row”, and “value” (the columns are not labeled). The “row” column is based on the Modflow origin. This file can be imported in ModelMuse:

o   Open File/Import/Gridded Data.

o   In the window that appears, change the Method dropdown menu to “List”, set the Number of values to ignore to 0, and choose the dataset to which the data applies from the Data set dropdown menu.

o   Open the .gdl text file in a text editor, select all data, and copy.

o   Return to the ModelMuse Import Gridded Data window and click on the leftmost cell in the first row.

o   Paste the data.

o   Click OK.

  • ASCII Grid (*.asc): Creates an ASCII text file.
  1.    If you have entered Type-A measurement locations in the Measurements tab but didn’t use them to condition the baseline field, select the Type-A variable and click Update Type-A measurements to update the values in the Measurements tab. If you have entered anchor locations already, this feature will also draw log-transformed anchor true values from the loaded field.

Field_Manager_Import_Baseline

Importing a baseline field:

Using the Import Baseline tab, you can draw Type-A data directly from a previously created baseline field. The file to be imported must be: a txt file (*.txt), a MAD# index (*.ind), or an ArcInfo ASCII (*.asc). The file must contain the parameter value, along with the column, row, and layer of the value location. The row must be defined using the MAD# origin (bottom-left of the grid). The spatial data must be defined on a domain with the same dimensions as the domain currently loaded in MAD (i.e. if the domain in MAD is 10 x 10 x 3, the spatial data must also be defined on a 10 x 10 x 3 grid). Txt and MAD# index files should be formatted similar to the following example, including column headers:

col,row,layer,value

1,1,1,0.01

Baseline fields exported using the Generate Baseline tab will be formatted correctly to import in this tab.

  1.        Click the Field Manager button , located in the ribbon near the top of the MAD# window.
  2.        Click on the tab Import Baseline.
  3.        In the Path field, either enter the path of the file to be imported, or use the search button  to locate the file using the explorer.
  4.        If the file to be imported contains log-transformed parameter values, and you would like to have the values in MAD be untransformed, click the Apply Exp() checkbox. If the values in the imported file are not log-transformed, uncheck this box. If you are going to use this field to update Type-A data, you should use untransformed values.
  5.        If you would like to apply a multiplier to all values in the field, enter it in the Multiplier field.
  6.        Modflow FUnit is the Fortran unit and defaults to (20G14.0).
  7.        Click Import. A spreadsheet and visualization of the field will appear. For 3D projects, use the Layer dropdown menu to choose which layer to display.
  8.        There are several options to modify the field.
  • To add a semivariogram, first check the Semivariogram checkbox, then click Options and Add semivariogram
  • To display the measurement locations, click Options, then Load measurements
  • To transform the values, click Options, then Transform field. Select the transform you would like to apply. This transform will affect the field loaded in MAD#, so if you subsequently use the field to update Type-A measurements and anchor true values (step 9), take care to use the field with the correct transformation.
  1.        The Field Manager can use the imported field to draw measurement values at Type-A locations and true values at Anchor locations.
  • Select the Type-A and Anchor true value parameter to be updated from the Type-A dropdown menu.
  • Click Update Type-A measurements
  • Type-A data and any Anchors defined for the specified parameter will be updated. Type-A data will be updated without applying any transformation to the loaded field. Anchor true values will be log-transformed before being updated.
  1.    Click Export to export the field. A new window will appear. Depending on the type of forward model you’re using, select a file type from the Save as type dropdown menu.

Field_Manager_Import_Realization

Loading a field generated by MAD# during simulations:

The Import Realization tab can be used to visualize random parameter fields generated by MAD# during the simulation step, and to export these fields in other usable formats. This feature uses a text file generated by MAD during the simulation and stored in the MADTemp folder (located in the MAD project folder). This file will have the name format MADProject_ResultName_ParameterNameSampleNumber.

  1.        Click the Field Manager button , located in the ribbon near the top of the MAD# window.
  2.        Click on the tab Import Realization.
  3.        In the Generator dropdown menu, select the random field generator specified in the Project tab of MAD# preprocessing.
  4.        In the Path field, either enter the path of the file described in the introduction paragraph of this subsection, or locate it using the search button . (Reminder: the file you need is located in the MADTemp folder of the project folder, and has the name format MADProject_ResultName_ParameterNameSampleNumber). Each sample in the simulation will have a separate version of this file.
  5.        If the project uses a Gstat or GSLIB random field generator, a Sim field will appear. In this field, enter the number of the realization you would like to load.
  6.        MAD generates realizations of the random fields in the transformed parameter space. If the parameter is log-transformed, and you would like to load the field in untransformed space, check the Apply Exp() checkbox.
  7.        If you would like to apply a multiplier to all values in the field, enter it in the Multiplier field.
  8.        Modflow FUnit is the Fortran unit and defaults to (20G14.0).
  9.        Click Import. A spreadsheet and visualization of the field will appear. For 3D projects, use the Layer dropdown menu to choose which layer to display.
  10.    There are several options to modify the field.
  • To add a semivariogram, first check the Semivariogram checkbox, then click Options and Add semivariogram
  • To display the measurement locations, click Options, then Load measurements
  • To transform the values, click Options, then Transform field. Select the transform you would like to apply. This transform will affect the field loaded in MAD#, so if you subsequently export the file, take care to use the field with the correct transformation.
  1.    To export the field, click Export. A new window will appear. Depending on the type of forward model you’re using, select a file type from the Save as type dropdown menu:
  • dat PMWIN files (*.dat): A text file will be created for each layer in the domain, formatted to import into the appropriate matrix in PMWIN.
  • Modflow Array (*.txt):
  • MAD# index (*.ind): A comma-delimited text file will be created with the columns “col”, “row”, “layer”, “value”. The “row” column is based on the MAD# origin, which may be different from the forward model’s origin. This file can be imported into MAD# using the Field Manager (as described in the Importing a baseline field subsection above).

Field_Manager_Import_Type_B

Importing head and concentration outputs from a forward model:

The Field Manager can import head data outputs from MODFLOW-96 and MODFLOW-2005, and can import concentration outputs from MT3D. In order to use this feature, first run the forward model to generate the output file (.dat for MODFLOW-96, .fhd for MODFLOW-2005, or .UCN for MT3D).

  1.        Click the Field Manager button , located in the ribbon near the top of the MAD# window.
  2.        Click on the tab Import Type-B.
  3.        In the Path field, enter the path of the head or concentration ouput file, or use the search button  to locate it using the finder. If locating the file using the search button, be sure that the correct format is specified in the dropdown menu next to the File name field.
  4.        Click Import. Several buttons and fields will be activated.
  5.        Select the timestep that you want to view from the Field dropdown.
  6.        Click View.
  7.      Select the layer that you want to view from the Layer dropdown.
  8.        To display the measurement locations on the visualization, click Options, then Load measurements
  9.        To export the field, click Export Current Layer. A new window will appear. Select a file type from the Save as type dropdown menu:
  • dat PMWIN files (*.dat): A text file will be created for each layer in the domain, formatted to import into the appropriate matrix in PMWIN.
  • Modflow Array (*.txt):
  • MAD# index (*.ind): A comma-delimited text file will be created with the columns “col”, “row”, “layer”, “value”. The “row” column is based on the MAD# origin, which may be different from the forward model’s origin. This file can be imported into MAD# later using the Field Manager, as will be described below.
  • Gridded data List (Modelmuse) (*.gdl): A tab-delimited text file will be created with the columns “layer”, “column”, “row”, and “value” (the columns are not labeled). The “row” column is based on the Modflow origin. This file can be imported in ModelMuse:

o   Open File/Import/Gridded Data.

o   In the window that appears, change the Method dropdown menu to “List”, set the Number of values to ignore to 0, and choose the dataset to which the data applies from the Data set dropdown menu.

o   Open the .gdl text file in a text editor, select all data, and copy.

o   Return to the ModelMuse Import Gridded Data window and click on the leftmost cell in the first row.

o   Paste the data.

o   Click OK.

  • ASCII Grid (*.asc): Creates an ASCII text file.
  1.    To extract data at a particular point, enter the column, row (in MAD# index), and layer indices, and click Get Data. [Note: the layer we selected in step 6 just specifies which layer should be displayed in the spreadsheet and visualization. The entire field is loaded, so we need to specify the layer again here].
  2.    If you have entered Type-B data locations in the Measurements tab of preprocessing, and would like to draw Type-B measurement values at these locations directly from the loaded field, check the Update Measurements checkbox. The features in the Update Type-B section will be activated.
  • In the Variable dropdown menu, select the Type-B variable to which the loaded field applies.
  • If the measurement has a reference date, enter it in the Reference date field. For transient Type-B data, enter the first measurement time. The field defaults to the current date and time.
  • In the Time Unit dropdown menu, select the time unit specified in the forward model.
  • In the Measure dropdown menu, select the Type-B data location to be updated.
  • Enter the time step length of the forward model in the Step length field. For steady-state models, enter 1.
  • Click Get Measurements. The spreadsheet will be replaced by the head value(s) at the specified location.
  • Click Update Current Measurement.
  1.    Repeat step 11 for all Type-B measurements you wish to update.

Prior Generator:

The Prior Generator tab is described in the section How do I provide prior distributions?

Last edited Aug 18, 2014 at 7:15 PM by segej87, version 8

Comments

No comments yet.