Re: Only one PDF workstation can be open at a time

From: Rick Brownrigg <brownrig_at_nyahnyahspammersnyahnyah>
Date: Fri Jan 04 2013 - 15:45:32 MST

Hi,

Which version of NCL are you using? I suspect you are using the older PDF driver. If you have 6.0.0, try using "newpdf" as a workstation type. In 6.1.0, the workstation "pdf" defaults to the newer driver.

Rick

On Jan 4, 2013, at 3:33 PM, Alexander Semenov <asemenov@alaska.edu> wrote:

> Hi
>
> I get the error message that only pdf file can be open at a time. I looked it up and the suggestion I found online was to write pdfs in a loop. I did that but it didn't help either.
>
> warning:GKS:GOPWK: -- Only one PDF workstation can be open at a time
> fatal:Workstation with PID#55 is not open
> 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
> fatal:Unable to open Workstation-Can't Create
> fatal:Unable to access object with id:-4
> fatal:NhlGetValues:PID #-4 is invalid
> fatal:Execute: Error occurred at or near line 3574 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl
> fatal:Execute: Error occurred at or near line 3800 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl
> fatal:Execute: Error occurred at or near line 46 in file sal_00.ncl
>
>
> Could you please take a look at my code and suggest the way I can fix that? Thanks
>
> 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
>
> f= addfile ("/import/c/w/asemenov/CESM_plots/model_out/ocn_year_ave.nc","r")
> g=addfile ("/import/c/w/asemenov/CESM_plots/obs/PHC2_TEMP_gx1v6_ann_avg.nc","r")
>
> pwv2 = g->TEMP
> pwv1 = f->TEMP(0,:,:,:)
> printVarSummary(pwv2)
> printVarSummary(pwv1)
>
> do i=0,59
> pwv = pwv1(i,:,:)-pwv2(i,:,:)
>
> z1 = f->z_t
> z=z1/100
> print(z)
> printVarSummary(pwv)
> lat2d = f->TLAT ; read in 2D lat/lon
> lon2d = f->TLONG
> pwv@lon2d = lon2d ; assign required attributes
> pwv@lat2d = lat2d
> printMinMax (pwv, True)
>
> wks = gsn_open_wks("pdf","plot"+i)
> gsn_define_colormap(wks,"BlWhRe")
>
>
> res = True
> res@gsnFrame = True ; So we can draw markers
> res@gsnMaximize = True
>
> res@gsnSpreadColors = True
> res@cnMinLevelValF = 25
> res@cnMaxLevelValF = 35
> res@mpGridLineDashPattern = 1
> res@mpGeophysicalLineColor = "Black"
> res@mpGeophysicalLineThicknessF = 1.5
> res@cnFillOn = True
>
> res@mpGridLatSpacingF = 30.
> res@mpGridLonSpacingF = 30.
> res@mpOutlineOn = True
> res@tiMainOn = True
> res@tiMainPosition = "Center"
> res@tiMainFontHeightF = 0.025
> res@lbLabelFontHeightF = 0.02
> res@lbLabelAutoStride = True
> res@lbOrientation = "Vertical"
> res@lbLabelFontHeightF = 0.025
>
> res@gsnPolarLabelDistance = 1.08
> res@gsnPolarLabelFontHeightF= 0.02
> res@gsnLeftString = " "
> res@gsnRightString = " "
>
> res@cnLinesOn = False
>
> res@gsnSpreadColor = True ; color to start
> res@cnLevelSelectionMode = "ManualLevels" ; manually set the contour levels with the following 3 resources
> res@cnMinLevelValF = -3 ; set the minimum contour level
> res@cnMaxLevelValF = 3 ; set the maximum contour level
> res@cnLevelSpacingF = 0.4 ; set the interval between contours
> res@mpProjection = "Stereographic"
> res@mpLimitMode = "Corners"
> res@mpLeftCornerLatF = 41.0
> res@mpLeftCornerLonF = 140.8014
> res@mpRightCornerLatF = 53.0
> res@mpRightCornerLonF = -50.0
> res@mpCenterLatF = 90
> res@mpCenterLonF = -180
>
> res@mpFillOn = True
>
>
> res@tiMainString = "POP2-simulated temp at depth "+z(i)+"m"
> map = gsn_csm_contour_map(wks,pwv(:,:),res)
>
> end do
> end
>
>
> --
> regards
>
> *******************************************************
> Alex Semenov
>
> PhD Student - Research Assistant
> International Arctic Research Center
> Department of atmospheric sciences
> University of Alaska Fairbanks
>
> 930 Koyukuk dr, 408c3
> Fairbanks, AK, USA, 99775
> work phone +19074742672
> _______________________________________________
> 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 Fri Jan 4 15:45:39 2013

This archive was generated by hypermail 2.1.8 : Mon Jan 07 2013 - 08:57:08 MST