Menu

ncrcat 4.4.5 command arguments mixed up

Developers
2014-09-13
2014-09-15
  • Dave Allured

    Dave Allured - 2014-09-13

    I am testing the new chunking feature in NCO 4.4.5. This problem seems to be in command argument processing, and has nothing to do with chunking or file processing. It doesn't get that far.

    This fails. Note that --cnk_plc has stolen the secondary argument from the -P option!

    ncrcat -D5 -4 --cnk_plc=r1d --cnk_dmn time,15 -Pxdata file1.nc file2.nc out.nc
    ncrcat: ERROR nco_pck_plc_get() reports unknown user-specified packing policy xdata
    ncrcat: ERROR exiting through nco_exit() which will now call exit(EXIT_FAILURE)
    

    So take out the path argument, and use explicit paths. This works fine, including the requested chunking in the output file:

    ncrcat -4 --cnk_plc=r1d --cnk_dmn time,15 xdata/file1.nc xdata/file2.nc out.nc
    

    Let's not talk about the warning from the second version, it is not related to this bug report.

    This problem occurs with NCO 4.4.5 on both Linux and Mac OS builds. Following is the requested config information for Linux.

    Is this a bug, or am I doing something wrong? Thanks for your help.

    --Dave

    Configuration

    linux128:~/test.445 1047> ncrcat -r
    NCO netCDF Operators version "4.4.5" last modified 2014/07/15 built Aug 29 2014 on linux64.psd.esrl.noaa.gov by root
    ncrcat version 4.4.5
    Linked to netCDF library version 4.3.1.1, compiled Mar 5 2014 11:04:45
    Copyright (C) 1995--2014 Charlie Zender
    This program is part of NCO, the netCDF Operators.
    NCO is free software and comes with a BIG FAT KISS and ABOLUTELY NO WARRANTY
    You can redistribute and/or modify NCO under the terms of the
    GNU General Public License (GPL) Version 3 with exceptions described in the LICENSE file
    GPL: http://www.gnu.org/copyleft/gpl.html
    LICENSE: http://nco.cvs.sf.net/nco/nco/LICENSE
    Homepage: http://nco.sf.net
    User Guide: http://nco.sf.net/nco.html
    Configuration Option: Active? Meaning or Reference:
    Check _FillValue Yes http://nco.sf.net/nco.html#mss_val
    Check missing_value No http://nco.sf.net/nco.html#mss_val
    DAP clients Yes http://nco.sf.net/nco.html#dap
    Debugging: Custom No Pedantic, bounds checking (slowest execution)
    Debugging: Symbols No Produce symbols for debuggers (e.g., dbx, gdb)
    GNU Scientific Library Yes http://nco.sf.net/nco.html#gsl
    HDF4 support Unknown http://nco.sf.net/nco.html#hdf4
    Internationalization No http://nco.sf.net/nco.html#i18n (pre-alpha)
    MPI parallelization No http://nco.sf.net/nco.html#mpi (beta)
    netCDF3 64-bit files Yes http://nco.sf.net/nco.html#lfs
    netCDF4/HDF5 available Yes http://nco.sf.net/nco.html#nco4
    netCDF4/HDF5 enabled Yes http://nco.sf.net/nco.html#nco4
    OpenMP SMP threading No http://nco.sf.net/nco.html#omp
    Optimization: run-time No Fastest execution possible (slowest compilation)
    Parallel netCDF3 No http://nco.sf.net/nco.html#pnetcdf (pre-alpha)
    Regular Expressions Yes http://nco.sf.net/nco.html#rx
    Shared libraries built No Small, dynamically linked executables
    Static libraries built Yes Large executables with private namespaces
    UDUnits conversions Yes http://nco.sf.net/nco.html#udunits
    UDUnits2 conversions Yes http://nco.sf.net/nco.html#udunits

    UHS Registration. Go Trojans!

    Input files, FWIW:

    linux128:~/test.445 1053> ncdump -s xdata/file1.nc
    netcdf file1 {
    dimensions:
    time = UNLIMITED ; // (5 currently)
    variables:
    float time(time) ;
    time:units = "days since 2000-1-1 0:0:0" ;

    // global attributes:
    :_Format = "classic" ;
    data:

    time = 0, 1, 2, 3, 4 ;
    }

    linux128:~/test.445 1054> ncdump -s xdata/file2.nc
    netcdf file2 {
    dimensions:
    time = UNLIMITED ; // (5 currently)
    variables:
    float time(time) ;
    time:units = "days since 2000-1-1 0:0:0" ;

    // global attributes:
    :_Format = "classic" ;
    data:

    time = 5, 6, 7, 8, 9 ;
    }

     
  • Charlie Zender

    Charlie Zender - 2014-09-13

    Hi Dave,

    It appears your command arguments may contain a typo.
    I think you mean to use "-p xdata" instead of "-Pxdata".
    -P has to do with printing, -p with paths.
    NCO uses GNU command line parsing, so whether you need a space after the switch or not may also affect the behavior. Try -p. Does that solve the problem?

    c

     
  • Dave Allured

    Dave Allured - 2014-09-15

    Charlie,

    You are right, I needed -p for the path argument, not -P. Sorry for the noise.

    --Dave

     

Log in to post a comment.