If you miss class or need more time to work on the exercise, you can do this exercise on your own computer if you have matlab. But please be sure you know how to log on to the ATG 623 cluster and edit a file before the class devoted to exercise 2. If on your own computer, you can download the matlab script from http://www.atmos.washington.edu/academics/classes/2011Q1/380/atms380exer1.m . Now go to midway through step 1.
If working in ATG 623 choose any computer near the group. They are all networked together so you will be able to access your directories from any of them. You can also log on to these machines from another computer on campus with ssh -X icicle.atmos.uw.edu, the "-X" flag will allow you to open graphical displays across the network. Note "icicle" can be replaced with any of the machine names that are located on the computers. It doesn't matter which one you log on to. If you open matlab from outside ATG with the full window frame, it may be painfully slow.
When in 623, before entering your atmos sci account name and password, choose a session type from the screen menu at lower left. If you are familiar with one, choose it. If not use KDE, so I can help you. This session type will be your default in the future. The rest of these instructions refer to the KDE window manager. You will need to open a window/terminal. Click on the K in the lower left corner. Go to the "System" menu and click on "Konsole". It will help if you do it again only click on the little terminal icon and drag it to your grey menu bar at the bottom of your screen. Now you can open a window by clicking on the icon from the lower menu bar.
Check to see that you are using an approriate shell for running the scripts for this class. In the Shell-Konsole window type, echo $SHELL
If it says /bin/csh or /bin/tcsh you are fine.
If not change your shell with chsh /bin/tcsh
To edit a file, use pico, emacs, vi, etc. Do not use microsoft word. If you are unfamiliar with how to do this, go to a Shell-Konsole window and type, emacs & and a window will open where you can open files and edit them. You don't need to edit anything today but please read the emacs tutorial under the help menu if you are unfamiliar with editing.
1. Run the advection model and code up the forward difference solution.
cp /home/disk/p/atms380/scripts/atms380exer1.m .
In the matlab window frame, be sure the current directory is where you just copied the matlab script
In the command window, type atms380exer1 and hit return as instructed. The red line is zero because it is your task to enter the forward algorithm. Open the file and edit it as needed. Run again when you think you are done coding.
2. Questions to answer about the model. Write a few complete sentences for b-e.
a) What is the finite difference equation with forward time differencing and centered spatial differencing for the one-dimensional wave equation that you coded?
b) Is the forward solution growing for reasonable Courant numbers?
c) What happens to all three finite difference estimates when you lower the Courant number and increase the end time?
d) What happens to the three when you increase the wind speed?
e) What happens to the three when you increase nx?
|Return to Homepage