script:
ncid = netcdf.create('wrflightningchemi_d01','NC_FORMAT_CLASSIC');
timedimID = netcdf.defDim(ncid, 'Time', 1009);
time_stringdimID = netcdf.defDim(ncid, 'DateStrLen', 19);
londimID = netcdf.defDim(ncid,'west_east', 332);
latdimID = netcdf.defDim(ncid,'south_north', 165);
etadimID = netcdf.defDim(ncid,'bottom_top', 28);
lnoxID = netcdf.defVar(ncid,'lnox','float',londimID);
error:
??? Error using ==> netcdflib
Unable to open netCDF file, library error message "NetCDF: Unknown
file format"
Error in ==> open at 54
[varargout{:}] = netcdflib ( 'open', filename, mode );
NETCDF version 3.6.2 is installed on the Linux machine I am using.
Any ideas?
Thanks,
Jonathan
Hello,
Do I need an additional folder besides the netcdf_toolbox in the MATLAB path in order for netcdf files to be in the correct format?
I am using version 2009a.
Jonathan
I don't have this version of Matlab, but in my version (2006a) that
uses mexCDF, I get a similar somewhat cryptic message if the filename
is wrong.
You can check the validity of the file outside of Matlab using
ncdump(filename).
Hello,
When I issue the command: ncdump(wrflightningchemi_d01)
this error follows
??? Undefined function or variable 'wrflightningchemi_d01'.
With this I get command
ncdump('wrflightningchemi_d01')
This error follows:
??? Undefined function or method 'ncdump' for input arguments of type 'char'.
When I issue the command outside of matlab:
ncdump wrflightningchemi_d01
ncdump: wrflightningchemi_d01: NetCDF: Unknown file format
The wrflightningchemi_d01 file was created in matlab.
All other netcdf files I have created outside of matlab can be read by matlab and opened with ncdump.
Any ideas from anyone would be helpful
Thanks,
Jonathan
The file has to be closed to be completely written and formatted.
netcdf.close(ncid)
Jonathan