next up previous contents
Next: Lecture 3: Graphics (for Up: Lecture 2: Programming in Previous: Scripts   Contents

A couple of exercises (using where)

A: Suppose we have:

heights=[0.,120,160.,512.,1000.,1200.,2000.,3300,4000.];(metres)
temperatures=[293.,-999.,-999.,290.,286.,-999.,276.,-999.,270.];(Kelvin) -999. is undefined
WVMR=[10.,9.5,9.6,-9999.,8.,7.,4.2,3.1,1.];Water Vapour Mixing Ratio (g/kg)

(A1) Plot WVMR vs height where there is WVMR data

(A2) Plot temperatures vs height where there is temperature AND WVMR data. Add WVMR vs height to the same graph.

B: Using,

~lecjm/public_html/Teaching/IDL_course/Data/larkhill_sonde.dat 
(contains data of pressure, height, temperature, dew-point, windspeed, wind direction)
and http://www.iac.ethz.ch/staff/dominik/idltools/idl_atmosphys.html

B1: Plot tempertaure against pressure (with surface pressure decreasing up y-axis)

B1: Plot relative humidity against pressure.

If you do these without using where it will take you a lot more lines of code!



lecjm 2008-11-06