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 shallow-water 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 command-line functions to plot vector-fields, scalar contours, domain geometry, and drogue paths.The functionality of the routines is restricted to 2-D fields, typically as horizontal/vertical slices of a 3-D field or vertically averaged resultsfrom a 3-D model. Some 3-D data visualization is avaviable, but currently is better handled using AVS. A Graphical User Interface (GUI) to the command-line 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:

oPrinciple difference in OPNML routines between MATLAB4 and MATLAB5
oNew Functions and Toolboxes
oDownload OPNML Toolboxes
oAccess to local routines
oFCAST matlab tools, version 1.2

Principle difference in OPNML routines between MATLAB4 and MATLAB5

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 x-coord
y: [444x1 double] % Node y-coord
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 post-pended with a "4". The user will need to determine if it's easier to replace MATLAB4 syntax with the new structure-based 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.


New OPNML Toolboxes

o FDCONT Version 1.2
FDCONT (current version 1.2) is a contour/vector plotting toolkit for FEM node-based 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.
o VIZICQ4 Version 1.2
VIZICQ4 is a GUI-based .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
o BUILDIND
BUILDIND is a GUI-based .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
o FEDAR3
FEDAR3, the Finite Element DAta Reviewer, is on the verge of being released. For a screenshot of FEDAR3's look, click here. Retrieve beta-test tarball.

New OPNML Functions

These functions are not yet in the standard distribution. They are Beta standalone routines that need hammering on.
o read_grib V1.4.0 (20 Sep 2005) a WMO GRiB file reader
o Go to Documentation
o 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).
o 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.
o The decoding of the binary sections of the GRiB records uses c-code written by Wesley Ebisuzaki
( http://wesley.wwb.noaa.gov). See http://www.scd.ucar.edu/dss/docs/gribdoc/ for GRiB format documentation.
o Get the read_grib.m V1.4.0 tar file.

o drog2ddt a 2-D Drog tracker for MATLAB.
o drog2ddt is a 2-D Drog tracker for MATLAB. It provides for the tracking of particles in a 2-D flow field directly in MATLAB. The integrator is 4th-order Runge-Kutta. 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.
o Get the drog2ddt.m function.

o pca
o an overly elaborate Principal Component Analysis (pca) function.
o Get the pca.m function.

DOWNLOADING OPNML/MATLAB5

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 mex-file 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.

Access to Local Routines

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