Title: ROMS: Real Ocean Modeling Stories or Reasons Ocean Modeling Sucks
1ROMS Real Ocean Modeling StoriesorReasons
Ocean Modeling Sucks
- Sally Warner
- tOAStER, Friday Harbor Labs
- January 25, 2008
2Motivation
- PO students and faculty have discussed the need
for a modeling class, but no class has been
taught yet. - I have been approached by numerous grad students
with the question, How hard would it be for me
to model region X?
3What is ROMS?
- ROMS Regional Ocean Modeling System
- Free code is maintained by oceanographers/computer
scientists at Rutgers University - ROMS is one of many ocean models (POM, HIM,
etc.), but probably the most advanced and widely
used.
4How does ROMS work?
- ROMS is simply thousands of lines of Fortran code
- 1. Edit or add code that tell ROMS what you want
it to do (days to weeks) - 2. Compile the code (minutes, need a Fortran
compiler) - 3. Run the code
- (hours to days, need a fast computer or lots of
time) - 4. Analyze the output which come as NetCDF files
- (months, need MATLAB)
- 5. Debug and repeat (months to years)
5Setting up the code
- Bathymetry
- Grid
- Time stepping
- Stratification
- Forcing
- Boundary Conditions
- Nudging
All of these parameters can be defined
analytically in ROMS or you can read in data from
external files.
6Analytic bathymetry
Nonlinear/analytical.f elif defined TTP1
Xsize20.00E03_r8 Esize 10.00E03_r8
depth200.0_r8 f00.0_r8
beta0.0_r8
Nonlinear/analytical.f elif defined TTP1
DO jJstrR,JendR DO iIstrR,IendR
val (xr(i,j)-(Xsize/2.0_r8))/1000.0_r8
h(i,j)depth-5.0_r8EXP(-(valval))
END DO END DO
7Complicated bathymetry
Any land (except straight side-walls) must have a
land mask.
Real bathymetry must be smoothed before
sending it to ROMS.
8PROBLEM! Leaky land mask
psu
9Grid
Terrain-following vertical grid (a.k.a.
S-coordinate grid)
rho-grid temp and salinity (5x3) u-grid
x-direction velocity (6x3) v-grid y-direction
velocity (5x4)
10Time stepping
CFL (Courant, Friedricks, Lewy) condition
determines the size of the time step
One M2 tidal cycle 44712 s 20 tidal cycle
run 900,000 time steps Luckily, if you break
CFL conditions, you will know
11Forcing and boundary conditions
elif defined TTP1 IF (WESTERN_EDGE) THEN
facTANH((tdays(ng)-dstart)/1.0_r8)
omega2.0_r8pitime(ng)/(12.42_r83600.0_
r8) val1.0_r8 phase0.0_r8deg2rad
DO jJstrR,JendR
BOUNDARY(ng)zeta_west(j)facvalSIN(omega-phase)
END DO END IF
12PROBLEM Incorrect boundary conditions
Test 44
channel entrance
channel exit
13PROBLEM Incorrect BCs
Test 45
Test 46
Test 51
Test 49
14Nudging
Nudging forces velocity near edges to a
prescribed value.
Test 61 - with nudging Time averaged velocity at
3 depths
Test 44 - without nudging Time averaged velocity
at 3 depth
15Advantages to modeling
- Know values of all parameters (velocity,
salinity, temperature, etc.) at every single grid
point. - Dont need a ship or fancy instrumentation less
money. - Easily test what ifs (e.g. Ive got my model
running accurately, what if the tides were twice
as fast?) - Modeling can fill in holes in measurements.
16Disadvantages to modeling
- The answer can seem so right, but is it?
- Need a powerful computer with lots of storage
space. - A modeler must not be scared of computer code,
MATLAB or computers. - Must have patience. (But who doesnt need
patience in grad school.)
17Whoa! Its like a Grateful Dead concert!