ROMSNumericalToolbox for MATLAB

E. Di Lorenzo, Georgia Institute of Technology ( RNT@ocean3d.org )

From this page you can download a set of matlab toolboxes to work with Regional Ocean Modeling System related stuff. The RNT toolbox combines and uses also the work done by other people: Hernan Arango, Sasha Sheckeptkin, Rich Signel, Pierrick Penven, John Wilkin, Kate Hedstrom and others.

WARNING:these toolboxes where meant to help my own work and have not been written/documented well enough to be so user friendly. However I have attempted a general help on each routines. Keep in mind that it will take you some time and therefore you may not find them as useful. On the other hand they can do pretty sophisticated stuff and fast!

Please contact me if you need to use any of this and are a bit confused. - MANU

DOWNLOADS

1)Download complete set of Toolboxes (MANU_TOOLBOX.tar 237 MB). Create a directory and extract the content of the tarfile in it. You will find a startup.m file, customize to add the toolboxes contained in the tarfile that you extracted. Alternatively, if you have already downloaded this in the past you may want to take only the essntial toolboxes (MANU_RNT_ESSENTIAL.tar 53 MB). I am sorry these files are so big but I have not taken the care to clean stuff up.

2)Download matlab script file to build grid, initial condition, forcing and boundary condition files (MAIN.tar 50K). MAIN_grid.m willl guide you in the creation of a new grid. There also script to create the rest of the input files like MAIN_ncfiles_forc.m, MAIN_ncfiles_TS, etc.

3)Download DATA files to produce climatological input files for ROMS using Levitus and NCEP climatological means (DATA.tar 1.1 GB). Untar the file which will produce a directory called "data". Add this directory in the matlab path in your startup script by adding a statement "path(path,'whatever_path/data').

4)Download TPXO topography to use in grid generation (TPXO6.tar 1.1 GB). This is added as a matlab toolbox.

5)How to compile the RNT Fotran code with MEX (mex_compile.txt ).

FAQ -

How to add a grid configuration to the RNT toolbox?Edit the configuration file rnt_gridinfo.m. You can find the location of this file from the matlab prompt by typing rnt_config. Once you open the file add a section with the information of your grid, for example:

case 'scb20'

gridindo.id = gridid;

gridindo.name = 'Southern California Bigth 20 km';

gridindo.grdfile = '/d6/edl/ROMS-pak/scb-data/scb20-grid.nc';

gridindo.N = 20;

gridindo.thetas = 5.0;

gridindo.thetab = 0.2;

gridindo.hc = 84.2521;

gridindo.cstfile = '/d6/edl/ROMS-pak/matlib/rgrd/rgrd_CCS_CstLine.mat';

save the file and load the grid information by typing. NOTE that if you do not have a gridfile you can use a history file instead.grd = rnt_gridload('scb20')

How to compute geostrophic flow using the TS on sigma coordinate?If you know the free-surface (zeta), then you do not need a ref. level and you can compute the velocity using the pressure gradient routine:

[ugeo,vgeo,rv,ru]=rnt_prsV2(zeta,rho,rho0,z_r,z_w,Hz,f,grd)

do a help on rnt_prsV2.m for more info. The density rho can be computed using the TS with the ROMS equations of state:

rho=rnt_rho_eos(T,S,z_r);

and z_r can be computed

[z_r,z_w,Hz] = rnt_setdepth(zeta,grd);If you do not know zeta First load the T and S from the model. Then set what reference level you want e.g ref='bottom' or ref='500' meters. At this point execute the following:

[ssh,ugeo,vgeo]=rnt_calcSSH(temp,salt,grd,'bottom');