Workspace reallocation would exceed maximum size

From: AJ Smit <albertus.smit_at_nyahnyahspammersnyahnyah>
Date: Tue Nov 03 2009 - 23:19:29 MST

Hello all,

I am reading in some AVHRR hdf data, assigning the lat/lon data to the
SSTs, and then try to plot it (more-or-less according to the
avhrr_1.ncl file). The error is always the same:

warning:ContourPlotSetValues: cnLevelSpacingF value causes level count
to exceed maximum: defaulting
fatal:ContourPlotDraw: Workspace reallocation would exceed maximum
size 60000000
fatal:ContourPlotDraw: draw error

Even adjusting wsMaximumSize does not fix things as has been suggested
in some previous posts I have seen about the problem:

setvalues NhlGetWorkspaceObjectId()
"wsMaximumSize": 60000000
end setvalues

(I stopped at 60000000).

I also thought the spatial coordinates were wrongly assigned but they
all look fine to me (see printVarSummary output later). The script is
also attached below.

Any help will be appreciated.
AJ

The script:

     infile = addfile("/Users/ajsmit/oceans/AVHRR_SST_v5/1985-2007_SST-
qual/198501.s04m3pfv50-sst-16b.hdf","r")
     _SST = infile -> sst
     _SST@_FillValue = integertobyte(1)
     sst = _SST*_SST@scale_factor + _SST@add_off
     delete(_SST)

     dim_sst = dimsizes(sst)
     nlat = dim_sst(0)
     lat = latGlobeFo(nlat, "lat", "latitude", "degrees_north")
     lat = lat(::-1) ; reverse to go from N to S
     nlon = dim_sst(1)
     lon = lonGlobeFo(nlon, "lon", "longitude", "degrees_east")
     lon = (/ lon-180. /) ; eastward from Date Line

     sst!0 = "lat"
     sst!1 = "lon"
     sst&lat = lat
     sst&lon = lon
     sst@long_name = "Sea surface temperature"

     wks = gsn_open_wks("x11","PFV5")
     gsn_define_colormap(wks,"BlAqGrYeOrReVi200")

     setvalues NhlGetWorkspaceObjectId()
     "wsMaximumSize": 60000000
     end setvalues

     res = True
     res@cnFillOn = True
     res@gsnSpreadColors = True
     res@cnLinesOn = False
     res@cnFillMode = "RasterFill"
     res@cnLevelSpacingF = 0.1
     res@lbLabelAutoStride= True
     res@tiMainString = "PFV5 data"

     plot = gsn_csm_contour_map_ce(wks,sst,res)

Some output:

ncl 27> printVarSummary(lat)

Variable: lat
Type: float
Total Size: 16384 bytes
             4096 values
Number of Dimensions: 1
Dimensions and sizes: [lat | 4096]
Coordinates:
             lat: [89.97803..-89.97803]
Number Of Attributes: 2
   long_name : latitude
   units : degrees_north

ncl 33> printVarSummary(lon)

Variable: lon
Type: float
Total Size: 32768 bytes
             8192 values
Number of Dimensions: 1
Dimensions and sizes: [lon | 8192]
Coordinates:
             lon: [0.02197266..359.978]
Number Of Attributes: 2
   long_name : longitude
   units : degrees_east

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dr Albertus J Smit
School of Biological & Conservation Sciences
University of KwaZulu-Natal
Westville Campus
PO Box X54001
Durban, South Africa

E-mail: smitaj@ukzn.ac.za
Tel. +27 031 260 7410;
Fax +27 031 260 2029

Web page: http://marinesci.ukzn.ac.za/biology
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Nov 3 23:19:08 2009

This archive was generated by hypermail 2.1.8 : Fri Nov 06 2009 - 09:15:29 MST