Re: Workspace reallocation would exceed maximum size

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Wed Nov 04 2009 - 14:24:37 MST

Hi AJ,
As Mary says, 60,000,000 bytes is not a large value for wsMaximumSize
considering common plotting requirements nowadays, and that even
modest computers have memory measured in gigabytes. In fact, the
default value for this resource has been raised to 100,000,000 as of
NCL 5.1.0, so if you have a recent version of NCL your code is
actually reducing the amount of workspace that is available. I do note
that the documentation has not been updated to reflect this fact. This
will be fixed soon.
  -dave

On Nov 4, 2009, at 12:46 PM, Mary Haley wrote:

>
> Hi AJ,
>
> I've seen values higher than what you're using for wsMaximumSize.
> Try adding another "0" to the end of the number.
>
> You might also try a larger cnLevelSpacingF value.
>
> I see you are already doing raster fill, so that's helpful. It looks
> like your coordinate arrays are okay, so I don't think that's the
> problem.
>
> --Mary
>
> On Nov 3, 2009, at 11:19 PM, AJ Smit wrote:
>
>> 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
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Nov 4 14:24:16 2009

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