Re: [netcdfgroup] Fortran interface limit on length of filename path NF_OPEN

Hi Ansley,

> I'm seeing a limit of 512 characters on the path name in the first 
> argument of NF_OPEN.  It's possible to hit this limit with long URL's.  
> With paths longer than 512, the error code that's returned is error 2, 
> "No such file or directory".  I'm using NetCDF 4.2.  Is there a setting 
> I can make or a code change to raise this limit?

NF_OPEN just passes the path name to nc_open.

For a long path name that's not a URL, the error actually comes from the
operating system, when a open(2) call in the C layer returns an error
that corresponds to the system error ENAMETOOLONG, defined in errno.h.
That's a limit that the netCDF library can't do anything about.

For a URL, it appears that the netCDF C client passes the query string
part of a long URL to the server, and the error is generated on the
server-side.  So it appears that there's no client-side setting that can
fix the problem.

--Russ



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