Coder Social home page Coder Social logo

river-route's Introduction

River Route

river-route is a Python package for routing runoff through a river network. Routing calculations are vectorized with numpy and scipy which keeps the array computation times on par with faster compiled languages.

Output File Schemas

Discharge Data

Discharge data are given in a netCDF file. The file has 2 dimensions: time and river_id. The times given will exactly match the times given in the runoff data unless a different time interval was specified. The river_id dimension will exactly match the IDs given in the river_id column of the routing parameters file. Discharge values will be in a variable named "Q", in an array of shape (time, river_id), and dtype float.

Tips for efficient computations

Results will vary based on your system specifications, the size of the river network, and the length of the simulation. These tips may help you achieve faster results.

  1. Use fewer inflow files: File IO operations can be relatively slow and are a probable bottleneck on HPC systems when I/O operations depend on networked drives. You may achieve faster results by doing a single computation covering 2 weeks instead of 14 computations covering 1 day each. The trade-off is that larger arrays consume more memory which could eventually become too large if your river network is very large.
  2. Adjust the time step: Using a longer time step will reduce the number of computations and therefore take less time to compute. It also requires storing fewer intermediate results in memory yielding a modest reduction in memory usage. A longer time step can increase performance if it does not induce numerical instability in the outflows.

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.