Skip to content
Snippets Groups Projects
Commit 44d4d1d9 authored by Peter Alexander's avatar Peter Alexander
Browse files

Exception handling to deal with some unexpected nan values in unused columns from LPJ

parent 7ead1dd0
No related branches found
No related tags found
No related merge requests found
...@@ -76,8 +76,13 @@ public abstract class AbstractTabularRasterReader<D extends RasterItem> { ...@@ -76,8 +76,13 @@ public abstract class AbstractTabularRasterReader<D extends RasterItem> {
Map<String, Double> rowValues = new HashMap<String, Double>(dataColNames.length); Map<String, Double> rowValues = new HashMap<String, Double>(dataColNames.length);
for (int i=2; i<tokens.length; i++) { for (int i=2; i<tokens.length; i++) {
double d = Double.parseDouble(tokens[i]); try {
rowValues.put(dataColNames[i], d); double d = Double.parseDouble(tokens[i]);
rowValues.put(dataColNames[i], d);
}
catch (Exception e) {
LogWriter.print("Problem getting col: " + i + " for x: " + x + ", y: " + y + " - " + e.getMessage());
}
} }
D item = dataset.getFromCoordinates(x, y); D item = dataset.getFromCoordinates(x, y);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment