NCAR Command Language (NCL) is an interpreted language designed specifically for scientific data analysis and visualization. Portable, robust and free, NCL is available as binaries or open source.
To run a NCL script: Type
ncl scriptname at the Unix prompt.
Data indexing in NCL
All indexing starts with 0 (0 ... n -1) -- unlike GrADS, which indexes data sets from 1 (1 ... n). For example, if there are 5 seasons in a data file, NCL indexes them (0:4).
NOTE: Scripts that have:
at the beginning are meant for use on NCAR computers. If you use these scripts locally, you will need to download the NCL functions.
Scripts for download
- Calculate SLP (FOAM example)
- Unpack netCDF data that has "scale_factor" and "add_offset" attributes and write it to a new file
- Make time "unlimited" in a series of netCDF files
- Convert Ascii Data to netCDF
- Compute Linear Trend Using SST Data
- Regrid FOAM Data from R15 Grid to 128x128 Fixed Grid
- Read in data from a netCDF file, do some calculations, and write the new variable to a new netCDF file (Genesis LSX example)
- Read in data from a netCDF file, do some calculations, and write the new variable to a new netCDF file while making time "unlimited" (Genesis LSX example)
- Convert data from modern calendar to celestial calendar (CSM example)
- Compute streamfunction, velocity potential, divergence, and vorticity (FOAM example)
- Fit POP ocean data to regular lat/lon grid and output to new file
- Convert hybrid sigma to pressure (multiple variables)