Dear NCL folks,
I am trying to make a polar projection plot of an observed field
that is from satellite data. My plot program worked with an older
version of the data that was of lower resolution and had 350 by 450
points. Now I have higher resolution data that is 855 by 855 points
and I get the error shown below.
I increased my memory in the .hluresfile to *wsMaximumSize :
100000000. I put in write statements so I know that the hang up is in
the call to the plot command (final command).
Any advice is appreciated. I would prefer to use NCL for these plots
and not have to switch to another piece of software.
I am including my code below (ok it is not so pretty). The data have
a 2-d lat and lon, which are read in from direct access binary files.
The data is a direct access binary file with one time slice.
The 2-d Lat and lon information is read in correctly (checked with a
print statement), but the longitudes are between -180 and 180, so that
may be causing a problem.
I have the feeling that the data is too big, but am hoping that is
not the case.
Thanks,
Regards,
Uma
----- error information from unix screen view begin ------
bhatt% ncl < plot_ndvim-map.ncl
Copyright (C) 1995-2009 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 5.1.1
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.
(0) read in data
(0) set the resources
(0) specify the plot info part 1
(0) specify the plot info part 2
fatal:ContourPlotDraw: Workspace reallocation would exceed maximum
size 100000000
fatal:ContourPlotDraw: draw error
warning:WorkstationDeactivate: workstation not active or not opened
----- unix screen view end ------
-----plot_ndvim-map.ncl begin ------
;************************************************
; Write out 2-d lat data information for plotting
; 8/20/2009
;************************************************
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
begin
;************************************************
; Read the input data
;************************************************
; read in the correlation information
path1 = "polar89sep15b.n11-VI3g.grd"
; third record 0=all, 3=land, 2=ocean
nrec = 0
dims = (/855,855/)
trend = fbindirread(path1, nrec, dims, "float")
; read in the latitude information
nrec = 0
path2 = "polarLW12km-LAT.grd"
lat2d = fbindirread(path2, nrec, dims, "float")
; read in the longitude information
nrec = 0
path3 = "polarLW12km-LON.grd"
lon2d = fbindirread(path3, nrec, dims, "float")
print("read in data")
;************************************************
; make a plot
;*******************************************
type = "ps" ; create variable
to hold info
; type_at_wkColorModel = "cmyk" ; make output cmyk
wks = gsn_open_wks(type,"maxndvi_mp")
gsn_define_colormap(wks,"nrl_sirkes") ; Change color map
newindex = NhlNewColor(wks,0.9,0.9,0.9)
res = True ; Plot modes desired.
res_at_gsnMaximize = True ; Maximize plot
; ndvim
res_at_cnLevelSelectionMode= "ExplicitLevels" ; set explicit contour levels
res_at_cnLevels = (/0.,.10,.20, \
.30,.40,.50,.60,.70,.80,.90,1./)
res_at_cnLinesOn = False ; turn off contour lines
res_at_cnFillOn = True ; color plot desired
; res_at_gsnSpreadColors = True ; use full range of colormap
; res_at_mpLandFillColor = "Tan" ; Change land color to grey.
; res_at_cnLevelSelectionMode = "ExplicitLevels" ; color fill
; nrl sirkes colors
res_at_cnFillColors = (/2,3,4,5,6,7,9,11, \
13,14,15,17,18,20,21,22/);
res_at_mpFillOn = True
res_at_mpDefaultFillPattern = -1
print("set the resources")
;************************************************
;No georeferencing: simple contour. Draws faster
;************************************************
; res_at_tiMainString = "gsn_csm_contour"
; plot = gsn_csm_contour(wks,trend,res) ; contour, no map
;*******************************************
; georeferencing: plot on polar projection
;*******************************************
; georeference
;
trend!0="lat2d"
trend!1="lon2d"
trend_at_lat2d = lat2d
trend_at_lon2d = lon2d
; specify the 2-d lat/lon issue
swi = new((/855,855/),float)
swi!0="lat2d"
swi!1="lon2d"
swi_at_lat2d = lat2d
swi_at_lon2d = lon2d
swi@_FillValue = -80.
print("specify the plot info part 1")
swi(:,:)=trend(:,:)
res_at_trGridType = "TriangularMesh" ; allow missing coordinates
res_at_gsnPolar = "NH" ; specify the hemisphere
res_at_mpMinLatF = 40
res_at_tiMainString = "gsn_csm_contour_map_polar"
print("specify the plot info part 2")
plot = gsn_csm_contour_map_polar(wks,swi,res)
end
----_plot_ndvim-map.ncl end ------
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Aug 20 2009 - 18:28:36 MDT
This archive was generated by hypermail 2.2.0 : Mon Aug 24 2009 - 11:15:23 MDT