[gradsusr] Question regarding the error I am receiving with coll2gr

Nimrod Micael nmicael at aggies.ncat.edu
Thu Nov 21 20:49:54 EST 2013


*"Collect Error: Z or T must be the only varying dimension*
*Collect Error: Z or T must be the only varying dimension*
*Collect Error: Z or T must be the only varying dimension*
*Collect Error: Z or T must be the only varying dimension*
*Collect Error: Z or T must be the only varying dimension*
*Collect Error: Z or T must be the only varying dimension*
*281.275*
*35.7428571428571*
*Collect Error: Z or T must be the only varying dimension*
*Collect Error: Z or T must be the only varying dimension*
*Collect Error: Z or T must be the only varying dimension*
*Collect Error: Z or T must be the only varying dimension*
*Collect Error: Z or T must be the only varying dimension*
*Collect Error: Z or T must be the only varying dimension*
*281.288*
*35.7465714285714*
*Operation error:  Invalid dimension environment*
*  Looping dimension does not vary*
*Operation error:  Invalid dimension environment*
*  Looping dimension does not vary*
*Cannot plot color bar: No shading information"*

Part of the error.


*Script used: *

'reinit'

'open 20110416_d03.ctl'
'set display color white'
'clear'
'set map 2 1 5'
'set annot 1 12'
'set xlopts 1 6 .17'
'set ylopts 1 6 .16'
'set mpdset hires'
'set grid off'
'set timelab off'
'set csmooth on'
*'set gxout shaded'
'set t 83'

*light green to dark green
'set rgb 31 230 255 225'
'set rgb 32 200 255 190'
'set rgb 33 180 250 170'
'set rgb 34 150 245 140'
'set rgb 35 120 245 115'
'set rgb 36  80 240  80'
'set rgb 37  55 210  60'
'set rgb 38  30 180  30'
'set rgb 39  15 160  15'

*light beige to dark brown
'set rgb 71 250 240 230'
'set rgb 72 240 220 210'
'set rgb 73 225 190 180'
'set rgb 74 200 160 150'
'set rgb 75 180 140 130'
'set rgb 76 160 120 110'
'set rgb 77 140 100  90'
'set rgb 78 120  80  70'
'set rgb 79 100  60  50'

'set xlint 1.5'

********************************************************
*
*          Color Shades
*******************************************************
'set rgb 59 0 0 0'
'set rgb 60 15 15 15'
'set rgb 61 30 30 30'
'set rgb 62 45 45 45'
'set rgb 63 60 60 60'
'set rgb 64 75 75 75'
'set rgb 65 90 90 90'
'set rgb 66 105 105 105'
'set rgb 67 120 120 120'
'set rgb 68 135 135 135'
'set rgb 69 150 150 150'
'set rgb 70 165 165 165'
'set rgb 71 180 180 180'
'set rgb 72 195 195 195'
'set rgb 73 210 210 210'
'set rgb 74 225 225 225'
'set rgb 75 245 245 245'
'set rgb 76 255 255 255'


*light yellow to dark red
'set rgb 20 255 250 200'
'set rgb 21 255 250 170'
'set rgb 22 255 232 120'
'set rgb 23 255 192  60'
'set rgb 24 255 160   0'
'set rgb 25 255  96   0'
'set rgb 26 255  50   0'
'set rgb 27 225  20   0'
'set rgb 28 192   0   0'
'set rgb 29 165   0   0'

*light blue to dark blue
'set rgb 81 225 255 255'
'set rgb 82 180 240 250'
'set rgb 83 150 210 250'
'set rgb 84 120 185 250'
'set rgb 85  80 165 245'
'set rgb 86  60 150 245'
'set rgb 87  40 130 240'
'set rgb 88  30 110 235'
'set rgb 89  20 100 210'

'set rgb 40 0 0 0'
'set rgb 41 0 236 236'
'set rgb 42 1 160 246'
'set rgb 43 0 0 246'
'set rgb 44 0 255 0'
'set rgb 45 0 200 0'
'set rgb 46 0 144 0'
'set rgb 47 255 255 0'
'set rgb 48 231 192 0'
'set rgb 49 255 144 0'
'set rgb 50 255 0 0'
'set rgb 51 214 0 0'
'set rgb 52 192 0 0'
'set rgb 53 255 0 255'
'set rgb 54 153 85 201'
'set rgb 55 255 255 255'

* These are the BLUE shades
'set rgb 16   0   0 255'
'set rgb 17  55  55 255'
'set rgb 18 110 110 255'
'set rgb 19 165 165 255'
'set rgb 20 220 220 255'


'c'
'set background 0'
'set line 0'
'draw rec 0 0 11 8.5'

'set lev 1000 100'
*'define prs = 100'
*'qv = qvapor'
*'th = theta'
*"define e=0.01*prs*qv/(0.6219718+qv)+1e-20"
*"define t=th*pow((prs/100000.0),(287.04/1005.7))"
*"define tlcl=55.0+2840.0/(3.5*log(t)-log(e)-4.805)"
*"define
the=t*pow(100000.0/prs,0.2854*(1.0-0.28*qv))*exp(((3376.0/tlcl)-2.54)*qv*(1.0+0.81*qv))"
"define vvort= hcurl(u,v)"
*******************************************************************************************
*'set x 1 50'*
*'set y 10'*
*'set lev 1000 100'
'set lat 35.65 35.75'
'set lon 280.95 281.3'
*'set gxout shaded'
'set parea 1 9.25 1 7.75'

* ARBITRARY CROSS-SECTION defined by lon1-lat1 lon2-lat2
lon1=280.95
lon2=281.3
lat1=35.65
lat2=35.75

*Vector winds projected in the plane
m=(lat2-lat1)/(lon2-lon1)
angle=math_atan(m)
xproj = math_cos(angle)
yproj = math_sin(angle)

lon=lon1
lat=lat1
'collect 1 free'
'collect 2 free'
'collect 3 free'
'collect 4 free'
*'collect 5 free'
'collect 6 free'
'collect 7 free'

while (lon<=lon2)
     'collect 1 gr2stn(w,'lon','lat')'
     'collect 2 gr2stn(u,'lon','lat')'
     'collect 3 gr2stn(v,'lon','lat')'
     'collect 4 gr2stn(dbz,'lon','lat')'
*    'collect 5 gr2stn(the,'lon','lat')'
    'collect 6 gr2stn(mag(u,v),'lon','lat')'
    'collect 7 gr2stn(vvort,'lon','lat')'
     say lon
     say lat
     lon=lon+0.013
     lat=lat1 + (lat2-lat1)*(lon-lon1) / (lon2-lon1)
endwhile

'set arrlab off'
'set grads off'
'set x 0 48'

* Horizotal windspeed and potential temparature
*'set lon 'lon1' 'lon2
*'set xaxis 'lon1-360' 'lon2-360' 0.2'
*'set parea 1 9.25 1 7.75'
*'set vrange 10 'height
*'set yaxis 0 'hgt' 0.5'
*'set clab off'
*'set xlopts 1 7 0.18'
*'set ylopts 1 7 0.18'
*'set clevs  -3.5 -3 -2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5'
*'set ccols 49 47 46 45 44 43 42 41 21 22 24 25 27 29'

*THETA-E Calculation
*'set clevs 350 355 360 365 367 370 375 380 385 390 395'
*'set ccols 18 19 20 21 22 23 24 25 26 27 28 29'
*'d coll2gr(5)'
*'draw title 8/29 1200UTC Theta-E(K) (29.8,-89.8 to 29.0,-88.0)'

* Display reflectivity
'set gxout shaded'
'set ccols 18 19 20 42 41 44 45 46 47 48 49 50 51 52 53 54'
'set clevs -10 -5 0 5 10 15 20 25 30 35 40 45 50 55 60'
'd coll2gr(4)'
*'draw title 8/29 1200UTC Ref.(dBz) (29.8,-89.8 to 29.0,-88.0)'

*W-wind
*'set gxout contour'
*'set cint 5'
*'set ccolor 1'
*'set cmin 0'
*'d coll2gr(1)'

* Winds
*'set ccols 21 22 23 24 25 26 27 28 29 30'
*'set clevs 20 25 30 35 40 45 50 55 60 65'
*'d coll2gr(6)'


*Vertical Vorticity
'set gxout contour'
'd coll2gr(7)'


* Display vector winds projected into plane
'set ccolor 1'
*'set arrscl 0.2 4'
*'set cthick 6'
*'d
skip(umotion-coll2gr(2,-u)*'%xproj%'+coll2gr(3,-u)*'%yproj%',2,2);vmotion-coll2gr(1,-u)*10'


'run cbarn'

> 'set grads off'




I speculate what's highlighted maybe the error in the x range may not be
the appropriate range. Everything else seems ok. I am trying to display
vertical vorticity in contours.

I know it states in the coll2gr function that the "The X axis of the output
grid will contain the equally spaced station profiles and will span the
range of the current X dimension environment. "



At any rate...I would really like your assistance on how to resolve this
problem because I am totally stuck.

Thanks!


-- 
Nimrod Micael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20131121/2d93eef2/attachment.html 


More information about the gradsusr mailing list