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

Commit

Permalink
Tested main function of module
Browse files Browse the repository at this point in the history
  • Loading branch information
kandread committed Sep 23, 2019
1 parent efe5356 commit b5b3828
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions confluence/__main__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import sys
import netCDF4 as netcdf
import integrator
from confluence import removeFlagged
from confluence import integrator, removeFlagged


def main(ncfile):
def main(ncfile, routing_table):
"""Driver function for the Confluence framework."""
f = netcdf.Dataset(ncfile)
H = f.variables['H'][:].data
Expand All @@ -17,11 +16,12 @@ def main(ncfile):
dA = f.variables['dA'][:].data
else:
dA = None
mf = integrator.MeanFlow(n, Ab, H, W, S, dA, None)
n_est, Ab_est = mf.integrate()
mf = integrator.MeanFlow(n, Ab, H, W, S, dA, routing_table)
Ab_est, n_est = mf.integrate()
integrator.write(ncfile, Ab_est, n_est)


if __name__ == '__main__':
ncfile = sys.argv[1]
main(ncfile)
routing_table = sys.argv[2]
main(ncfile, routing_table)

0 comments on commit b5b3828

Please sign in to comment.