Released Matlab processing scripts

ROMS Code Release Announcements

Moderators: arango, robertson

Post Reply
Message
Author
User avatar
arango
Site Admin
Posts: 1347
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Released Matlab processing scripts

#1 Unread post by arango »

I am releasing few Matlab pre- and post-processing scripts for ROMS. These scripts are well documented. Notice that each sub-directory has their own Contents.m which briefly describe each m-file within. It is highly recommended for you to use the provided startup.m or modify your starting workspaced script and include these paths so Matlab can find them.

Currently, the matlab repository (https://www.myroms.org/svn/src/matlab) have the following sub-directory structure:

Code: Select all

matlab/                       Main repository directory
      /bathymetry             Bathymetry extracting tools
      /coastlines             Coastline extracting tools
      /landmask               ROMS Land/Sea mask tools and GUIs
      /seagrid/               Charles Denham grid generation GUI
              /@seagrid       SeaGrid internal utility functions
              /test_data      SeaGrid test data
      /seawater               Phillip Morgan (CSIRO) SeaWater library
      /utility                Generic pre- and post-processing library
      /startup.m              Workspace configuration script
Some Remarks:
  • To check-out the files from the matlab repository (latest version), enter (notice https instead of http):

    Code: Select all

         svn checkout https://www.myroms.org/svn/src/matlab MyDir
    or 
         svn checkout --username joe_roms https://www.myroms.org/svn/src/matlab MyDir
    
  • The script utility/depths.m is the official Matlab script to compute ROMS depths for any 3D-variable. I highly recommend to you to use this script. Recall, that the depths (z_r and z_w) in ROMS change at each time step because of its dependency on the time-varying free-surface. See :arrow: WikiROMS description of ROMS Vertical S-coordinate.
  • The script utility/scoord.m can be used to select the optimal set of vertical stretching parameters, vertical transformation equation, and vertical stretching function for a particular applications. See :arrow: WikiROMS for more details. This script was used to produce the plots shown in this wiki page.
  • The NetCDF interface to Matlab is via the :arrow: MEXNC developed by John Evans. MEXNC is a mex-file interface very similar to the NetCDF C-library. John Evans developed a very clever design (starting with version 2.9.1) for this interface. It performs a series of internal checks to either use Matlab native interface (available in version R2008b) or the MEXNC library. MEXNC It is possible to compile MEXNC to support both NetCDF-3 and NetCDF4/HDF5 type files.
  • It is possible to build an OpenDAP enabled MEXNC. There are notes online :arrow: here. Unfortunately, you won't be able read NetCDF4/HDF5 files though. We are investigating whether MEXNC can be modified to use the NetCDF-Java library for reading OpenDAP URLs.
    Mark Hadfield remind me that there is an experimental version of OpenDAP in the latest version of the NetCDF4 library. It has the ncdump/ncgen utilility that can read files from an OpenDAP server and read/write NetCDF-4 files. He also adds:
    The only problem, a fairly big one, is that the OpenDAP interface is written in C++, which means that programs (like MEXNC, Fortran programs, etc) that use this library must be linked with the C++ linker. This just isn't worth the bother to me, so I haven't tried to link to it with ROMS. However the netCDF developers plan to reqrite the OpenDAP code in C for version 4.1. I don't know when they plan to release 4.1, but it won't be soon.

User avatar
wilkin
Posts: 872
Joined: Mon Apr 28, 2003 5:44 pm
Location: Rutgers University
Contact:

Re: Released Matlab processing scripts

#2 Unread post by wilkin »

The CSIRO Matlab seawater toolbox is available directly from http://www.cmar.csiro.au/datacentre/ext ... awater.htm where is it up to version 3.2. I have no idea to what extent this code might have changed from the versions Hernan has placed in the ROMS repository, but users should know there is a more recent source.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

Post Reply