source: LMDZ5/trunk/libf/dyn3dpar/divgrad_p.F @ 1930

Last change on this file since 1930 was 1907, checked in by lguez, 11 years ago

Added a copyright property to every file of the distribution, except
for the fcm files (which have their own copyright). Use svn propget on
a file to see the copyright. For instance:

$ svn propget copyright libf/phylmd/physiq.F90
Name of program: LMDZ
Creation date: 1984
Version: LMDZ5
License: CeCILL version 2
Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
See the license file in the root directory

Also added the files defining the CeCILL version 2 license, in French
and English, at the top of the LMDZ tree.

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.1 KB
RevLine 
[764]1      SUBROUTINE divgrad_p (klevel,h, lh, divgra_out )
[1823]2      USE parallel_lmdz
[630]3      USE times
4      IMPLICIT NONE
5c
6c=======================================================================
7c
8c  Auteur :   P. Le Van
9c  ----------
10c
11c                              lh
12c      calcul de  (div( grad ))   de h  .....
13c      h  et lh  sont des arguments  d'entree pour le s-prog
14c      divgra     est  un argument  de sortie pour le s-prog
15c
16c=======================================================================
17c
18c   declarations:
19c   -------------
20c
21#include "dimensions.h"
22#include "paramet.h"
23#include "comgeom.h"
24#include "comdissipn.h"
25#include "logic.h"
26c
27      INTEGER klevel
[764]28      REAL h( ip1jmp1,klevel ), divgra_out( ip1jmp1,klevel )
29      REAL,SAVE :: divgra( ip1jmp1,llm )
30
[630]31c
32      REAL ghy(ip1jm,llm), ghx(ip1jmp1,llm)
33
34      INTEGER  l,ij,iter,lh
35c
36      INTEGER ijb,ije,jjb,jje
37c
38c
39c      CALL SCOPY ( ip1jmp1*klevel,h,1,divgra,1 )
40     
41      ijb=ij_begin
42      ije=ij_end
[764]43c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
44      DO l = 1, klevel     
45      divgra(ijb:ije,l)=h(ijb:ije,l)
46      ENDDO
47c$OMP END DO NOWAIT
[630]48c
49
50c
51      DO 10 iter = 1,lh
52
53      jjb=jj_begin
54      jje=jj_end
55      CALL filtreg_p ( divgra,jjb,jje,jjp1,klevel,2,1,.true.,1  )
56
57c      call exchange_Hallo(divgra,ip1jmp1,llm,0,1)
[764]58c$OMP BARRIER
59c$OMP MASTER     
[630]60      call suspend_timer(timer_dissip)
61      call exchange_Hallo(divgra,ip1jmp1,llm,1,1)
62      call resume_timer(timer_dissip)
[764]63c$OMP END MASTER
64c$OMP BARRIER       
[630]65      CALL    grad_p (klevel,divgra, ghx  , ghy          )
66
[764]67c$OMP BARRIER
68c$OMP MASTER   
[630]69      call suspend_timer(timer_dissip)
70      call exchange_Hallo(ghy,ip1jm,llm,1,0)
71      call resume_timer(timer_dissip)
[764]72c$OMP END MASTER
73c$OMP BARRIER           
74
[630]75      CALL  diverg_p (klevel,  ghx , ghy  , divgra       )
76
77      jjb=jj_begin
78      jje=jj_end
79      CALL filtreg_p( divgra,jjb,jje,jjp1,klevel,2,1,.true.,1)
80
[764]81c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
[630]82      DO 5 l = 1,klevel
83      DO 4  ij = ijb, ije
[764]84      divgra_out( ij,l ) = - cdivh * divgra( ij,l )
[630]85   4  CONTINUE
86   5  CONTINUE
[764]87c$OMP END DO NOWAIT
[630]88c
89  10  CONTINUE
90      RETURN
91      END
Note: See TracBrowser for help on using the repository browser.