[ncl-talk] gc_inout

Rick Brownrigg brownrig at ucar.edu
Tue Mar 26 10:17:34 MDT 2019


I don't understand what is happening there -- does the "totype" error
message align with the where statement?  Again,  prinVarSummary() is your
friend when it comes to debugging.



On Mon, Mar 25, 2019 at 10:54 PM Md. Jalal Uddin <dmjalal90 at gmail.com>
wrote:

> Hi Rick,
>
> Thanks for your sound explanation. Please help.
>
> slat      = (/ 7.5, 8.5, 9.5 /)
> slon      = (/88,88.5,89/)
> srad      = (/ 500 /)
> srad_unit = 1
> N         = 180
> opt       = False
> circle    = geolocation_circle(slat, slon, srad, srad_unit, N, opt)
> circle_lat = circle[0]
> circle_lon = circle[1]
>
> Now, I tried to mask my data within circle_lat and lon.
>  f2  = addfile("all_mar.nc", "r")
>  prc2 =f2->pre
> tcavgmar = dim_avg_n_Wrap(prc2,0)
>
> lat = new(3,"float")
> lon = new(3,"float")
>
> in_circle = gc_inout(circle_lat,circle_lon,lat,lon)
> copy_VarMeta(circle_lat,in_circle)
> martrmm  = where(in_circle,tcavgmar,tcavgmar at _FillValue)
>
> errors:
>
> (0)     totype: warning: cannot convert input variable type <float> to type: <logical>
> (0)        The original type: <float> will be returned.
> fatal:where: condition variable (parameter 0) dimension mismatch with parameter 1
>
>
>
>
> On Tue, Mar 26, 2019 at 3:49 AM Rick Brownrigg <brownrig at ucar.edu> wrote:
>
>> Well, based on that error message, it sounds like your plat/plon arrays
>> are of different sizes, which in turn sounds like the points you want to
>> test for inclusion/exclusion have not been constructed properly.  Perhaps
>> put in some printVarSummary statements to make sure your variables are what
>> you think they are.
>>
>>
>>
>> On Mon, Mar 25, 2019 at 4:14 AM Md. Jalal Uddin <dmjalal90 at gmail.com>
>> wrote:
>>
>>> Hi all,
>>> I have multiple locations for cyclone track and followed the polyg_25
>>> example to calculate 500km radius for every location (
>>> http://www.ncl.ucar.edu/Applications/Scripts/polyg_25.ncl). Finally, I
>>> used gc_inout to mask rainfall data inside the circle. However, I am
>>> getting the following errors:
>>>
>>> fatal:gc_inout: the dimensions sizes for the plat/plon arrays must be
>>> the same as all but the rightmost dimension of the lat/lon arrays
>>> fatal:["Execute.c":8637]:Execute: Error occurred at or near line 77 in
>>> file tc500_modi_mar.ncl
>>>
>>> I attached the figure and script herewith. Could I have any suggestions,
>>> please?
>>>
>>> Best Regards,
>>> Jalal
>>>
>>>
>>>
>>> [image: tc500km_mar1.000003.png]
>>>
>>> --
>>> *Md. Jalal Uddin*
>>> MSc in Applied Meteorology (English Language)
>>> Nanjing University of Information, Science and Technology, China
>>> B.Sc. in Disaster Management (Hons.)
>>> Patuakhali Science and Technology University, Bangladesh.
>>> Cell: +8613260859092, +8801792052662
>>> Web: www.dmjalal90.weebly.com
>>> Facebook: jalal.hossen.39
>>> LinkedIn: https://bd.linkedin.com/in/md-jalal-uddin-80a026b0
>>> Twitter: dmjalal90
>>> Skype: dmjalal90
>>> _______________________________________________
>>> ncl-talk mailing list
>>> ncl-talk at ucar.edu
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>
>
> --
> *Md. Jalal Uddin*
> MSc in Applied Meteorology (English Language)
> Nanjing University of Information, Science and Technology, China
> B.Sc. in Disaster Management (Hons.)
> Patuakhali Science and Technology University, Bangladesh.
> Cell: +8613260859092, +8801792052662
> Web: www.dmjalal90.weebly.com
> Facebook: jalal.hossen.39
> LinkedIn: https://bd.linkedin.com/in/md-jalal-uddin-80a026b0
> Twitter: dmjalal90
> Skype: dmjalal90
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190326/474c1074/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tc500km_mar1.000003.png
Type: image/png
Size: 181155 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190326/474c1074/attachment-0001.png>


More information about the ncl-talk mailing list