[ncl-talk] xyplot producing empty pdf but no error message

Rick Brownrigg brownrig at ucar.edu
Tue Feb 7 15:56:04 MST 2017


Hi Mark,

Yes, there must be something else going on, as I was able to run your
script just fine, generating both .pdf and .png output.  I'll investigate
the "-502" error further, but in the mean time, can you tell me which
version of NCL you are using?  And are you certain its not a filesystem
permissions issue?

Rick


On Tue, Feb 7, 2017 at 3:49 PM, Mark Ross England <mre2126 at columbia.edu>
wrote:

> Hi there,
>
>
> Thanks for help in advance.
>
>
> I am doing something very similar to xy_2.ncl example on the NCL examples
> webpage. I have simplified the code to try and work out where it is going
> wrong.
>
>
> I get no error message however the pdf which is produced is empty and is 0
> bytes.
>
>
> I have written out the final data to make code shorter. I can’t find where
> my code is any different to the example which makes me think there is
> something else going wrong.
>
>
> If I replace pdf with png it gives this error message which I couldn’t
> find anything on:
>
>  GKS ERROR NUMBER -502 ISSUED FROM SUBROUTINE GCLRWK:
>
>  -- cairo driver error: error opening output file
>
>
> Thank you very much,
>
>
> Mark
>
>
> 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
>
> wks = gsn_open_wks ("pdf", "TS") ; send graphics to PDF file
>
>
> data2 = (/(/273.1187, 273.3957, 271.8196, 268.2388, 265.0738, 263.2264,
> 262.0622, 261.7988, 263.2089, 266.001, 269.4273, 271.867, 273.1187/),
> (/275.6794, 276.363, 275.8335, 273.9187, 271.6543, 269.8786, 268.6503,
> 267.9535, 268.2413, 269.8357, 272.1223, 274.2099, 275.6794/), (/274.4088,
> 274.9937, 273.6758, 269.9453, 266.8276, 264.6391, 263.7714, 263.5388,
> 264.7565, 267.5732, 270.5323, 272.9919, 274.4088/)/)
>
>
> months = ispan(1,13,1)
>
>
> res = True ; plot mods desired
>
> res at tiMainString = "Antarctic surface temperature"       ; add title
>
> res at xyMarkerColors = (/"blue","red","green"/)
>
> plot = gsn_csm_xy (wks, months, data2, res) ; create plot
>
> end
>
> _______________________________________________
> 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/20170207/5179721a/attachment.html 


More information about the ncl-talk mailing list