Search code examples
extractnetcdfnconcks

nco extracting data from netCDF with hyperslab


I have a netCDF file with ten minute resolution data. I would like to extract the hourly data from this and write a new netCDF file that grabs the data at the top of each hour in the original ten minute file. I think that I would do this with the ncks -d hyperslab flag but I am not entirely sure if this is the best way.


Solution

  • Yes, the best way is to use

    ncks -d time,min,max,stride in.nc out.nc
    

    e.g.,

    ncks -d time,0,,6 in.nc out.nc