How to suppress info messages?

Help
2014-04-25
2016-06-17
  • James Adams

    James Adams - 2014-04-25

    I have a script which concatenates a bunch of files using NCO. When I run this I get quite a few info messages that I'd like to suppress, but I'm not sure how I'd do that (the man pages and documentation don't list such an option, at least I haven't found it yet). Can anyone here suggest the correct option to use for running operators such as ncpdq and ncrcat in "silent" mode, i.e. with no extraneous info messages, etc.?

    As an example the below is the sort of message I'm seeing now and trying to suppress:

    ncpdq: INFO nco_var_dmn_rdr_mtd() for variable spei_24 reports old input record dimension time is now ordinal dimension 1, new record dimension must be lon

    Thanks in advance for any suggestions.

    --James

     
  • Charlie Zender

    Charlie Zender - 2014-04-26

    In the current NCO, these messages should only print when operators run with
    -D 3 or greater. For fewer messages run with lower (or no) debugging level, i.e., -D 0.
    cz

     
  • atw

    atw - 2016-06-16

    Using -D 0 seems to have no effect, at least in the v4.5.4 of ncecat and ncpdq. I still get messages like:

    ncecat: INFO nco_cpy_var_dfn_trv() is defining dimension time as fixed (non-record) in output file even though it is a record dimension in the input file. This is necessary to satisfy user request that member be the record dimension in the output file which adheres to the netCDF3 API where the record dimension, if any, must be a variable's first dimension.

    ncpdq: INFO nco_cpy_var_dfn_trv() is defining dimension member as fixed (non-record) in output file even though it is a record dimension in the input file. This is necessary to satisfy user request that time be the record dimension in the output file which adheres to the netCDF3 API where the record dimension, if any, must be a variable's first dimension.

    Aside from grepping these out, is there another way to suppress these INFO messages?

    (My application: Concatenating time-dependent ensemble members, which also have a time_bounds auxiliary variable that I don't want expanded along the members dimension. So I ncecat all but time_bounds, then ncpdq to swap the time and member axes, then append the time_bounds using ncks. Works great, apart from the INFO messages.)

    Andrew

     
  • Charlie Zender

    Charlie Zender - 2016-06-16

    Those are level 0 messages and there is no way to turn them off (except pipe stderr to /dev/null). I just changed them to level 1 messages which are off by default. That will be in 4.6.1. Are there other on-by-default messages that bother you?
    cz

     
  • atw

    atw - 2016-06-17

    Thanks, this is much appreciated! I think those were the main ones. It'll be great to have these INFO messages off by default, with the option to dial them in or out with -D, rather than just redirecting everything and possibly missing important messages from NCO. Thanks again,

    Andrew

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks