<div dir="ltr"><div>120       alist = [/times(it),lat1,lon1,ta_interp(it,nlev,nlt,nln)/]   ; Store data to be written in a list.</div><div>=============</div><div>fatal:Subscript out of range, error in subscript #1</div><div><br></div><div>Subscript #1 of ta_interp(it,<b>nlev</b>,nlt,nln) is "nlev"    [ subscript numbers: (0,1,2,3) ]<br></div><div><br></div><div>When you get this type of error, use print statements prior to the offending statement:</div><div><br></div><div>print("it="+it+"  nlt="+nlt+"  nln="+nln+" nlev="+nlev)<br></div><div>alist = [/times(it),lat1,lon1,ta_interp(it,nlev,nlt,nln)/]</div><div>=====</div><div><br></div><div>After the computation of 'ta_interp' add a printVarSummary:</div><div> <br></div><div>   ta_interp = wrf_user_vert_interp(a,ta_mean,vert_coord,lev,opts)</div><div>   printVarSummary(ta_interp)</div><div><br></div><div>This will give you the variable dimension information.</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 17, 2021 at 11:53 PM ali mughal via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr">Dear All <div><br></div><div>I am trying to obtain values of temperature at seven specific station locations and their respective heights. To do so, I have modified the script write_csv 5.ncl according to my usage. </div><div>But I am getting the following error at line </div><div><div>fatal:Subscript out of range, error in subscript #1</div><div>fatal:An error occurred reading ta_interp</div><div>fatal:["Execute.c":8637]:Execute: Error occurred at or near line 120 in file write_TA_MEAN_intrp.ncl</div></div><div><br></div><div>Can someone kindly guide me on what I can correct so that I can get the required values at respective heights and location of the stations ?</div><div><br></div><div><br></div></div></div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div>