[ncl-talk] Interpolation to specific height levels
ali mughal
mughalali655 at gmail.com
Sat Jun 19 01:05:29 MDT 2021
Dear Dennis
Thank you for the response. Please see the following output from the
statement print("it="+it+" nlt="+nlt+" nln="+nln+" nlev="+nlev)
(0) it=0 nlt=1 nln=80 nlev=6
(0) it=0 nlt=85 nln=154 nlev=27
which is correct according to what is required, however, not sure why "it"
remains 0.
The following is the output of prinVarSummary for ta_interp which is also
correct.
Variable: ta_interp
Type: float
Total Size: 572682600 bytes
143170650 values
Number of Dimensions: 4
Dimensions and sizes: [Time | 755] x [interp_levels | 7] x [south_north |
129] x [west_east | 210]
Coordinates:
interp_levels: [6..15]
Number Of Attributes: 8
_FillValue : 9.96921e+36
FieldType : 104
MemoryOrder : XYZ
description : T Abs. Mean
units : K
stagger :
coordinates : XLONG XLAT XTIME
vert_interp_type : theta
The total number of the eta levels (vertical levels) in the wrfout file
were 51. I needed to interpolate the values to exact heights of the seven
stations as I mentioned before as some of the stations lie above the height
of 1st vertical level. The first level is at 5.5 m height.
On Sat, Jun 19, 2021 at 3:03 AM Dennis Shea <shea at ucar.edu> wrote:
> 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/20210619/4b68851e/attachment.html>
More information about the ncl-talk
mailing list