/[lmdze]/trunk/dyn3d/Dissipation/nxgraro2.f
ViewVC logotype

Diff of /trunk/dyn3d/Dissipation/nxgraro2.f

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

trunk/libf/dyn3d/nxgraro2.f revision 27 by guez, Thu Mar 25 14:29:07 2010 UTC trunk/Sources/dyn3d/Dissipation/nxgraro2.f revision 137 by guez, Wed May 6 15:51:03 2015 UTC
# Line 1  Line 1 
1  !  module nxgraro2_m
2  ! $Header: /home/cvsroot/LMDZ4/libf/dyn3d/nxgraro2.F,v 1.1.1.1 2004/05/19 12:53:06 lmdzadmin Exp $  
3  !    IMPLICIT NONE
4         SUBROUTINE nxgraro2 (klevel,xcov, ycov, lr, grx, gry )  
5  c  contains
6  c      P.Le Van .  
7  c   ***********************************************************    SUBROUTINE nxgraro2(xcov, ycov, lr, grx, gry, crot)
8  c                                 lr  
9  c      calcul de  ( nxgrad (rot) )   du vect. v  ....      ! From LMDZ4/libf/dyn3d/nxgraro2.F, version 1.1.1.1 2004/05/19 12:53:06
10  c  
11  c       xcov et ycov  etant les compos. covariantes de  v      ! P. Le Van
12  c   ***********************************************************      ! Calcul de nxgrad(rot) du vecteur v
13  c     xcov , ycov et lr  sont des arguments  d'entree pour le s-prog  
14  c      grx   et  gry     sont des arguments de sortie pour le s-prog      USE dimens_m, ONLY: iim, jjm
15  c      USE filtreg_v_m, ONLY: filtreg_v
16  c      use nr_util, only: assert, assert_eq
17        use dimens_m      use rotatf_m, only: rotatf
18        use paramet_m  
19              use inidissip_m      ! Composantes covariantes de v :
20        use filtreg_m, only: filtreg      REAL, intent(in):: xcov(:, :, :) ! (iim + 1, jjm + 1, :)
21        IMPLICIT NONE      REAL, intent(in):: ycov(:, :, :) ! (iim + 1, jjm, :)
22  c  
23  c      integer, intent(in):: lr
24  c    ......  variables en arguments  .......      REAL, intent(out):: grx(:, :, :) ! (iim + 1, jjm + 1, :)
25  c      REAL, intent(out):: gry(:, :, :) ! (iim + 1, jjm, :)
26        INTEGER klevel      real, intent(in):: crot
27        REAL xcov( ip1jmp1,klevel ), ycov( ip1jm,klevel )  
28        REAL  grx( ip1jmp1,klevel ),  gry( ip1jm,klevel )      ! Variables locales
29  c  
30  c    ......   variables locales     ........      INTEGER klevel, iter
31  c      REAL rot(iim + 1, jjm, size(xcov, 3)) , nugradrs
32        REAL rot(ip1jm,llm) , signe, nugradrs  
33        INTEGER l,ij,iter      !----------------------------------------------------------
34        integer, intent(in):: lr  
35  c    ........................................................      call assert((/size(xcov, 1), size(ycov, 1), size(grx, 1), size(gry, 1)/) &
36  c           == iim + 1, "nxgraro2 iim")
37  c      call assert((/size(xcov, 2) - 1, size(ycov, 2), size(grx, 2) - 1, &
38  c           size(gry, 2)/) == jjm, "nxgraro2 jjm")
39        signe    = (-1.)**lr      klevel = assert_eq(size(xcov, 3), size(ycov, 3), size(grx, 3), &
40        nugradrs = signe * crot           size(gry, 3), "nxgraro2 klevel")
41  c  
42        CALL SCOPY ( ip1jmp1* klevel, xcov, 1, grx, 1 )      grx = xcov
43        CALL SCOPY (  ip1jm * klevel, ycov, 1, gry, 1 )      gry = ycov
44  c  
45        CALL     rotatf     ( klevel, grx, gry, rot )      CALL rotatf(klevel, grx, gry, rot)
46  c      CALL laplacien_rot(klevel, rot, rot, grx, gry)
47        CALL laplacien_rot ( klevel, rot, rot,grx,gry      )  
48        ! ItĂ©ration de l'opĂ©rateur laplacien_rotgam
49  c      DO iter = 1, lr - 2
50  c    .....   Iteration de l'operateur laplacien_rotgam  .....         CALL laplacien_rotgam(klevel, rot, rot)
51  c      ENDDO
52        DO  iter = 1, lr -2  
53          CALL laplacien_rotgam ( klevel, rot, rot )      CALL filtreg_v(rot, intensive = .true.)
54        ENDDO      CALL nxgrad(klevel, rot, grx, gry)
55  c  
56  c      nugradrs = (-1.)**lr * crot
57        CALL filtreg( rot, jjm, klevel, 2,1, .FALSE.,1)      grx = grx * nugradrs
58        CALL nxgrad ( klevel, rot, grx, gry )      gry = gry * nugradrs
59  c  
60        DO    l = 1, klevel    END SUBROUTINE nxgraro2
61           DO  ij = 1, ip1jm  
62            gry( ij,l ) = gry( ij,l ) * nugradrs  end module nxgraro2_m
          ENDDO  
          DO  ij = 1, ip1jmp1  
           grx( ij,l ) = grx( ij,l ) * nugradrs  
          ENDDO  
       ENDDO  
 c  
       RETURN  
       END  

Legend:
Removed from v.27  
changed lines
  Added in v.137

  ViewVC Help
Powered by ViewVC 1.1.21