[764] | 1 | SUBROUTINE nxgraro2_p (klevel,xcov, ycov, lr, grx_out, gry_out ) |
---|
[630] | 2 | c |
---|
| 3 | c P.Le Van . |
---|
| 4 | c *********************************************************** |
---|
| 5 | c lr |
---|
| 6 | c calcul de ( nxgrad (rot) ) du vect. v .... |
---|
| 7 | c |
---|
| 8 | c xcov et ycov etant les compos. covariantes de v |
---|
| 9 | c *********************************************************** |
---|
| 10 | c xcov , ycov et lr sont des arguments d'entree pour le s-prog |
---|
| 11 | c grx et gry sont des arguments de sortie pour le s-prog |
---|
| 12 | c |
---|
| 13 | c |
---|
| 14 | USE write_Field_p |
---|
| 15 | USE parallel |
---|
| 16 | USE times |
---|
[985] | 17 | USE mod_hallo |
---|
[630] | 18 | IMPLICIT NONE |
---|
| 19 | c |
---|
| 20 | #include "dimensions.h" |
---|
| 21 | #include "paramet.h" |
---|
| 22 | #include "comdissipn.h" |
---|
| 23 | c |
---|
| 24 | c ...... variables en arguments ....... |
---|
| 25 | c |
---|
| 26 | INTEGER klevel |
---|
| 27 | REAL xcov( ip1jmp1,klevel ), ycov( ip1jm,klevel ) |
---|
[764] | 28 | REAL,SAVE :: grx( ip1jmp1,llm ), gry( ip1jm,llm ) |
---|
| 29 | REAL grx_out( ip1jmp1,klevel ), gry_out( ip1jm,klevel ) |
---|
[630] | 30 | c |
---|
| 31 | c ...... variables locales ........ |
---|
| 32 | c |
---|
[764] | 33 | REAL,SAVE :: rot(ip1jm,llm) |
---|
| 34 | REAL signe, nugradrs |
---|
[630] | 35 | INTEGER l,ij,iter,lr |
---|
[985] | 36 | Type(Request) :: Request_dissip |
---|
[630] | 37 | c ........................................................ |
---|
| 38 | c |
---|
| 39 | INTEGER :: ijb,ije,jjb,jje |
---|
| 40 | |
---|
| 41 | c |
---|
| 42 | c |
---|
| 43 | signe = (-1.)**lr |
---|
| 44 | nugradrs = signe * crot |
---|
| 45 | c |
---|
| 46 | c CALL SCOPY ( ip1jmp1* klevel, xcov, 1, grx, 1 ) |
---|
| 47 | c CALL SCOPY ( ip1jm * klevel, ycov, 1, gry, 1 ) |
---|
| 48 | |
---|
| 49 | ijb=ij_begin |
---|
| 50 | ije=ij_end |
---|
[764] | 51 | |
---|
| 52 | c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) |
---|
| 53 | DO l = 1, klevel |
---|
| 54 | grx(ijb:ije,l)=xcov(ijb:ije,l) |
---|
| 55 | ENDDO |
---|
| 56 | c$OMP END DO NOWAIT |
---|
| 57 | |
---|
| 58 | c$OMP BARRIER |
---|
[985] | 59 | call Register_Hallo(grx,ip1jmp1,llm,0,1,1,0,Request_dissip) |
---|
| 60 | call SendRequest(Request_dissip) |
---|
[764] | 61 | c$OMP BARRIER |
---|
[985] | 62 | call WaitRequest(Request_dissip) |
---|
| 63 | c$OMP BARRIER |
---|
[630] | 64 | |
---|
| 65 | ijb=ij_begin |
---|
| 66 | ije=ij_end |
---|
| 67 | if(pole_sud) ije=ij_end-iip1 |
---|
[764] | 68 | |
---|
| 69 | c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) |
---|
| 70 | DO l = 1, klevel |
---|
| 71 | gry(ijb:ije,l)=ycov(ijb:ije,l) |
---|
| 72 | ENDDO |
---|
| 73 | c$OMP END DO NOWAIT |
---|
| 74 | |
---|
[630] | 75 | c |
---|
| 76 | CALL rotatf_p ( klevel, grx, gry, rot ) |
---|
| 77 | c call write_field3d_p('rot1',reshape(rot,(/iip1,jjm,llm/))) |
---|
[764] | 78 | |
---|
| 79 | c$OMP BARRIER |
---|
[985] | 80 | call Register_Hallo(rot,ip1jm,llm,1,1,1,1,Request_dissip) |
---|
| 81 | call SendRequest(Request_dissip) |
---|
[764] | 82 | c$OMP BARRIER |
---|
[985] | 83 | call WaitRequest(Request_dissip) |
---|
| 84 | c$OMP BARRIER |
---|
[630] | 85 | |
---|
| 86 | CALL laplacien_rot_p ( klevel, rot, rot,grx,gry ) |
---|
| 87 | c call write_field3d_p('rot2',reshape(rot,(/iip1,jjm,llm/))) |
---|
| 88 | c |
---|
| 89 | c ..... Iteration de l'operateur laplacien_rotgam ..... |
---|
| 90 | c |
---|
| 91 | DO iter = 1, lr -2 |
---|
[764] | 92 | c$OMP BARRIER |
---|
[985] | 93 | call Register_Hallo(rot,ip1jm,llm,1,1,1,1,Request_dissip) |
---|
| 94 | call SendRequest(Request_dissip) |
---|
[764] | 95 | c$OMP BARRIER |
---|
[985] | 96 | call WaitRequest(Request_dissip) |
---|
| 97 | c$OMP BARRIER |
---|
| 98 | |
---|
[630] | 99 | CALL laplacien_rotgam_p ( klevel, rot, rot ) |
---|
| 100 | ENDDO |
---|
| 101 | |
---|
| 102 | c call write_field3d_p('rot3',reshape(rot,(/iip1,jjm,llm/))) |
---|
| 103 | |
---|
| 104 | c |
---|
| 105 | c |
---|
| 106 | jjb=jj_begin |
---|
| 107 | jje=jj_end |
---|
| 108 | if (pole_sud) jje=jj_end-1 |
---|
| 109 | |
---|
| 110 | CALL filtreg_p( rot, jjb,jje,jjm, klevel, 2,1, .FALSE.,1) |
---|
[764] | 111 | c$OMP BARRIER |
---|
[985] | 112 | call Register_Hallo(rot,ip1jm,llm,1,0,0,1,Request_dissip) |
---|
| 113 | call SendRequest(Request_dissip) |
---|
[764] | 114 | c$OMP BARRIER |
---|
[985] | 115 | call WaitRequest(Request_dissip) |
---|
| 116 | c$OMP BARRIER |
---|
| 117 | |
---|
[630] | 118 | CALL nxgrad_p ( klevel, rot, grx, gry ) |
---|
| 119 | |
---|
| 120 | c |
---|
| 121 | ijb=ij_begin |
---|
| 122 | ije=ij_end |
---|
[764] | 123 | |
---|
| 124 | c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) |
---|
[630] | 125 | DO l = 1, klevel |
---|
| 126 | |
---|
| 127 | if(pole_sud) ije=ij_end-iip1 |
---|
| 128 | DO ij = ijb, ije |
---|
[764] | 129 | gry_out( ij,l ) = gry( ij,l ) * nugradrs |
---|
[630] | 130 | ENDDO |
---|
| 131 | |
---|
| 132 | if(pole_sud) ije=ij_end |
---|
| 133 | DO ij = ijb, ije |
---|
[764] | 134 | grx_out( ij,l ) = grx( ij,l ) * nugradrs |
---|
[630] | 135 | ENDDO |
---|
| 136 | |
---|
| 137 | ENDDO |
---|
[764] | 138 | c$OMP END DO NOWAIT |
---|
[630] | 139 | c |
---|
| 140 | RETURN |
---|
| 141 | END |
---|