This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
>To: address@hidden >From: Danika Gilbert <address@hidden> >Subject: necessary netcdf attributes? >Organization: UCAR/Unidata >Keywords: 200311052130.hA5LUgOb019682 Hi Danika, > I've run into a problem with some netcdf files we've created. The problem > is that I crash ncPlot or ncBrowse when I try to look at some fields we've > created and written out to existing netcdf files. > > Actually, what we've done is copy .nc files and add new fields to the end > of these files. I don't have this problem when I plot any of the fields > that were present in the original .nc files. > > The only difference I can clearly tell is that we have not included any > variable attributes for our new fields. Are there any of these attribute > fields that are essential for plotting in ncPlot, ncBrowse or other netcdf > plotting tools? > > When I do an ncdump -v on our new variables, the data displays fine. I > can also plot the data fine if I load the .nc files into matlab. > > Any suggestions/thoughts? Looking at the ncPlot User's Guide, it says the data must conform to the NCAR-RAF/nimbus conventions: http://raf.atd.ucar.edu/Software/netCDF.html which says All variables contain the basic attributes units, long_name, and _FillValue (pre 1998 spelled MissingValue). .... and then lists some additional variable attributes. I don't know whether omitting units, long_name, or _FillValue would cause ncPlot to crash, but it might. I suggest you contact the ncPlot developer (Chris Webster?). The ncBrowse site at PMEL seems to be down right now so I can't check it, but it was my understanding from the developer, Don Denbo, that ncBrowse is supposed to work on arbitrary netCDF files, although it can take advantage of EPIC and COARDS conventions; it should not require variable attributes. If the latest version of ncBrowse fails on one of your netCDF files, I'm sure Don would want to hear about it and provide a workaround or fix. --Russ _____________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu/staff/russ