下面引用由sunny2008在 2008/01/10 10:13am 发表的内容:
请问该怎么输出文本的数据文件呢?比如我想输出变量U10m的值到文本文件u.dat,
我在gs文件里用rc=write(‘u.dat’,U10m),
可是写出的u.dat文件里只有变量名U10m,没有具体的数据,不知是怎么回事啊?哪位好心 ...
file="out.txt"
'set gxout print'
*'set prnopts %f 10 1'
'd U10m'
rc=write(file,result,append)
资源二:
file='*.txt'
'set gxout print'
'set prnopts *'
'd var'
'a=write(file,result) '
资源三:
set
prnopts
set prnopts format numl numb
Controls the way values are printed when set gxout print is
used.
format a C language template for formatting
ascii output. Default is %g.
numl number of values to
print per record. Default is 8.
numb number of blanks to
insert between values. Default is 1.
u
print 'Undef' instead of the numerical value for
missing data.
Usage Notes
The first line of the ascii output will tell the user how many data
values are being printed as well as the missing data
value.
Examples
This example will print all the values in exponential
notation:
set gxout print
set prnopts .3e 5 1
d t
The output might look like this:
Printing Grid -- 30 Values -- Undef =
-2.56e+33
-2.560e+33 -2.560e+33 3.014e+02
3.011e+02
3.001e+02
-2.560e+33 -2.560e+33 3.010e+02 -2.560e+33
-2.560e+33
-2.560e+33 -2.560e+33 -2.560e+33 -2.560e+33
-2.560e+33
-2.560e+33 -2.560e+33 -2.560e+33 2.993e+02
2.995e+02
-2.560e+33 -2.560e+33 3.004e+02
3.008e+02
3.010e+02
-2.560e+33 -2.560e+33 2.999e+02
3.010e+02
3.012e+02
加载中,请稍候......