0. Create the grid in directory ../Grids: "rectelem < rect.in" which produces file fort.8. Rename it to something useful like chan.xx where xx is the spectral truncation inside each element. Produce the Dirichlet boundary condition file. It should be named chan.xx.dbc 1. Compile code in ../Code07b "make ns2dp" and copy it to run directory. 2. Adjust ns2d.dat 3. Run the code:"./ns2dp" Output data written to files fort.000.11: vorticity fort.000.12: streamfunction fort.000.21: Last snapshot of zonal velocity fort.000.22: last snapshot of meridional velocity. 4. Plotting: two solutions use NCAR graphics or use matlab. The ncargraphics solution needs: 1. Compile/install ncargraphics using ifort as the fortran compiler 2. Go to ~/SEOM/Plot/Src make drawcoast (for drawing grids) make contours (for contouring) make vectors (for vector plots) 3. Use one of the scripts I have to do the contouring: "contours < str.com", to plot the streamfunction by default the output is sent to a file called gmeta in a format called CGM. If you want a postscript figure just say: export GKS_WORKST=20 and run the program again. The output will be in gmeta1.ps. 4. Visualize the data by doing "idt gmeta" and you can a console that looks like a video controller. 5. matlab solution. Since matlab understand 2D matrices one solution is to interpolate the ns2dp data to a structuredgrid and plot it. For this to be meaningful you have to use the native ns2dp interpolation. This is done in two steps using a. "tocart < tocart.in" which produces a file called slab.000.sav, rename it to structured_grid.sav. You run tocart.in once for a given SEOM grid and a given output grid. You can reuse it to plot the different fields, eg. streamfunction, vorticity, velocity... b. "interp2d < interp2d.dat" which uses the info in structured_grid.sav file to interpolate to an equally spaced grid. the input/output file names are specified in interp2d.dat, in this case fort.000.12 and fortst.12. You can use the same script to process the vorticity modifying it for the file names. c. load matlab and run the script seomplot.m you should copy the files in ~mohamed/matlab/*.m to your own ~munehiko/matlab directory. d. I noticed you don't have matlab in your computer, talk to Sharan and Grant Basham to install the common version onto your system.