ncks help

Help
2014-05-28
2014-05-28
  • Dear Users
    I need help in merging two nc files with different variables each of 2GB size into a single file.
    Using Ncks -h -A file1.nc file2.nc is the command I have used

    The file size is 720x410*50

    I am using nco-4.3.1
    the dimension of the first file is

    dimensions:
    bnds = 2 ;
    T1 = UNLIMITED ; // (1 currently)
    ZT = 40 ;
    GRID_Y_T = 410 ;
    GRID_X_T = 720 ;
    the dimesion of the second file is
    dimensions:
    bnds = 2 ;
    T1 = UNLIMITED ; // (1 currently)
    ZT = 40 ;
    GRID_Y_T = 410 ;
    GRID_X_T = 720 ;

    and the first file contains 23 vriables and the second file contains 23 variables

    the following error message is coming
    ERROR NC_EVARSIZE One or more variable sizes violate format constraints
    HINT: NC_EVARSIZE errors can occur when attempting to aggregate netCDF3 classic files togetherERROR NC_EVARSIZE One or more variable sizes violate format constraints
    HINT: NC_EVARSIZE errors can occur when attempting to aggregate netCDF3 classic files together into outputs that exceed the capacity of the netCDF3 classic file format, e.g., a variable with size in excess of 2^31 bytes. In this case, try altering the output file type to netCDF3 classic with 64-bit offsets (with --64) or to netCDF4 (with -4). For more details, see http://nco.sf.net/nco.html#fl_fmt
    nco_err_exit(): ERROR Short NCO-generated message (usually name of function that triggered error): nco_enddef()
    nco_err_exit(): ERROR Error code is -62. Translation into English with nc_strerror(-62) is "NetCDF: One or more variable sizes violate format constraints"
    nco_err_exit(): ERROR NCO will now exit with system call exit(EXIT_FAILURE) into outputs that exceed the capacity of the netCDF3 classic file format, e.g., a variable with size in excess of 2^31 bytes. In this case, try altering the output file type to netCDF3 classic with 64-bit offsets (with --64) or to netCDF4 (with -4). For more details, see http://nco.sf.net/nco.html#fl_fmt
    nco_err_exit(): ERROR Short NCO-generated message (usually name of function that triggered error): nco_enddef()
    nco_err_exit(): ERROR Error code is -62. Translation into English with nc_strerror(-62) is "NetCDF: One or more variable sizes violate format constraints"
    nco_err_exit(): ERROR NCO will now exit with system call exit(EXIT_FAILURE)

    I request your help in merging this file pl

    With regards

    C Kalyani

     
  • Charlie Zender
    Charlie Zender
    2014-05-28

    Seems like a straightforward size problem.
    As the message indicates, try one of these instead

    ncks -4 -h -A file1.nc file2.nc
    ncks -6 -h -A file1.nc file2.nc
    ncks -7 -h -A file1.nc file2.nc

    depending on which output format you want.
    cz