North American Regional Climate Change Assessment Program
North American Regional Climate Change Assessment Program
    Home Data Useful Tools
 
  PROGRAM
About NARCCAP
About Data
Contact Us
  RESOURCES
For PIs
For Users
    Access Data
  User Directory
  Contributions
  Acknowledgements
  RESULTS
Output Data Catalog
General Results
    NCEP-Driven RCM Runs
Climate Change Results
CRCM+CCSM
CRCM+CGCM3
ECP2+GFDL
ECP2+HadCM3 NEW!
HRM3+GFDL
HRM3+HadCM3
MM5I+CCSM
MM5I+HadCM3 NEW!
RCM3+CGCM3
RCM3+GFDL
WRFG+CCSM
WRFG+CGCM3
  SPONSORS
 
Useful Tools
 
The following tools are very useful for working with NARCCAP data.

ncdump

Outputs contents of a netCDF file as ascii. From Unidata, part of the NetCDF libraries. http://www.unidata.ucar.edu/software/netcdf/index.html

Useful options:
ncdump -h -- prints headers
ncdump -v variable -- prints a variable
ncdump -f n1,n2 -- specify precision of output
ncdump -l length -- specify line length of output

Example output: pr-ncdump.csv -- produced using ncdump -p 5,5 -l 2000 pr_WRFP_2001010103_clim.nc

NCO

NCO is a package of command-line utilities for manipulating netCDF files. Each NCO command does one very specific kind of manipulation, but you can combine them to powerful effect.

There are a number of options common to most or all NCO commands. These include -v for specifying the variable and -d for choosing a dimensional slice. Some NCO commands make use of a "record" dimension. This needs to be the first dimension and is unlimited in extent. In NARCCAP data, this is always the time dimension.

NCO Documentation: http://nco.sourceforge.net/nco.html
  • ncap and ncap2: netCDF Arithmetic Processors (examples) -- algebraic manipulation of data
  • ncatted: netCDF Attribute Editor (examples) -- modify metadata
  • ncbo: netCDF Binary Operator (includes ncadd, ncsubtract, ncmultiply, ncdivide) -- (examples) -- math involving two files
  • ncea: netCDF Ensemble Averager (examples) -- average across multiple input files
  • ncecat: netCDF Ensemble Concatenator (examples) -- combine files into a single record
  • ncflint: netCDF File Interpolator (examples) -- combine inputs via weighted interpolation
  • ncks: netCDF Kitchen Sink (examples) -- copies data to ascii or output file
  • ncpdq: netCDF Permute Dimensions Quickly, Pack Data Quietly (examples) -- rearrange dimensions or pack data
  • ncra: netCDF Record Averager (examples) -- average across time (record dimension)
  • ncrcat: netCDF Record Concatenator (examples) -- combine sequential files
  • ncrename: netCDF Renamer (examples) -- rename dimensions, variables, or attributes
  • ncwa: netCDF Weighted Averager (examples) -- weighted average over one file

Example

seasonal-average -- Shellscript using NCO commands to generate seasonal climatology

NCL

NCL is an interpreted programming language for scientific analysis and visualization. It is designed with NetCDF in mind and allows easy and transparent access to NetCDF data files. It has a large and powerful plotting library oriented toward geophysical data.

NCL's syntax is FORTRAN-like. It supports the idea of coordinate variables and attributes associated with variables. Most parameters are passed to functions via "resource" attributes.

Examples

2d-time-plot.ncl Plot a timeslice from a file. Used in NARCCAP QC process. Example results.

Extensive reference and support materials are available on the NCL website: http://www.ncl.ucar.edu/

Other Tools

There are a number of other tools for working with netCDF data.

PackageDescriptionURL
CDATModular data analysis environmenthttp://www-pcmdi.llnl.gov/software-portal/cdat/
CDOLike NCO, but for climate model datahttp://www.mpimet.mpg.de/fileadmin/software/cdo/
FANSimple plain-text data extractorhttp://www.unidata.ucar.edu/software/netcdf/fan_utils.html
FerretOceanographic visualization/analysis toolhttp://ferret.wrc.noaa.gov/Ferret/
IDLCommercial scientific analysis packagehttp://www.exelisvis.com/IntelliEarthSolutions/GeospatialProducts/IDL.aspx
IDVUnidata's geoscience data viewer (java)http://www.unidata.ucar.edu/software/idv/
MatlabCommerical scientific analysis packagehttp://www.mathworks.com/products/
NumPyPython scientific computing librarieshttp://numpy.scipy.org/
PanoplyCross-platform NetCDF viewerhttp://www.giss.nasa.gov/tools/panoply
PyNGL/PyNIOScientific visualization for Pythonhttp://www.pyngl.ucar.edu/
RStatistical computing languagehttp://www.r-project.org/
The GSP guide to using NetCDF in R

Unidata's netCDF homepage has a comprehensive list of software for working with netCDF: http://www.unidata.ucar.edu/software/netcdf/docs/software.html

 
©2007 UCAR   |   Privacy Policy   |   Terms of Use   |   Site Map   |   top of page