UW-Hydro / tonic

A pre/post processing toolbox for hydrologic models
MIT License
20 stars 34 forks source link

Expanded the number of characters in the part of the vic2netcdf.py #17

Open orianac opened 9 years ago

orianac commented 9 years ago

code that reads filenames to find the coordinates. Before, the code would break if the output files were at 1/16th degree resolution because the number of characters of a XX.XXXXX_-XXX.XXXXX would exceed the counted characters and the coordinate mapping would fail.

jhamman commented 9 years ago

Thanks but I think the better way to approach this is to make this a option in the config file. I'll leave this open but I think it will require a bit more work.

jhamman commented 9 years ago

@orianac -

This should push you in the right direction:

tuple(map(float, os.path.splitext(os.path.basename(filename))[0].split('_')[-2:]))

We want to test this though so if you could add a few short tests to the get_file_coords, that would put this issue to bed.