Merge remote-tracking branch 'origin/release-v4.5.2'
[WRF.git] / var / convertor / kma_wave2grid / LT2GAU.inc
blob7a7acbe2134e249fa16693d24d1e9fa05b93ab4c
1       SUBROUTINE LT2GAU                                                 
2      &(EDATA,IMAXE,JMAXE,IMAXG,JMAXG,COLRAD,                       
3      & GDATA,DY,LY)                                                     
4 C                                                                       
5       DIMENSION EDATA(IMAXE,JMAXE)
6       DIMENSION GDATA(IMAXG,JMAXG)      
7       DIMENSION DY(JMAXG),LY(JMAXG)                                     
8       DIMENSION COLRAD(JMAXG) 
10       PAI  =4.0*ATAN(1.0)  
11       DLONE =PAI/FLOAT(JMAXE)                             
12       DLONG =PAI/FLOAT(JMAXG)                              
13       DLONEI=1.0/DLONE                                       
14       CNVG2E=DLONG*DLONEI                                     
15 c      print*,' PAI = ',PAI
16 c      print*,' IMAXG= ',IMAXG,' JMAXG= ',JMAXG
17 c      print*,' IMAXE= ',IMAXE,' JMAXE= ',JMAXE
18 c      print*,' DLONE = ',DLONE,' DLONG= ',DLONG,
19 c     + ' CNVG2E= ',CNVG2E
21       DO 200 JG=1,JMAXG                                        
22       JE=LY(JG)                                                 
23       FY=DY(JG)                                                  
24       DO 200 IG=1,IMAXG  
25       GDATA(IG,JG)=(1.0-FY)*EDATA(IG,JE)+ FY*EDATA(IG,JE+1)               
26 c      print*,IG,JG,JE,(1.0-FY),FY,' d1 & 2 res ',
27 c     + EDATA(IG,JE),EDATA(IG,JE+1),GDATA(IG,JG)
28   200 CONTINUE                                                        
29 C                                                                    
30 C                                                                   
31       RETURN                                                       
32       END SUBROUTINE LT2GAU