/[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 3 by guez, Wed Feb 27 13:16:39 2008 UTC trunk/dyn3d/Dissipation/nxgraro2.f revision 266 by guez, Thu Apr 19 17:54:55 2018 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 (xcov, ycov).
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 filtreg_v_m, ONLY: filtreg_v
15  c      use nr_util, only: assert, assert_eq
16  c      use nxgrad_m, only: nxgrad
17        use dimens_m      use rotatf_m, only: rotatf
18        use paramet_m  
19        IMPLICIT NONE      ! Composantes covariantes :
20  c      REAL, intent(in):: xcov(:, :, :) ! (iim + 1, jjm + 1, klevel)
21        include "comdissipn.h"      REAL, intent(in):: ycov(:, :, :) ! (iim + 1, jjm, klevel)
22  c  
23  c    ......  variables en arguments  .......      integer, intent(in):: lr
24  c      REAL, intent(out):: grx(:, :, :) ! (iim + 1, jjm + 1, klevel)
25        INTEGER klevel      REAL, intent(out):: gry(:, :, :) ! (iim + 1, jjm, klevel)
26        REAL xcov( ip1jmp1,klevel ), ycov( ip1jm,klevel )      real, intent(in):: crot
27        REAL  grx( ip1jmp1,klevel ),  gry( ip1jm,klevel )  
28  c      ! Local:
29  c    ......   variables locales     ........      INTEGER klevel, iter
30  c      REAL rot(size(ycov, 1), size(ycov, 2), size(ycov, 3)) , nugradrs
31        REAL rot(ip1jm,llm) , signe, nugradrs  
32        INTEGER l,ij,iter,lr      !----------------------------------------------------------
33  c    ........................................................  
34  c      call assert(size(xcov, 1) == [size(ycov, 1), size(grx, 1), size(gry, 1)], &
35  c           "nxgraro2 iim")
36  c      call assert(size(xcov, 2) - 1 == [size(ycov, 2), size(grx, 2) - 1, &
37        signe    = (-1.)**lr           size(gry, 2)], "nxgraro2 jjm")
38        nugradrs = signe * crot      klevel = assert_eq(size(xcov, 3), size(ycov, 3), size(grx, 3), &
39  c           size(gry, 3), "nxgraro2 klevel")
40        CALL SCOPY ( ip1jmp1* klevel, xcov, 1, grx, 1 )  
41        CALL SCOPY (  ip1jm * klevel, ycov, 1, gry, 1 )      grx = xcov
42  c      gry = ycov
43        CALL     rotatf     ( klevel, grx, gry, rot )  
44  c      CALL rotatf(klevel, grx, gry, rot)
45        CALL laplacien_rot ( klevel, rot, rot,grx,gry      )      CALL laplacien_rot(klevel, rot, rot, grx, gry)
46    
47  c      ! ItĂ©ration de l'opĂ©rateur laplacien_rotgam
48  c    .....   Iteration de l'operateur laplacien_rotgam  .....      DO iter = 1, lr - 2
49  c         CALL laplacien_rotgam(klevel, rot, rot)
50        DO  iter = 1, lr -2      ENDDO
51          CALL laplacien_rotgam ( klevel, rot, rot )  
52        ENDDO      CALL filtreg_v(rot, intensive = .true.)
53  c      CALL nxgrad(klevel, rot, grx, gry)
54  c  
55        CALL filtreg( rot, jjm, klevel, 2,1, .FALSE.,1)      nugradrs = (-1.)**lr * crot
56        CALL nxgrad ( klevel, rot, grx, gry )      grx = grx * nugradrs
57  c      gry = gry * nugradrs
58        DO    l = 1, klevel  
59           DO  ij = 1, ip1jm    END SUBROUTINE nxgraro2
60            gry( ij,l ) = gry( ij,l ) * nugradrs  
61           ENDDO  end module nxgraro2_m
          DO  ij = 1, ip1jmp1  
           grx( ij,l ) = grx( ij,l ) * nugradrs  
          ENDDO  
       ENDDO  
 c  
       RETURN  
       END  

Legend:
Removed from v.3  
changed lines
  Added in v.266

  ViewVC Help
Powered by ViewVC 1.1.21