Re: Re write_matrix file name

From: Isabella Bovolo <Isabella.Bovolo_at_nyahnyahspammersnyahnyah>
Date: Fri Nov 13 2009 - 03:02:38 MST

Hi,

sorry, the double quote is there in my script, but somehow it got missed
off in the email...

opt@fout = dir+"yearly_statsall.txt"
write_matrix(matrixall,"4f15.3",opt)

Thanks for checking though.

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

On Thu, 12 Nov 2009, Donna Cote wrote:

> Is there a particular reason that the matrix_write statement does not have a
> closing double quote mark? This is what I see:
> write_matrix(matrixall,"4f15.3,opt)
>
> ^ start quote ...... no end
> quote mark; maybe this is the error?
>
> Good luck,
> Donna
>> Date: Thu, 12 Nov 2009 18:36:11 +0000 (GMT)
>> From: Isabella Bovolo <Isabella.Bovolo@newcastle.ac.uk>
>> Subject: write_matrix file name
>> To: ncl-talk@ucar.edu
>>
>> 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
>>
>> ------------------------------
>>
>> Date: Thu, 12 Nov 2009 11:50:18 -0700
>> From: Dennis Shea <shea@ucar.edu>
>> Subject: Re: write_matrix file name
>> To: Isabella Bovolo <Isabella.Bovolo@newcastle.ac.uk>
>> Cc: ncl-talk@ucar.edu
>>
>> I assume "cell" is a directory???
>>
>> How about?
>>
>> opt@fout = dir+cell+"/"+"yearly_statsall.txt"
>>
>> Good luck
>>
>>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Nov 13 03:02:49 2009

This archive was generated by hypermail 2.1.8 : Tue Nov 17 2009 - 17:27:43 MST