Special characters in the netcdf file name

Help
climater
2014-04-04
2014-04-04
  • climater

    climater - 2014-04-04

    I encountered an issue that when there are special characters in the netcdf file name or the path name, NCO commands fail. For example, say I have two identical files, foo.nc and foo(1).nc,

    $ ncks -O foo.nc foo.nc # succeeded

    $ ncks -O "foo(1).nc" "foo(1).nc"
    sh: -c: line 0: syntax error near unexpected token (' sh: -c: line 0:mv -f foo(1).nc.pid857.ncks.tmp foo(1).nc'

    I use NCO to process CMIP5 model output. This issue is problematic because a few models contain special characters in their model names.

    I'm using a recent version of NCO:
    $ ncks --version
    NCO netCDF Operators version "4.3.6" last modified 2013/10/16 built Oct 22 2013 on buildvm-14.phx2.fedoraproject.org by mockbuild
    ncks version 4.3.7

     
  • climater

    climater - 2014-04-04

    OK. Apparently, the problem is gone in NCO 4.4.1.

     
  • Charlie Zender

    Charlie Zender - 2014-04-04

    Yes, I ran into the same problem as you a few months ago. Surprised no one had reported it before. Anyway, special characters in filenames should work fine now.
    cz

     

Log in to post a comment.