/[lmdze]/trunk/libf/dyn3d/Dissipation/divgrad2.f90
ViewVC logotype

Diff of /trunk/libf/dyn3d/Dissipation/divgrad2.f90

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/libf/dyn3d/Dissipation/divgrad2.f revision 64 by guez, Fri Apr 20 14:58:43 2012 UTC trunk/libf/dyn3d/Dissipation/divgrad2.f90 revision 65 by guez, Thu Sep 20 09:57:03 2012 UTC
# Line 1  Line 1 
1  !  module divgrad2_m
 ! $Header: /home/cvsroot/LMDZ4/libf/dyn3d/divgrad2.F,v 1.1.1.1 2004/05/19 12:53:06 lmdzadmin Exp $  
 !  
       SUBROUTINE divgrad2 ( klevel, h, deltapres, lh, divgra, cdivh )  
 c  
 c     P. Le Van  
 c  
 c   ***************************************************************  
 c  
 c     .....   calcul de  (div( grad ))   de (  pext * h ) .....  
 c   ****************************************************************  
 c   h ,klevel,lh et pext  sont des arguments  d'entree pour le s-prg  
 c         divgra     est  un argument  de sortie pour le s-prg  
 c  
       use dimens_m  
       use laplacien_m, only: laplacien  
       use paramet_m  
       use comgeom  
       IMPLICIT NONE  
 c  
   
 c    .......    variables en arguments   .......  
 c  
       INTEGER klevel  
       REAL, intent(in):: h( ip1jmp1,klevel ), deltapres( ip1jmp1,klevel)  
       REAL, intent(out):: divgra( ip1jmp1,klevel)  
       real, intent(in):: cdivh  
 c  
 c    .......    variables  locales    ..........  
 c  
       REAL     signe, nudivgrs, sqrtps( ip1jmp1,llm )  
       INTEGER  l,ij,iter  
       integer, intent(in):: lh  
 c    ...................................................................  
   
 c  
       signe    = (-1.)**lh  
       nudivgrs = signe * cdivh  
       divgra = h  
   
 c  
       CALL laplacien( klevel, divgra )  
       
       DO l = 1, klevel  
        DO ij = 1, ip1jmp1  
         sqrtps( ij,l ) = SQRT( deltapres(ij,l) )  
        ENDDO  
       ENDDO  
 c  
       DO l = 1, klevel  
         DO ij = 1, ip1jmp1  
          divgra(ij,l) = divgra(ij,l) * sqrtps(ij,l)  
         ENDDO  
       ENDDO  
     
 c    ........    Iteration de l'operateur  laplacien_gam    ........  
 c  
       DO  iter = 1, lh - 2  
        CALL laplacien_gam ( klevel,cuvscvgam2,cvuscugam2,unsair_gam2,  
      *                     unsapolnga2, unsapolsga2,  divgra, divgra )  
       ENDDO  
 c  
 c    ...............................................................  
   
       DO l = 1, klevel  
         DO ij = 1, ip1jmp1  
           divgra(ij,l) = divgra(ij,l) * sqrtps(ij,l)  
         ENDDO  
       ENDDO  
 c  
       CALL laplacien ( klevel, divgra )  
 c  
       DO l  = 1,klevel  
       DO ij = 1,ip1jmp1  
       divgra(ij,l) =  nudivgrs * divgra(ij,l) / deltapres(ij,l)  
       ENDDO  
       ENDDO  
2    
3        RETURN    IMPLICIT NONE
4        END  
5    contains
6    
7      SUBROUTINE divgrad2(klevel, h, deltapres, lh, divgra, cdivh)
8    
9        ! From LMDZ4/libf/dyn3d/divgrad2.F, version 1.1.1.1 2004/05/19 12:53:06
10        ! P. Le Van
11    
12        ! Calcul de div(grad) de (pext * h)
13    
14        USE comgeom, ONLY: cuvscvgam2, cvuscugam2, unsair_gam2, unsapolnga2, &
15             unsapolsga2
16        USE laplacien_m, ONLY: laplacien
17        USE paramet_m, ONLY: ip1jmp1
18    
19        INTEGER, intent(in):: klevel
20        REAL, intent(in):: h(ip1jmp1, klevel), deltapres(ip1jmp1, klevel)
21        integer, intent(in):: lh
22        REAL, intent(out):: divgra(ip1jmp1, klevel)
23        real, intent(in):: cdivh
24    
25        ! Variables locales
26        REAL sqrtps(ip1jmp1, klevel)
27        INTEGER iter
28    
29        !-----------------------------------------------------------------
30    
31        divgra = h
32        CALL laplacien(klevel, divgra)
33        sqrtps = SQRT(deltapres)
34        divgra = divgra * sqrtps
35    
36        ! ItĂ©ration de l'opĂ©rateur laplacien_gam
37        DO iter = 1, lh - 2
38           CALL laplacien_gam(klevel, cuvscvgam2, cvuscugam2, unsair_gam2, &
39                unsapolnga2, unsapolsga2, divgra, divgra)
40        ENDDO
41    
42        divgra = divgra * sqrtps
43        CALL laplacien(klevel, divgra)
44        divgra = (-1.)**lh * cdivh * divgra / deltapres
45    
46      END SUBROUTINE divgrad2
47    
48    end module divgrad2_m

Legend:
Removed from v.64  
changed lines
  Added in v.65

  ViewVC Help
Powered by ViewVC 1.1.21