Re: random extraction of data only from land

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Thu, 05 Apr 2007 15:56:47 -0600

Hi Debasish,

Try adding the following to your code after the ind_resolve line:
(untested. Checks the array ir against the orography array to see if the
point is over land. If so, use it. If not, toss it out.)
;======================================
ir = ind_resolve(iT,(/70,150/) )

ir2 = ir
ir2@_FillValue = -999
ir2 = ir2@_FillValue
cntr = 0
do ff = 0,dimsizes(ir(:,0))-1
    if (oro(ir(ff,0),ir(ff,1)).eq.1) then
       ir2(ff,cntr) = ir(ff,:)
         cntr = cntr+1
    end if
end do
delete(ir)
ir3 = ir2(:cntr-1,:)
delete(ir2)
.....
pmarker = gsn_add_polymarker(wks,plot,lon(ir3(:,1)),lat(ir3(:,0)),xres)
;=====================================================
You will need to set nUnique say 75% higher than normal to account for
the ocean pts you will throw out after the function is called. Thus, try
setting nMax = 175 instead of 100.

Good luck,
Adam

Debasish Pai Mazumder wrote:
> Hi all,
>
>
>
> I have done program for extracting the data randomly with the help of
> Dennis Shea and plotted the randomly choose 100 grid points. The program
> is attached the mail. Now I am trying to extract data randomly from land
> only. Any help will be appreciated.
>
>
>
> Thanks
>
>
>
> Debasish
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
--------------------------------------------------------------
Adam Phillips			             asphilli_at_ucar.edu
National Center for Atmospheric Research   tel: (303) 497-1726
ESSL/CGD/CAS                               fax: (303) 497-1333
P.O. Box 3000				
Boulder, CO 80307-3000	  http://www.cgd.ucar.edu/cas/asphilli
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Apr 05 2007 - 15:56:47 MDT

This archive was generated by hypermail 2.2.0 : Wed Apr 11 2007 - 08:36:47 MDT