19.01.2015 Views

A model of the wind-driven ocean circulation Version 1.0

A model of the wind-driven ocean circulation Version 1.0

A model of the wind-driven ocean circulation Version 1.0

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

A <strong>model</strong> <strong>of</strong> <strong>the</strong> <strong>wind</strong>-<strong>driven</strong> <strong>ocean</strong> <strong>circulation</strong><br />

<strong>Version</strong> <strong>1.0</strong><br />

André Paul<br />

February 15, 2006<br />

Figure 1: Stream lines (in units <strong>of</strong> Sverdrup, 1 Sv = 1×10 6 ms −1 ) in a rectangular<br />

basin as simulated by <strong>the</strong> gyre <strong>model</strong> with all parameters set to <strong>the</strong>ir default<br />

values.<br />

1


1 System requirements<br />

To run this <strong>ocean</strong> <strong>model</strong> and view its output on your Windows PC requires <strong>the</strong><br />

following s<strong>of</strong>tware packages to be installed:<br />

• cygwin (http://cygwin.com/)<br />

• netCDF (http://www.unidata.ucar.edu/s<strong>of</strong>tware/netcdf/)<br />

• GMT (<strong>the</strong> ‘Generic Mapping Tools’, http://gmt.soest.hawaii.edu/)<br />

• GSview (http://www.cs.wisc.edu/~ghost/gsview/packages)<br />

• Ferret (http://ferret.pmel.noaa.gov/Ferret/)<br />

2 How to get started<br />

2.1 How to install <strong>the</strong> <strong>model</strong><br />

• Using Windows, download <strong>the</strong> ZIP-compressed folder gyre.zip from<br />

http://www.palmod.uni-bremen.de/~apau/<br />

• Do not open this folder, but save it, e.g. to <strong>the</strong> folder My Documents (Eigene<br />

Dateien) on <strong>the</strong> desktop <strong>of</strong> your PC.<br />

• Ei<strong>the</strong>r right-click on <strong>the</strong> gyre.zip icon and extract all files directly to <strong>the</strong><br />

folder My Documents, or use any o<strong>the</strong>r tool to extract all files from this<br />

ZIP-compressed folder.<br />

2.2 Directory structure<br />

The gyre directory contains <strong>the</strong> following subdirectories (in <strong>the</strong> UNIX/LINUX<br />

world <strong>the</strong> term ‘directory’ is used for ‘folder’):<br />

doc<br />

gmt<br />

input<br />

output<br />

src<br />

tmp<br />

work<br />

documentation<br />

GMT scripts *.gmt for plotting<br />

input parameters *.in<br />

<strong>model</strong> output *.dat or *.nc<br />

Fortran 90 source code *.f90, if available<br />

temporary subdirectory for compiling and plotting<br />

executable program and (possibly) compile scripts<br />

2


2.3 How to run <strong>the</strong> <strong>model</strong><br />

To ‘run’ (execute) <strong>the</strong> <strong>model</strong>, double-click on <strong>the</strong> start cygwin.bat icon in <strong>the</strong><br />

work directory. A cygwin <strong>wind</strong>ow will appear. Type gyre.exe (or ./gyre.exe)<br />

on <strong>the</strong> command line and press return. The <strong>model</strong> will start, print <strong>the</strong> current<br />

values <strong>of</strong> <strong>the</strong> <strong>model</strong> parameters beta, taur and tau0 to <strong>the</strong> screen, run for a<br />

few seconds, print out <strong>the</strong> number <strong>of</strong> iterations n it took to reach an equilibrium<br />

solution and finish.<br />

2.4 List <strong>of</strong> some useful UNIX/LINUX commands<br />

ls<br />

cd<br />

cd ..<br />

cp file1 file2<br />

rm file<br />

man command<br />

pwd<br />

gv or ggv<br />

g95 or ifort<br />

list directory contents<br />

change directory to directory<br />

change directory one level up<br />

copy files and directories<br />

remove file(s) or directories<br />

format and display <strong>the</strong> on-line manual pages<br />

print name <strong>of</strong> current/working directory<br />

display ps files (may work for eps or pdf files as well)<br />

compile Fortran 90 source file<br />

2.5 Some LINUX hints<br />

• Use <strong>the</strong> tab key to complete a command.<br />

• Use <strong>the</strong> up and down keys to scroll through <strong>the</strong> history <strong>of</strong> previous coomands.<br />

• To put ghostview (gv or ggv) or any editor (e.g. emacs) in <strong>the</strong> background,<br />

add ‘ &’ at <strong>the</strong> end <strong>of</strong> <strong>the</strong> command line.<br />

2.6 How to view <strong>the</strong> results<br />

After running <strong>the</strong> gyre <strong>model</strong>, <strong>the</strong> output directory contains <strong>the</strong> following files:<br />

snapshot.dat in human-readable ASCII format, snapshot.nc in binary netCDF<br />

format. Both files contain <strong>the</strong> equilibrium solution for <strong>the</strong> <strong>wind</strong>-<strong>driven</strong> <strong>ocean</strong><br />

<strong>circulation</strong> in terms <strong>of</strong> a horizontal streamfunction. The contents <strong>of</strong> <strong>the</strong> file<br />

snapshot.dat can be visualized using, e.g. ‘GMT’ (<strong>the</strong> ‘Generic Mapping Tools’,<br />

http://gmt.soest.hawaii.edu/) - see <strong>the</strong> GMT script gyre.gmt in <strong>the</strong> gmt directory.<br />

The contents <strong>of</strong> <strong>the</strong> file snapshot.nc can be visualized using, e.g. ‘ferret’:<br />

3


• If you use a ‘German-language’ Windows operating system, open <strong>the</strong> file<br />

init ferret.txt, turn those lines that refer to <strong>the</strong> ‘English-language’ Windows<br />

operating system into comments, and activate those lines that refer<br />

to <strong>the</strong> ‘German-language’ Windows operating system.<br />

• Double-click on <strong>the</strong> start ferret.bat icon in <strong>the</strong> output directory to automatically<br />

start up ‘ferret’ in this directory. A new cygwin <strong>wind</strong>ow will<br />

appear.<br />

– To start ‘ferret’, now type: ferret.<br />

– To load <strong>the</strong> output file into ‘ferret’, type: use snapshot.nc<br />

– To check what data was loaded, type: show data<br />

– To get a first idea <strong>of</strong> <strong>the</strong> <strong>model</strong> result, type: shade psi<br />

If <strong>the</strong> shade psi command fails, close ‘ferret’ (by typing exit), start <strong>the</strong><br />

‘X <strong>wind</strong>ows server’ (by typing startx & in a different cygwin <strong>wind</strong>ow),<br />

<strong>the</strong>n re-open ‘ferret’ (by typing ferret again).<br />

If executing <strong>the</strong> start ferret.bat file fails, start up ‘ferret’ by executing <strong>the</strong><br />

ferret batch file from <strong>the</strong> ‘Start - All Programs’ menu. Find out where you are<br />

by typing pwd and pressing ‘enter’. If you are not in <strong>the</strong> output directory, change<br />

to it using <strong>the</strong> following sequence <strong>of</strong> commands:<br />

cd c:<br />

cd Documents and Settings<br />

cd geo<br />

cd Mydocuments<br />

cd gyre<br />

cd gyre<br />

cd output<br />

2.7 Fur<strong>the</strong>r ‘ferret’ commands<br />

show data<br />

shade psi<br />

cont psi<br />

fill psi<br />

plot/y=2500000 psi<br />

list <strong>the</strong> loaded data<br />

color-shade streamfunction<br />

draw contour lines<br />

draw color-filled contour lines<br />

for a given value <strong>of</strong> y = 2500 km,<br />

plot <strong>the</strong> streamfunction as a function <strong>of</strong> x<br />

To compare <strong>the</strong> contents <strong>of</strong> two output files snapshot1.nc and snapshot2.nc,<br />

use <strong>the</strong> following sequence <strong>of</strong> commands:<br />

4


use snapshot1.nc<br />

use snapshot2.nc<br />

show data<br />

fill psi[d=1]<br />

fill psi[d=2]<br />

plot/y=2500000 psi[d=1]<br />

plot/y=2500000/overlay psi[d=2]<br />

2.8 How to continue<br />

To carry out a second experiment and compare <strong>the</strong> result to <strong>the</strong> first one, proceed<br />

as follows:<br />

• rename <strong>the</strong> output file snapshot.nc in <strong>the</strong> output directory to prevent<br />

overwriting (e.g. type mv snapshot.nc snapshot1.nc in <strong>the</strong> cygwin <strong>wind</strong>ow)<br />

• change parameter(s) in <strong>the</strong> file input/gyre.in using <strong>the</strong> ‘Editor’, ‘Word-<br />

Pad’ or notepad, save <strong>the</strong> file<br />

• rerun <strong>the</strong> program work/gyre.exe, check <strong>the</strong> parameters read in (a new<br />

output file is generated)<br />

• rename <strong>the</strong> output file snapshot.nc in <strong>the</strong> output directory (e.g. type mv<br />

snapshot.nc snapshot2.nc in <strong>the</strong> cygwin <strong>wind</strong>ow)<br />

• load output files into ‘ferret’ (e.g. type use snapshot1.nc in <strong>the</strong> ‘ferret’<br />

<strong>wind</strong>ow)<br />

3 Model description<br />

3.1 Model parameters<br />

There are three key parameters that can be changed in <strong>the</strong> file input/gyre.in:<br />

• beta (or β): rate <strong>of</strong> change <strong>of</strong> <strong>the</strong> Coriolis parameter with latitude (default<br />

value: 2 × 10 −11 m −1 s −1 )<br />

• taur (or τ r ): relaxation time scale for bottom (Rayleigh) friction (default<br />

value: 6 days)<br />

• tau0 (or τ 0 ): amplitude <strong>of</strong> zonal <strong>wind</strong> forcing (default value: 0.1 N m −2 )<br />

5


The bottom (Rayleigh) friction parameter is given by R = 1/τ r . The relaxation<br />

time scale τ r characterizes <strong>the</strong> time it would take for <strong>the</strong> <strong>circulation</strong> to slow down<br />

if all o<strong>the</strong>r forcings could be ‘turned <strong>of</strong>f’. The longer this timescale, <strong>the</strong> smaller<br />

<strong>the</strong> friction.<br />

A <strong>the</strong>oretical description <strong>of</strong> this <strong>model</strong> can be found in Stommel (1948), Open<br />

University Course Team (1989, Section 4.2) and Mellor (1996, Section 6.3) - see<br />

also Munk (1950) and Munk and Carrier (1952).<br />

References<br />

Mellor, G. L. (1996). Introduction to Physical Oceanography. Woodbury, New<br />

York: American Institute <strong>of</strong> Physics.<br />

Munk, W. H. (1950). On <strong>the</strong> <strong>wind</strong>-<strong>driven</strong> <strong>ocean</strong> <strong>circulation</strong>. Journal <strong>of</strong> Meteorology<br />

7, 79–93.<br />

Munk, W. H. and G. F. Carrier (1952). The <strong>wind</strong>-<strong>driven</strong> <strong>ocean</strong> <strong>circulation</strong> in<br />

<strong>ocean</strong> basins <strong>of</strong> various shapes. Tellus 2, 158–167.<br />

Open University Course Team (1989). Ocean Circulation. Milton Keynes:<br />

Open University.<br />

Stommel, H. (1948). The westward intensification <strong>of</strong> <strong>wind</strong>-<strong>driven</strong> <strong>ocean</strong> currents.<br />

Transactions <strong>of</strong> <strong>the</strong> American Geophysical Union 29, 202–206.<br />

6

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!