Generating Field Files for EFDC+ from External Data using Python
EFDC+ supports input of spatially and temporally varying boundary conditions as field files to provide independent boundary time series for each model cell. This capability is helpful when users want to import weather data (e.g., wind speed, wind direction, pressure, precipitation, etc.) from another grid-based model. This capability is also helpful for representing sediment dredging processes in a waterbody. Users may refer to the EFDC_Explorer 10 (EE10) User Guide for the full list of possible applications.
The data for boundary conditions can be generated and processed in EEMS or in an external scripting program. The process of generating field files through the EE user interface is described in the EE10 User Guide here. As an alternative to this process, this post describes field file generation using an external script, developed in Python. External scripting may be useful if the data for the field files are being generated by a separate program and require some additional processing before EFDC+ can use them.
To create a field file that is readable by EFDC+, users must follow the exact data format required by EFDC+, which means the exact sequence of header information and the data structure. The field files can be provided in ASCII or binary format. The header information for both ASCII and binary files are available in Section B-26 of the EE10 User Guide on Data Format. For ASCII format, simply following the correct sequence as listed in the user guide is sufficient. For the binary format, however, the proper data type is also crucial. Binary files can be a little hard to deal with at first because they cannot be simply read in any text editor, but the use of binary files can be very efficient for a large model by reducing the file size by about two thirds compared to ASCII files. This significantly reduces the model loading time.
For a model with close to 30,000 cells and 36,500 temporal snapshots, for example, a binary field file can be as large as 4 GB, but the same data in an ASCII file would be about 12 GB. Running the model with input from a binary field file would require substantially fewer computation resources.
The following links are for two sample scripts that can be used to generate field files for an EFDC+ model. The user can modify these scripts according to their project requirements. Feel free to ask questions on GitHub or EEMS forums.
Talk to the experts
Anurag Mishra, Ph.D, PE
Senior Hydrologic Engineer