https://github.com/csiro-hydroinformatics/pygme

Python Generic Modelling Engine (PyGME): A simple python package to design, run and calibrate models used in environmental sciences

https://github.com/csiro-hydroinformatics/pygme

Science Score: 49.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.7%) to scientific vocabulary
Last synced: 6 months ago · JSON representation

Repository

Python Generic Modelling Engine (PyGME): A simple python package to design, run and calibrate models used in environmental sciences

Basic Info
  • Host: GitHub
  • Owner: csiro-hydroinformatics
  • License: other
  • Language: Python
  • Default Branch: master
  • Size: 236 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 1
  • Releases: 1
Created over 2 years ago · Last pushed 6 months ago
Metadata Files
Readme License

README.md

pygme

DOI CI Coverage

Python Generic Modelling Engine (PyGME): A simple python package to design, run and calibrate models used in environmental sciences.

What is pygme?

  • pygme is a set of tools to create simple models and calibrate them via automatic optimizer
  • pygme provides interface to classical hydrological models and allows you to create your own models.

Installation

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

Basic use

To setup a model, change its parameters and run it:

```python import numpy as np from pygme.models.gr2m import GR2M import matplotlib.pyplot as plt

Get an instance of the GR2M monthly rainfall-runoff model

gr = GR2M()

Generate random inputs (to be replaced by real data)

inputs = np.random.uniform(0, 10, size=(300, 2))

Allocate model

This step allocates all internal variables

used for any runs of the model.

The number of outputs is set to the maximum

to generate all GR2M outputs. Default is 1

which reduces the output variables to

streamflow only.

gr.allocate(inputs, noutputs=gr.noutputsmax)

Set parameters

gr.X1 = 500 gr.X2 = 0.8

Initialise model

Here we initialise both GR2M stores

gr.initialise([450, 55])

Run model

gr.run()

Plot results

S: production store

R: routing store

AE: Actual evapotranspiration

F: Inter-basin exchange

Q: Streamflow

df = gr.to_dataframe()

fig = plt.figure(layout="tight") mosaic = [[s] for s in ["S", "R", "AE", "F", "Q"]] axs = fig.subplotmosaic(mosaic) for varname, ax in axs.items(): df.loc[:, varname].plot(ax=ax) ax.settitle(varname)

plt.show() ``` A set of examples is provided in the folder examples.

License

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

Owner

  • Name: CSIRO Hydroinformatics
  • Login: csiro-hydroinformatics
  • Kind: organization

CSIRO - hydroinformatics repositories

GitHub Events

Total
  • Delete event: 3
  • Push event: 6
  • Pull request event: 5
  • Create event: 3
Last Year
  • Delete event: 3
  • Push event: 6
  • Pull request event: 5
  • Create event: 3

Dependencies

requirements.txt pypi
  • Babel ==2.4.0
  • Cython ==0.26
  • Jinja2 ==2.9.6
  • MarkupSafe ==0.23
  • OWSLib ==0.14.0
  • Pillow ==4.2.1
  • PySocks ==1.6.6
  • Pygments ==2.2.0
  • alabaster ==0.7.10
  • asn1crypto ==0.22.0
  • astroid ==1.4.9
  • bleach ==1.5.0
  • certifi ==2016.2.28
  • cffi ==1.10.0
  • chardet ==3.0.4
  • colorama ==0.3.9
  • coverage ==4.4.1
  • cycler ==0.10.0
  • decorator ==4.1.2
  • docutils ==0.14
  • entrypoints ==0.2.3
  • html5lib ==0.9999999
  • idna ==2.6
  • imagesize ==0.7.1
  • inflect ==0.2.5
  • ipykernel ==4.6.1
  • ipython ==6.1.0
  • ipython-genutils ==0.2.0
  • isort ==4.2.15
  • jedi ==0.10.2
  • jsonschema ==2.6.0
  • lazy-object-proxy ==1.3.1
  • lxml ==3.8.0
  • matplotlib ==2.0.2
  • mistune ==0.7.4
  • nbconvert ==5.2.1
  • nbformat ==4.3.0
  • nose ==1.3.7
  • numexpr ==2.6.2
  • numpy ==1.12.1
  • numpydoc ==0.6.0
  • olefile ==0.44
  • packaging ==16.8
  • pandas ==0.21.0
  • pandocfilters ==1.4.1
  • path.py ==10.3.1
  • pickleshare ==0.7.4
  • prompt-toolkit ==1.0.14
  • psutil ==5.2.2
  • psycopg2 ==2.7.1
  • pyOpenSSL ==17.0.0
  • pycodestyle ==2.3.1
  • pycparser ==2.18
  • pyflakes ==1.5.0
  • pylint ==1.6.4
  • pyparsing ==2.2.0
  • pyproj ==1.9.5.1
  • pyshp ==1.2.11
  • python-dateutil ==2.6.1
  • pytz ==2017.2
  • pyzmq ==16.0.2
  • requests ==2.14.2
  • rope-py3k ==0.9.4.post1
  • scipy ==1.0.0
  • simplegeneric ==0.8.1
  • singledispatch ==3.4.0.3
  • six ==1.10.0
  • snowballstemmer ==1.2.1
  • sphinx ==1.6.2
  • sphinxcontrib-websupport ==1.0.1
  • sqlacodegen ==1.1.5
  • testpath ==0.3
  • traitlets ==4.3.2
  • urllib3 ==1.21.1
  • wcwidth ==0.1.7
  • win-inet-pton ==1.0.1
  • wrapt ==1.10.10
  • xlrd ==1.1.0
setup.py pypi
  • cython *
  • hydrodiy *
  • numpy *
  • pandas *
  • scipy *