PIO  2.5.4
Examples

Examples Included with PIO Distribution

The PIO library examples can be found under the examples subdirectory. They are built with the make test or make check build target.

C Examples

The C examples are in the examples/c subdirectory.

  • examplePio.c A simple example showing a write, then read, of a 1D variable.
  • example1.c Another simple example showing a write, then read, of a 1D variable. This produces the same output as examplePio.c.
  • example2.c This example writes a 3D floating point variable, with an unlimited dimension. The data are written in slices along the unlimited dimension. This example also incorporates (if installed) the MPE profiling system to generate graphical output.

Fortran Examples

The Fortran examples are in the examples/f03 subdirectory.

  • examplePio.f90 A simple example showing a write, then read, of a 1D variable.

Other Examples

PIO has been implemented in several geophysical component models, including the Community Atmosphere Model (CAM), the Community Land Model (CLM), the Parallel Ocean Program (POP), the Community Ice CodE (CICE), and coupler for used by CCSM4.0 (CPL7). We also provide several simpler example code as well as a test code that is suitable for regression testing and benchmarking.