This version of tide prediction for FES can handle cartesian grid. The longitude and latitude axes are regular and so we use this property to :
Detect if a axis is circular for the longitudes : lon_step * number_lons = 360.0 (with a 1e-9 tolerance)
For a given lon or lat, get the index on the axis : nearest_int( (lon - lon_min) / lon_step )
Using a grid with a non rational step has led us to problems in the circularity detection and in getting the nearest points. Our grid has the following step :
step_as_double = 0.03333333333333333
step_as_float = 0.033333335
We propose to use a double precision step for both latitudes and longitudes axes in order to detect the longitude circularity and have a better precision for getting indexes on the axes
This version of tide prediction for FES can handle cartesian grid. The longitude and latitude axes are regular and so we use this property to :
Using a grid with a non rational step has led us to problems in the circularity detection and in getting the nearest points. Our grid has the following step : step_as_double = 0.03333333333333333 step_as_float = 0.033333335
We propose to use a double precision step for both latitudes and longitudes axes in order to detect the longitude circularity and have a better precision for getting indexes on the axes