-
-
Save j08lue/e792b3c912c33e9191734af7e795b75c to your computer and use it in GitHub Desktop.
Yes, sounds like it! Pls try and feel free to share here whether it worked out.
You can also use xESMF if that for some unlikely reason better fits your tool stack: https://gist.github.com/j08lue/4952ff9f4a5eb148d198903076664d32
Cool! I just tried your code and it works well for my case ;)
As far as I understand, the code reprojects data to your preferred projection by resampling (the default setting is nearest). I also tested the UTM projection, it seems to work well.
Yes, rasterio.warp.calculate_default_transform
is for calculating a suitable target transform and shape - could be for any projection you want or you could get this from somewhere else, e.g. a template file - and rasterio.warp.reproject
does the actual reprojection, where you can make the usual choices of interpolation methods, etc.
Thanks for sharing the notebook! I have some hyperspectral satellite L1 data that isn't reprojected yet. The data (long, lat, variables) are in 2d. I suppose it's fine to use this method?