»Ø¸´£º »Ø¸´£º [ncl-talk] write_table function error

From: Â¥êØ <524712476_at_nyahnyahspammersnyahnyah>
Date: Mon Oct 14 2013 - 09:33:00 MDT

hello,I 've tried ,it seems the function "write_table" do not work on my computer:
  
  Copyright (C) 1995-2012 - All Rights Reserved
 University Corporation for Atmospheric Research
 NCAR Command Language Version 6.1.0-beta
 The use of this software is governed by a License Agreement.
 See http://www.ncl.ucar.edu/ for more details.
ncl 0> a = (/111, 222, 333, 444/)
ncl 1> write_table("list.txt", "w", [/a/], "%d")
fatal:syntax error: line 1 before or near \n
write_table("list.txt", "w", [/a/], "%d")
-----------------------------------------^
 fatal:syntax error: possibly an undefined procedure
ncl 2>

  

 

 ------------------ ԭʼÓʼþ ------------------
  ·¢¼þÈË: "Mary Haley";<haley@ucar.edu>;
 ·¢ËÍʱ¼ä: 2013Äê10ÔÂ14ÈÕ(ÐÇÆÚÒ») ÍíÉÏ11:10
 ÊÕ¼þÈË: ""Â¥êØ" <524712476@qq.com>;"<>;
 ³­ËÍ: "ncl-talk Talk"<ncl-talk@ucar.edu>;
 Ö÷Ìâ: Re: »Ø¸´£º [ncl-talk] write_table function error

 

[When you respond to me, please also include ncl-talk@ucar.edu]

Perhaps you have multiple versions of NCL installed on your system, but you are still pointing to an older version?

Please try this simple test program, and send me all the output, including the version number that NCL echoes when you first run it.

First, type:

ncl

You are now in "interactive" NCL. Type the following three lines exactly as they appear here:

a = (/111, 222, 333, 444/)
write_table("list.txt", "w", [/a/], "%d")
quit


Now type:

cat list.txt

I tried the above with NCL V6.1.0, and it works just fine:

% ncl
 Copyright (C) 1995-2012 - All Rights Reserved
 University Corporation for Atmospheric Research
 NCAR Command Language Version 6.1.0
 The use of this software is governed by a License Agreement.
 See http://www.ncl.ucar.edu/ for more details.
ncl 0> a = (/111, 222, 333, 444/)
ncl 1> write_table("list.txt", "w", [/a/], "%d")
ncl 2> quit
% cat list.txt
111
222
333
444


On Oct 14, 2013, at 9:02 AM, "Â¥êØ" <524712476@qq.com> wrote:

> thank you for your reply, and I also noticed ,but my NCL version is NCL version 6.1.0.There should have other mistakes and I continued to look for mistakes...
>
> ------------------ ԭʼÓʼþ ------------------
> ·¢¼þÈË: "Mary Haley";<haley@ucar.edu>;
> ·¢ËÍʱ¼ä: 2013Äê10ÔÂ14ÈÕ(ÐÇÆÚÒ») ÍíÉÏ10:52
> ÊÕ¼þÈË: "Â¥êØ"<524712476@qq.com>;
> ³­ËÍ: "ncl-talk"<ncl-talk@ucar.edu>;
> Ö÷Ìâ: Re: [ncl-talk] write_table function error
>
> Hello,
>
> The error is telling you that this is "possibly an undefined procedure". It sounds like you have an older version of NCL that doesn't have this procedure.
>
> If you look at the documentation for write_table:
>
> http://www.ncl.ucar.edu/Document/Functions/Built-in/write_table.shtml
>
> You will see that it was added to NCL version 6.1.0.
>
> You can check your version of NCL with:
>
> ncl -V
>
> If it says "6.0.0" or "5.1.2" or something earlier, then you will need to upgrade your version of NCL.
>
> http://www.ncl.ucar.edu/Download/
>
> --Mary
>
> On Oct 14, 2013, at 8:08 AM, Â¥êØ <524712476@qq.com> wrote:
>
> > hello,
> > I'm trying to use 'write_table' function to write variables to a file, but i always get errors like this:
> >
> > fatal:syntax error: line 23 in file writetable.ncl before or near \n
> > write_table("list.txt", "w", hlist, "%s")
> > ------------------------------------------^
> > fatal:syntax error: possibly an undefined procedure
> > fatal:syntax error: line 24 in file writetable.ncl before or near \n
> > write_table("list.txt", "a", alist, "%d,%16.2f,%s,%d,%ld")
> > -----------------------------------------------------------^
> > fatal:syntax error: possibly an undefined procedure
> > fatal:syntax error: line 25 in file writetable.ncl before or near \n
> > write_table("list.txt", "a", flist, "%s ")
> > -------------------------------------------^
> > fatal:syntax error: possibly an undefined procedure
> > fatal:Syntax Error in block, block not executed
> > fatal:error at line 27 in file writetable.ncl
> >
> > These errors appers after i tested the 'Example1' in
> > http://www.ncl.ucar.edu/Document/Functions/Built-in/write_table.shtml
> > can you help me figure the problem out?
> > thanks!
> > _______________________________________________
> > ncl-talk mailing list
> > List instructions, subscriber options, unsubscribe:
> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
> .

.

ÿÿÿÙ4
Received on Mon Oct 14 09:34:27 2013

This archive was generated by hypermail 2.1.8 : Tue Oct 22 2013 - 10:35:27 MDT