OPNML/MATLAB Facilities
READ_GRIB for MATLAB : The MATLAB Grib Edition1 reader has been moved to the Renaissance Computing Institute. Click here to go there now.
Introduction
This is the access page for the OPNML/MATLAB5 routines for handling
output files
from the FUNDY and QUODDY series of shallowwater FEM models.
Documentation
including installation, demonstrations, and function lists are
available
through the
OPNML User's Guide on the OPNML
Homepage. The OPNML/Matlab facilities consist of commandline
functions
to plot vectorfields, scalar contours, domain geometry, and drogue
paths.The
functionality of the routines is restricted to 2D fields, typically as
horizontal/vertical slices of a 3D field or vertically averaged
resultsfrom a
3D model. Some 3D data visualization is avaviable, but currently is
better handled using AVS. A Graphical User Interface (GUI) to the
commandline
OPNML/Matlab functions is avaliable called FEDAR (Finite Element DAta
Reviewer),
and is described below. Most OPNML/Matlab codes rely on MATLAB's latest
language
features (namely structures) and thus require MATLAB 5.1 or later.
Go Directly To:
 Principle difference in OPNML routines between
MATLAB4 and MATLAB5
 New Functions and Toolboxes
 Download OPNML Toolboxes
 Access to local routines
 FCAST matlab tools, version 1.2
The principle difference between the MATLAB4 and
MATLAB5 versions of the OPNML
routines resides in MATLAB's new language features, particularly
structures. Formerly, the function LOADGRID returned a separate array
for the FEM element
list, the horizontal node coordinates, bathymetry, etc.
([e,x,y,z,b]=loadgrid(domainname);). Other functions
were then
passed the information needed, as in plotting the FEM domain boundary
with
PLOTBND (plotbnd(x,y,b)). The MATLAB5 structure
capability
greatly simplifies the loading and passing of grid parts to other
routines. In
MATLAB5, the above calls now look like:
gridstruct=loadgrid(domainname);
plotbnd(gridstruct);
In the first statement, the LOADGRID function
returns the element, node,
bathymetry, and boundary information packaged
into a structure called gridstruct. gridstruct has the following
components (type "gridstruct" at the MATLAB prompt (>>)),for
example.
gridstruct =
name: 'domainname'
e: [727x3 double] % Element list
x: [444x1 double] % Node xcoord
y: [444x1 double] % Node ycoord
z: [444x1 double] % Node depth
bnd: [161x2 double] % Domain boundary list
ar: [727x1 double] % Element areas
The next statement calls the boundary plotter and
passes it the ENTIRE structure, from
which PLOTBND extracts the information it needs. Below is a list of
OPNML/MATLAB
routines that are provided for backward usage; they use the calling
syntax from MATLAB4
and are postpended with a "4". The user will need to determine if it's
easier to
replace MATLAB4 syntax with the new structurebased features or
temporarily append "4"
to certain routines. But these should not be relied upon to exist
forever; they are old
and in the way.
belint4 drawelems4 el_areas4 genbel4
lcontour4 loadgrid4 plotbnd4
More details are given in the
OPNML
User's Guide Demo.
 FDCONT Version 1.2
FDCONT (current version 1.2) is a contour/vector plotting toolkit for
FEM nodebased data. It requires MATLAB5+, and the usual OPNML toolbox.
Click here to download a tarball.
It will untar into a directory called FDCONT_1.2. Place this directory
alongside FDCONT_1.1,
in $OPNML. Then, edit the opnmlinit.m function to point to the new
directory. For demo and documentation, click
here.
 VIZICQ4
Version 1.2
VIZICQ4 is a GUIbased .icq4 file visualizer written in MATLAB for the
GLOBEC/OSSE workgroup. It is in Beta development (1.2), but can be
retrieved here. VIZICQ4 will eventually support isosurfaces using new
MATLAB5.3 functionality, and will also read in any standard model
output file type. Also available from the FCAST/MATLAB pages. README,TarBall,
ScreenShot
 BUILDIND
BUILDIND is a GUIbased .ind file generator written in MATLAB for the
GLOBEC/OSSE workgroup. It is in Beta development, but can be retrieved
here. Also available from the FCAST/MATLAB pages. README,TarBall
 FEDAR3
FEDAR3, the Finite Element
DAta Reviewer,
is on the verge of being released. For a screenshot of FEDAR3's look,
click here. Retrieve
betatest tarball.
New OPNML Functions
These functions are not yet in the standard distribution. They are Beta
standalone routines that need hammering on.
 read_grib V1.4.0
(20 Sep 2005) a WMO GRiB file reader
 Go to
Documentation

Version 1.4.0 repairs a memory leak in 1.3.1 under MATLAB7 (R14). iV1.3.1 will NOT
run correctly in R14, and may cause seg faults. (V1.4.0 does run properly in R13,
so it is safe to upgrade).
 read_grib is a
World Meteorological
Organization (WMO) GRiB file reader. It
allows the reading of the WMO international exchange GRiB formatted
data files into MATLAB. It has various input modes, including
extraction of individial GRiB records by record number, extraction by
parameter name (which is not unique), and generating an inventory of
the GRiB file contents. It has been tested on the following standard
model output files; AVN,ETA,RUC,ECMWF. The functionality is more
complete than V1.2. The default GRiB parameter table used is the NCEP
Operational table.
 The decoding of the binary
sections of the GRiB records uses ccode written by Wesley Ebisuzaki
( http://wesley.wwb.noaa.gov).
See
http://www.scd.ucar.edu/dss/docs/gribdoc/ for GRiB format
documentation.
 Get
the read_grib.m V1.4.0 tar file.
drog2ddt a 2D
Drog tracker for MATLAB.
 drog2ddt is a
2D Drog tracker for MATLAB. It
provides for the tracking of particles in a 2D flow field directly in
MATLAB. The integrator is 4thorder RungeKutta. The drogue elimination
criteria is not very sophisticated; if a drogue hits a boundary, it's
gone. drog2ddt
is not intended for
production particle tracking, but rather for exploratory work directly
in MATLAB. See http://www.opnml.unc.edu/Projects/EL9905/Misc/misc.html
for some example applications.
 Get the
drog2ddt.m function.
pca
 an
overly elaborate Principal Component Analysis (pca) function.
 Get the
pca.m function.
Retrieve the GNU ZIPPED OPNML/MATLAB5
Tarball
Retrieve the UNIX compressed
OPNML/MATLAB5
Tarball
Retrieve the OPNML/MATLAB5 Tarball
See the
OPNML User's Guide for Installation instructions.
Retrieve mexfile binaries for certain architectures. The tar file
should be
placed in the subdirecory MEX, relative to the
installation directory of the OPNML/MATLAB5 tarball and untarred in
place.
Here is access to the collection of OPNML routines
that are not distributed in
any of the above toolboxes. It is hoped that some
of the routines may be of use to others, but they are provided on an AS
IS
basis.
OPNML Local Routines
MAIL: brian_blanton@renci.org
Last modified: 09 Sep 2002