1

I would like to crop my NetCDF file for a specific location using NCO. However, I am quite lost in the documentation. So far, I've tried this:

ncks -v Precipitation_Flux -d lon,-18.751,-7.684314, -d lat,-40.9972,33.696913 C3S_concat.nc C3S_concat_cropped.nc

With error:

ncks: ERROR parsing hyperslab specification for dimension lon,-18.751,-7.684314,
Stride must be specified (and be a positive integer)

Deleting float and negative values didn't help me. And I am not understanding what is the Stride.

1
  • Okey I see that NCO topics are quite intensively discussed in StackOverflow. Should I put it there?
    – Luckasino
    Nov 25, 2020 at 9:46

1 Answer 1

2

The error you received was due to the extra comma in the -d lon option. Try this:

ncks -v Precipitation_Flux -d lon,-18.751,-7.684314 -d lat,-40.9972,33.696913 C3S_concat.nc C3S_concat_cropped.nc
1
  • Great! Thanks! It is running!
    – Luckasino
    Nov 25, 2020 at 14:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.