I'm not sure exactly when NEP changed the API but nep.h/libnep.a are what NEP uses in the current snapshot, NEP 1.7.x. Hopefully the API is stable now. Unfortunately NEP is evolving so quickly that it does not make sense for NCO to support the older APIs. Maybe you could push back and request to use NEP 1.7.x (which may not have existed when you were given your task).
I had NEP 1.0 working with NCO. Then the API changed, and I just updated to support the current NEP snapshot. Configure NCO's latest snapshot with --enable-nep. It builds/links for me. Unfortunately the LZ4 codec now emits an error. Not sure what broke... zender@maluhia:~$ ncks -r NCO netCDF Operators version 5.3.7-alpha06 "Spidey" built by zender on maluhia at Mar 18 2026 15:55:38 ncks version 5.3.7-alpha06 Linked to netCDF library version 4.10.1-development compiled Mar 16 2026 16:01:06 Copyright...
Please post a small version of the file that reproduces the problematic behavior, and the ncap2 command that demonstrates it.
Hi. There's too many issues here for me to address. Please submit a minimally reproducible example that shows that NCO is doing something wrong or unexpected. Attach the dataset with the command and an explanation of why it does not meet your expectations.
Thanks for the input. NCO 5.1.9 had a fix to --mro that might help your use-case. I suggest updating to the latest stable version, 5.3.6.
Hello HST, To some extent this is a semantic issue. A dimension in netCDF and CF parlance is 1-dimensional (like time, y, or x), not two-dimensional. ncks will subset those dimensions as intended. lat and lon, OTOH, are called auxiliary coordinate variables. ncks can often hyperslab such coordinate using the -X aka --auxiliary options (please see the manual). The metadata in the file will need to be as described in the manual. Then you can do, e.g., ncks -X 0.,180.,-30.,30. -v gds_3dvar in.nc out.nc...
Great Dave. I really appreciate your continued help on MacPorts and other netCDF stuff!
I spoke too soon. The "no variables fit criteria for processing" error is correct. The initial dataset has time as a fixed dimension not a record dimension so ncra will not work. To average over the fixed dimension time use ncwa -a time in.nc out.nc. Or change time to a record dimension first as described in the manual. I take back the statement that NCO was at fault for that. The error message clearly describes the problem.