Hi everyone,
I am trying to write a 2D matrix to an ASCII file but am encountering
some sort of file related error. When I print the matrix to the screen,
it seems to work as expected. However, I get an error when I try to
print to file.
Here is a snippet of my code:
print("Compiling summary...")
;put data into object to be written to ASCII file
data = transpose((/ fltnum, st, et, et-st, av_palt, av_p, av_ws,
av_wd, av_trk, av_wi, av_xo3, av_galt, \
av_T, av_rho, mx_wi, mn_wi, mx_theta, mn_theta, mx_palt,
mn_palt, MFx, MFy, \
EF, av_Bern, Kh, Kz, O3flux, mx_pdEta, mn_pdEta, PE, KEhp,
av_uA, av_vA /))
datadim = dimsizes(data)
print("Saving data info summary...")
printVarSummary(data)
fmtx = datadim(0)+"f12.4"
opt = True
opt_at_title = "fltnum, st, et, et-st, av_palt, av_p, av_ws, av_wd,
av_trk, av_wi, av_xo3, av_galt, av_T, av_rho, mx_wi, mn_wi, mx_theta,
mn_theta, mx_palt, mn_palt, MFx, MFy, EF, av_Bern, Kh, Kz, O3flux,
mx_pdEta, mn_pdEta, PE, KEhp, av_uA, av_vA"
opt_at_fout = dirt+"summary.table"
write_matrix (data, fmtx,opt)
delete(data)
print("done matrix write")
And this is the error I get back:
(0) Compiling summary...
(0) Saving data info summary...
Variable: data
Type: double
Total Size: 83952 bytes
10494 values
Number of Dimensions: 2
Dimensions and sizes: [dim1 | 318] x [dim0 | 33]
Coordinates:
Number Of Attributes: 1
_FillValue : -999
open: No such file or directory
apparent state: unit 31 named ~/trex/charts/gv_stats/summary.table
lately writing direct unformatted external IO
Abort
Does this indicate that it has a problem because the file does not
already exist? I tried a system call to touch the file first and later
tried one to likewise delete it, but neither seem to help. Thanks for
your help!
Bryan
-- Bryan Woods Ph.D. Candidate Dept. of Geology & Geophysics Yale University P.O. Box 208109 New Haven, CT 06520-8109 203.404.3365 (office) 978.726.3462 (cell) 203.432.3134 (fax)
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2.2.0 : Mon Jan 07 2008 - 11:19:46 MST