- 积分
- 4457
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2011-9-23
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
我刚开始学习画图,在论坛里努力搜帖子学习,但是还是解决不了这个问题,恳请各位前辈不吝赐教。
这是我按照清风大大的pdf做的sta2grd.f
Program sta2grd
Implicit none!这里是程序的变量声明
!变量生命结束
!程序开始
Character*8 stid
Character*8 lon,lat,var,t24,tim
integer nlev,flag
tim =0.0
nlev=1
flag=1
Open(1,file='e:\jwsksj\surface\t24-p\16012208.000',status='old')
open(2,file='sta.grd',status='replace',form='binary')
read(1,*)
read(1,*)
read(1,*)
read(1,*)
read(1,*)
read(1,*)
read(1,*)
read(1,*)
read(1,*)
read(1,*)
read(1,*)
read(1,*)
read(1,*)
read(1,*)
10 Read(1,*,end=100)stid,lon,lat,var,t24
write(2)stid,lat,lon,tim,nlev,flag,t24
! print*,stid,lon,lat,var,rain
! pause
Goto 10
100 continue
Close(1)
nlev=0
write(2)stid,lat,lon,tim,nlev,flag,t24
close(2)
!程序结束
End
pdf里经纬度等是real,结果出的.grd里有乱码,就改成Character*8
出的sta.grd是这样的:
CTL是:
dset e:/jwsksj/surface/t24-p/sta.grd
dtype station
stnmap e:/jwsksj/surface/t24-p/sta.map
undef -999.9
title 2016012208 t24-p
tdef 1 linear 08:00z22Jan2016 24hr
vars 1
t24 0 99 t24-p data
endvars
在使用!stanmap时出现这个问题:
ga->!stnmap -i e:/jwsksj/surface/t24-p/sta.ctl
Name of binary data set:e:/jwsksj/surface/t24-p/sta.grd
Number of times in the data set:1
Number of surface variables:1
Number of level dependent variables:0
Starting scan of station data binary file.
Binary data file open:e:/jwsksj/surface/t24-p/sta.grd
Processing time step 1
Invalid station hdr found in station binary file
Possible causes:Invalid level count in hdr
Descriptor file mismatch
File not station data
Invalid relative time
levs = 538981684 flag = 0 time = 4.165e-11
|
-
|