Last active
April 24, 2025 20:25
-
-
Save j08lue/e792b3c912c33e9191734af7e795b75c to your computer and use it in GitHub Desktop.
Reprojecting UKCP 2.2km dataset from rotated pole to regular lat/lon grid using Rasterio 1.4 with src_geoloc_array
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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