Commit c54d8319 authored by Andrey Filippov's avatar Andrey Filippov

Fixing error when current grid file has less stations than current

parent 685a0667
...@@ -13681,7 +13681,9 @@ Which parameters affect which matrices ...@@ -13681,7 +13681,9 @@ Which parameters affect which matrices
} }
if (this.stationZCorr==null) return this.gridGeometry[v1][u1]; if (this.stationZCorr==null) return this.gridGeometry[v1][u1];
double [] result=this.gridGeometry[v1][u1].clone(); double [] result=this.gridGeometry[v1][u1].clone();
result[2]+=this.stationZCorr[v1][u1][station]; // use lower station if grid file does not have current
int useStation=(this.stationZCorr[v1][u1].length>station)?station:(this.stationZCorr[v1][u1].length-1);
result[2]+=this.stationZCorr[v1][u1][useStation];
return result; return result;
// return this.gridGeometry[v1][u1]; // return this.gridGeometry[v1][u1];
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment