[ncl-talk] Dimension size mismatch
Rashed Mahmood
rashidcomsis at gmail.com
Sat Aug 10 00:27:02 MDT 2019
Which line the error message occurs? Generally the printVarSummary() can be
very useful for understanding the dimsize issues.
On Fri, Aug 9, 2019 at 7:18 PM Md. Jalal Uddin <dmjalal90 at gmail.com> wrote:
> Thank you, sir, for your kind suggestion, but it did not work.
>
> On Fri, 9 Aug 2019 at 18:25, Rashed Mahmood <rashidcomsis at gmail.com>
> wrote:
>
>> Hi Jalal,
>> I think the error message is likely related to the lines:
>>
>> poly_lat = clat(nc,nr,:)
>> poly_lon = clon(nc,nr,:)
>>
>> Changed those to:
>> poly_lat * :=* clat(nc,nr,:)
>> poly_lon* :=* clon(nc,nr,:)
>>
>> hope that helps.
>>
>> Rashed
>>
>>
>> On Thu, Aug 8, 2019 at 6:39 PM Md. Jalal Uddin via ncl-talk <
>> ncl-talk at ucar.edu> wrote:
>>
>>> do nr=0,nRadius-1
>>> do nc=0,nCenter-1
>>> poly_lat = clat(nc,nr,:)
>>> poly_lon = clon(nc,nr,:)
>>>
>>> min_lat = min(poly_lat)
>>> max_lat = max(poly_lat)
>>> min_lon = min(poly_lon)
>>> max_lon = max(poly_lon)
>>>
>>> ;---Extract the desired rectangle of data
>>>
>>> PRC := jancont({min_lat:max_lat},{min_lon:max_lon})
>>>
>>> ;---Set points that are outside of the circle of data to missing
>>>
>>> lat2d := conform(PRC, PRC&latitude, 0)
>>> lon2d := conform(PRC, PRC&longitude, 1)
>>>
>>> latlon_circle := gc_inout(lat2d,lon2d, poly_lat,poly_lon)
>>> PRC = where(latlon_circle, PRC, PRC at _FillValue)
>>> end do
>>> end do
>>>
>>>
>>> Here, when center lat changed (nc), the dimension size of PRC also
>>> changed that means PRC has different size. Similar to
>>> http://www.ncl.ucar.edu/Applications/Scripts/polyg_29.ncl
>>>
>>> I tried to mask overland for PRC data but failed because of different
>>> dimension sizes.
>>>
>>> How can I make PRC as the same size? Any suggestions would be
>>> appreciated.
>>>
>>> Jalal
>>> --
>>> *Md. Jalal Uddin*
>>> MSc in Applied Meteorology
>>> 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
>>> _______________________________________________
>>> 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
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190809/37889568/attachment.html>
More information about the ncl-talk
mailing list