Atmospheric and Ocean Waves-572
Students will run a series of experiments with a 3-D. primitive equation model, incompressible, hydrostatic, with Cartesian coordinates and a vertical terrain following coordinate (ZETA model). An analysis package is also included. The students are expected to write a short essay describing the experiment and its main conclusions.
Experiment #1. Flow over a 2-D. gaussian mountain.
Each student has assigned a different value for the velocity of the mean flow; the rest of the parameters ( e.g stratification, height and width of the mountain etc) are prescribed. More details will be given in the laboratory class.
* Describe the structure of each of the dynamic variables in the steady state solution.
* Discuss the momentum and energy fluxes of the numerical solution.
* Find the steady state linear solution for the mountain wave, assuming hydrostatic e incompressible fluid and related to the particular values of your numerical simulation.
For the examples you will use the ZETA
model
To Copy the Model Code
You will have all the files necessary to run
the model.
In "Zeta_setup" file, you select the parameters of the experiment, time step, characteristics of the basic flow etc. The second one "Create_scripts" is the file that creates the corresponding scripts to be submitted for execution to the T90 machine (it is fairly automatic).
Graphical Analysis Information
You may use GrADS or Ferret to
analyze the data. Ferret was developed more recently than Grads and it is more powerful. With simple line
commands it is easy to do graphics.
Basic FerretCommands
Startup GrADS by entering :
ferret  To open a file
use "/archive/io/CLASS_2D001.b1.e1000.nc"
To see what variables do you have in the file
show dat
If you want to define a window size (It is not necessary the default is fine)
set win/clear/aspect=0.551748251748252
To contour a region you can do it in two ways, preset a region as follow
set region /I=98:158/J=3/K=2:35/L=6
or specify the region in the line command for contouring the variable uu[....]
contour ww[I=98:158,j=3,k=2:35,l=6]
To fill with colour, or shade
fill uu[I=98:158,j=3,k=2:35,l=6]
To clean the window
set win/clear
For showing different variables in one graph (command/over)
fill uu[I=98:158,j=3,k=2:35,l=6]
contour/over ww[I=98:158,j=3,k=2:35,l=6]
To save in a gif file do the following
FRAME/FORMAT=GIF
FRAME/file=Class1Ferret.gif
quit
For those who do not want to use Ferret and wish to use GrADS, some GrADS basics are listed below.
Basic GrADS Commands
Startup GrADS by entering :grads (this will open GrADS in "portrait" mode.)
orgrads -l (this will open GrADS in "landscape" mode.)
To open a netCDF file, enter :
sdfopen <filename>GrADS Modes:
set gxout contour Data is displayed by contours
set gxout shaded Data is displayed by shaded bands
set gxout vector Data is displayed by vector arrowsDisplaying the data:
d "var" where "var" is the name of one of variables contained in the netcdf file
defined in the sdfopen statementTo quit a GrADS session, enter:quitHelp
q entering "q" will yield:
q config List configuration of this build
q files: Lists open files
q file n: Gives info on particular file
q define: Lists currently defined variables
q fwrite: Fwrite Status
q lats: State of the GrADS-LATS Interface
q dims: Gives current dimension environment
q time: Gives current time
q gxinfo: Gives graphics environment info
q xinfo: Gives info on state of X Window
q shades: Gives colors and levels of shaded contours
q pos: Waits for mouse click, returns position
q w2gr: Convert world to grid coordinates
q gr2w: Convert grid to world coordinates
q w2xy: Convert world to x,y screen coordinates
q xy2w: Convert x,y screen coordinates to world coordinates
q gr2xy: Convert grid to x,y screen coordinates
q xy2gr: Convert x,y screen to grid coordinates
q pp2xy: Convert pre-projected grid coordinates to screen x,y coordinates
q defval: Gives defined grid value given grid i,jYou may then enter the appropriate "q" command to obtain appropriate information.
Note: q is not a substitute for quit. GrADS examples shown below should clarify the elementary commands.Example 1
Most of you should have run a case in which a constant flow, U=20m/s, is blowing over a two dimensional mountain of 1000m height and 50km cross stream width. In order to visualize the solution, GrADS instructions are shown below:
/local/user/> grads
ga-> sdfopen /archive/user/CLASS_2D001.b1.e1000.nc To open file
ga-> set t 6 to fix time (only 6 records).
ga-> set y 3 to set latitude, 3rd row (only 5 in example).
ga-> set z 2 35 to set levels, the netcdf record has 36 levels.
ga-> set x 98 158 to set the longitude or x points.
ga-> enable print UU_VV_TH This is to open the metafile
ga-> set gxout shaded to set what kind of plot type for uu.
ga-> d uu display uu.
ga-> set gxout contour to set the plot type for ww.
ga-> set ccolor 0 to set the color of the contour.
ga-> d ww display ww.
ga-> set ccolor 1 set the color for the contour of th.
ga-> d th display th.
ga-> print write the metafile.
ga-> quit close grads and the metafile.
GrADS produces a metafile that you can see it directly or you can convert it to a postscript file as follow:
/local/user/> "ls UU_VV_TH" This is the metafile.
/local/user/>" gxps -r -i UU_VV_TH -o UU_VV_TH.ps " This is to translate to a "ps" file
The figure shows U (uu, x velocity) shaded, contours (white) of vertical velocity W (ww) and Potential temperature contours (th, black)
![]()
Go Back