JGCRI / xanthos

An extensible global hydrologic framework
Other
34 stars 16 forks source link

Data loading, output writing, and tests #35

Closed calebbraun closed 5 years ago

calebbraun commented 5 years ago

Reading files with open option "U" is long depreciated. This PR scopes data loading to the DataLoader class alone, and cleans up some naming, documentation, and flow along the way. The routing module is most affected by these changes, loading data earlier rather than later.

Previously-merged commits altered how diagnostics were written out, leading to the introduction of a couple bugs. One was because of the handling of inputs with non-Intel endianness, which is now fixed when the data is read in (from NetCDFs). The other had to do with diagnostic aggregation level ids vs. row numbers, which was causing diagnostic outputs to be written one row off.

Corrected example outputs have been included.

Finally, to help prevent further bugs in the future, Travis CI integration has been set up with a couple tests that use python's unittest module.

calebbraun commented 5 years ago

Yup the build status is in the README -- I think it's good to go.