Re: flushing out buffer of output PS file, OLDPS vs PS

From: Rick Brownrigg <brownrig_at_nyahnyahspammersnyahnyah>
Date: Wed Jul 23 2014 - 09:45:21 MDT

Arindam,

The behavior is different because the two workstation versions employ
completely different PS/PDF implementations. The older version was a home
grown implementation; the later version is based upon cairographics (
cairographics.org), and as such, is somewhat of a black box in its
behavioral nuances.

Thanks Kyle and Karin for your posts to this thread!

Rick



On Wed, Jul 23, 2014 at 9:00 AM, Kyle Griffin <ksgriffin2@wisc.edu> wrote:

> The delete(wks) necessity was added in 6.1.2.
>
> http://ncl.ucar.edu/prev_releases.shtml#6.1.2
>
> Such action was always recommended, but not required up until this
> 6.1.1/6.1.2 version. Beyond that, I assume the developers could give you
> more info on the change. Because of this change, the "oldps" type was lef=
t
> to allow for backwards compatibility.
>
> ----------------------------------------
> Kyle S. Griffin
> Department of Atmospheric and Oceanic Sciences
> University of Wisconsin - Madison
> Room 1421
> 1225 W Dayton St, Madison, WI 53706
> Email: ksgriffin2@wisc.edu
>
>
> On Wed, Jul 23, 2014 at 10:22 AM, Arindam Chakraborty <arch13@gmail.com>
> wrote:
>
>> Hi Kyle, Karin,
>> Thanks for the delete(wks) solution. That fixes my problem. However, I
>> wanted to know why this behavior is different between the two workstatio=
n
>> versions.
>> If I use eps, the figure is not "tight" bounded to the panel boundary.
>> Making a PDF directly from that EPS will keep white spaces around figure
>> panels.
>>
>> arindam
>>
>> --
>> *Arindam Chakraborty*
>> CAOS, IISc, Bangalore-12
>>
>>
>> On Wed, Jul 23, 2014 at 7:05 PM, Kyle Griffin <ksgriffin2@wisc.edu>
>> wrote:
>>
>>> Yes, I would certainly recommend that Arindam uses the EPS type
>>> directly. The flushing issue can be addressed via the 'delete' function
>>> regardless of the output format. Any calls to 'system' from within NCL =
can
>>> be a bit time consuming, especially when that functionality is already =
in
>>> NCL.
>>>
>>>
>>> Kyle
>>>
>>> ----------------------------------------
>>> Kyle S. Griffin
>>> Department of Atmospheric and Oceanic Sciences
>>> University of Wisconsin - Madison
>>> Room 1421
>>> 1225 W Dayton St, Madison, WI 53706
>>> Email: ksgriffin2@wisc.edu
>>>
>>>
>>> On Wed, Jul 23, 2014 at 9:24 AM, Karin Meier-Fleischer <
>>> meier-fleischer@dkrz.de> wrote:
>>>
>>>> Hi Kyle,
>>>>
>>>> why don’t you use the “eps“ or "oldepsâ€=
œ format directly? Then you don’t
>>>> have to call ps2eps.
>>>>
>>>> wks = gsn_open_wks("eps","test“)
>>>>
>>>> or
>>>>
>>>> wks = gsn_open_wks("oldeps","test“)
>>>>
>>>> Bye,
>>>> Karin
>>>>
>>>>
>>>> Am 23.07.2014 um 14:34 schrieb Kyle Griffin <ksgriffin2@wisc.edu>:
>>>>
>>>> When you want the newer version of NCL to write the output to file,
>>>> call delete(wks), where wks is the name of the workstation associated =
with
>>>> your graphic. This is necessary regardless of the image type.
>>>>
>>>> Kyle
>>>> On Jul 23, 2014 7:44 AM, "Arindam Chakraborty" <arch13@gmail.com>
>>>> wrote:
>>>>
>>>>> Hi,
>>>>> I'm trying to convert a PS file generated within my code to EPS, fro=
m
>>>>> within the NCL function. This is possible when I use OLDPS but not (N=
ew)
>>>>> PS. A simple test says that with NewPS, the file is not written (popu=
lated
>>>>> with data) until the NCL code exists. This is not true for OLDPS
>>>>> workstation. In both cases, the PS file is of correct size/format onc=
e NCL
>>>>> exists. Possibly the PS file is not FLUSHed until NCL exists! I'm not=
 very
>>>>> sure if this was discussed earlier. Below is the test code.
>>>>>
>>>>> begin
>>>>> x=ispan(0,360,1)*1d0
>>>>> y=sin(x*3.14/180)
>>>>>
>>>>> wks = gsn_open_wks("oldps","test");
>>>>> ; wks = gsn_open_wks("ps","test");
>>>>> plt=gsn_csm_xy(wks,x,y,False)
>>>>> system("ls -l test.ps") ; file size 0 for PS and non-zero for OLDPS
>>>>> ; system("ps2eps test.ps") ; does not work for "PS" workstation
>>>>> end
>>>>>
>>>>> I'm using Ubuntu. NCL 6.2.0.
>>>>>
>>>>> regards,
>>>>> --
>>>>> *Arindam Chakraborty*
>>>>> CAOS, IISc, Bangalore-12
>>>>>
>>>>> _______________________________________________
>>>>> 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
>>>>
>>>>
>>>>
>>>
>>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>

Received on Wed Jul 23 03:45:34 2014

This archive was generated by hypermail 2.1.8 : Fri Aug 01 2014 - 15:10:55 MDT