If the curvilinear grid is in fact rectangular over much of its range, we can use the standard rectangular form of Ferret commands when the requested region lies in that portion of the grid. This means that the scripts will not have to do extra operations to determine the grid indices that correspond to the region, and they do not have to do a sampling operation to get subsets of the data. The grid need not be regularly-spaced in this region, only rectilinear.
Currently the backend Ferret scripts can make these simplifications if the grid is rectilinear for all longitudes less than some value (as is the case for tripolar grids, for instance). If this is the case, then there need to be two additions to the dataset configuration. The first is the maximum longitude at which the grid is rectilinear, and it is configured as a Ferret property, linear_lat_max:
<properties>
<ferret>
<linear_lat_max>47.0</linear_lat_max> <!-- Curvilinear above lat = 47 -->
...
</ferret>
</properties>
In addition, the backend scripts need to know what axes to associate with the data to make it look like a rectilinear grid. We need to create a data file with x and y axes that have units of degrees longitude and latitude, that correspond to the rectilinear portion of the grid and which have the same number of coordinate points as the the underlying grid of the curvilinear dataset. The ferret scripts will check to see if the requested region lies in the rectilinear portion of the grid, and if so, simply replace the axes of the data variable with the new ones provided in this file.
The axes can be anything in the region that is not in the rectilinear portion of the world. The name of the file containing these axes is configured as the Ferret property linear_coords_file; specify the url or location of the file
<properties>
<ferret>
<linear_coords_file>/home/server/ansley/las_data/mydata_linear_axes.nc</linear_coords_file>
...
</ferret>
</properties>