Extract / interpolate in 3d atmospheric field [message #69684] |
Wed, 03 February 2010 05:57 |
Dave[3]
Messages: 12 Registered: November 2006
|
Junior Member |
|
|
I have some gridded, 3d atmospheric model data (pv, temperature, etc)
and I am trying to pull some data out of the cube.
IDL> help, data, /str
** Structure <1fafc08>, 10 tags, length=701600, data length=701600,
refs=1:
IDAY LONG 25
IMON LONG 1
IYEAR LONG 2005
LATS LONG 73
MERIDS LONG 96
LEVS LONG 25
XLAT FLOAT Array[73]
XLON FLOAT Array[96]
PRES FLOAT Array[25]
DATA FLOAT Array[73, 96, 25]
IDL> print, data.xlat
-90.0000 -87.5000 -85.0000 -82.5000 -80.0000
-77.5000 -75.0000 -72.5000 -70.0000
-67.5000 -65.0000 -62.5000 -60.0000 -57.5000
-55.0000 -52.5000 -50.0000 -47.5000
-45.0000 -42.5000 -40.0000 -37.5000 -35.0000
-32.5000 -30.0000 -27.5000 -25.0000
-22.5000 -20.0000 -17.5000 -15.0000 -12.5000
-10.0000 -7.50000 -5.00000 -2.50000
0.00000 2.50000 5.00000 7.50000 10.0000
12.5000 15.0000 17.5000 20.0000
22.5000 25.0000 27.5000 30.0000 32.5000
35.0000 37.5000 40.0000 42.5000
45.0000 47.5000 50.0000 52.5000 55.0000
57.5000 60.0000 62.5000 65.0000
67.5000 70.0000 72.5000 75.0000 77.5000
80.0000 82.5000 85.0000 87.5000
90.0000
IDL> print, data.xlon
0.00000 3.75000 7.50000 11.2500 15.0000
18.7500 22.5000 26.2500 30.0000
33.7500 37.5000 41.2500 45.0000 48.7500
52.5000 56.2500 60.0000 63.7500
67.5000 71.2500 75.0000 78.7500 82.5000
86.2500 90.0000 93.7500 97.5000
101.250 105.000 108.750 112.500 116.250
120.000 123.750 127.500 131.250
135.000 138.750 142.500 146.250 150.000
153.750 157.500 161.250 165.000
168.750 172.500 176.250 180.000 183.750
187.500 191.250 195.000 198.750
202.500 206.250 210.000 213.750 217.500
221.250 225.000 228.750 232.500
236.250 240.000 243.750 247.500 251.250
255.000 258.750 262.500 266.250
270.000 273.750 277.500 281.250 285.000
288.750 292.500 296.250 300.000
303.750 307.500 311.250 315.000 318.750
322.500 326.250 330.000 333.750
337.500 341.250 345.000 348.750 352.500
356.250
IDL> print, data.pres
1000.00 681.292 464.159 316.228 215.443
146.780 100.000 68.1292 46.4159
31.6228 21.5443 14.6780 10.0000 6.81292
4.64159 3.16228 2.15443 1.46780
1.00000 0.681292 0.464159 0.316228 0.215443
0.146780 0.100000
I'd like to pull the 2d slice of data at a specific latitude circle
and create a contour plot where the y-axis
is pressure and the x-axis is longitude. So, when the latitude of
interest is specified in xlat, 85 N, I
can pull this array as:
IDL> print, data.xlat[70]
85.0000
IDL> help, reform(data.data[70,*,*])
<Expression> FLOAT = Array[96, 25]
Unfortunately, the latitude circle of interest isn't always exactly
specified, say 83.5 or 84 deg N.
Re-runing the model with higher grid resolution is not an option so
I'm stuck trying to interpolate
the data cube. I suspect I'm not the first person to encounter this in
atmospheric science and
was wondering if anyone had any routines or techniques they are
willing to share.
I've looked at the routine 'extract_slice' but I'm not sure it is
appropriate here and I've not been
able to get sensible results from it.
Thanks all,
Dave
|
|
|