[ncl-talk] Dimension size mismatch

Md. Jalal Uddin dmjalal90 at gmail.com
Thu Aug 8 19:39:51 MDT 2019


 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190809/df086027/attachment.html>


More information about the ncl-talk mailing list