Weather and Climate Prediction Exercise 1
http://www.atmos.washington.edu/academics/classes/2013Q1/380/HW1.html
Due 17 Jan, 2013
This assignment comes with a pdf with additional information.

0. Basics

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/2013Q1/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.

When logging in to a machine 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 pal, so I can help you. This session type will be your default in the future.  You will need to open a window/terminal. Click on the "Applications" button in the lower left corner. Use the search box to search for "terminal" and click on Konsole.

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 terminal 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.

When you run matlab on one of our machines, ALWAY FIRST OPEN A TERMINAL AND TYPE "qrsh" so you will run from the least busy machine on the cluster. For example, if you sat down at the iceicle.atmos.uw.edu (or any computer in 623):
icicle% qrsh (this will log you into a free machine e.g. analyze)
analyze% matlab
analyze% exit
icicle% exit
Note that you have to exit the terminal twice, or just log out of the workstation when you are done. You can run any unix command after qrsh, not just matlab.

qrsh
mkdir timestepping

cd timestepping
cp
/home/disk/p/atms380/scripts/atms380exer1.m .
matlab &

In the matlab window frame, be sure the current directory is where you just copied the matlab script. In the matlab 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) Write the equation for the finite difference equation with forward time differencing and centered spatial differencing for the one-dimensional wave equation that you coded. This will be analogous to the finite difference equations on the handout.

b) Describe the quality of the forward-centered solution compared to the exact solution in terms of the magnitude and phase shift of the wave crests when time = 12 and when time = 36 (increase t_stop to 36). Set t_stop back to 12 when you are done.

c) Convince yourself that most of these solutions are quite accurate if you decrease the grid spacing (by increasing nx) and decrease the time step (by lowering the Courant number). What are the trade-offs? In other words, why not decrease the two in an operational model?

d) What happens to the various numerical solutions when you increase the wind speed?

e) Increase the Courant number to 1.2 and describe the quality of the backward-centered solution compared to the others in terms of how the solutions grow in time.

A solution that blows up cannot be tolerated in an operational model. Fortunately there are better numerical scheme than these. But the lesson about making trade-offs applies to every scheme. We won't scrutinze the numerics in our models any further, but we may experience  inaccuracy or solutions that blowing up when we change parameters outside their normal operating range.

Return to Homepage