<div dir="ltr">I have storm I am analyzing but the vectors are not displaying appropriately. I am trying to show the appropriate updrafts and downdrafts of the storm.<div><br></div><div><br></div><div>My code:</div><div><br>
</div><div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">'reinit'<br><blockquote>
'open 20110416_d03.ctl'<br>'set display color white'<br>'clear'<br>'set map 2 1 5'<br>'set annot 1 12'<br>'set xlopts 1 6 .17'<br>'set ylopts 1 6 .16'<br>'set mpdset hires'<br>
'set grid off'<br>'set timelab off'<br>'set csmooth on'<br>*'set gxout shaded'<br>'set t 84'<br>*light green to dark green<br>'set rgb 31 230 255 225'<br>'set rgb 32 200 255 190'<br>
'set rgb 33 180 250 170'<br>'set rgb 34 150 245 140'<br>'set rgb 35 120 245 115'<br>'set rgb 36 80 240 80'<br>'set rgb 37 55 210 60'<br>'set rgb 38 30 180 30'<br>'set rgb 39 15 160 15'<br>
*light beige to dark brown<br>'set rgb 71 250 240 230'<br>'set rgb 72 240 220 210'<br>'set rgb 73 225 190 180'<br>'set rgb 74 200 160 150'<br>'set rgb 75 180 140 130'<br>'set rgb 76 160 120 110'<br>
'set rgb 77 140 100 90'<br>'set rgb 78 120 80 70'<br>'set rgb 79 100 60 50'<br>'set xlint 1.5'<br>********************************************************<br>*<br>* Color Shades<br>
*******************************************************<br>'set rgb 59 0 0 0'<br>'set rgb 60 15 15 15'<br>'set rgb 61 30 30 30'<br>'set rgb 62 45 45 45'<br>'set rgb 63 60 60 60'<br>
'set rgb 64 75 75 75'<br>'set rgb 65 90 90 90'<br>'set rgb 66 105 105 105'<br>'set rgb 67 120 120 120'<br>'set rgb 68 135 135 135'<br>'set rgb 69 150 150 150'<br>'set rgb 70 165 165 165'<br>
'set rgb 71 180 180 180'<br>'set rgb 72 195 195 195'<br>'set rgb 73 210 210 210'<br>'set rgb 74 225 225 225'<br>'set rgb 75 245 245 245'<br>'set rgb 76 255 255 255'<br>*light yellow to dark red<br>
'set rgb 20 255 250 200'<br>'set rgb 21 255 250 170'<br>'set rgb 22 255 232 120'<br>'set rgb 23 255 192 60'<br>'set rgb 24 255 160 0'<br>'set rgb 25 255 96 0'<br>'set rgb 26 255 50 0'<br>
'set rgb 27 225 20 0'<br>'set rgb 28 192 0 0'<br>'set rgb 29 165 0 0'<br>*light blue to dark blue<br>'set rgb 81 225 255 255'<br>'set rgb 82 180 240 250'<br>'set rgb 83 150 210 250'<br>
'set rgb 84 120 185 250'<br>'set rgb 85 80 165 245'<br>'set rgb 86 60 150 245'<br>'set rgb 87 40 130 240'<br>'set rgb 88 30 110 235'<br>'set rgb 89 20 100 210'<br>'set rgb 40 0 0 0'<br>
'set rgb 41 0 236 236'<br>'set rgb 42 1 160 246'<br>'set rgb 43 0 0 246'<br>'set rgb 44 0 255 0'<br>'set rgb 45 0 200 0'<br>'set rgb 46 0 144 0'<br>'set rgb 47 255 255 0'<br>
'set rgb 48 231 192 0'<br>'set rgb 49 255 144 0'<br>'set rgb 50 255 0 0'<br>'set rgb 51 214 0 0'<br>'set rgb 52 192 0 0'<br>'set rgb 53 255 0 255'<br>'set rgb 54 153 85 201'<br>
'set rgb 55 255 255 255'<br>* These are the BLUE shades<br>'set rgb 16 0 0 255'<br>'set rgb 17 55 55 255'<br>'set rgb 18 110 110 255'<br>'set rgb 19 165 165 255'<br>'set rgb 20 220 220 255'<br>
'c'<br>'set background 0'<br>'set line 0'<br>'draw rec 0 0 11 8.5'<br>'set lev 1000 100'<br>*'define prs = 100'<br>*'qv = qvapor'<br>*'th = theta'<br>*"define e=0.01*prs*qv/(0.6219718+qv)+1e-20"<br>
*"define t=th*pow((prs/100000.0),(287.04/1005.7))"<br>*"define tlcl=55.0+2840.0/(3.5*log(t)-log(e)-4.805)"<br>*"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))"<br>
"define vvort= hcurl(u,v)"<br>*******************************************************************************************<br>'set x 1'<br>'set y 10'<br>*'set lev 1000 100'<br>*'set lat 35.65 35.75'<br>
*'set lon 280.95 281.3'<br>*'set gxout shaded'<br>'set parea 1 9.25 1 7.75'<br>* ARBITRARY CROSS-SECTION defined by lon1-lat1 lon2-lat2<br><b>lon1=281.2 (78.8)<br></b><b>lon2=281.36 (78.64)<br></b><b>lat1=35.78<br>
</b><b>lat2=35.86<br></b>*Vector winds projected in the plane<br>m=(lat2-lat1)/(lon2-lon1)<br>angle=math_atan(m)<br>xproj = math_cos(angle)<br>yproj = math_sin(angle)<br>lon=lon1<br>lat=lat1<br>'collect 1 free'<br>
'collect 2 free'<br>'collect 3 free'<br>'collect 4 free'<br>*'collect 5 free'<br>'collect 6 free'<br>'collect 7 free'<br>while (lon<=lon2)<br> 'collect 1 gr2stn(w,'lon','lat')'<br>
'collect 2 gr2stn(u,'lon','lat')'<br> 'collect 3 gr2stn(v,'lon','lat')'<br> 'collect 4 gr2stn(dbz,'lon','lat')'<br>* 'collect 5 gr2stn(the,'lon','lat')'<br>
'collect 6 gr2stn(mag(u,v),'lon','lat')'<br> 'collect 7 gr2stn(vvort,'lon','lat')'<br> say lon<br> say lat<br> lon=lon+0.013<br> lat=lat1 + (lat2-lat1)*(lon-lon1) / (lon2-lon1)<br>
endwhile<br>'set arrlab off'<br>'set grads off'<br>'set x 1 50'<br>"* Display vector winds projected into plane<br>'set gxout vector'<br>'set ccolor 1'<br>'set arrscl 0.2 7' <br>
'set cthick 6'<br>'d skip(coll2gr(2,-u)*'%xproj%'+coll2gr(3,-u)*'%yproj%',2,2);coll2gr(1,-u)*10'"<br>So I dont see what I did wrong. Here's the image. </blockquote></blockquote></div>
<div><div><br></div><div>Thanks for the help. </div><div><br></div><div><br></div><div>Also the range that is being displayed is incorrect</div><div><br></div><div>It should be from 78.64 W to 78.8 W NOT 84.05W to 83.55 W.</div>
<div><br></div><div>I dont understand why it's not displaying that. </div><div><br></div><div><br></div><div>Thanks! </div><div><br></div><div><br></div>-- <br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Nimrod Micael
</blockquote></div></div>