working with memory

From: Micah Sklut <micahs2005_at_nyahnyahspammersnyahnyah>
Date: Mon, 16 Jan 2006 12:55:40 -0500

Hi,

I am creating plots of different regions along the US coastline.
I am reading in 29 data files (which vary in time), joining them
together,and then plotting
the different regions per time. So, for example, there are 29 plots for the
delmarva coastline, 29 plots for
the new jersey coastline, etc.

When I try to plot all the regions in the same program I am encountering
memory problems. I get the following error:
Fatal: NhlMalloc Failed: [errno=12]: Cannot allocate Memory

If I only plot one region, then I am successful in creating all 29 plots. I
am wondering if there is anything I can do to allocate more memory, so that
I don't have to run individual programs for each region?

Thanks.

I am currently working with a Linux box using 384 MB ram.
Program is below: (I load the same plot routines for each region
- nam_graphs.ncl)

begin

nam_files = systemfunc("ls ./data/*.tm00")
f = addfiles(nam_files+".grb","r")
ListSetType(f,"join")

u = f[:]->U_GRD_218_HTGL * 1.944
v = f[:]->V_GRD_218_HTGL * 1.944
lt = f[0]->gridlat_218
ln = f[0]->gridlon_218

; convert u and v into speed
spd = (u^2+v^2)^(.5)

u_at_lat2d = lt
u_at_lon2d = ln
v_at_lat2d = lt
v_at_lon2d = ln
spd_at_lat2d = lt
spd_at_lon2d = ln

;plot

do i = 0,28

hr = i*3

if (hr .lt. 10) then
  ext = "0"+hr
else
  ext = hr
end if

name_out="wna_stx/wna_stx_wind"+ext
latmin = 25.512
lonmin = -98.5
latmax = 28.4
lonmax = -94.5
load "$SWELLINFO_ROOT/wind/nam_graphs.ncl"

name_out="wna_ntx/wna_ntx_wind"+ext
latmin = 27.3
lonmin = -97.
latmax = 30.188
lonmax = -93.
load "$SWELLINFO_ROOT/wind/nam_graphs.ncl"

name_out="wna_flpan/wna_flpan_wind"+ext
latmin = 28.
lonmin = -88.
latmax = 30.888
lonmax = -84.
load "$SWELLINFO_ROOT/wind/nam_graphs.ncl"

.....(more regions).....

end do

end

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Jan 16 2006 - 10:55:40 MST

This archive was generated by hypermail 2.2.0 : Tue Jan 17 2006 - 08:28:16 MST