Please enable JavaScript to view this site.

ModelMuse Help

Navigation: Online Guide to MODFLOW > Farm Process

Farm Process Array and List Reading Utility Modules

Scroll Prev Top Next More

Explanation of the use of Array-Reading Utility Modules [READOPTION]

In order to keep the structure of the FMP-data-input-file simple, it is recommended to specify for each respective line of the FMP-input-file, from which a utility module reads, one of the following:

Name of a file or cross-reference to a file, from which the utility module will read the data array or list records (see use of the keywords “OPEN/CLOSE” and “EXTERNAL” below),

Constant(s), in case 2D-arrays or lists may be lumped together.

READOP

Utility - module

Free-format control record options

Constant

Internal

External

Open/close

[1]

U2DINT

1

x

x

1

[2]

U2DDP

1

x

x

1

[3]

FMP2WELRD

1

x

x

1

[4]

FMP2LSTRD

1

x

x

1

[5]

FMP2DPLSTRD

1

x

x

1

[6]

FMP2DPWDLSTRD

1

x

x

1

[7]

FMP2INTLSTRD

1

x

x

1

[8]

FMP2WELPARRD





[9]

UPARLSTALPRTOCH





1 Constants or file-names are recommended in order to maintain a line-by-line FMP1 input file structure for each input item.

X Internal arrays or unit numbers for external files are technically possible, but the user has to define such unit numbers in the Name File. However, if data are desired to be read from the same file for multiple stress periods, then cross-referenced “external” files are of advantage, since they remain open.

Input Structure of Array and List Reading Utility Modules

A control record item “a” is read from the Farm Process input file by all utility modules. A keyword signals whether to use a constant value for two-dimensional- (2D-) arrays or data lists, or whether to read 2D-data arrays and data lists internally from the Farm Process input file or externally from a data file. For 2D-data arrays read by standard MODFLOW utility modules, a “Multiplier Constant” can be applied to scale any input-data array.

For data lists read by FMP-embedded list reading utility modules, a second control record item “b” is optionally read if the use of scale factor multipliers is desired. If item b is included, the respective line must begin with “SFAC.” For internal data lists, this control record item b is read from the next line of the Farm Process input file. For external lists, item b is read from the first line of the external data file.

READOP

Keyword

Constant(s) or cross-reference

Multiplier constant

Read format

Print flag

For the use of Standard MODFLOW 2D-array reading Utility Modules:

[1]

CONSTANT

Integer scalar

 



INTERNAL


11

(FREE)2

3–1

OPEN/CLOSE

FILENAME

11

(FREE)2

3–1

EXTERNAL

Nunit

11

(FREE)2

3–1

For the use of list reading Utility Modules embedded in the FMP1:

[2]

CONSTANT

Double precision scalar


 


INTERNAL


Real scalar

(FREE)2

3–1

OPEN/CLOSE

FILENAME

Real scalar

(FREE)2

3–1

EXTERNAL

Nunit

Real scalar

(FREE)2

3–1

[3], [4], [5], [6], [7]

CONSTANT

Real [3],[4] or double precision [5],[6], or integer [7] scalar(s)




INTERNAL





OPEN/CLOSE

FILENAME




EXTERNAL

Nunit




1 It is not recommended to “scale” 2D integer arrays of identifiers (such as farm-ID, crop-ID, or soil-ID).

2 Since the FMP1 allows the use of free format, the user is advised to read 2D-data arrays by the standard MODFLOW utility modules as well in free format.

3 Known input data should not be ‘re-printed’ in order to avoid a very large list file, where results are to be printed.

Keywords

The keyword “CONSTANT” indicates that the scalar, which follows the keyword, represents a single value for 2D-arrays or for data lists with only one attribute. For data lists with multiple attributes, as many constants must be entered after the keyword “CONSTANT” as there are fields attributed to the multi-dimensional variable, but omit the keyword attribute in the first field. Distributed data may be read as 2D arrays or as data lists either internally in the FMP1 input file, as indicated by the keyword “INTERNAL,” or externally from a file.

External data can be read by using a keyword of “OPEN/CLOSE” and then specifying a filename directly in the FMP1 input file. The obvious advantage of using “OPEN/CLOSE” is that no further referencing of the file name in the Name File is necessary. However, each file will be closed after reading and can be reopened and reused for future stress periods.

Alternatively, data can be read by using a keyword of “EXTERNAL” and specifying a file unit number, Nunit, in the FMP1 input file that cross-references a file name contained in the name file and the key term “DATA.” The advantage of using “EXTERNAL” is that the file, from which a respective module reads, will not be closed, and data for future stress periods can continuously be read from the same file.

Read Format

The read format for the Standard MODFLOW 2D-array reading utility modules, [1] and [2], must either be a standard Fortran format that is enclosed in parentheses, “(FREE),” which indicates free format, or “(BINARY)” which indicates binary (unformatted) data. A suggested print flag of –1 indicates that an array should not be printed to the list file after it has been read. For further instructions on use of array readers, print flags, and associated codes, refer to Harbaugh and others (2000, p. 86) and Schmid (2004, p. 159).

The read format for the list reading utility modules embedded in the FMP1, [3],[4],[5], [6], and [7] is, by standard, in free format and, therefore, not required to be specified. The farm-wells list-reading utility module [3] prints the read variables, including auxiliary variables, to the list file in integer and scientific notation unless “NOPRINT” is not specified for {option} in item 2. The other, less complex, list-reading modules, [4], [5], [6], and [7], do not re-print the read input data to the list file.

Control-Record Item b

If item “b” is included, it must begin with the keyword “SFAC.” The keyword “SFAC” indicates whether a scale factor is to be multiplied with parameter values of a designated attribute or a range of attributes. Alternatively, a list of scale factors can be read from yet another external data file. If the control-record item “b” is not included, the Scale is 1.0.

READOP

Keyword 1

Constant or keyword 2

Cross-reference

For the use of list reading Utility Modules embedded in the FMP1:

[3],[4],[5],[6]

SFAC

Real ([3],[4]) or Double Precision ([5],[6]) Scalar(s)


[5]

SFAC

OPEN/CLOSE

FILENAME


SFAC

EXTERNAL

Nunit

Constant Scale Factor

A scale factor can be applied to all lists read by the utility modules embedded in the FMP1, [3], [4], [5], and [6]. For each item, a constant real or double precision scalar may be multiplied by the parameter value(s) associated with the following respective attribute or range of attributes:

Item

SFAC applies to parameter(s)

READOP

4.

QMAXfact

[3]

7.

OFE

[5]

9.

CapFringe

[6]

11.

ROOT

[4]

12.

FTR,FEP,FEI

[5]

13.

FIESWP, FIESWI

[5]

14.

PSI1, PSI2, PSI3, PSI4

[5]

19.

GWcost1, GWcost2, GWcost3, GWcost4, SWcost1, SWcost2, SWcost3, SWcost4

[5]

23.

QMAX

[3]

27.

OFE

[5]

29.

ROOT

[4]

30a.

CU

[4]

31.

FTR, FEP, FEI

[5]

32.

FIESWP, FIESWI

[5]

35.

GWcost1, GWcost2, GWcost3, GWcost4, SWcost1, SWcost2, SWcost3, SWcost4

[5]

39.

CALL

[5]

For items 4 and 22, the values of the list variables that are automatically printed to the list file include the effect of the Scale.

List of Scale Factors

A list of scale factors can be applied to parameters of a data list that require different multipliers for each parameter. This option is available only for lists read by utility module [5]. As before, item b must begin with the first keyword “SFAC.” A second control record keyword indicates whether the file containing the list of scale factors is specified directly by its file name or by a file unit number that cross-references to a file name contained in the Name File.

The first column in a list of scale factors contains the attribute or field number of a data list. The second column contains the individual scale factor for each respective attribute. For example, multiple scale factors for the three different attributes (1: WPF-Slope, 2: WPF-Int, 3: Crop-Price) in item 18 could be defined as follows:

Attribute

Scale factor

1

1.0

2

2.0

3

1.0

4

10.0

The first attribute always defines an ID, which is why the scale factor always must be 1.0, as shown in the previous table above. Parameters related to any other attribute that is not to be scaled must also be equipped with a scale factor of 1.0. In the example, the slope of the water-production function was multiplied by 2.0, and the crop market price per unit weight was multiplied by 10.