How do I read/write NetCDF, HDF4, HDF-EOS2, GRIB1, GRIB2, or CCM History Tape files?
To open any one of these types of files, use the addfile function, which opens a data file and returns a pointer to the file. Once you have a pointer to the file, you have access to all of its global and variable attributes and coordinate arrays. You can also use addfile to open a NetCDF or HDF file for writing (not GRIB1, GRIB2, HDF-EOS2, or CCM files, since you can’t write these files in NCL).