1 | ! |
---|
2 | ! $Id: gr_fi_dyn_p.F90 5367 2024-12-03 09:40:13Z abarral $ |
---|
3 | ! |
---|
4 | |
---|
5 | #ifdef CPP_PARA |
---|
6 | SUBROUTINE gr_fi_dyn_p(nfield,ngrid,im,jm,pfi,pdyn) |
---|
7 | ! Interface with parallel physics, |
---|
8 | USE mod_interface_dyn_phys |
---|
9 | USE dimphy |
---|
10 | USE parallel_lmdz |
---|
11 | IMPLICIT NONE |
---|
12 | !======================================================================= |
---|
13 | ! passage d'un champ de la grille scalaire a la grille physique |
---|
14 | !======================================================================= |
---|
15 | |
---|
16 | !----------------------------------------------------------------------- |
---|
17 | ! declarations: |
---|
18 | ! ------------- |
---|
19 | |
---|
20 | INTEGER :: im,jm,ngrid,nfield |
---|
21 | REAL :: pdyn(im,jm,nfield) |
---|
22 | REAL :: pfi(ngrid,nfield) |
---|
23 | |
---|
24 | INTEGER :: i,j,ifield,ig |
---|
25 | |
---|
26 | !----------------------------------------------------------------------- |
---|
27 | ! calcul: |
---|
28 | ! ------- |
---|
29 | !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) |
---|
30 | DO ifield=1,nfield |
---|
31 | |
---|
32 | do ig=1,klon |
---|
33 | i=index_i(ig) |
---|
34 | j=index_j(ig) |
---|
35 | pdyn(i,j,ifield)=pfi(ig,ifield) |
---|
36 | if (i==1) pdyn(im,j,ifield)=pdyn(i,j,ifield) |
---|
37 | enddo |
---|
38 | |
---|
39 | ! traitement des poles |
---|
40 | if (pole_nord) then |
---|
41 | do i=1,im |
---|
42 | pdyn(i,1,ifield)=pdyn(1,1,ifield) |
---|
43 | enddo |
---|
44 | endif |
---|
45 | |
---|
46 | if (pole_sud) then |
---|
47 | do i=1,im |
---|
48 | pdyn(i,jm,ifield)=pdyn(1,jm,ifield) |
---|
49 | enddo |
---|
50 | endif |
---|
51 | |
---|
52 | ENDDO |
---|
53 | !$OMP END DO NOWAIT |
---|
54 | ! of #ifdef CPP_PARA |
---|
55 | RETURN |
---|
56 | END SUBROUTINE gr_fi_dyn_p |
---|
57 | #endif |
---|