Keep it or not?

From: <Oliver.Fuhrer_at_nyahnyahspammersnyahnyah>
Date: Mon, 20 Apr 2009 17:12:17 +0200

Hi ncl-talk,

I am somewhat confused about which variables I need to keep until the
end of my scripts and which ones I can delete on the fly... Here's a
generic example script...

pl = new(6,graphic)
do i=0,5
  mp = gsn_map(...)
  gg = gsn_add_polyline(mp, ...)
  cn = gsn_contour(...)
  pl(i) = overlay( (/mp,cn/) )
  delete(mp)
  delete(gg)
  delete(cn)
end do
gsn_panel(pl,...)

The script contains a base map (mp), an additional polyline (gg) drawn
onto each map, a contour plot (cn) and an overlay (pl) of the map and
the contour. In the end, the overlays are put into a panel plot. Since
the pl are panelled, they must be allocated as an array before the loop
and kept in memory. My question now is, if the mp, gg and cn need to be
handled the same way as pl (allocate beforehand and kept in memory) or
if deleting them is ok.

Thanks for any advice,
Oli

________________________________________

Oliver Fuhrer
Numerical Models

Federal Departement of Home Affairs FDHA
Federal Office of Meteorology and Climatology MeteoSwiss

Kraehbuehlstrasse 58, P.O. Box 514, CH-8044 Zurich, Switzerland

Tel. +41 44 256 93 59
Fax +41 44 256 92 78
oliver.fuhrer_at_meteoswiss.ch
www.meteoswiss.ch - First-hand information
  
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Apr 20 2009 - 09:12:17 MDT

This archive was generated by hypermail 2.2.0 : Tue Apr 21 2009 - 11:04:41 MDT