[ncl-talk] lat-lon to ij for NARR

Ashish Sharma asharma7 at nd.edu
Wed Mar 16 13:12:57 MDT 2016


Hello,

I am trying to find corresponding ij for lat-lon pair from NARR data using
*getind_latlon2d* command, but the values are wrong.

Please advise.

thanks,
Ashish

  minlat =  37.37814

  maxlat =  46.64286

  minlon = -98.91251

  maxlon = -73.89026


;=================================================;

f3 = addfile("land.nc","r")

  lat2d_narr  = f3->lat                ; (277,349)

  lon2d_narr  = f3->lon


  printMinMax(lat2d_narr, 0)

  printMinMax(lon2d_narr, 0)


 lat   = (/ minlat,maxlat  /)   ; user specified coordinate pairs

 lon   = (/minlon,maxlon /)


  nm = *getind_latlon2d* (lat2d_narr,lon2d_narr, lat, lon)

 print(nm)

  iStrt = nm(0,0)

  jStrt = nm(0,1)

  iLast = nm(1,0)

  jLast = nm(1,1)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160316/897746c9/attachment.html 


More information about the ncl-talk mailing list