Merge remote-tracking branch 'origin/release-v4.5.2'
[WRF.git] / var / convertor / wave2grid_kma / REDHED.inc
blob180bd9f5aa1e698a9866067f2a5fec38dd8c10b1
1       SUBROUTINE REDHED                                                         
2      I(NFL   ,                                                                  
3      O TYPE  ,IDATE ,FILE  ,MODEL ,RESL  ,EXPR  ,KTUNIT,IDTYPE,                 
4      O IBACK ,NNSP  ,                                                           
5      O IMD   ,JMD   ,NPROD ,FLONID, FLATID,                                     
6      O XID   ,XJD   ,XLATD ,XLOND ,                                             
7      O VCODD ,KMD   ,AAD   ,BBD   ,                                             
8      O IMM   ,JMM   ,NPROM ,FLONIM, FLATIM,                                     
9      O XIM   ,XJM   ,XLATM ,XLONM ,                                             
10      O VCODM ,KMM   ,AAM   ,BBM   ,                                             
11      O CINF  )                                                                  
12 C                                                                               
13       INTEGER IDATE(5)                                                          
14       CHARACTER*8 FILE, MODEL, RESL                                             
15       CHARACTER*4 TYPE, EXPR, KTUNIT                                            
16 C                                                                               
17       INTEGER IMD, JMD, IMM, JMM                                                
18       CHARACTER*4 NPROD, NPROM                                                  
19 C                                                                               
20       CHARACTER*4 VCODD, VCODM                                                  
21       INTEGER KMD, KMM                                                          
22       DIMENSION AAD(*), BBD(*), AAM(*), BBM(*)                                  
23 CM    DIMENSION AAD(KMD+1), BBD(KMD+1), AAM(KMM+1), BBM(KMM+1)                  
24 C                                                                               
25       CHARACTER*80 CINF(10)                                                     
26 C                                                                               
27       READ (NFL,IOSTAT=IOS)                                                
28      1           TYPE, IDATE, FILE, MODEL, RESL, EXPR, KTUNIT, IDTYPE,          
29      2           IBACK, NNSP                                                    
30           IF (IOS /= 0) THEN
31                 WRITE(96,*) 'REDHED: READ ERROR IN FILE:ERROR=',IOS
32                 STOP 9991
33           END IF
34       READ (NFL,IOSTAT=IOS) IMD, JMD, NPROD,                               
35      1           FLONID, FLATID, XID, XJD, XLATD, XLOND                         
36           IF (IOS /= 0) THEN
37                 WRITE(96,*) 'REDHED: READ ERROR IN FILE:ERROR=',IOS
38                 STOP 9992
39           END IF
40       READ (NFL,IOSTAT=IOS) VCODD, KMD,                                    
41      1           (AAD(I),I=1,KMD+1), (BBD(I),I=1,KMD+1)                         
42           IF (IOS /= 0) THEN
43                 WRITE(96,*) 'REDHED: READ ERROR IN FILE:ERROR=',IOS
44                 STOP 9993
45           END IF
46       READ (NFL,IOSTAT=IOS) IMM, JMM, NPROM,                               
47      1           FLONIM, FLATIM, XIM, XJM, XLATM, XLONM                         
48           IF (IOS /= 0) THEN
49                 WRITE(96,*) 'REDHED: READ ERROR IN FILE:ERROR=',IOS
50                 STOP 9994
51           END IF
52       READ (NFL,IOSTAT=IOS) VCODM, KMM,                                    
53      1           (AAM(I),I=1,KMM+1), (BBM(I),I=1,KMM+1)                         
54           IF (IOS /= 0) THEN
55                 WRITE(96,*) 'REDHED: READ ERROR IN FILE:ERROR=',IOS
56                 STOP 9994
57           END IF
58       READ (NFL,IOSTAT=IOS) CINF                                           
59           IF (IOS /= 0) THEN
60                 WRITE(96,*) 'REDHED: READ ERROR IN FILE:ERROR=',IOS
61                 STOP 9995
62           END IF
63 C                                                                               
64       WRITE(96,*) 'REDHED:FILE,NFL ', FILE,'   ',NFL                             
65 C                                                                               
66       RETURN                                                                    
67 C                                                                               
68       END SUBROUTINE REDHED