# Re: reading data with different increment

Date: Thu Oct 06 2011 - 14:15:20 MDT

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..

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

```--
______________________________________________________________