tonic icon indicating copy to clipboard operation
tonic copied to clipboard

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

Open orianac opened this issue 10 years ago • 2 comments

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.

orianac avatar Jul 17 '15 22:07 orianac

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 avatar Jul 17 '15 22:07 jhamman

@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.

jhamman avatar Jul 17 '15 22:07 jhamman