[ncl-talk] Error involving PlotcharData

Sara Jackson sjackson615 at btinternet.com
Mon Oct 12 19:48:03 MDT 2015


Hi Rick,
Yes, $NCARG_ROOT is /usr/local/ncarg. When I type which ncl I get /usr/bin/ncl.
Thank you for your help, I am new to using NCL!Sara 


     On Tuesday, 13 October 2015, 0:02, Rick Brownrigg <brownrig at ucar.edu> wrote:
   

 Hi Sara,

It looks like NCL is not finding its supporting files, namely the font files and possibly the map database.  From the errors, it looks like you have NCARG_ROOT set to "/usr/share/ncarg"?   What is reported when you type:

    which ncl

?

Rick

On Mon, Oct 12, 2015 at 2:40 AM, Sara Jackson <sjackson615 at btinternet.com> wrote:

Hi there,
I was hoping for some help with a PlotcharData error. I am using ncl version 6.1.2 and gcc version (Ubuntu 4.8.4-2ubuntu1~14.04)  4.8.4. 
I am trying to run the following ncl script:
; load functions and procedures
load "$NCARG_ROOT/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/nclscripts/wrf/WRFUserARW.ncl"

begin

; WRF ARW input file (NOTE, your wrfout file does not need the .nc, 
; but NCL needs it so make sure to add it in the line below)

a = addfile("../wrfout_d01_2013-12-01_00:00:00.nc","r") 

; Output on screen (type="x11"). Output will be called "plt_Surface1" 
type = "x11"
wks = gsn_open_wks(type,"plt_Surface1") 

; Set basic resources
res = True 
res at MainTitle = "REAL-TIME WRF"               ; Give plot a main title 
res at Footer = False                                 ; Set Footers off
pltres = True                                       ; Plotting resources 
mpres = True                                       ; Map resources

;--------------------------------------------------------------- 
times = wrf_user_getvar(a,"times",-1)                ; get all times in the file
ntimes = dimsizes(times)                       ; number of times in the file 
it = 0                                       ; only interested in first time 
res at TimeLabel = times(it)                       ; keep some time information 
   
;---------------------------------------------------------------

; Get variables

slp = wrf_user_getvar(a,"slp",it)                  ;Get slp
   wrf_smooth_2d( slp, 3 )                         ; Smooth slp

t2 = wrf_user_getvar(a,"T2",it)                    ; Get T2 (deg K)
   tc2 = t2-273.16                                    ; Convert to deg C 
   tc2 at units = "C"

u10 = wrf_user_getvar(a,"U10",it)                  ; Get U10 
v10 = wrf_user_getvar(a,"V10",it)                  ; Get V10 
   u10 at units = "m/s" 
   v10 at units = "m/s"

;---------------------------------------------------------------

; Plotting options for T
opts = res                       ; Add basic resources 
opts at cnFillOn = True                               ; Shaded plot 
opts at ContourParameters = (/ -20., 90., 5./)          ; Contour intervals 
opts at gsnSpreadColorEnd = -3 
contour_tc = wrf_contour(a,wks,tc2,opts)           ; Create plot 
delete(opts) 

; Plotting options for SLP 
opts = res                       ; Add basic resources 
opts at cnLineColor = "Blue"                          ; Set line color 
opts at cnHighLabelsOn = True                         ; Set labels 
opts at cnLowLabelsOn = True
opts at ContourParameters = (/ 900.,1100.,4./)       ; Contour intervals 
contour_psl = wrf_contour(a,wks,slp,opts)          ; Create plot 
delete(opts)
 

; Plotting options for Wind Vectors
opts = res                       ; Add basic resources 
opts at FieldTitle = "Winds"                        ; Overwrite the field title 
opts at NumVectors = 47                             ; Density of wind barbs 
vector = wrf_vector(a,wks,u10,v10,opts)            ; Create plot 
delete(opts)

 

; MAKE PLOTS 
plot = wrf_map_overlays(a,wks,  \ 
      (/contour_tc,contour_psl,vector/),pltres,mpres)
  
;---------------------------------------------------------------

 

end
But then I get the following error:Copyright (C) 1995-2013 - All Rights Reserved
 University Corporation for Atmospheric Research
 NCAR Command Language Version 6.1.2
 The use of this software is governed by a License Agreement.
 See http://www.ncl.ucar.edu/ for more details.
warning:TextItem:libncarg Error:PLCHHQ/PCFOPN - ERROR OPENING PWRITX DATA FILE /usr/share/ncarg/database/PlotcharData
 warning:TextItem:libncarg Error:PLCHHQ/PCFOPN - ERROR OPENING PWRITX DATA FILE /usr/share/ncarg/database/PlotcharData
 warning:TextItem:libncarg Error:PLCHHQ/PCFOPN - ERROR OPENING PWRITX DATA FILE /usr/share/ncarg/database/PlotcharData
........ (repeated a lot of times!) ......

 fatal:MapV41DHInitialize: dynamic memory allocation error:[errno=12]
 fatal:MapV41DHInitialize: error initializing map outline records
 fatal:MapSetTrans: error initializing map: MAPINT - UNCLEARED PRIOR ERROR
 warning:["SetValues.c":474]:SetValuesChild never occurred on plt_Surface1_map.PlotManager: Error in mapPlotClass
 warning:tmXBBorderOn is not a valid resource in plt_Surface1_map at this time
 fatal:ContourPlotDraw: CPLBDR/CPPKLP/CPSTLS/PLCHHQ/PCFOPN - ERROR OPENING PWRITX DATA FILE /usr/share/ncarg/database/PlotcharData
 fatal:ContourPlotDraw: draw error
 warning:WorkstationDeactivate: workstation not active or not opened
 warning:MapV41DHDrawMapList:libncarg Error:MPSETI - UNCLEARED PRIOR ERROR
 warning:MapV41DHDrawMapList:libncarg Error:MPSETI - UNCLEARED PRIOR ERROR
 warning:MapPlotPostDraw:libncarg Error:MPSETI - UNCLEARED PRIOR ERROR
 warning:TextItemDraw:libncarg Error:PLCHHQ/PCFOPN - ERROR OPENING PWRITX DATA FILE /usr/share/ncarg/database/PlotcharData
 warning:TextItemDraw:libncarg Error:PLCHHQ/PCFOPN - ERROR OPENING PWRITX DATA FILE /usr/share/ncarg/database/PlotcharData
 warning:TextItem:libncarg Error:PLCHHQ/PCFOPN - ERROR OPENING PWRITX DATA FILE /usr/share/ncarg/database/PlotcharData
 warning:TextItemDraw:libncarg Error:PLCHHQ/PCFOPN - ERROR OPENING PWRITX DATA FILE /usr/share/ncarg/database/PlotcharData


.....etc .....
Many thanks,Sara Jackson 


     On Monday, 12 October 2015, 16:26, Sara Jackson <sjackson615 at btinternet.com> wrote:
   

 Hi there,
I was hoping for some help with a PlotcharData error. I am using ncl version 6.1.2 and gcc version (Ubuntu 4.8.4-2ubuntu1~14.04)  4.8.4. 
I am trying to run the following ncl script:
; load functions and procedures
load "$NCARG_ROOT/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/nclscripts/wrf/WRFUserARW.ncl"

begin

; WRF ARW input file (NOTE, your wrfout file does not need the .nc, 
; but NCL needs it so make sure to add it in the line below)

a = addfile("../wrfout_d01_2013-12-01_00:00:00.nc","r") 

; Output on screen (type="x11"). Output will be called "plt_Surface1" 
type = "x11"
wks = gsn_open_wks(type,"plt_Surface1") 

; Set basic resources
res = True 
res at MainTitle = "REAL-TIME WRF"               ; Give plot a main title 
res at Footer = False                                 ; Set Footers off
pltres = True                                       ; Plotting resources 
mpres = True                                       ; Map resources

;--------------------------------------------------------------- 
times = wrf_user_getvar(a,"times",-1)                ; get all times in the file
ntimes = dimsizes(times)                       ; number of times in the file 
it = 0                                       ; only interested in first time 
res at TimeLabel = times(it)                       ; keep some time information 
   
;---------------------------------------------------------------

; Get variables

slp = wrf_user_getvar(a,"slp",it)                  ;Get slp
   wrf_smooth_2d( slp, 3 )                         ; Smooth slp

t2 = wrf_user_getvar(a,"T2",it)                    ; Get T2 (deg K)
   tc2 = t2-273.16                                    ; Convert to deg C 
   tc2 at units = "C"

u10 = wrf_user_getvar(a,"U10",it)                  ; Get U10 
v10 = wrf_user_getvar(a,"V10",it)                  ; Get V10 
   u10 at units = "m/s" 
   v10 at units = "m/s"

;---------------------------------------------------------------

; Plotting options for T
opts = res                       ; Add basic resources 
opts at cnFillOn = True                               ; Shaded plot 
opts at ContourParameters = (/ -20., 90., 5./)          ; Contour intervals 
opts at gsnSpreadColorEnd = -3 
contour_tc = wrf_contour(a,wks,tc2,opts)           ; Create plot 
delete(opts) 

; Plotting options for SLP 
opts = res                       ; Add basic resources 
opts at cnLineColor = "Blue"                          ; Set line color 
opts at cnHighLabelsOn = True                         ; Set labels 
opts at cnLowLabelsOn = True
opts at ContourParameters = (/ 900.,1100.,4./)       ; Contour intervals 
contour_psl = wrf_contour(a,wks,slp,opts)          ; Create plot 
delete(opts)
 

; Plotting options for Wind Vectors
opts = res                       ; Add basic resources 
opts at FieldTitle = "Winds"                        ; Overwrite the field title 
opts at NumVectors = 47                             ; Density of wind barbs 
vector = wrf_vector(a,wks,u10,v10,opts)            ; Create plot 
delete(opts)

 

; MAKE PLOTS 
plot = wrf_map_overlays(a,wks,  \ 
      (/contour_tc,contour_psl,vector/),pltres,mpres)
  
;---------------------------------------------------------------

 

end
But then I get the following error:Copyright (C) 1995-2013 - All Rights Reserved
 University Corporation for Atmospheric Research
 NCAR Command Language Version 6.1.2
 The use of this software is governed by a License Agreement.
 See http://www.ncl.ucar.edu/ for more details.
warning:TextItem:libncarg Error:PLCHHQ/PCFOPN - ERROR OPENING PWRITX DATA FILE /usr/share/ncarg/database/PlotcharData
 warning:TextItem:libncarg Error:PLCHHQ/PCFOPN - ERROR OPENING PWRITX DATA FILE /usr/share/ncarg/database/PlotcharData
 warning:TextItem:libncarg Error:PLCHHQ/PCFOPN - ERROR OPENING PWRITX DATA FILE /usr/share/ncarg/database/PlotcharData
........ (repeated a lot of times!) ......

 fatal:MapV41DHInitialize: dynamic memory allocation error:[errno=12]
 fatal:MapV41DHInitialize: error initializing map outline records
 fatal:MapSetTrans: error initializing map: MAPINT - UNCLEARED PRIOR ERROR
 warning:["SetValues.c":474]:SetValuesChild never occurred on plt_Surface1_map.PlotManager: Error in mapPlotClass
 warning:tmXBBorderOn is not a valid resource in plt_Surface1_map at this time
 fatal:ContourPlotDraw: CPLBDR/CPPKLP/CPSTLS/PLCHHQ/PCFOPN - ERROR OPENING PWRITX DATA FILE /usr/share/ncarg/database/PlotcharData
 fatal:ContourPlotDraw: draw error
 warning:WorkstationDeactivate: workstation not active or not opened
 warning:MapV41DHDrawMapList:libncarg Error:MPSETI - UNCLEARED PRIOR ERROR
 warning:MapV41DHDrawMapList:libncarg Error:MPSETI - UNCLEARED PRIOR ERROR
 warning:MapPlotPostDraw:libncarg Error:MPSETI - UNCLEARED PRIOR ERROR
 warning:TextItemDraw:libncarg Error:PLCHHQ/PCFOPN - ERROR OPENING PWRITX DATA FILE /usr/share/ncarg/database/PlotcharData
 warning:TextItemDraw:libncarg Error:PLCHHQ/PCFOPN - ERROR OPENING PWRITX DATA FILE /usr/share/ncarg/database/PlotcharData
 warning:TextItem:libncarg Error:PLCHHQ/PCFOPN - ERROR OPENING PWRITX DATA FILE /usr/share/ncarg/database/PlotcharData
 warning:TextItemDraw:libncarg Error:PLCHHQ/PCFOPN - ERROR OPENING PWRITX DATA FILE /usr/share/ncarg/database/PlotcharData


.....etc .....
Many thanks,Sara Jackson


   
_______________________________________________
ncl-talk mailing list
ncl-talk at ucar.edu
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk





  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151013/fc627c59/attachment.html 


More information about the ncl-talk mailing list