iwfm.file_utils¶
IWFM File Format Conventions —————————– IWFM input files follow a Fortran-style convention where:
Comment lines start with ‘C’, ‘c’, ‘*’, or ‘#’ in the first column (column 1)
Data lines MUST start with whitespace (space, tab) to avoid being treated as comments
This convention ensures that data values never accidentally get interpreted as comment markers. For example, a filename ‘crop_data.dat’ would appear as ‘ crop_data.dat’ (with leading space) in IWFM input files.
The skip_ahead() function implements this convention and is used internally by the utility functions in this module.
Functions
|
Return the IWFM component version tag from a file's first line. |
|
Read multiple line values directly into a dictionary. |
|
Read multiple consecutive line values. |
|
Skip ahead and read a value from the next line. |
|
Read a table of numeric parameters and return a numpy array. |
|
Advance to the next non-comment line without parsing it. |