[ncl-talk] muting output to screen?

Joe Grim grim at ucar.edu
Wed Feb 11 08:29:08 MST 2015


Karin and Kyle,

Thanks so much for your answers!  Karin, your solution was exactly what I
wanted!  Kyle, a couple of your solutions work too, and looking through the
other options you gave taught me things that will be useful in the future.

Thanks again!

Joe

On Wed, Feb 11, 2015 at 4:43 AM, Karin Meier-Fleischer <
meier-fleischer at dkrz.de> wrote:

> Hi Joe,
>
> there is a way to get rid of the icObjAnal_1d lines when running NCL. You
> can pipe the output
> from your script to a grep command, like
>
> ncl your_script.ncl | grep -v icObjAnal_1d
>
> This will keep all other output information lines untouched and print them
> at your terminal window.
>
> Bye,
> Karin
>
> Am 11.02.2015 um 00:22 schrieb Kyle Griffin <ksgriffin2 at wisc.edu>:
>
> Hi Joe,
>
> You could also try running
>
> ncl myscript.ncl > /dev/null
>
> I haven't tried this explicitly, and it might be more "mute" than you were
> intending.
>
> Otherwise, you also have these NCL command line options.
>
> http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclCLO.shtml
>
> -n will turn off the (0) and similar numbers at the start of the line.
> Although the -p option looks interesting, I don't think that is relevant as
> this printing isn't coming from a system(...) call.
>
> Developers can chime in if there's some other way to assign NCL's
> environmental pager to a null pager, but I'm not sure there's much else...
>
>
> 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 at wisc.edu
>
> On Tue, Feb 10, 2015 at 4:04 PM, Joe Grim <grim at ucar.edu> wrote:
>
>> Thanks, Kyle, for your quick response and workaround idea.  Yes, I
>> thought of doing this, though I was just wondering if there happened to be
>> a way of muting screen output without this extra work (as I often would
>> like to mute screen output.)
>>
>> Thanks again!
>>
>> Joe
>>
>> On Tue, Feb 10, 2015 at 3:00 PM, Kyle Griffin <ksgriffin2 at wisc.edu>
>> wrote:
>>
>>> Although this wouldn't work for the non-deprecated function, as that is
>>> built-in, the deprecated function is sitting in the contributed.ncl file, at
>>>
>>> $NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl <https://www.ncl.ucar.edu/Document/Functions/Contributed/contrib.shtml>
>>>
>>> ugh this wo
>>>
>>> This means that you can go in the file and search for the function, find the associated printing statements, and comment them out if you so choose. If you don't have write permissions for your NCL installation location, you can simply copy the code (including the undef("obj_anal_ic_deprecated) line above the function declaration) into its own file, make your desired changes, and load it at the bottom of your load statements for your script. Hope that makes sense, and let the list know if you need further help...
>>>
>>>
>>> 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 at wisc.edu
>>>
>>> On Tue, Feb 10, 2015 at 3:53 PM, Joe Grim <grim at ucar.edu> wrote:
>>>
>>>> Hi,
>>>>
>>>> I was wondering if you could tell me if there is an NCL parameter or
>>>> subroutine that can allow one to avoid having certain ascii output shown on
>>>> the screen?  I am using the function obj_anal_ic_deprecated, and I have set
>>>> its option parameter *option*@*zonal = True*.  So, when I run the main
>>>> NCL program, I get output to my screen that looks like this:
>>>> (0)     icObjAnal_1d: lat=32.15   zonavg=-4.14749
>>>> (1)     icObjAnal_1d: lat=32.25   zonavg=-4.14749
>>>> (2)     icObjAnal_1d: lat=32.35   zonavg=-4.14749
>>>> (3)     icObjAnal_1d: lat=32.45   zonavg=-4.1474
>>>> ...
>>>> Since obj_anal_ic_deprecated is used 720 times in my program, that is a
>>>> lot of output to my screen that I don't want to see, though I do want to
>>>> see other screen output from the program.  Is there any way to mute certain
>>>> output to the screen?
>>>>
>>>> Thanks in advance!
>>>>
>>>> Joe Grim
>>>>
>>>> _______________________________________________
>>>> 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
>
>
> ____________________________________
> Dipl. Geophys. Karin Meier-Fleischer
> Visualisierung
> Abteilung Anwendungen
>
> Deutsches Klimarechenzentrum GmbH (DKRZ)
> Bundesstrasse 45a * D-20146 Hamburg
> Germany
>
> Phone: +49 (0)40 460094 126
> Fax: +49 (0)40 460094 270
> E-Mail: meier-fleischer at dkrz.de
> URL: http://www.dkrz.de/
>
> Geschäftsführer: Prof. Dr. Thomas Ludwig
> Sitz der Gesellschaft: Hamburg
> Amtsgericht Hamburg HRB 39784
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150211/55367fac/attachment.html 


More information about the ncl-talk mailing list