[ncl-talk] gc_latlon

Md. Jalal Uddin dmjalal90 at gmail.com
Mon Mar 18 01:29:08 MDT 2019


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


More information about the ncl-talk mailing list