write_table error

From: H.Dang <danghy_at_nyahnyahspammersnyahnyah>
Date: Tue Oct 16 2012 - 10:53:10 MDT

Hi dear all,

I'm testing write_table, but it doesn't work for me. Following is the
error message:

 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.
fatal:syntax error: line 9 in file test.ncl before or near \n
write_table("test1.txt", "w", c,"%d")
-------------------------------------^

fatal:syntax error: possibly an undefined procedure
fatal:syntax error: line 10 in file test.ncl before or near \n
write_table("test2.txt", "w", c,"%10.3")
----------------------------------------^

fatal:syntax error: possibly an undefined procedure
fatal:syntax error: line 11 in file test.ncl before or near \n
write_table("test3.txt", "w", a,"%10.3")
----------------------------------------^

fatal:syntax error: possibly an undefined procedure
fatal:Syntax Error in block, block not executed
fatal:error at line 13 in file test.ncl

My code is:

  1 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
  2 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
  3 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
  4 begin
  5
  6 a = (/3,2,1/)
  7 c = [/a/]
  8
  9 write_table("test1.txt", "w", c,"%d")
 10 write_table("test2.txt", "w", c,"%10.3")
 11 write_table("test3.txt", "w", a,"%10.3")
 12
 13 end

Could you please find the mistake in my simple code? Thanks a lot!

Hongyan

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Oct 16 10:54:03 2012

This archive was generated by hypermail 2.1.8 : Tue Oct 23 2012 - 11:10:04 MDT