[ncl-talk] gc_latlon

Soma Roy somaroy892 at gmail.com
Mon Mar 18 01:35:31 MDT 2019


Try to use geolocation circle and based on that cut out the inner values by
using mask option as available in ncl pages.

Hope this idea help you...

Cheers,
Soma

On Mon, Mar 18, 2019, 12:59 Md. Jalal Uddin <dmjalal90 at gmail.com wrote:

> Hi all,
> I wanted to extract rainfall within 500 km from certain lat and lon. I am
> not getting the right one. any suggestions?
>
> f  = addfile("jan500.nc", "r")
>  prc =f->pre(:,{75:100},{0:30})
>  lon = f->longitude
>  lat =f->latitude
>  prc_reorder = prc(time|:,latitude|:,longitude|:)
>
>  prc_reorder&latitude = lat
>  prc_reorder&longitude = lon
>
> lat1 =(/5.5/)
> lon1 = (/87.0/)
>
> do i = 0,dimsizes(lat)-1
>       do j = 0,dimsizes(lon)-1
>       if gc_latlon(lat1,lon1,i,j,2,4) .lt.500 then
>           prc_reorder(:,i,j) =  prc_reorder(:,i,j)
>               end if
>       end do
>  end do
> ;;;;
> Jalal
> --
> *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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190318/928dd1f3/attachment.html>


More information about the ncl-talk mailing list