Importing Watershed Data


Watershed data are typically entered and edited using the 'Edit Watersheds' procedure.

Alternatively, watershed data can be imported from or exported to an external Excel file using the 'File Watersheds Import/Export' procedures accessed from the main menu.

This option may be preferred in cases involving large numbers of watersheds.  It can also be used as a linkage to GIS databases.

 

Imported files can be in 3 formats:

 

The file "P8_Watersheds_Formats.xls" shows the same data expressed in each of these formats. 

The sample input files described below are all designed to work with the case "p8_watersheds_demo.p8c" , stored in the /sample_files directory.

 

Excel Format (.XLS)

The file "P8_Watersheds_demo.xls" in the P8 program directory contains a template for entering watershed data.

The first 5 rows of the watershed data sheet (column headings, etc) must be identical to the template worksheet.  

When reading data from the Excel workbook, P8 looks for the first worksheet with "P8-V3.X" in Cell A1.  Other cells in Row A can contain user notes but are not read by P8.   The workbook may contain other worksheets. 

The watershed data must be contained in contiguous rows starting in Row 6.  Rows after the first blank row are ignored.   Watershed data specified in any P8 case can be exported to files in this format ('File Watersheds Export').

Watershed files created for Version 3.2 will must be reformatted for use with Version 3.3 and higher.

 

ASCII Comma-Delimited (.CSV)

Example: "P8_Watersheds_demo.csv".  The ASCII format may be more convenient than the Excel format for linking with GIS databases.  Example: "P8_Watersheds.csv"

The first Row must contain the following:  "P8-V3.X",   followed by a user-specified file description enclosed in quotes 

The second and following rows contain the comma-delimited watershed data in the same order specified in the Excel format file (example P8_Watersheds.xls).

The title rows (2-5) in the Excel file format are not contained in the CSV file.

 

ASCII Text format (.TXT)

Example: "P8_Watersheds_demo.txt".  Files previously created for DOS version 2.4 are imported in this format.  Note that the fields are in a different order, as compared with the .XLS or .CSV formats described above.

Since devices were identified by number in the DOS version (vs. name in the Windows version), the specified device numbers must be in the same order as those specified in the current windows file.  For example, device 1 should refer to the first device in the list displayed on the 'Edit Devices' screen.

This format is provided for backward compatibility only.  Newly-created import files should be in the .XLS or .CSV format.


Notes

All of the watersheds in the current case are replaced when watershed data are imported from an external file.

The device references (outflow, percolation) must be identified in the current case.  Therefore, the device network must be defined before importing watershed data.  If the watershed does not drain to an aquifer, leave the percolation outflow device blank.

If the watershed outflow device specified in Column C of an .XLS or .CSV file is blank, the record will be skipped (not imported).

If the watershed outflow device specified in Column C of an .XLS or .CSV file is not contained in the current case, a new
pipe device will be created with the specified name.   The new pipe device can be subsequently edited to send the watershed runoff to the appropriate treatment device.  This feature facilities construction of new cases for a new set of watersheds starting with the default case file.

Errors identified during importing will be listed.  If errors occur, the user has the following options:

Even if no errors are identified during the import procedure, the data should be checked using 'Edit Watersheds' or 'List Inputs Watersheds' before running the model.

Once the data are imported, the linkage to the import file is broken; i.e. changing the import file will have no effect unless the P8 import procedure is repeated.  The imported watershed data are stored along with the other P8 input values when the case file is saved.

The Excel watershed file cannot be open while importing or exporting.

Exported files are always in the Excel (.XLS) format.

If the P8 data are exported to an existing Excel file, all other worksheets in that file are destroyed.

The current watershed data can be listed in the same format as the import/export files by running 'List Inputs Watersheds' from the main menu or by clicking the 'List' button on the watershed edit screen.

 

See sample input files .