This is a follow on from my previous question, in that this is much more specific with examples and data. I have a 304 by 448 array of ice data (in polar stereographic projection), of which the netcdf can be obtained here. The corresponding lat/lon points of each grid box can be found in this file. I would like to transform this data onto a regular lat/lon grid (say 180x360) where each grid box is a degree. Is there any python way of doing this? Etc using Basemap, or alternatively using CDO (climate data operators)?
Many thanks in advance. James
If you first add the grid to the data file with, e.g.,
ncks -A -v lat,lon NSIDC_LatLon.nc sample.nc
Then you can use NCO's ncremap to regrid that with, e.g.,
ncremap -i sample.nc -d 1x1.nc -o out.nc
Unfortunately this will require the current snapshot of NCO (rather than a released version) because the input files contained dimensions in an unusual order that I just patched NCO to handle. A sample of the regridded output is here.
At the OP's request I regridded his file then uploaded it (here). I didn't have a 1x1 dataset sitting around so I first created a 1x1 grid file as shown in the manual, then regridded with that (with ncremap -g option):
ncremap -i ~/NSIDC.nc -g ${DATA}/grids/180x360_SCRIP.20150901.nc -o ~/NSIDC_1x1.nc