gher-uliege/Diva-Workshops

Alternative grid for interpolation (non lat-lon)

francescadgln opened this issue · 3 comments

Hi all,

I am working with datasets in polar regions and would like to interpolate to a grid which is different from the lat-lon grid. I see that in the notebook the grid coordinates are defined as
lonr = lon_beg:dx:lon_end
Is there a way, instead, to give in input the grid points in another coordinate system? The locations would always be expressed in lat and lon, but they would not be organised in a regular lat-lon grid. It would be something similar to interpolate to scattered points.

Thank you very much in advance for your help.
Francesca

It depends:
-if you are using diva3D I think you are limited to the regular lon-lat grid.
-if you are using DIVAndrun directly, you can use any regular orthogonal curvilinear grid, but you have to set it up yourself and define the associated metrics.

Another solution is to interpolate in a sufficiciently fine regular lon-lat grid (filtering via the noise-to-signal ratio included) and once the analysis obtained on a regular grid, just perform a linear interpolation into any position from that analysis. You can do this yourself or try the following trick within diva: add pseudo data to you data which are at the locations where you want the analysis but attach an infinite error to them (so their value is not taken into account). Once the analysis done, you can recover the analysis at the data points (or residuals), including at your pseudo-data points (your requested output points) and you are done.

Hi jmbeckers, thank you very much for your suggestions!

I am interpolating a 2D field, so I decided to try to set a new system of coordinates and metrics in the lambert azimuthal equal-area, let's see if I succeed. What I did not understand how to do, is to set myself the correlation length in a dimension which is not meters (if I understood well, with fitcorrlen=false the default unit for the correlation length is meters..?)

The problem with using lat-lon grid, is that I can see discontinuity in the interpolated field at the boundary 180E-180W, I guess because in that region data are considered as being far apart from each other...?

Thank you,
Francesca

Hi Francesca

If you use fitcorrlen I suppose you are using diva3D.

The -180: 180 problem can easily (?) be dealt with by activating keyword
moddim=[1,0]
in the parameter list for your 2D case