登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
program chafen
2 implicit none
3
4 integer,parameter:: IM=360,JM=180,KM=33,KN=31
5 integer::m,n,k,x,y,w
6 real(kind=4),dimension(KM):: U,V,tss
7 real(kind=4),dimension(24):: FU,FV
8 real(kind=4),dimension(IM,JM,KM)::ts
9 real(kind=4),dimension(IM,JM,KN)::tst
10 real(kind=4),dimension(IM,JM,24)::tv
11 OPEN(10,file="s00mn1",form="formatted",status="old") //s00mn1经向、纬向的格点数为360、180,共33层数据
12 OPEN(20,file="s00mn1_31",form="formatted",status="replace") // 试图将s00mn1_31处理为经向、纬向的格点数为360、180,共31层的数据
13 100 FORMAT(10F8.4)
14 DO k=1,KM
15 READ(10,100),((ts(m,n,k),m=1,IM),n=1,JM)
16 END DO
17
26 DATA U/0,-10,-20,-30,-50,-75,-100,-125,-150,-200,-250,-300,-400,-50 0,-600,-700,-800,-900,-1000,-1100,-1200,-1300,-1400,-1500,-1750,-2000,-2500, -3000,-3500,-4000,-4500,-5000,-5500/ //原始的33层数据,每层对应的深度,因为是从海平面往下计算,所以都是负值
27 DATA V/ts(m,n,,1),ts(m,n,2),& //从s00mn1中读出来的每一层数据,每次编译,都显示这一块有问题
难道是我定义错误,我已经试过多种定义方法还是行不通。
28 ts(m,n,3),ts(m,n,4),&
29 ts(m,n,5),ts(m,n,6),&
30 ts(m,n,7),ts(m,n,8),&
31 ts(m,n,9),ts(m,n,10),&
32 ts(m,n,11),ts(m,n,12),&
33 ts(m,n,13),ts(m,n,14),&
34 ts(m,n,15),ts(m,n,16),&
35 ts(m,n,17),ts(m,n,18),&
36 ts(m,n,19),ts(m,n,20),&
37 ts(m,n,21),ts(m,n,22),&
38 ts(m,n,23),ts(m,n,24),&
39 ts(m,n,25),ts(m,n,26),&
40 ts(m,n,27),ts(m,n,28),&
41 ts(m,n,29),ts(m,n,30),&
42 ts(m,n,31),ts(m,n,32),&
43 ts(m,n,33)/
44 DATA FU/-40,-60,-70,-80,-90,-110,-120,-130,-140,-163.8606,-192.9948 ,-252.0088,-354.2027,-510.9896,-731.3966,-1021.67,-1385.003,-1821.396,-2327. 656,-2897.536,-3522.009,-4189.662,-4887.194,-5600/ // 除了0,-10,-20,-30等7位满足31层模式要求的深度数据外,模式要求的的另外24层对应的深度
45 DATA FV/tv(m,n,1),tv(m,n,2),&
46 tv(m,n,3),tv(m,n,4),&
47 tv(m,n,5),tv(m,n,6),&
48 tv(m,n,7),tv(m,n,8),&
49 tv(m,n,9),tv(m,n,10),&
50 tv(m,n,11),tv(m,n,12),&
51 tv(m,n,13),tv(m,n,14),&
52 tv(m,n,15),tv(m,n,16),&
53 tv(m,n,17),tv(m,n,18),&
54 tv(m,n,19),tv(m,n,20),&
55 tv(m,n,21),tv(m,n,22),&
56 tv(m,n,23),tv(m,n,24)/
57
58 do x=1,24
59 call enlg3(U,V,33,FU(x),FV(x))
60 end do
61
62 tst(1:IM,1:JM,1:4)=ts(1:IM,1:JM,1:4)
63 tst(1:IM,1:JM,5)=tv(1:IM,1:JM,1)
64 tst(1:IM,1:JM,6)=ts(1:IM,1:JM,5)
65 tst(1:IM,1:JM,7:10)=tv(1:IM,1:JM,2:5)
66 tst(1:IM,1:JM,11)=ts(1:IM,1:JM,7)
67 tst(1:IM,1:JM,12:15)=tv(1:IM,1:JM,6:9)
68 tst(1:IM,1:JM,16)=ts(1:IM,1:JM,9)
69 tst(1:IM,1:JM,17:31)=tv(1:IM,1:JM,10:24)
70
71 DO k=1,KN
72 WRITE(20,100),((tst(m,n,k),m=1,IM),n=1,JM)
73 END DO
74
75 close(10)
76 close(20)
77
78 SUBROUTINE ENLG3(X,Y,N,T,Z) //二元三点插值法的程序,因为较长,略去
总的想法就是,将33层182X85的网格点数据,利用插值方法,转换成31层182X85的网格点数据
麻烦大家给点建议,不胜感激!
|