OpenCDSS / ArkDSS-Colors-of-Water

Colorado's Decision Support Systems (CDSS) ArkDSS Colors of Water Model Engine code
GNU General Public License v3.0
2 stars 5 forks source link

ArkDSS-Colors-of-Water

Colorado's Decision Support Systems (CDSS) ArkDSS Colors of Water Model Engine code

This repository contains the source code for the ArkDSS Colors of Water Model Engine, which is part of Colorado's Decision Support Systems (CDSS).

See the following sections in this page:


Colors of Water Repository Folder Structure

The following are folders in the repository.

  1. matlab - This folder contains the StateTL matlab based model engine code for the Colors of Water (COW) tool. The StateTL manages inputs, outputs, stream network routing, and transit loss and routing calculations given options in a control file.
  2. fortran - This folder contains the fortran code modified from the original USGS j349 code that can perform dynamic streamflow routing and bank storage calculations that can be called from the matlab StateTL code for a given stream subreach. Most currently this is not being used as streamflow routing and bank storage calculations (similar but not identical to j349) have been built into the matlab code.
  3. python - This folder contains the python script to perform calibration using the ArkDSS matlab StateTL executable.
  4. tests - This folder is empty, but is used to hold output folders for the calibration runs.

Python/Anaconda setup

To ensure you have the proper python libraries installed in your python setup use the following commands, using the command line, before the first time the python script is run. (Make sure you are in the directory of the requirements.txt or environment.yml file)


Initial run of Matlab executable

The Matlab runtime v911 must be installed and available on the local machine to run the Matlab executable (available from mathworks)

Before running the python script for the first time it is necessary to run the matlab executable to build essential .mat binary files that are read by Matlab for subsequent runs. From the command line, run the following code from the matlab directory:

for calibration, the following command would also be issued to generate gage/observation data

the calibration program will probably issue command line arguments such as the following


Running Calibration

From the command line, navigate to the 'python' directory under the ArkDSS-Colors-of-Water directory and run the following line of code:

The program will take at least several minutes to run. A simple statement saying, 'This test has completed. ' indicates the script has successfully completed running.


License

The software is licensed under GPL v3+. See the LICENSE.md file.

Contact

Contact Brian Macpherson, CWCB (brian.macpherson@state.co.us) or Kelley Thompson, DWR (kelley.thompson@state.co.us).