[ncl-talk] Suppressing output of "table_attach_columns" function

Mary Haley haley at ucar.edu
Wed Jan 24 08:35:39 MST 2018


Hi Michael,

Your version of table_attach_rows inadvertently had a "write_matrix" call
added to it, that is printing out all the values.

You have a few options for a fix:

1) You can upgrade to NCL V6.4.0 which doesn't have this issue
​.​


2) You can modify $NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl
directly and comment
​or remove
 this line inside of "table_attach_rows":

  write_matrix(tNew, "10f7.2" , False)

3)
​If you don't have the necessary write permissions to do #2, then y​
​
​
​
ou can
​ copy
$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl
​to your own directory, make the change to this copy of the file, and then
load your own contributed.ncl instead of the system one:

; load "
$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl
​"​
load "*/path/to/my/own/*contributed.ncl"

​4) If you don't want to copy over the whole contributed.ncl file, then you
can edit the file, copy the whole table_attach_rows function only, write
this code to a new file, say "table_attach_rows_mod.ncl", and then just
load that one file:

load "
$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl
​"​
load "*/path/to/my/own/*table_attach_rows_mod.ncl"

--Mary

On Tue, Jan 23, 2018 at 7:18 PM, Michael Toy via ncl-talk <ncl-talk at ucar.edu
> wrote:

> Hello,
>
> I am using NCL version 6.3.0 and am using the “table_attach_columns”
> function for the first time.  Using an interactive session, when I enter
> the following:
> x = table_attach_columns(t1,t2,0)
>
> Instead of “quietly” assigning the values to the variable “x”, the entire
> result is written out to the screen (as well as assigning the value to
> “x”).  I’ve never seen an NCL function do this before and am wondering if
> it’s a bug.  In the meantime, is there a way to suppress the output?
>
> Thanks.
>
> — Mike Toy
>
>
> _______________________________________________
> 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/20180124/8f919eb7/attachment.html>


More information about the ncl-talk mailing list