[netcdfgroup] nc_{put,get}_vars() question

The documentation for the strided access to variables specify a pointer to
ptrdiff_t types, which I infer means that I could specify a negative value
to read/write in a dimension in reverse. However, when I gave this a shot,
specifying a -1 for the latitude dimension of one of my datasets, the C api
came back and said I had an illegal stride.

Is there any way to read/write dimensions in reverse order, much like
python's [::-1] with the C-API, or am I going to have to flip the data
around myself (I'd like to avoid the copy, as well as all of the fun code
to do so for an arbitrary dimension). At the very least, are there helper
functions for this?

Thank you,
Ben Root
  • 2020 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: