Nice, related package posted by Ryan here: Can a reprojection/change of CRS operation be done lazily using rioXarray? - #5 by rabernat
btw yesterday I found out GDAL can warp not only from geolocation-array grids (e.g. a curvlinear netcdf), but it can also warp to one . That cuts out a lot of jiggery pokery with point reprojection and look up (but obvsly not always appropriate given the metric of interest).
warp_to_geol_grid.md
Take one band of a CMIP model and zero out the values (Float32) to create a template target grid, geolocation is by lon,lat arrays in the netcdf.
Then warp another grid source to that.
```bash
gdal_translate "vrt:///vsicurl/http://esgf-data1.llnl.gov/thredds/fileServer/css03_data/CMIP6/ScenarioMIP/DKRZ/MPI-ESM1-2-HR/ssp126/r1i1p1f1/SIday/siconc/gn/v20190710/siconc_SIday_MPI-ESM1-2-HR_ssp126_r1i1p1f1_gn_20150101-20191231.nc?bands=1&scale=0,100,0,0" target.nc
gdalwarp "vrt:///vsicurl/https://www.ncei.noaa.gov/data/sea-surface-temperature-optimum-interpolation/v2.1/access/avhrr/202408/oisst-avhrr-v02r01.20240819.nc?sd_name=sst" target.nc
```
This file has been truncated. show original
1 Like