diff --git a/confluence/__init__.py b/confluence/__init__.py new file mode 100644 index 0000000..ddc1399 --- /dev/null +++ b/confluence/__init__.py @@ -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."""