tnetcdf-tools.rst - pism - [fork] customized build of PISM, the parallel ice sheet model (tillflux branch)
(HTM) git clone git://src.adamsgaard.dk/pism
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
tnetcdf-tools.rst (2108B)
---
1 .. include:: ../../global.txt
2
3 .. _sec-nctoolsintro:
4
5 Handling NetCDF files
6 ---------------------
7
8 PISM takes one or more NetCDF files as input, performs some computation, and then produces
9 one or more NetCDF files as output. However, other tools are usually needed to help to
10 extract meaning from NetCDF files, and yet more NetCDF tools help with creating PISM input
11 files or post-processing PISM output files.
12
13 Here we list a number of NetCDF tools that can be useful in preparing input data for use
14 with PISM and post-processing results; see :numref:`tab-NetCDFview`.
15
16 .. list-table:: A selection of tools for viewing and modifying NetCDF files.
17 :name: tab-NetCDFview
18 :header-rows: 1
19
20 * - Tool
21 - Function
22
23 * - ``ncdump`` (part of NetCDF_)
24 - dump binary NetCDF as ``.cdl`` (text) file
25
26 * - ``ncgen`` (part of NetCDF_)
27 - convert ``.cdl`` file to binary NetCDF
28
29 * - ncview_
30 - quick graphical view
31
32 * - CDO_
33 - Climate Data Operators; command-line tools, including conservative re-mapping
34
35 * - IDV_
36 - more complete visualization
37
38 * - NCO_
39 - NetCDF Operators; command-line tools for pre- and post-processing
40
41 * - NCL_
42 - NCAR Command Language
43
44 * - PyNGL_
45 - Python version of NCL
46
47 The PISM authors use ``ncview`` and "``ncdump -h``" for quick visualization and metadata
48 examination. NCO has powerful command-line manipulation of NetCDF files, but requires some
49 learning. Another such command-line tool is CDO, but to use CDO on PISM files first run
50 the script ``nc2cdo.py``, from the ``util/`` PISM directory, on the file to fix the
51 metadata so that CDO will understand the mapping. Finally, Python scripts using the
52 ``netcdf4-python`` package (see :ref:`sec-installation`) are often the best way to
53 non-trivially change a NetCDF file or make publishable figures from it. MATLAB also has
54 good NetCDF I/O capabilities.
55
56 See :numref:`tab-modelhierarchy` in section :ref:`sec-model-hierarchy` for an
57 overview on the data necessary for modeling. For more information on the format of input
58 files for PISM, see section :ref:`sec-initboot`.