removing grid points

From: Benjamin Lamptey (lamptey AT essc.psu.edu)
Date: Mon May 16 2005 - 09:50:30 MDT


Hello,
I should be grateful, if someone could help me out with this.

I have 2d and I wish to remove two grid points from the beginning and two
grid points from the end of the grid array. That is, I have the following

mix = 52
mjx = 72

lat2d = fbinrecread (infileA,0, (/mjx,mix/),"float")
lon2d = fbinrecread (infileA,1, (/mjx,mix/),"float")

raintot1_A=fbinrecread (infileA,16, (/nyear,nmon,mjx,mix/),"float")

Now, because mix and mjx are scalars, I cannot do the following
MIX = 52
MJX = 72

mix = MIX(2:49) ; removes 0,1,50,51)
mjx = MJX(2:69)

I tried using the lat and lon as follows

LAT2d = fbinrecread (infileA,0, (/mjx,mix/),"float")
LON2d = fbinrecread (infileA,1, (/mjx,mix/),"float")

lat2d = LAT2d(2:69,2:49)
lon2d = LON2d(2:69,2:49)

but this works on the lat and lon without working on the data. I thought
when the reduced area is plotted (my data in in Lambert Conformal projection), it
will automatically cut-off the data in the region being cut-off, by selecting a
a narrower lat and lon range. This does not happen. The plot area is reduced but
all the data is plotted.

Any help will be appreciated.

Thanks
Ben

-- 

Benjamin L. Lamptey Phone: (814) 865-9911 (office) Pennstate (EMS Environment Institute) (814) 237-8193 (home) 2217 Earth-Engineering Sciences Bldg Fax : (814) 865-3191 University Park, PA 16802 WWW:http://www.essc.psu.edu/~lamptey

_______________________________________________ ncl-talk mailing list ncl-talk@ucar.edu http://mailman.ucar.edu/mailman/listinfo/ncl-talk



This archive was generated by hypermail 2b29 : Tue May 17 2005 - 08:17:44 MDT