I'm trying to open netCDF-files I created by myself. In idl I have a list which contains the filenames but when I try to open the netCDF with one of those list elements it does not work:
NCDF_OPEN: Unable to open the file "(null)". (NC_ERROR=-31)
The specific file exists and is readable. The funny thing is when I just type the name of the file into the ncdf_open routine idl is able to open my file.
I'm using netcdf library version 4.2 on IDL Version 6.4 (linux x86_64 m64).
+++ short example start +++
filelist=findfile("MODIS*.nc") ; n_elements(filelist) > 0
id=ncdf_open(filelist[ii]) ; error occurs
id=ncdf_open('MODIS_GRID_h05v13.nc') ; works
+++ short example end +++
I often need to open and close those files so unfortunately typing by hand is no option...
Probably, it's a very silly problem with a simple solution but I can't get it. Please help!