
NCL Home >
Documentation >
Language
NCL's supported file formats
The file handling capabilities of NCL represent one of its greatest strengths. In addition to being able to read and write the usual binary and ASCII files, NCL can import and export the self-describing and network-transparent data formats netCDF and HDF. NCL can also import the proprietary data formats GRIB1, GRIB2 and CCM History Tape.There are five supported formats in NCL:
- netCDF
- HDF4
- HDF4-EOS
- HDF5
- HDFEOS5
- GRIB1 and GRIB2
- CCM History tape (COS blocked only)
- OGR geospatial formats (Shapefile, MapInfo, GMT, TIGER)
File types are identified by appropriate file name suffixes. The legal suffixes are ".nc" (with ".cdf" allowed as an alternate), ".hdf", ".hdfeos", ".grb", ".grib", ".grb2", ".grib2", ".ccm", ".shp", ".mif", ".gmt" and ".rt1".
Details on NCL's supported file formats can be found in the NCL Reference Manual.
Example of reading a variable off a netCDF file
in = addfile("/fs/cgd/data0/argo/data/buoy.nc","r") ; ; To read variable with all metadata: ; t = in->T ; ; To read variable values only (faster), enclose with '(/' and '/)': ; t = (/in->T/)