You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(dfns): deprecate reader, infer from other attributes (#2565)
The reader attribute for DFN variables seems unnecessary. Deprecate it and infer it in mf6ivar.py from shape/type. It is only used for generating documentation. Leave reader in the DFNs for now in case other people are using it. Also, the DFN spec listed old, outdated values from MF2005 like "u1ddbl" as still in use, clean that up.
Copy file name to clipboardExpand all lines: doc/mf6io/mf6ivar/readme.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,7 +67,7 @@ A MODFLOW 6 input variable is described by a set of attributes. Some attributes
67
67
| tagged | Whether a keyword is required before the parameter value. | No | True | Set to false for keyword parameters (which do not take a value). |
68
68
| in_record | Whether the parameter is part of a record. | No | False | If true, the parameter must follow a record parameter keyword rather than being listed on its own line. |
69
69
| layered | Whether the parameter is layered. | No | False | If true, then the LAYERED keyword will be written to the input instructions. |
70
-
| reader | The MODFLOW 6 routine used to read the parameter value. |Yes|| Valid values are: `urword`, `u1ddbl`, `u2ddbl`, `readarray`. |
70
+
| reader | The MODFLOW 6 routine used to read the parameter value. |No| (inferred) | This attribute is deprecated and is now inferred from `type` and `shape` but remains supported for compatibility. Valid values are: `urword`, `readarray`.|
71
71
| optional | Whether the parameter is optional. | No | False ||
72
72
| longname | A brief but descriptive label for the parameter. | Yes || May contain spaces. |
73
73
| description | A full description of the parameter. | Yes || Should describe the parameter in detail. Underscores must be escaped since this value is parsed and substituted into LaTeX files for the MF6IO documentation. |
@@ -80,14 +80,15 @@ A MODFLOW 6 input variable is described by a set of attributes. Some attributes
80
80
81
81
### Reader Attribute
82
82
83
-
The reader attribute indicates what reader is used by MODFLOW 6 for the information. There are several reader types that result in specialized input instructions. For example, the delr array of the DIS package is read using u1ddbl. Because the MODFLOW 6 array readers often require a control record, when this reader type is specified, information about the control record is written. For example, the following block identifies how delr is specified:
83
+
The reader attribute indicates which read routine is used by MODFLOW 6. It is only used to generate documentation. **This attribute is now automatically inferred** from attributes `type` and `shape` and does not need to be specified in DFN files. If present in a DFN file, it will be ignored in favor of the inferred value. Array types (`integer` or `double precision` with a non-empty shape) use reader `readarray`. All other types use `urword`.
84
+
85
+
The `readarray` reader is used for array variables and results in specialized documentation. It allows for a LAYERED keyword to be specified. For example, the delr array of the DIS package might be specified as:
84
86
85
87
```
86
88
block griddata
87
89
name delr
88
90
type double precision
89
91
shape (ncol)
90
-
reader u1ddbl
91
92
longname spacing along a row
92
93
description is the is the column spacing in the row direction.
93
94
```
@@ -97,11 +98,11 @@ This results in the following block description:
97
98
```
98
99
BEGIN GRIDDATA
99
100
DELR
100
-
delr(ncol) -- U1DDBL
101
+
<delr(ncol)> -- READARRAY
101
102
END GRIDDATA
102
103
```
103
104
104
-
The READARRAY reader is another reader that results in specialized input. It allows for a LAYERED keyword to be specified. The icelltype variable is read using readarray and is specified as:
105
+
The icelltype variable also uses readarray and is specified as:
0 commit comments