Cam5 Catalyst Adaptor

We provide a ParaView Catalyst Adaptor for CAM5 simulation with Finite Volume (fv) or Spectral Element (se) dynamic modules. We tested our code with cesm1_2_2.


Useful documentation:

To build CAM5 and the Catalyst adaptor:

  1. Download ParaView source code and download CESM (Community Earth System Model) source code using instructions in:

  2. Modify,, in ~/src/ParaView/CoProcessing/Adaptors/CamAdaptor/ such that CAM_ROOT points to the location for cesm1_2_2 sources. By default the scripts assume that cesm1_2_2 is stored in ~/src/cesm_1_2_2.
  3. Build ParaView.

    Patch cesm1_2_2 sources to call the Catalyst Adaptor:

    cd ~/src/cesm1_2_2/models/atm/cam
    patch < ~/build/ParaView/CoProcessing/Adaptors/CamAdaptor/cesm1_2_2.patch

    By default, Cam5 Adaptor saves the simulation data. See and for the ParaView pipeline that is executed. To execute a different script you can modify those files or modify src/cpl_mct/atm_comp_mct.F90 to point to your scripts.

  4. Configure Cam5:

     mkdir ~/build/cam-5.3
     cd ~/build/cam-5.3

    Edit the configuration script by uncommenting the configuration you want or creating a different configuration. Parameters for finite volume and spectral element with different grid sizes are available. Run the configuration script.


    Note you have to configure the number of MPI processors and use the same number when you run the simulation.

    Build cam5:

    make -j10
  5. Create a run directory for the simulation and create the parameters for the simulation. This is where you set for how long you run the simulation and how often you save data.

     mkdir ~/run/cam-5.3
     cd ~/run/cam-5.3
     ~/src/ParaView/CoProcessing/Adaptors/CamAdaptor/ | grep FOUND

    Namelists (parameters) for the simulation are listed in:

    Different configurations need different data files. If any of the required data files are NOT FOUND download them from: Don't checkout everything as the datafiles are big! First checkout individual empty directories leading to the file you are interested in:

    cd ~/src/cesm-data
    svn update --depth empty atm
    cd atm
    svn update --depth empty cam
    cd cam
    svn update --depth empty inic
    cd inic
    svn update --depth empty homme
    cd homme

    Then checkout the file:

    svn update
  6. Run the simulation:


    The data fields generated by the simulation (those stored in the .nc file) are listed in:

    You can view the history file*.nc in ParaView using 'NetCDF files generic and CF conventions' reader. You can switch the dimensions viewed to be (lat,lon) or (lev, lat, lon) to get a sphere or a ball.

  7. Optional: If you want to debug certain pio files in the simulation run:

     ~/src/ParaView/CoProcessing/Adaptors/CamAdaptor/ d

    This command copies a list of to the corresponding .F90 so that gdb works correctly over these files. When you need to rebuild run:

    ~/src/ParaView/CoProcessing/Adaptors/CamAdaptor/ g

To dump the history file produced by the simulation in text format run ncdump*.nc > camrun.txt

See for more information.