First time posting for help on the Pangeo community, and pretty new to the geospatial domain.
In a Nutshel
In few words : from my initial objective of cliping raster/xarray data to a polygon/shapefile, I ended up looking for information on regridding/interpolation.
My Data
The data product I’m using is from Sentinel-3, Level 2 Land Surface Temperature (SLSTR).
I preprocessed the content of one zip and ended up with this shape of data:
I get that what I’m getting from this product, is a grid corresponding to the satellite swath “scatter plots”, as displayed below:
In the many examples I’ve encountered, dimensions and coordinates are usually similar, and 1D.
So, I’ve come to the point where I understand that further processing would need a ‘regridding’, otherwise said ‘interpolation’ on a regularly spaced grid (which is not my case at the moment).
Questions
Then my questions are:
considering the shape of the data I’m dealing with: what would you recommend me to use (package, interpolation algo, projection grid, …)
Keep in mind that I might have to:
merge multiple swath products to build a global map (in the future),
and that my objetive is to be able to clip this xarray to a shapefile to apply specific processing on measures from the shapefile’s area.
Thank you very much in advance for your help.
Regards,
Mathieu
I bumped into this but it doesn’t seem appropriate since it corresponds to “administrative-clipping” (if I may say), while I’m trying to subset my raster with very specific polygons.
Am I right ?
@RichardScottOZ
I’m fairly new to this domain, so I’ll try to answer your question as precisely and synthetically as possible:
My initial goal there was to “clip” my non lat/long-gridded xarray to a polygon/shapefile.
The tools/scripts I found looked quite easy but always seemed to be using georeference (lat/lon) dimensional raster…
That’s when I thought I had to regrid/reproject my raster into a georeferenced lat/lon dimension raster before applying those tricks.
Feel free to advice for some more relevant process to apply to meet my initial goal.
Not sure the following rephrase might help, but at least it’s helping me try to focus on what my main question is.
At the moment, and in order to perform later regridding, I feel like what I’m trying to ask help for is to interpolate an unstructured/irregularly spaced scatter plot latlon grid into a structured/regularly spaced one.
FYI, I’ve also been adviced to look into pangeo-pyinterp documentation, on the specific case of ‘unstructured grid’:
If I had to summarize the process in my own words, it would be:
build your initial dataset, defining your lat/lon dataarrays as coordinates (depending on the initial x/y grids),
define the mesh ‘nest’ through the use of pyinterp.RTree() and mesh.packing,
define the new grid you want your new data to be regridded in through the use of np.meshgrid,
then use, for example (and choosing wisely ), mesh.inverse_distance_weighting or mesh.radial_basis_function to interpolate the initial gridded data in a new data.
Remember, I had to regrid my data because the initial ones corresponded to an irregular grid regarding corresponding georeferenced coordinates.
Your case might be different, but I hope somebody out here will benefit from this exchange.
Thanks again to all of you contributors.
Regards,
Mathieu
PS : I would like to flag this issue as SOLVED but…doesn’t seem to find a way to do it…any help ?