DEM plot: memory allocation error

From: Noel Aloysius <noel.aloysius_at_nyahnyahspammersnyahnyah>
Date: Mon Apr 08 2013 - 13:17:58 MDT

Dear NCL-talk,

I have a 90m DEM with the following dimensions (/27260,26610/), ~ 2.9GB in
size. The script below creates a spatial plot of the DEM.

The plot is successfully created if I restrict the region as follows,

  plot = gsn_csm_contour_map(wks, dem90m(5000:27259,5000:26609), res1)

I get an error otherwise.

fatal:NhlRealloc Failed:[errno=12]
fatal:ContourPlotDraw: dynamic memory allocation error
fatal:ContourPlotDraw: draw error
warning:WorkstationDeactivate: workstation not active or not opened

Is there a way around?

Thanks,
Noel

;*****************************************************************
 ffig = diro + "dem90m"
  wks = gsn_open_wks(type, ffig)
  plot = new(1, graphic)
  gsn_define_colormap(wks, "ncl_default")
  maps = NewList("fifo")

  ;--------------------------------------------------------
  setvalues NhlGetWorkspaceObjectId()
    "wsMaximumSize": 2000000000
  end setvalues
  ;--------------------------------------------------------

  res1 = True ; plot mods desired
  res1@gsnDraw = False
  res1@gsnFrame = False

  res1@tiMainString = "90m DEM"
  res1@gsnPaperOrientation = "auto"
  res1@gsnMaximize = True
  res1@gsnSpreadColors = True
  res1@gsnAddCyclic = False

  res1@lbLabelBarOn = True

  res1@cnFillMode = "RasterFill"
  res1@cnFillOn = True
  res1@cnLinesOn = False

  res1@mpCenterLonF = (regBnds(2)+regBnds(3))/2 ; center the map
arounf this lon.
  res1@mpMinLatF = regBnds(0) ; select a subregion
  res1@mpMaxLatF = regBnds(1)
  res1@mpMinLonF = regBnds(2)
  res1@mpMaxLonF = regBnds(3)

  plot = gsn_csm_contour_map(wks, dem90m(5000:27259,5000:26609), res1)
  ;plot = gsn_csm_contour_map(wks, dem90m, res1)

  ; draw polygon
  lnres1 = True
  lnres1@gsLineColor = "black"
  lnres1@gsLineThicknessF = 2.0
  ListPush(maps, gsn_add_shapefile_polylines(wks,plot,fshp1,lnres1))

  draw(wks)
  frame(wks)
;***************************************************************

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Apr 8 13:18:11 2013

This archive was generated by hypermail 2.1.8 : Mon Apr 15 2013 - 20:12:25 MDT