[Science] [BAS home] [Met home] [WMC home] | Antarctic Meteorology |
Note for non-pp users: all the IDL progs here assume the data is given wrapped up in a pp-field. For just about all purposes, all you need to know is that this is a structure with various components, including:
The main purpose of this was the Rossby Wave Source term stuff: RWS: see below. But the routines here would also be useful if you just want gradients, laplacians etc of PP fields on the sphere. If you use this, read the cautions...
SPHEREPACK page: http://www.scd.ucar.edu/css/software/spherepack/
NOTE (this caused me so much pain...) that spherepack uses a slightly different wind-component-sign-convention: the NS one is the negative of what I/UKMO normally use. Ie, the first component is easterly (as usual): a +ve wind is blowing from W to E; but the second component is such that a +ve wind is blowing from N to S. REMEMBER THIS! In practice, this means that all NS components need to be negated before being handed to spherepack, and then (if the result is a wind) the NS component negated on return.
new_field=pp_regrid(era_field,get_orog(),/pole)
My code: sfvp.f compiled by compile1_sfvp and then used by IDL prog fsfvp.
test_sfvp1. Uses a real ERA 850 hPA field. The result is:
which seems to show we've got it right. It also checks that div(rot_wind) is nearly zero (yes) and curl(div_wind) too (yes).
ALSO: since v_rot = k ^ grad(stream function), one can test this by taking grad (using fgrad.pro), then using kcross.pro, then computing fsfvp on the result, and you should be back to where you started. And you are.
See: rws for more.
My code: curl.f compiled by compile1_curl and then used by IDL prog fcurl.
@test_poisson z=get_field('test-1',nf=3) gettwogifs,out='test-1'
Past last modified: 30/8/2007 |
wmc@bas.ac.uk © Copyright Natural Environment Research Council - British Antarctic Survey 2001 |