Merge remote-tracking branch 'origin/release-v4.5.2'
[WRF.git] / var / convertor / wave2grid_kma / VPRM.inc
blob692cdd5389f82229786f1cc0f10a7462990006cc
1       SUBROUTINE VPRM( NVPFL, A, B, AAM, BBM, KMAX )                            
2       DIMENSION A(KMAX+1), B(KMAX+1), AAM(KMAX+1), BBM(KMAX+1)                  
3 C                                                                               
4       READ( NVPFL,END=9999,ERR=9999 ) KMX,(A(K),K=1,KMX),(B(K),K=1,KMX)         
5       IF( KMX.NE.KMAX ) THEN                                                    
6         WRITE(6,*) 'DIMENSION ERROR IN VPRM', KMX, KMAX                         
7         STOP 999                                                                
8       ENDIF                                                                     
9       A(KMAX+1) = 0.0                                                           
10       B(KMAX+1) = 0.0                                                           
11 C                                                                               
12       WRITE(6,*) '<< MODEL LEVEL >> AMDL, AANL, BMDL, BANL'                     
13       DO 10 K=1,KMAX+1                                                          
14         IF(ABS(A(K)-AAM(K)).GT.ABS(A(K)*10E-3)                                  
15      1 .OR.ABS(B(K)-BBM(K)).GT.ABS(B(K)*10E-3)) THEN                            
16         WRITE(6,*) '*', A(K), AAM(K), B(K), BBM(K)                              
17         ELSE                                                                    
18         WRITE(6,*) ' ', A(K), AAM(K), B(K), BBM(K)                              
19         ENDIF                                                                   
20    10 CONTINUE                                                                  
21 C                                                                               
22       RETURN                                                                    
23 C                                                                               
24  9999 WRITE(6,*) '## READ ERROR IN VPRM'                                        
25       STOP 999                                                                  
26       END SUBROUTINE VPRM