Initial Conditions and Climatology Scripts

From WikiROMS
Revision as of 19:14, 23 April 2012 by Arango (talk | contribs) (Created page with "<div class="title">Matlab: Initial Conditions and Climatology Scripts</div>__NOTOC__ This page describes several Matlab scripts to process ROMS initial conditions and climatolog…")
(change visibility) (diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
Matlab: Initial Conditions and Climatology Scripts

This page describes several Matlab scripts to process ROMS initial conditions and climatology data.


roms2roms.m
Interpolates requested 2D or 3D variable between two ROMS application grids. The receiver grid must be inside of the donor grid. This function is intended for down-scaling or nesting applications. The horizontal/vertical coordinates for the donor and the and receiver grids are specified with array structures D and R, which are built elsewhere using script get_roms_grid.m for efficiency and functionality.
V = roms2roms  (ncname, D, R, Vname, Tindex, Rvector, method, offset, RemoveNaN)
On Input:
ncname:   Donor grid NetCDF file name containing variable to process (string)
D:   Donor grid structure containing all horizontal and vertical variables (struct array)
R:   Receiver grid structure containing all horizontal and vertical variables (struct array)
Vname:   Field variable name to process (string)
Tindex:   Time record index to process (scalar)
Rvector:   Switch to Interpolate U- and V-points variables to RHO-points to facilitate rotation in curvilinear grid applications elsewhere (logical)
method:   Interpolation method in TriScatteredInterp (string):
natural -   natural neighbor interpolation
linear -   linear interpolation (default)
nearest -   nearest-neighbor interpolation
offset:   Number of extra points to used to sample the donor grid so is large enough to contain the receiver grid (default 5)
RemoveNaN:   Switch to remove NaN values from interpolated variable with a second interpolation step using the nearest-neighbor method (default false)
On Output:
V:   Interpolated requested 2D or 3D variable