[ncl-talk] Interpolation to specific height levels

Dennis Shea shea at ucar.edu
Fri Jun 18 13:03:18 MDT 2021


120       alist = [/times(it),lat1,lon1,ta_interp(it,nlev,nlt,nln)/]   ;
Store data to be written in a list.
=============
fatal:Subscript out of range, error in subscript #1

Subscript #1 of ta_interp(it,*nlev*,nlt,nln) is "nlev"    [ subscript
numbers: (0,1,2,3) ]

When you get this type of error, use print statements prior to the
offending statement:

print("it="+it+"  nlt="+nlt+"  nln="+nln+" nlev="+nlev)
alist = [/times(it),lat1,lon1,ta_interp(it,nlev,nlt,nln)/]
=====

After the computation of 'ta_interp' add a printVarSummary:

   ta_interp = wrf_user_vert_interp(a,ta_mean,vert_coord,lev,opts)
   printVarSummary(ta_interp)

This will give you the variable dimension information.








On Thu, Jun 17, 2021 at 11:53 PM ali mughal via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:

> Dear All
>
> 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.
> But I am getting the following error at line
> fatal:Subscript out of range, error in subscript #1
> fatal:An error occurred reading ta_interp
> fatal:["Execute.c":8637]:Execute: Error occurred at or near line 120 in
> file write_TA_MEAN_intrp.ncl
>
> 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 ?
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20210618/3fd1f651/attachment.html>


More information about the ncl-talk mailing list