Giter Club home page Giter Club logo

hydro-conductor's Introduction

Hydro Conductor

Build Status Code Climate

This repository hosts a set of Python scripts and modules written to couple a hydrologic model with a regional glacier model. It is written for the University of Washington's Variable Infiltration Capacity hydrologic model and UBC's Regional Glacier Model.

The "conductor" executes each model as a subprocess while translating inputs and outputs from each model to match the scale and requirements of the other.

How to set up a dev environment

  • Install Python 3
  • Set up a virtual environment
$ virtualenv -p python3 env
  • Activate the environment
$ source env/bin/activate
  • Install the requirements
$ pip install -r requirements.txt
  • Add the package to your environment's path
$ python ./setup.py develop

How to run the tests

We have a pytest config file in the repo at pytest.cfg. pytest should automatically discover all of our tests (but feel free to reconfigure through pytest.cfg or py.test's command line arguments.

$ pip install pytest
$ pip install mock
  • Run pytest
$ py.test

hydro-conductor's People

Contributors

jameshiebert avatar

Stargazers

Lindsey Nicholson avatar hetao avatar Marianne Corvellec avatar

Watchers

 avatar James Cloos avatar Michael Fischer avatar  avatar Rod Glover avatar LC Zeman avatar  avatar

hydro-conductor's Issues

Global file processing improperly handles free form strings in NetCDF attributes

The split-everything-ask-questions-later approach taken in get_global_parms() causes incorrect representation for free form strings such as NetCDF attributes.

>>> g = conductor.globals.get_global_parms('/tmp/glb_peyto_base_save_state.txt')
>>> g['NETCDF_ATTRIBUTE'][0]
['institution', 'Pacific', 'Climate', 'Impacts', 'Consortium', '(PCIC),', 'Victoria,', 'BC,', 'www.pacificclimate.org']

The value of g['NETCDF_ATTRIBUTE'] should really be a key/value mapping. e.g.

>>> g['NETCDF_ATTRIBUTE']
{'institution': 'Pacific Climate Impacts Consortium (PCIC)...'}

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.