Coder Social home page Coder Social logo

csiro-hydroinformatics / pydaisi Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 3.6 MB

Python Data Assimilation Informed model Structure Improvement (PyDAISI). Python code to run the DAISI method applied to the GR2M monthly rainfall-runoff model.

License: Other

Python 88.86% C 6.09% Cython 5.04%

pydaisi's Introduction

pydaisi

DOI CI codecov

Python Data Assimilation Informed model Structure Improvement (PyDAISI): Python code to run the PyDAISI method applied to the GR2M monthly rainfall-runoff model.

What is pydaisi?

This package implements the Data Assimilation Informed model Structure Improvement (DAISI) method described in the following paper: Lerat, J., Chiew, F., Robertson, D., Andreassian, V., Zheng, H. (2023), "Data Assimilation Informed model Structure Improvement (DAISI) for robust prediction under climate change: Application to 201 catchments in southeastern Australia", WRR, Submitted.

Installation

  • Create a suitable python environment. We recommend using miniconda combined with the environment specification provided in the [env_mini.yml] (env_mini.yml) file in this repository.
  • Git clone this repository and run pip install .

Basic use

To access the data:

from pydaisi import daisi_data

# Get the site meta data
sites = daisi_data.get_sites()

# Select a site id among the 201 catchments 
# For example the Jamieson River at Gerrang Bridge,
# (site ID 405218)
siteid = 405218
monthly_data = daisi_data.get_data(siteid)

print(monthly_data) 
# This command shows:
#                 Rain      Evap      Qobs
# 
# 1970-07-01  135.9429   33.5447  186.7124
# 1970-08-01  253.6129   46.9463  207.2174
# 1970-09-01   87.7752   69.9889  119.4157
# 1970-10-01   51.4173  114.8741   56.1140
# 1970-11-01  110.2354  145.4254   27.9042
# ...              ...       ...       ...
# 2019-02-01   34.0550  146.5809    3.1161
# 2019-03-01   62.1733  117.4158    2.5748
# 2019-04-01   27.0699   75.8672    2.8548
# 2019-05-01  138.3442   44.7638    8.6404
# 2019-06-01  141.6448   32.5938   43.1690

To run DAISI applied to the GR2M model:

# Run DAISI step 0 - calibration of GR2M rainfall runoff model
# by default, the script calibrates the model for the 
# 201 catchments. 
python scripts/STEP0_gr2m_calibration.py

# The scripts can be run over a subset of sites (batch) 
# using the -n (number of batch) and -t (taskid=0..n-1) options
# This is useful if one wants to run the script using 
# parallel computing. The same options are available for 
# all scripts mentioned below.

# Run DAISI step 1 - apply Ensemble Smoother algorithym to GR2M
python scripts/STEP1_data_assimilation.py

# Run DAISI step 2 - fitting of update coefficients
python scripts/STEP2_model_structure_update.py

# Run DAISI step 3 - Computation of diagnostic metrics
python scripts/STEP3_dianostic_compute_metrics.py

# Run DAISI step 3 - Distribution of performance
python scripts/STEP3_dianostic_plot_metrics.py

License

The source code and documentation of the pydaisi package is licensed under the BSD license.

pydaisi's People

Contributors

jlerat avatar

Stargazers

J-M avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.