[Thread Prev][Thread Next][Index]

Re: Plot buffer size



Hi David,

Mark's solution is right on.

Here's another -- using Ferret's lo:hi:delta notation:

  yes? use coads_climatology
  yes? vector/l=1 uwnd[i=1:180:5,j=1:90:3],vwnd[i=1:180:5,j=1:90:3]

This plots every 5th point in longitude, and every 3rd in latitude --
the same choice that Ferret would make by default if you had simply said
"yes? vector/l=1 uwnd,vwnd"

Note that the command 
  yes? PPL LIST STATS
can be used anytime to ask PLOT+ what data it is holding.

	- steve

============================================

"Mark A. Verschell" wrote:
> 
> David,
> 
>         This IS a simple (but NOT trivial) problem. Your problem is not with
> the calculations but with the display of your results. The underlying PPLUS
> package (that handles the graphics) is limited to 495000 points to plot. Now,
> when you are doing the vector plot there is no way you will be plotting even
> 495000 vectors, much less more than that, because the PPLUS vector command will
> give you default XSKIP and YSKIP values. But PPLUS calculates the number of
> plotting points before the XSKIP and YSKIP are taken into account. Thus, the
> error occurs because you could CONCEIVABLY be asking for 832370 points.
> 
> So, if you want to look at the whole field, you need to divide the graphic up,
> so that you are never passing more than 495000 points to PPLUS. Here is my
> suggestion (plus some suggestions for the length and the skips that might look
> better):
> 
> Instead of:
> ! Plot the field for verification
> vec/length=5.0 txs,tys
> 
> Use:
> ! Plot the field for verification
> vec/length=.2/xskip=50/yskip=10/ylim=89s:89n/j=1:178 txs,tys
> vec/length=.2/xskip=50/yskip=10/ylim=89s:89n/over/nolab/pen=1/j=179:356 txs,tys
> vec/length=.2/xskip=50/yskip=10/ylim=89s:89n/over/nolab/pen=1/j=356:534 txs,tys
> 
> Mark Verschell
> 
> ================================================================================
> 
> On Feb 11,  5:05pm, David Oxilia wrote:
> > Subject: Plot buffer size
> > Ferreters,
> >
> > I have the feeling this will turn out to be trivial. I want to
> > regrid coads winds onto etopo20's grid and then do some
> > manipulations on the regridded fields (ie interpolating and
> > smoothing). As a check on my procedure I'd also like to plot
> > my final fields as a vecor plot.
> >
> > The code below shows what I'm doing. The script runs fine and
> > writes my output fields as desired; however, when I go to
> > vector plot these fields I get a:
> >
> > **ERROR: a program limit has been reached: 832370 points to plot
> >           Plot buffer size is: 495000
> >
> > I'm unclear as to the relationship between the "plot buffer size"
> > and allocated memory (which I've set to 15 MWords). I've ran my
> > code in diagnostic mode and increased the desperate mode to twice
> > the default (hence, 160,000) in hopes that the error is resulting
> > from overly splitting the calculation. If anyone can tell me how
> > to solve this I'd be grateful.
> >
> > Thanks, David.
> >
> > *~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
> > David Oxilia                  Tel: (541) 737-2368
> > COAS:Oregon State University  Fax: (541) 737-2064
> > Ocean Admin. Bldg. 104                Email: oxilia@oce.orst.edu
> > Corvallis, OR 97331-5503      WWW: http://www.oce.orst.edu/po
> > *~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
> >
> >
> > ! Allocate memory for computation
> > set memory/size=15                    ! 1 MWord = 4 MBytes
> >
> > ! Set data files
> > set data etopo20
> > set data coads_climatology
> >
> > ! WIND STRESS
> > ! -----------
> >
> > ! Define wind stress grid as for etopo
> > define grid/like=rose[d=1] etopoxy
> >
> > ! Compute annually averaged wind fields and map to grid
> > let uwndt = uwnd[g=etopoxy,l=@ave]
> > let vwndt = vwnd[g=etopoxy,l=@ave]
> > let wspdt = wspd[g=etopoxy,l=@ave]
> >
> > ! Set constants
> > let c_d = 1.e-3                       ! Drag coefficient
> > let rho_air = 1.2                     ! Density of air in kg/m^3
> >
> > ! Define (tau_x,tau_y) by filling grid via linear interpolation
> > let tx = rho_air*c_d*uwndt[x=@fln:3,y=@fln:3]*wspdt[x=@fln:3,y=@fln:3]
> > let ty = rho_air*c_d*vwndt[x=@fln:3,y=@fln:3]*wspdt[x=@fln:3,y=@fln:3]
> >
> > ! Finally smooth the wind stress with a 5 point boxcar window
> > let txs = tx[i=@sbx:5,j=@sbx:5]
> > let tys = ty[i=@sbx:5,j=@sbx:5]
> >
> > ! Plot the field for verification
> > vec/length=5.0 txs,tys
> >-- End of excerpt from David Oxilia
> 
> --
>  Mark Verschell                     NASA/Goddard Space Flight Center
>  verschell@neptune.gsfc.nasa.gov    Code 970/Lab. for Hydrospheric Proc.
>  301-614-5669  Fax: 301-614-5666    Greenbelt, MD 20771
> 
>                   USQC Certified: 100% Microsoft Free

-- 
Steve Hankin
NOAA/PMEL, 7600 Sand Point Way NE, Seattle, WA 98115-0070
ph. (206) 526-6080 -- FAX (206) 526-6744


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement