Skip to main content

Tools to perform flow naturalisation in Caterbury

Project description

This git repository contains project code for the flow naturalisation procedure. The procedure has several modules for performing different tasks that ultimately combine for the naturalisation.

Modules:
  • Catchment delineation and selection of upstream takes

  • Estimating flow when the flow doesn’t exist during the required period

  • Estimate water usage when the usage doesn’t exist during the required period

  • Naturalise the flows

Inputs

The first step is to create a csv file of site numbers that should be naturalised. This csv should be placed into the inputs folder structured according to the example csv file currently there.

Parameters

In the python folder there is a parameters.ini that sets several global parameters for the modules. The key ones are the project_path, from_date, and to_date. The project_path is the root path for the naturalisation project. Below this paath should be the inputs and results folders. The from_date and to_date parameters is the time period that the naturalisation will be performed over.

Run the procedure

To run the code, go to the python subfolder and run the install_env.bat (you might need admin permissions). This will install the python environment needed to run the code. Once that completes, run the main.bat and the procedures to naturalise the flows will run.

The results are placed in the results folder with a date stamp as part of the name. If those results have not been run for the current day, the procedure re-runs all procedures and produces new results. If results already exist for the current day, then the procedure will simply read in those existing results for the further processes. To force a procedure to re-run on the current day, simply delete (or rename) the particular result file and re-run the main.bat.

Methods

The modules use several python packages for their procedures.

The catchment delineation module uses the python package gistools which has a catchment delineation function. This functions uses the REC stream network version 2 and the associated catchments for determining the catchments above specific points. The flow locations are used to delineate the upstream catchments. The upstream catchments are then used to select the WAPs that are within each catchment. The WAPs were taken from a summary of Accela.

Not all flow locations have a continuous record from a recorder. Consequently, the flow sites with only gaugings need to be correlated to flow sites with (nearly) continuous recorders. This is done via the hydrolm package that uses ordinary least squares regressions of one or two recorders. The F statistic is used to determine the best regression.

Water usage data also needs to be estimated when it doesn’t already exist. This was done by grouping the consents by SWAZ and use type and estimating the ratio of usage to allocation. These ratios were then applied at all consents without existing water usage data. This analysis was performed on a monthly scale.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

FlowNaturalisation-0.0.3.tar.gz (14.8 kB view details)

Uploaded Source

File details

Details for the file FlowNaturalisation-0.0.3.tar.gz.

File metadata

  • Download URL: FlowNaturalisation-0.0.3.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.6

File hashes

Hashes for FlowNaturalisation-0.0.3.tar.gz
Algorithm Hash digest
SHA256 2c09243084b6264d4de230495b74807eb119dca4a113751344f48a0348546152
MD5 bbac116c8e27ac477eb0733688be291d
BLAKE2b-256 a95418e8a17e6bbdf19aa4c5719356d5300498e4cbf1a134fa2ddb9fd390b421

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page