Reading NETCDF

VisIt can read data from several codes that write their data files to the NETCDF data file format. NETCDF is mainly a smart array storage file format from VisIt's point of view. Complex data structures such as unstructured meshes or AMR meshes are often stored in several arrays (coordinates, connectivity, etc.) and the meaning of each array is known to the code that wrote the file. For VisIt to read that file back in, VisIt's plugins must also understand the conventions used to write the NETCDF file so when certain arrays are seen, they can be reassembled into the more complex data structure that they collectively represent. VisIt's NETCDF database reader plugin understands the conventions of a few different codes that stored their data using NETCDF.

The NETCDF plugin understands:

NETCDF convention What it stores More information
CCSM Data stored by the CCSM code, which is similar to CF. The reader implements a subset of CF and can read time-varying rectilinear data. The reader serves up a version of the data mapped to a spherical geometry representing the Earth.

VisIt assumes CCSM data will contain time dimension with size > 1, a lat or latitude dimension, and a lon or longitude dimension. The file must also contain arrays of the same names, which store the time, latitude, longitude, respectively. Any data over the entire mesh must have dimensions (time, latitude, longitude). See ncdump of CCSM data for more information.

http://www.ccsm.ucar.edu/
ADAPT Atmospheric modeling https://narac.llnl.gov/modeling.php
Lodi Atmospheric modeling -- various levels stored as curvilinear data. https://narac.llnl.gov/modeling.php
FVCOM Unstructured meshes containing climate and bathymetry data. http://fvcom.smast.umassd.edu/FVCOM/index.html
Basic NETCDF This reader exposes any 1D, 2D, or 3D arrays in the file as data on rectilinear meshes. If an array has a time dimension then VisIt will expose the array as a time-varying variable. If there are arrays that have other dimensions then the reader will expose them as invalid variables, meaning that they cannot be plotted. VisIt tries all other NETCDF readers before using the basic reader as a last resort. The purpose of the basic reader is to show what can be plotted in the most general NETCDF file where VisIt assumes very little about what is stored in the file. The basic reader is mostly an array viewer.

The basic reader supports few conventions.

  • 1-d arrays whose name matches a dimension are used as mesh coordinates. So, for example, if the file contains dimensions width, height and a variable var(width,height) then VisIt will try and get mesh coordinates from 1-d arrays called width and height if they exist.
  • The unlimited dimension is treated as time. Otherwise, the reader looks for dimensions called time, Time, or T and tries to use those as time.
  • _FillValue, valid_range, valid_min, valid_max, missing_value and other attributes describing missing data are supported.
  • scale_factor and add_offset attributes are supported to turn byte data back into floating point data.
Some of your NETCDF data will likely be viewable using the basic NETCDF reader.


DO NOT ASSUME THAT JUST BECAUSE VISIT HAS A NETCDF READER IT WILL AUTOMATICALLY UNDERSTAND YOUR NON-STANDARD DATA CONVENTIONS!

If you have advanced data conventions that require higher level constructs to be assembled from more than 1 data array then you will likely need to extend the NETCDF reader or write your own new NETCDF reader plugin in order for VisIt to read your data properly. You can then implement code yourself that reads various arrays from NETCDF and assembles them into a higher level mesh construct (like AMR mesh) that can be served up to VisIt. Please see the Getting Data Into VisIt manual.

Simple data conventions for rectilinear and curvilinear meshes are understood in VisIt's NETCDF reader and can fairly easily be created from Python.