Re: PDF error: error opening output file

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Fri Apr 22 2011 - 15:01:08 MDT

Hi Donna,
Whenever you get a warning that looks like this:

warning:GKS:GOPWK: --PDF error: error opening output file
fatal:Workstation with PID#8 is not open
fatal:Unable to open Workstation-Can't Create

It means that NCL was unable to open the output file for writing, either
due to the directory/path being invalid or because you don't have
permissions to write to that file or over that file.

Thus, I would guess that within your gsn_open_wks call you are
specifying a directory that isn't present on your mac, or a directory
that you do not have permission to write to, or the file is already
there and you don't have permissions to overwrite it.

Hope that helps! Adam

On 04/22/2011 01:11 PM, donna Cote wrote:
> My script works but not on production machine!
>
> This is a little hard to explain but I have run across a script that I
> created, and have working properly, on my Mac. When I copied it to a
> Linux box at work, it doesn't work. Let me know if you want a look at
> the script and/or the data used. Thanks. Donna
>
>
> On my MacBook Pro, I have installed
> ncl_ncarg-5.2.1.MacOS_10.5_i386_nodap_gcc401
>
> donna-cotes-macbook-pro:Gomex donnacote$ ncl -n axbtVsModel2.ncl
> 'DATADIR="./03june2010_axbt/"'
> 'MODEL2="./fgrid_fcast_river_20100601.nc"' 'PLOTDIR="./plots/"'>
> log-plots-dlc-axbt-vs-model2.txt 2>&1
> donna-cotes-macbook-pro:Gomex donnacote$ ls -lh
> log-plots-dlc-axbt-vs-model2.txt
> -rw-r--r-- 1 donnacote staff 243B Apr 22 13:53
> log-plots-dlc-axbt-vs-model2.txt
> donna-cotes-macbook-pro:Gomex donnacote$ cat
> log-plots-dlc-axbt-vs-model2.txt
> Copyright (C) 1995-2010 - All Rights Reserved
> University Corporation for Atmospheric Research
> NCAR Command Language Version 5.2.1
> The use of this software is governed by a License Agreement.
> See http://www.ncl.ucar.edu/ for more details
> donna-cotes-macbook-pro:Gomex donnacote$ ls -1 plots | wc -l
> 25
> donna-cotes-macbook-pro:Gomex donnacote$
> ;;; everything appears as it should be
>
> ;;; The machine, mesonet, has:
> ncl_ncarg-5.2.1.Linux_RedHat_x86_64_nodap_gcc412
> [ldm@mesonet GOMEX-PPP]$ uname -a
> Linux mesonet.tamu.edu 2.6.18-194.32.1.el5 #1 SMP Wed Jan 5 17:52:25 EST
> 2011 x86_64 x86_64 x86_64 GNU/Linux
> [ldm@mesonet GOMEX-PPP]$ arch
> x86_64
> [ldm@mesonet GOMEX-PPP]$ gcc --version
> gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48)
> [ldm@mesonet GOMEX-PPP]$
> ;;;;
>
> [dcote@mesonet GOMEX-PPP]$ ncl -n ~ldm/GOMEX-PPP/NCL/axbtVsModel2dlc.ncl
> 'DATADIR="./AXBT/03june2010_axbt/"'
> 'MODEL2="./2_PROFS_Oey/fgrid_fcast_river_20100601.nc"'
> 'PLOTDIR="/tmp/plots/"'> /tmp/log-plots-dlc-axbt-vs-model2.txt 2>&1
> [dcote@mesonet GOMEX-PPP]$ ls -lh /tmp/log-plots-dlc-axbt-vs-model2.txt
> -rw-r--r-- 1 dcote admins 1.1K Apr 22 13:45
> /tmp/log-plots-dlc-axbt-vs-model2.txt
> [dcote@mesonet GOMEX-PPP]$ ls -lh /tmp/plots
> total 0
> [dcote@mesonet GOMEX-PPP]$
>
> Here I see the log has:
> [ldm@mesonet GOMEX-PPP]$ head /tmp/log-axbt20100603-vs-Model2.txt
> Copyright (C) 1995-2010 - All Rights Reserved
> University Corporation for Atmospheric Research
> NCAR Command Language Version 5.2.1
> The use of this software is governed by a License Agreement.
> See http://www.ncl.ucar.edu/ for more details.
> warning:GKS:GOPWK: --PDF error: error opening output file
> fatal:Workstation with PID#8 is not open
> fatal:Unable to open Workstation-Can't Create
> fatal:Unable to access object with id:-4
> fatal:NhlGetValues:PID #-4 is invalid
> [ldm@mesonet GOMEX-PPP]$ tail /tmp/log-axbt20100603-vs-Model2.txt
> fatal:Execute: Error occurred at or near line 3552 in file
> $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl
>
> fatal:Execute: Error occurred at or near line 123 in file
> /usr/local/ldm/GOMEX-PPP/NCL/axbtVsModel2.ncl
>
> ERROR 3 IN NGSETI - value for WO must reference an open workstation.
> ERROR 1 IN NGSETI - Uncleared prior error
> ERROR 1 IN NGSETI - Uncleared prior error
> ERROR 1 IN NGSETI - Uncleared prior error
> ERROR 1 IN NGSETI - Uncleared prior error
> ERROR 1 IN NGSETI - Uncleared prior error
> [ldm@mesonet GOMEX-PPP]$
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
__________________________________________________
Adam Phillips 
asphilli@ucar.edu
National Center for Atmospheric Research   tel: (303) 497-1726
Climate and Global Dynamics Division         fax: (303) 497-1333
P.O. Box 3000				
Boulder, CO 80307-3000    http://www.cgd.ucar.edu/cas/asphilli
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Apr 22 15:01:31 2011

This archive was generated by hypermail 2.1.8 : Tue May 03 2011 - 14:47:35 MDT