\chapter{Implementation of \exo{} with \code{NetCDF}}\label{app:efficiency}

\section{Description}

The \code{NetCDF} software is an I/O library, callable from C or
Fortran, which stores and retrieves scientific data structures in
self-describing, machine-independent files. \em{Self-describing} means
that a file includes information defining the data it
contains. \em{Machine-independent} means that a file is represented in
a form that can be accessed by computers with different ways of
storing integers, characters, and floating-point numbers. It is
available via the web from \url{https://github.com/Unidata/netcdf-c}.  The
current version is 4.9.2.

EXODUS uses the standard \code{netCDF} distribution with no modifications.

\section{Efficiency Issues}

There are some efficiency concerns with using \code{NetCDF} as the low level
data handler. The main one is that whenever a new object is
introduced, the file is put into \em{define} mode, the new object is
defined, and then the file is taken out of \em{define} mode. A result
of going in and out of \em{define} mode is that all of the data that
was output previous to the introduction of the new object is copied to
a new file. Obviously, this copying of data to a new file is very
inefficient. We have attempted to minimize the number of times the
data file is put into \em{define} mode by accumulating objects within
a single EXODUS API function. Thus using optional features such as
the element variable truth table, concatenated node and side sets, and
writing all property array names with \cfuncref{ex_put_prop_names} will
increase efficiency significantly.
