recNum is the record dimension. So this is pretty easy to do.

https://linux.die.net/man/1/ncks

ncks -d dimension,min,max,stride infile.nc outfile.nc

so you can do
ncks -d recNum,1,1730,10 infile.nc outfile.nc

to get every 10th observation.

Or you can do recNum,1,100,1 to get only the first 100 records.

Now I used ncks -d recNum,1,1730,100 infile.nc outfile.nc to reduce data size from 2M into 20K.

Cory Martin's guidance, August 14, 2024
