Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.


#58 NCKS bug

Cathy Smith

I'm resubmitting my bug again after using version 4.0.10 of ncks on a MAC and getting the same error

/usr/loca/bin/ncks -d lev,0,0 -d time,0,0 -v lev -v lat -v lon -v omega
fails with
nco_err_exit(): ERROR Short NCO-generated message (usually name of function that triggered error): nco_get_vara()
nco_err_exit(): ERROR Error code is -73. Translation into English with nc_strerror(-73) is "NetCDF: Malformed or inaccessible DAP DATADDS"
nco_err_exit(): ERROR NCO will now exit with system call exit(EXIT_FAILURE)

/usr/local/bin/ncks -d lev,0,0 -d time,1,2 -v lev -v lat -v lon -v omega

succeeds (or anything after 0 for time). Time step 0 is Jan 1979 and time step 1 is Feb 1979.

Another user not on our computer system got this error when they ran 4.0.8 on linux. I don't think they had a later version of NCO. It worked for them on earlier versions

If it's helpful, the udunits library we have are 1.12.9 and 2.1.8 on the MAC.
Let me know if I can provide any more info.



  • Charlie Zender
    Charlie Zender

    I am unable to reproduce this bug. Your command works fine for me.
    As does the simpler and faster to evaluate command below.
    My working hypothesis is that the problem you are having is caused
    at the link stage, i.e., perhaps your NCO links to a version of
    netCDF/DAP that (inexplicably) fails.
    UDUnits probably does not have anything to do with it, since the
    hyperslab is index-based, not coordinate-based.
    Hence my recommendation is to install netCDF 4.2.0, and to re-build
    NCO against that.

    zender@givre:~$ ncks -D 3 -d time,0,0 -v time
    ncks: INFO nco_fl_mk_lcl() successfully accessed this file using the DAP protocol
    ncks: INFO nco_inq() reports file contains 32 variables, 4 dimensions, and 4 global attributes
    ncks: INFO nco4_inq() reports file contains 1 group comprising 32 variables, 4 dimensions, and 4 global attributes
    time: type NC_DOUBLE, 1 dimension, 10 attributes, chunked? no, compressed? no, packed? no, ID = 0
    time size (in RAM) is 418*sizeof(NC_DOUBLE) = 418*8 = 3344 bytes
    time dimension 0: time, size = 418 NC_DOUBLE, dim. ID = 3 (CRD)
    time attribute 0: grads_dim, size = 1 NC_CHAR, value = t
    time attribute 1: grads_mapping, size = 6 NC_CHAR, value = linear
    time attribute 2: grads_size, size = 3 NC_CHAR, value = 418
    time attribute 3: grads_min, size = 12 NC_CHAR, value = 00z01jan1979
    time attribute 4: grads_step, size = 3 NC_CHAR, value = 1mo
    time attribute 5: units, size = 26 NC_CHAR, value = days since 1-1-1 00:00:0.0
    time attribute 6: long_name, size = 4 NC_CHAR, value = time
    time attribute 7: minimum, size = 12 NC_CHAR, value = 00z01jan1979
    time attribute 8: maximum, size = 12 NC_CHAR, value = 00z01oct2013
    time attribute 9: resolution, size = 1 NC_FLOAT, value = 30.4365

    time[0]=722451 days since 1-1-1 00:00:0.0

    ncks: TIMER Wallclock-elapsed time for command is 0.02 s

  • Cathy Smith
    Cathy Smith

    I'm not sure how to best respond to the ticket I submitted. Someone here was able to build NCO on our linux machines using 4.2.0 of netcdf. That fixed the problem. Interestingly, the bug was not just with time=0 but with any first dimension equaling zero

    -d lat,0,1-d time,0,0 failed
    -d lat1,1 -d time,0,0 worked

    We are hesitant to use the latest version of netCDF here until it's very stable (hence the delay)
    but we think we will go to that now as it doesn't seem to be associated with other problems and
    has some better features.

  • Cathy Smith
    Cathy Smith

    To clarify: We built 3 versions of NCO (4.8-4.10) . It is only version 4.1.3 of NetCDF that is associated with the bug; the NCO version was not relevant. NetCDF versions before and after 4.1.3 do not evidence the " index 0" bug. Let us know if you have any questions.

  • Charlie Zender
    Charlie Zender

    Closing this bug (again) because it's apparently not an NCO bug.
    More likely netCDF and or Opendap interface.
    And it appears to be outdated in that only netCDF 4.1.3 is known to trigger it.

  • Charlie Zender
    Charlie Zender

    • assigned_to: nobody --> zender
    • status: open --> closed