Re: one question plot zoom plot

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Wed, 03 Jun 2009 12:31:21 -0600

Hi Hui,
I was just made aware of a useful function, region_ind, that will subset
2D latitude/longitude data.
http://www.ncl.ucar.edu/Document/Functions/Contributed/region_ind.shtml
Expanding/modifying the example:

glat2d = a->XLAT(0,:,:)
glon2d = a->XLONG(0,:,:)

   printMinMax(LAT2D, True)
   printMinMax(LON2D, True)

latS = 30 ; California [*rough*]
   latN = 43
   lonL = -125
   lonR = -113

   ji = region_ind (glat2d,glon2d, latS, latN, lonW, lonE)

    iStrt = ji(0) ; lat start
    jLast = ji(1) ; lat last
    iStrt = ji(2) ; lon start
    iLast = ji(3) ; lon last

    LAT2D = glat2d(jStrt:jLast,iStrt:iLast)
    LON2D = glon2d(jStrt:jLast,iStrt:iLast)

   printMinMax(LAT2D, True)
   printMinMax(LON2D, True)

                       ; read data just for the region of interest
    x = f->T2(:,jStrt:jLast,iStrt:iLast)
   x_at_lat2d = LAT2D
   x_at_lon2d = LON2D

If neither of the two methods that I originally sent you seem to work,
you can try using region_ind..
Adam

Hui Liu wrote:
> Dear consultants:
>
> I have a wrfinput data for a large domain and these data are read in.
> I can make plots over the entire domain without problem.
> I wonder is there a easy way do some plot over a zoom area (smaller)
> without regenerating the input data?
> Thanks.
> hui
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> 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
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jun 03 2009 - 12:31:21 MDT

This archive was generated by hypermail 2.2.0 : Wed Jun 03 2009 - 12:52:48 MDT