Hi I have two netcdf precipitation files with different spatial and temporal resolutions:
ny = 192
nx = 288
time = 248
lat = 94
lon = 192
time = 124
I'd like to regrid precip1 to the resolution of precip2, then sum up every two time steps in precip1 to reach the temporal resolution of precip2.
I've found an example of regriding MODIS data, but is rather specific:
Is it possible to achieve these with NCO. Many thanks.
In general regridding is a difficult problem.
NCO supports bilinear interpolation. See manual.
Summing every two timesteps can be done with
is done with the duration feature of ncra:
ncra -O -v one_dmn_rec_var -y ttl -d time,,,2,2 --mro -p ~/nco/data in.nc ~/foo.nc
Thanks Charlie for the lightening fast help! Two issues:
1.I've tried the summing method you mentioned above, which ended up with: ncra: unrecognized option '--mro'
The nco version we have on Nersc supercomputer is 4.0.8
2.I've also tried ncap2 with bilinear_interp
ncap2 -v -s "precip=bilinear_interp(precip,precip,lat_in,lon_in,lat_out,lon_out)" in.nc out.nc
But the ncap2 is unable to find variable lat_in in in.nc or out.nc. I suspect if I need to create a out.nc upfront with the same lat_in and lon_out.