[ncl-talk] Subscript out of range on call to grad_latlon_cfd from V6.4.0

Ryan Connelly rconne01 at gmail.com
Wed Apr 27 12:30:11 MDT 2016


Hi Rick,

Thanks for answering.

That seems to work.

Ryan

On Wed, Apr 27, 2016 at 1:33 PM, Rick Brownrigg <brownrig at ucar.edu> wrote:

> Hi Ryan,
>
> The way I read the docs for grad_latlon_cfd is that the 2nd and 3rd
> arguments are coordinate *arrays* with lat/lon values, not scalars that
> represent the dimensions of tc_rect_plane.  I'm not sure what those arrays
> should be in your case, but perhaps this gets you further along (?)
>
> HTH...
> Rick
>
> On Wed, Apr 27, 2016 at 11:20 AM, Ryan Connelly <rconne01 at gmail.com>
> wrote:
>
>> Hi,
>>
>> I get the error messages:
>>
>> fatal:Subscript out of range, error in subscript #0
>> fatal:An error occurred reading lon
>> fatal:["Execute.c":8128]:Execute: Error occurred at or near line 18228 in
>> file local_bin/contributed.ncl_beta_640
>>
>> fatal:["Execute.c":8128]:Execute: Error occurred at or near line 168 in
>> file wrf_temp_adv.ncl
>>
>>
>> when trying to feed a rectilinear grid into the function
>> grad_latlon_cfd.  A subset of my script is below:
>>
>> (...opts for regrid...)
>> tc_rect_plane = ESMF_regrid(tc_plane,Opt)     ; Do the regridding
>>
>> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>>
>> ; Define variables needed to calculate temp advection
>>
>>       printVarSummary(tc_rect_plane)
>>       print(nlat)
>>       print(mlon)
>>
>>       gradT = grad_latlon_cfd(tc_rect_plane,nlat,mlon,False,False)      ;
>> First "False" is to indicate that data is NOT cyclic
>>       dTdx = gradT[0]
>>       dTdy = gradT[1]
>>
>> The print lines return (1) that tc_rect_plane has 2 dimensions with
>> coordinates [281,353], (2) 281, and (3) 353, respectively, which is why I'm
>> confused on where it's going out of bounds.
>>
>> I appreciate any help I can get!
>>
>> Ryan
>>
>> --
>> Ryan Connelly
>> M.S. Student in Atmospheric Sciences, Stony Brook University
>> B.S. in Meteorology with Minors in Mathematics and GIS, Valparaiso
>> University
>> rconne01 at gmail.com
>> ryan.connelly at stonybrook.edu
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>


-- 
Ryan Connelly
M.S. Student in Atmospheric Sciences, Stony Brook University
B.S. in Meteorology with Minors in Mathematics and GIS, Valparaiso
University
rconne01 at gmail.com
ryan.connelly at stonybrook.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160427/8cb4eed1/attachment.html 


More information about the ncl-talk mailing list