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

From: Kyle Griffin <ksgriffin2_at_nyahnyahspammersnyahnyah>
Date: Wed Jul 23 2014 - 07:35:33 MDT

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“ f=
ormat 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 you=
r
> 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, from
>> within the NCL function. This is possible when I use OLDPS but not (New)
>> PS. A simple test says that with NewPS, the file is not written (populat=
ed
>> 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 once N=
CL
>> exists. Possibly the PS file is not FLUSHed until NCL exists! I'm not ve=
ry
>> 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
>
>
>

Received on Wed Jul 23 01:36:08 2014

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