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.
Unidata's netCDF homepage has a comprehensive list of software for working with netCDF: http://www.unidata.ucar.edu/software/netcdf/docs/software.html
|