write_matrix file name

From: Isabella Bovolo <Isabella.Bovolo_at_nyahnyahspammersnyahnyah>
Date: Thu Nov 12 2009 - 11:36:11 MST

Dear all,

I am trying to print an array to a file using write_matrix by giving the file
name a named directory and prefix however, I am getting an error.

The following works fine:
opt = True
opt@fout = "yearly_statsall.txt"
write_matrix(matrixall,"4f15.3,opt)

but this:
dirobs = "~/ERA40/MODA/rain.grb.avg.dir/region/obs-yearly-1958-2001/"
cell = "c72267"
opt = True
opt@fout = dir+cell+"yearly_statsall.txt"
write_matrix(matrixall,"4f15.3,opt)

results in the following error:
open: No such file or directory
apparent state: unit 31 named
~/ERA40/MODA/rain.grb.avg.dir/region/obs-yearly-1958-2001/yearly_statsall.txt
lately writing direct unformatted external IO
Aborted (core dumped)

the "dir" and "cell" variables work fine elsewhere in the program.

I could specify the directory name within the quotes (which also works) but I
would like the cell name to be able to change.

Is this possible and am I doing something wrong?

Many thanks,

Isabella

-------
Dr. C. Isabella Bovolo

Email: Isabella.Bovolo@ncl.ac.uk
Tel: +44 191 222 8599
Fax: +44 191 222 6669
School of Civil Engineering and Geosciences, Newcastle University, NE1 7RU,
England, UK

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Nov 12 11:36:19 2009

This archive was generated by hypermail 2.1.8 : Sat Nov 14 2009 - 12:49:36 MST