source: trunk/LMDZ.COMMON/libf/dyn3dpar/divgrad_p.F @ 1243

Last change on this file since 1243 was 1019, checked in by emillour, 11 years ago

Common dynamics; keep up with updates (seq and ) in LMDZ5 (up tio rev 1845):

  • General stuff:
  • makelmdz_fcm: add options -j # (compile using # threads) and -full, and to keep up

with Earth model, possibility to compile with various versions of orchidee

  • bld.cfg: adaptations to enable compiling using multiple threads
  • build_gcm: adaptations to enable compiling using multiple threads
  • makelmdz: keep up with Earth model: possibility to compile with various versions of orchidee + cosmetic changes + library directory name change
  • bibio:
  • wxios.F90 : Added for possible future use of XIOS library
  • filtrez:
  • mkl_dft_type.f90 & mkl_dfti.f90 : MKL (for MKL FFT) interface definitions
  • filtreg_mod : limit use of FFT to parallel mode
  • mod_filtre_fft.F90 & mod_filtre_fft_lov.F90 : swich to use parallel_lmdz
  • dyn3d:
  • abort_gcm.F : add things for xios
  • advtrac.F90 : minor change in CFL outputs
  • ce0l.F90 : indicesol.h is now module indice_sol_mod
  • comvert.h : cosmetic change on comments
  • gcm.F : add xios and use module indice_sol_mod (for INCA)
  • inigeom.F : move two computations outside loop
  • dyn3dpar:
  • parallel.F90 => parallel_lmdz.F90 : and change all the "use parallel" into "use parallel_lmdz" in all files in dyn3dpar
  • comvert.h : cosmetic change on comments
  • gcm.F : add xios and use module indice_sol_mod (for INCA)
  • leapfrog_p.F : add xios + correction for times in Newtonian case
  • ce0l.F90 : indicesol.h is now module indice_sol_mod
  • inigeom.F : move two computations outside loop

EM

File size: 2.1 KB
Line 
1      SUBROUTINE divgrad_p (klevel,h, lh, divgra_out )
2      USE parallel_lmdz
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
28      REAL h( ip1jmp1,klevel ), divgra_out( ip1jmp1,klevel )
29      REAL,SAVE :: divgra( ip1jmp1,llm )
30
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
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
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)
58c$OMP BARRIER
59c$OMP MASTER     
60      call suspend_timer(timer_dissip)
61      call exchange_Hallo(divgra,ip1jmp1,llm,1,1)
62      call resume_timer(timer_dissip)
63c$OMP END MASTER
64c$OMP BARRIER       
65      CALL    grad_p (klevel,divgra, ghx  , ghy          )
66
67c$OMP BARRIER
68c$OMP MASTER   
69      call suspend_timer(timer_dissip)
70      call exchange_Hallo(ghy,ip1jm,llm,1,0)
71      call resume_timer(timer_dissip)
72c$OMP END MASTER
73c$OMP BARRIER           
74
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
81c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
82      DO 5 l = 1,klevel
83      DO 4  ij = ijb, ije
84      divgra_out( ij,l ) = - cdivh * divgra( ij,l )
85   4  CONTINUE
86   5  CONTINUE
87c$OMP END DO NOWAIT
88c
89  10  CONTINUE
90      RETURN
91      END
Note: See TracBrowser for help on using the repository browser.