<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi,<div><br></div><div>I'm currently trying to plot skewT diagrams with the standard skewT_PlotData function. However, I'm getting an error about subscripting at the skewT_PlotData line in my code. This is shown in the print out below. I've seen this error a thousand times and it's usually a very simple correction in my own code. However, this time I'm subscripting nothing and feeding skewT_PlotData arrays that are all just one dimension, with 39 points.</div><div><br></div><div><div>An exert from my code is below (the rest is just reading in the data) and also a print out from the code. Any help would be appreciated?</div><div><br></div><div>Thanks,</div><div>James</div><div>------------------------------------------------------</div><div><div>;*************************</div><div>; Resources</div><div>;*************************</div><div><br></div><div>skewtOpts                 = True</div><div>skewtOpts@DrawColAreaFill = True</div><div>skewtOpts@tiMainString    = ""</div><div>skewtOpts@vpWidthF        = 0.38</div><div>skewtOpts@vpHeightF       = 0.38</div><div>skewtOpts@DrawFahrenheit  = False</div><div>skewtOpts@tiXAxisString  = "Temperature (C)"</div><div>skewtOpts@tmXBLabelFontHeightF = 0.0225</div><div>skewtOpts@tmYLLabelFontHeightF = 0.0225</div><div>skewtOpts@tiMainFontHeightF    = 0.0225</div><div>skewtOpts@tiMainOffsetXF  = 0.0</div><div><br></div><div>dataOpts = True</div><div>dataOpts@DrawWindBarbThk = 2.0</div><div><br></div><div>;*************************</div><div>; Plot</div><div>;*************************</div><div><br></div><div>print(PR07n)</div><div><br></div><div>print("Plotting data")</div><div><br></div><div>wks  = gsn_open_wks ("png", "skewt_norsou")</div><div><br></div><div>skewtOpts@vpXF            = 0.08</div><div>skewtOpts@vpYF            = 0.95</div><div>skewt_bkgd_1 = skewT_BackGround(wks,skewtOpts)</div><div>skewt_data_1 = skewT_PlotData(wks,skewt_bkgd_1,PR07n,TC07n,TD07n,Zm07n,Ws07n,Wd07n,dataOpts)</div><div>draw(skewt_bkgd_1)</div><div>draw(skewt_data_1)</div></div><div><br></div><div>-------------------------------------------------</div><div><br></div><div>Print out:</div><div><br></div><div><div>data/figs> ncl plot_skewT_ns.ncl</div><div> Copyright (C) 1995-2017 - All Rights Reserved</div><div> University Corporation for Atmospheric Research</div><div> NCAR Command Language Version 6.4.0</div><div> The use of this software is governed by a License Agreement.</div><div> See <a href="http://www.ncl.ucar.edu/">http://www.ncl.ucar.edu/</a> for more details.</div><div>(0)<span style="white-space:pre">     </span>Reading data </div><div><br></div><div><br></div><div>Variable: PR07n</div><div>Type: float</div><div>Total Size: 156 bytes</div><div>            39 values</div><div>Number of Dimensions: 1</div><div>Dimensions and sizes:<span style="white-space:pre">     </span>[lev | 39]</div><div>Coordinates: </div><div>            lev: [0.9965..0.002989615]</div><div>Number Of Attributes: 4</div><div>  _FillValue :<span style="white-space:pre">       </span>9.96921e+36</div><div>  units :<span style="white-space:pre"> </span>Pa</div><div>  long_name :<span style="white-space:pre">      </span>PR</div><div>  average_op_ncl :<span style="white-space:pre"> </span>dim_avg_n over dimension(s): time</div><div>(0)<span style="white-space:pre">  </span>965.5065</div><div>(1)<span style="white-space:pre">   </span>957.6194</div><div>(2)<span style="white-space:pre">   </span>946.9515</div><div>(3)<span style="white-space:pre">   </span>933.5039</div><div>(4)<span style="white-space:pre">   </span>916.8141</div><div>(5)<span style="white-space:pre">   </span>895.9583</div><div>(6)<span style="white-space:pre">   </span>870.9427</div><div>(7)<span style="white-space:pre">   </span>842.1523</div><div>(8)<span style="white-space:pre">   </span>811.4512</div><div>(9)<span style="white-space:pre">   </span>780.7855</div><div>(10)<span style="white-space:pre">  </span>750.1562</div><div>(11)<span style="white-space:pre">  </span>707.0631</div><div>(12)<span style="white-space:pre">  </span>653.2709</div><div>(13)<span style="white-space:pre">  </span>602.9095</div><div>(14)<span style="white-space:pre">  </span>555.7852</div><div>(15)<span style="white-space:pre">  </span>511.7217</div><div>(16)<span style="white-space:pre">  </span>470.5537</div><div>(17)<span style="white-space:pre">  </span>432.1226</div><div>(18)<span style="white-space:pre">  </span>396.2743</div><div>(19)<span style="white-space:pre">  </span>362.8608</div><div>(20)<span style="white-space:pre">  </span>331.7417</div><div>(21)<span style="white-space:pre">  </span>302.7841</div><div>(22)<span style="white-space:pre">  </span>275.8629</div><div>(23)<span style="white-space:pre">  </span>250.8601</div><div>(24)<span style="white-space:pre">  </span>227.664</div><div>(25)<span style="white-space:pre">   </span>206.1693</div><div>(26)<span style="white-space:pre">  </span>186.2755</div><div>(27)<span style="white-space:pre">  </span>167.8874</div><div>(28)<span style="white-space:pre">  </span>151.0405</div><div>(29)<span style="white-space:pre">  </span>135.8232</div><div>(30)<span style="white-space:pre">  </span>122.1585</div><div>(31)<span style="white-space:pre">  </span>109.8879</div><div>(32)<span style="white-space:pre">  </span>98.86901</div><div>(33)<span style="white-space:pre">  </span>88.97418</div><div>(34)<span style="white-space:pre">  </span>80.08877</div><div>(35)<span style="white-space:pre">  </span>72.10982</div><div>(36)<span style="white-space:pre">  </span>64.94485</div><div>(37)<span style="white-space:pre">  </span>58.51083</div><div>(38)<span style="white-space:pre">  </span>52.73309</div><div>(0)<span style="white-space:pre">   </span>Plotting data</div><div>fatal:Subscript out of range, error in subscript #0</div><div>fatal:An error occurred reading P</div><div>fatal:["Execute.c":8640]:Execute: Error occurred at or near line 950 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/skewt_func.ncl</div><div><br></div><div>fatal:["Execute.c":8640]:Execute: Error occurred at or near line 2199 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/skewt_func.ncl</div><div><br></div><div>fatal:["Execute.c":8640]:Execute: Error occurred at or near line 79 in file plot_skewT_ns.ncl</div></div><div><br></div><div><br></div><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">-----------------------------------------------------------------------------<br><span lang="en-US"><font face="Tahoma" size="2" color="black"><span style="font-size:10pt" dir="ltr">Graduate Research & Teaching Assistant<br></span></font></span></div><div><span lang="en-US"><font face="Tahoma" size="2" color="black"><span style="font-size:10pt" dir="ltr">PhD Candidate: Atmospheric Science<br></span></font></span></div><div><span lang="en-US"><font face="Tahoma" size="2" color="black"><span style="font-size:10pt" dir="ltr">Department of Marine, Earth, and Atmospheric Sciences        <br></span></font></span></div><div dir="ltr"><div><span lang="en-US"><font face="Tahoma"><span dir="ltr"><font color="#000000"><span style="font-size:10pt">North Carolina State University</span></font></span></font></span></div><div><font color="#000000" face="Tahoma"><span style="font-size:13.3333px"><a href="http://go.ncsu.edu/james-russell" target="_blank">http://go.ncsu.edu/james-russell</a></span></font></div><div><span style="color:black;font-family:Tahoma;font-size:10pt">--------------------------------------------------------------------------<br></span><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>