- 积分
- 1044
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2011-8-24
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
各位大侠:我有一个txt数据,数据格式是:站号,经纬度,高度,温度,风速等要素,总共有11列,25个时次,每个时次是600个站,我想把这里面的要素按站号和时次单独输出到一个txt文件中,
即:
stations lat lon hgt t td u
52181
..........
.........
52181
...........
.........
总共25个时次
提取其中单个要素输出成如下格式:
station lat lon 1 2 3 4 5 6 ..........25
52181 ............................................
文件按以下方式读出:
begin
;************ read station domain 1 datas ***********
; diri = "./"
filename = "wrf-to-stations_d01.txt"
nrows = 600
ncols = 11
ntimes = 25
station_sta =(/ntimes,nrows,1/)
do i= 0 , ntimes-1
data = asciiread(filename, (/ntimes,nrows,ncols/), "float")
data@_FillValue = -99999.00
station_sta = data(i,:,0)
lat_sta = data(i,:,1)
lon_sta = data(i,:,2)
height_sta = data(i,:,3)
height_wrf = data(i,:,4)
t2m_sta = data(i,:,5)
t2m_wrf = data(i,:,6)
uspd_sta = data(i,:,7)
uspd_wrf = data(i,:,8)
udir_sta = data(i,:,9)
udir_wrf = data(i,:,10)
end do
请问我该如何输出数据呢?
|
|