Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Commit

Permalink
Confluence module implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
kandread committed May 29, 2019
1 parent fd9e28d commit 994f64d
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions confluence/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
"""
Implementation of Confluence framework for integrating and diagnosing
SWOT-estimated discharge.
"""

import netCDF4 as netcdf


def read_file(ncfile):
"""Read reach time series data from NetCDF file."""
with netcdf.Dataset(ncfile) as f:
rt = f.groups['Reach_Timeseries']
Q = rt.variables['Q'][:]
W= rt.variables['W'][:]
H = rt.variables['H'][:]
return Q, H, W


def integrate(Q):
"""Apply integrator algorithms to estimated discharge."""

0 comments on commit 994f64d

Please sign in to comment.