[ncl-talk] ContourPlotDraw and PlotManagerDraw error while ploting SST

Guido Cioni guidocioni at gmail.com
Mon Aug 29 03:55:28 MDT 2016


As stated here http://www.ncl.ucar.edu/Document/Graphics/hlures.shtml <http://www.ncl.ucar.edu/Document/Graphics/hlures.shtml> [at the bottom] try to increase the default contour memory in the .hluresfile. 
Regards,

Guido Cioni
http://guidocioni.altervista.org <http://guidocioni.altervista.org/> 

> On 29 Aug 2016, at 10:17, Amit Kumar <amitkumar.777 at hotmail.com> wrote:
> 
> Hi all,
> 
> I'm trying to plot daily file of SST using NCL. But I'm getting following error:
> 
> fatal:ContourPlotDraw: Workspace reallocation would exceed maximum size 100000000
> fatal:ContourPlotDraw: draw error
> fatal:ContourPlotDraw: draw error
> fatal:PlotManagerDraw: error in plot draw
> fatal:_NhlPlotManagerDraw: Draw error
> 
> I'm able to plot HEM, OLR which are in same format and with same NCL script but with SST I'm encountering these errors.
> 
> My NC file description is as shown below:
> 
> dimensions:
>       x = 1744
>       y = 657
>       time = 1  // unlimited
>    variables:
>       double longitude ( y, x )
>          standard_name :    longitude
>          long_name :    longitude
>          units :    degrees_east
>          _CoordinateAxisType :    Lon
> 
>       double latitude ( y, x )
>          standard_name :    latitude
>          long_name :    latitude
>          units :    degrees_north
>          _CoordinateAxisType :    Lat
> 
>       double time ( time )
>          standard_name :    time
>          units :    hours since 1-1-1 00:00:00
>          calendar :    standard
>          axis :    T
> 
>       double SST_DLY ( time, y, x )
>          coordinates :    latitude longitude
>          _FillValue :    -9e+33
>          missing_value :    -9e+33
>          fillvalue :    -9.e+33
> 
> 
> My script is as below:
> 
> load "/usr/share/ncarg/nclscripts/csm/gsn_code.ncl"
> load "/usr/share/ncarg/nclscripts/csm/gsn_csm.ncl"
> load "/usr/share/ncarg/nclscripts/csm/contributed.ncl"
> 
> begin
> 
>  a = addfile("/media/amit/E/Research/SWM/SST/AUG/output/india/07AUG.nc","r")
>  ;filename = "/media/amit/E/India_shapefile/Districtbound(Satmet).shp"
>  filename = "/media/amit/E/India_shapefile/State_bound(Satmet).shp"
> 
>   var     = doubletofloat(a->SST_DLY(0,:,:))
>   lat     =  a->latitude
>   lon     =  a->longitude
> 
> wks = gsn_open_wks("png","07AUG")                ; send graphics to PNG file
> 
>   res                      = True                  ; plot mods desired
>   res at gsnDraw              = False
>   res at gsnFrame             = False
>   res at gsnAddCyclic         = False
>   res at gsnStringFontHeightF = 0.015
>   res at cnFillOn             = True                  ; turn on color fill
>   res at gsnMaximize          = True     ; maximize plot in frame
>   res at mpOutlineOn   = False   ; Use outlines from shapefile
>   res at mpFillOn      = False
>   res at cnLinesOn         = False    ; turn off contour lines
>   res at cnLineLabelsOn    = False    ; turn off line labels
>   res at cnLevelSelectionMode = "ExplicitLevels"
>   res at cnLevels             = (/273,283,293,294,295,296,297,298,299,300,301,302,303,304,305/) ;   15 contour values
>   res at cnFillPalette            = "rainbow"
>   res at lbLabelBarOn     = False
>   res at lbOrientation   = "Vertical"
>   res at sfXArray             = lon
>   res at sfYArray        =  lat
>  ; res at mpMinLonF     = 1.0
>  ; res at mpMaxLonF     = 163.0
>  ; res at mpMinLatF     = -81.0
>  ; res at mpMaxLatF     = 25.0
>   res at pmTickMarkDisplayMode     = "Always"
>   ;res at tiXAxisString            = "Longitude"
>   ;res at tiYAxisString            = "Lattitude"
>   res at tiXAxisFontHeightF     = 0.02
>   res at tiYAxisFontHeightF     = 0.02 
> plot = gsn_csm_contour_map(wks,var, res)        ; create plot
> 
> ;---Resource list for shapefile outlines
>  plres                     = True
>  plres at gsLineColor       = "black"
>  plres at gsLineThicknessF  = "1.0"
>  dumstr                = unique_string("poly")
>  id = gsn_add_shapefile_polylines(wks,plot,filename,plres)
>  draw(plot)
>  frame(wks)
> end
> 
> 
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu <mailto:ncl-talk at ucar.edu>
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk <http://mailman.ucar.edu/mailman/listinfo/ncl-talk>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160829/89a74202/attachment.html 


More information about the ncl-talk mailing list