Re: reading data with different increment

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Thu Oct 06 2011 - 14:38:19 MDT

Hi Ahmed,
I should have added this to my initial reply:
Make sure to check your data before and after you subscript, to make
sure you selected the data you wanted. Note also that the orientation of
your data comes into play here. If, say, your longitudes go from
-180:180, then coordinate subscripting that you want {0:240} will only
grab data from 0:180... (I am guessing that this is happening in your case.)

So, look at the latitude/longitude span of your data, and make sure your
specified coordinate subscripts are in the same range. If your
longitudes go from -180:180, and you want them to go from 0:360, then
you can use the function lonFlip:
http://www.ncl.ucar.edu/Document/Functions/Contributed/lonFlip.shtml
Adam

On 10/06/2011 02:30 PM, ahmed lasheen wrote:
> thanks for your help
> when i use the bracket , i found that the image is produced for
> only quarter of the earth (the quarter has positive lat and lon only).
> i have attached the image produced.
>
>
> On Thu, Oct 6, 2011 at 10:15 PM, Adam Phillips <asphilli@ucar.edu
> <mailto:asphilli@ucar.edu>> wrote:
>
> Hi Ahmed,
> There are two ways to subscript: by using coordinate values, or by using
> index values. I believe you are confusing the two methods here.
>
> Coordinate subscripting uses { } to denote that you are specifying
> coordinate values (latitude/longitude values in your case)
>
> elv = f->z({j1:j2:20},{i1:i2:20})
> elv = f->z({j1:j2},{i1:i2})
> elv = f->z({j1:},{:i2})
>
> Index subscripting doe not:
> elv = f->z(0:100:10,5:125:5})
> elv = f->z(::10,::5})
> elv = f->z(5::10,5::5})
>
> Note that in either case, the specified stride value must be an
> integer..
>
> In your case, I think you want this:
> elv = f->z({j1:j2:20},{i1:i2:20})
>
> Hope that helps..
> Adam
>
> On 10/06/2011 02:04 PM, ahmed lasheen wrote:
> > Hello all
> > I am trying to read and plot elevation data in which it's
> resolution is
> > 5 minute , and when i plot it keeping in mind maximizing the
> workstation
> > size and increasing the cnLevelSpacingF .
> > when i use the com elv = f->z(::20,::20) , then it works well
> but when
> > i use the command elv = f->z(j1:j2:20,i1:i2:20) where j1 is the
> first
> > lat ,j2 is the second lat , i1 is the first lon and i2 is the
> second lon
> > , then the image produces is wrong .anybody know why , i
> > have attached the scripts.
> > thanks
> >
> > --
> > ===============
> > Ahmed Lasheen
> > Junior researcher at Cairo Numerical Weather Prediction Center
> (CNWPC)
> > Egyptian Meteorological Authority(EMA)
> > Cairo,Egypt
> > ===============
> >
> >
> >
> > _______________________________________________
> > ncl-talk mailing list
> > List instructions, subscriber options, unsubscribe:
> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
> --
> ______________________________________________________________
> Adam Phillips asphilli@ucar.edu <mailto:asphilli@ucar.edu>
> NCAR/Climate and Global Dynamics Division (303) 497-1726
> 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
>
>
>
>
> --
> ===============
> Ahmed Lasheen
> Junior researcher at Cairo Numerical Weather Prediction Center (CNWPC)
> Egyptian Meteorological Authority(EMA)
> Cairo,Egypt
> ===============
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
______________________________________________________________
Adam Phillips                                asphilli@ucar.edu
NCAR/Climate and Global Dynamics Division       (303) 497-1726
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 Thu Oct 6 14:38:25 2011

This archive was generated by hypermail 2.1.8 : Sun Oct 09 2011 - 13:05:26 MDT