Changeset 1459
- Timestamp:
- Jun 20, 2015, 9:22:53 AM (10 years ago)
- Location:
- trunk/LMDZ.COMMON/libf
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/dyn3d/advect.F
r1422 r1459 28 28 c ------------- 29 29 30 #include "dimensions.h"31 #include "paramet.h"32 #include "comgeom.h"30 include "dimensions.h" 31 include "paramet.h" 32 include "comgeom.h" 33 33 34 34 c Arguments: 35 35 c ---------- 36 36 37 REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm),teta(ip1jmp1,llm) 38 REAL massebx(ip1jmp1,llm),masseby(ip1jm,llm),w(ip1jmp1,llm) 39 REAL dv(ip1jm,llm),du(ip1jmp1,llm),dteta(ip1jmp1,llm) 37 REAL,INTENT(IN) :: vcov(ip1jm,llm) 38 REAL,INTENT(IN) :: ucov(ip1jmp1,llm) 39 REAL,INTENT(IN) :: teta(ip1jmp1,llm) 40 REAL,INTENT(IN) :: massebx(ip1jmp1,llm) 41 REAL,INTENT(IN) :: masseby(ip1jm,llm) 42 REAL,INTENT(IN) :: w(ip1jmp1,llm) 43 REAL,INTENT(INOUT) :: dv(ip1jm,llm) 44 REAL,INTENT(INOUT) :: du(ip1jmp1,llm) 45 REAL,INTENT(INOUT) :: dteta(ip1jmp1,llm) 40 46 41 47 c Local: … … 57 63 deuxjour = 2. * daysec 58 64 59 DO 1ij = 1, ip1jmp160 unsaire2(ij) = unsaire(ij) * unsaire(ij)61 1 CONTINUE65 DO ij = 1, ip1jmp1 66 unsaire2(ij) = unsaire(ij) * unsaire(ij) 67 ENDDO 62 68 END IF 63 69 … … 100 106 101 107 c 102 DO 20l = 1, llmm1108 DO l = 1, llmm1 103 109 104 110 105 111 c ...... calcul de - w/2. au niveau l+1 ....... 106 112 107 DO 5ij = 1, ip1jmp1108 wsur2( ij ) = - 0.5 * w( ij,l+1 )109 5 CONTINUE113 DO ij = 1, ip1jmp1 114 wsur2( ij ) = - 0.5 * w( ij,l+1 ) 115 ENDDO 110 116 111 117 112 118 c ..................... calcul pour du .................. 113 119 114 DO 6ij = iip2 ,ip1jm-1115 ww = wsur2 ( ij ) + wsur2( ij+1 )116 uu = 0.5 * ( ucov(ij,l) + ucov(ij,l+1) )117 du(ij,l) = du(ij,l) - ww * ( uu - uav(ij, l ) )/massebx(ij, l)118 du(ij,l+1)= du(ij,l+1) + ww * ( uu - uav(ij,l+1))/massebx(ij,l+1)119 6 CONTINUE120 DO ij = iip2 ,ip1jm-1 121 ww = wsur2 ( ij ) + wsur2( ij+1 ) 122 uu = 0.5 * ( ucov(ij,l) + ucov(ij,l+1) ) 123 du(ij,l) = du(ij,l) -ww*(uu-uav(ij,l))/massebx(ij,l) 124 du(ij,l+1)= du(ij,l+1) +ww*(uu-uav(ij,l+1))/massebx(ij,l+1) 125 ENDDO 120 126 121 127 c ..... correction pour du(iip1,j,l) ........ … … 123 129 124 130 CDIR$ IVDEP 125 DO 7ij = iip1 +iip1, ip1jm, iip1126 du( ij, l ) = du( ij -iim, l )127 du( ij,l+1 ) = du( ij -iim,l+1 )128 7 CONTINUE131 DO ij = iip1 +iip1, ip1jm, iip1 132 du( ij, l ) = du( ij -iim, l ) 133 du( ij,l+1 ) = du( ij -iim,l+1 ) 134 ENDDO 129 135 130 136 c ................. calcul pour dv ..................... 131 137 132 DO 8ij = 1, ip1jm133 ww = wsur2( ij+iip1 ) + wsur2( ij )134 vv = 0.5 * ( vcov(ij,l) + vcov(ij,l+1) )135 dv(ij,l) = dv(ij, l ) - ww * (vv - vav(ij, l ) )/masseby(ij, l)136 dv(ij,l+1)= dv(ij,l+1) + ww * (vv - vav(ij,l+1))/masseby(ij,l+1)137 8 CONTINUE138 DO ij = 1, ip1jm 139 ww = wsur2( ij+iip1 ) + wsur2( ij ) 140 vv = 0.5 * ( vcov(ij,l) + vcov(ij,l+1) ) 141 dv(ij,l) = dv(ij, l ) - ww*(vv-vav(ij,l))/masseby(ij,l) 142 dv(ij,l+1)= dv(ij,l+1) + ww*(vv-vav(ij,l+1))/masseby(ij,l+1) 143 ENDDO 138 144 139 145 c … … 147 153 c ............... 148 154 149 DO 15ij = 1, ip1jmp1155 DO ij = 1, ip1jmp1 150 156 ww = wsur2(ij) * (teta(ij,l) + teta(ij,l+1) ) 151 157 dteta(ij, l ) = dteta(ij, l ) - ww 152 158 dteta(ij,l+1) = dteta(ij,l+1) + ww 153 15 CONTINUE159 ENDDO 154 160 155 IF( conser) THEN156 DO 17ij = 1,ip1jmp1157 ge(ij) = wsur2(ij) * wsur2(ij) * unsaire2(ij)158 17 CONTINUE159 gt = SSUM( ip1jmp1,ge,1 )160 gtot(l) = deuxjour * SQRT( gt/ip1jmp1 )161 END IF161 IF( conser) THEN 162 DO ij = 1,ip1jmp1 163 ge(ij) = wsur2(ij) * wsur2(ij) * unsaire2(ij) 164 ENDDO 165 gt = SSUM( ip1jmp1,ge,1 ) 166 gtot(l) = deuxjour * SQRT( gt/ip1jmp1 ) 167 END IF 162 168 163 20 CONTINUE169 ENDDO ! of DO l = 1, llmm1 164 170 165 RETURN166 171 END -
trunk/LMDZ.COMMON/libf/dyn3dpar/advect_new_p.F
r1422 r1459 28 28 c ------------- 29 29 30 #include "dimensions.h"31 #include "paramet.h"32 #include "comgeom.h"30 include "dimensions.h" 31 include "paramet.h" 32 include "comgeom.h" 33 33 34 34 c Arguments: 35 35 c ---------- 36 36 37 REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm),teta(ip1jmp1,llm) 38 REAL massebx(ip1jmp1,llm),masseby(ip1jm,llm),w(ip1jmp1,llm) 39 REAL dv(ip1jm,llm),du(ip1jmp1,llm),dteta(ip1jmp1,llm) 37 REAL,INTENT(IN) :: vcov(ip1jm,llm) 38 REAL,INTENT(IN) :: ucov(ip1jmp1,llm) 39 REAL,INTENT(IN) :: teta(ip1jmp1,llm) 40 REAL,INTENT(IN) :: massebx(ip1jmp1,llm) 41 REAL,INTENT(IN) :: masseby(ip1jm,llm) 42 REAL,INTENT(IN) :: w(ip1jmp1,llm) 43 REAL,INTENT(INOUT) :: dv(ip1jm,llm) 44 REAL,INTENT(INOUT) :: du(ip1jmp1,llm) 45 REAL,INTENT(INOUT) :: dteta(ip1jmp1,llm) 46 c Local: 47 c ------ 48 40 49 REAL,SAVE :: dv1(ip1jm,llm),du1(ip1jmp1,llm),dteta1(ip1jmp1,llm) 41 50 REAL,SAVE :: dv2(ip1jm,llm),du2(ip1jmp1,llm),dteta2(ip1jmp1,llm) 42 c Local:43 c ------44 45 51 REAL,SAVE :: uav(ip1jmp1,llm),vav(ip1jm,llm) 46 52 REAL wsur2(ip1jmp1) … … 60 66 deuxjour = 2. * daysec 61 67 62 DO 1ij = 1, ip1jmp168 DO ij = 1, ip1jmp1 63 69 unsaire2(ij) = unsaire(ij) * unsaire(ij) 64 1 CONTINUE70 ENDDO 65 71 END IF 66 72 … … 77 83 DO ij=ijb,ije 78 84 du2(ij,1)=0. 85 du1(ij,llm)=0. 79 86 ENDDO 80 87 … … 85 92 DO ij=ijb,ije 86 93 dv2(ij,1)=0. 94 dv1(ij,llm)=0. 87 95 ENDDO 88 96 … … 92 100 DO ij=ijb,ije 93 101 dteta2(ij,1)=0. 102 dteta1(ij,llm)=0. 94 103 ENDDO 95 104 c$OMP END MASTER … … 129 138 ENDDO 130 139 endif 131 140 132 141 ENDDO 133 142 c$OMP END DO … … 169 178 170 179 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 171 DO 20l = 1, llmm1180 DO l = 1, llmm1 172 181 173 182 174 183 c ...... calcul de - w/2. au niveau l+1 ....... 175 ijb=ij_begin176 ije=ij_end+iip1177 if (pole_sud) ije=ij_end178 179 DO 5ij = ijb, ije180 wsur2( ij ) = - 0.5 * w( ij,l+1 )181 5 CONTINUE184 ijb=ij_begin 185 ije=ij_end+iip1 186 if (pole_sud) ije=ij_end 187 188 DO ij = ijb, ije 189 wsur2( ij ) = - 0.5 * w( ij,l+1 ) 190 ENDDO 182 191 183 192 184 193 c ..................... calcul pour du .................. 185 194 186 ijb=ij_begin187 ije=ij_end188 if (pole_nord) ijb=ijb+iip1189 if (pole_sud) ije=ije-iip1190 191 DO 6ij = ijb ,ije-1192 ww = wsur2 ( ij ) + wsur2( ij+1 )193 uu = 0.5 * ( ucov(ij,l) + ucov(ij,l+1) )194 du1(ij,l) = ww * ( uu - uav(ij, l ) )/massebx(ij, l )195 du2(ij,l+1)= ww * ( uu - uav(ij,l+1) )/massebx(ij,l+1)196 6 CONTINUE195 ijb=ij_begin 196 ije=ij_end 197 if (pole_nord) ijb=ijb+iip1 198 if (pole_sud) ije=ije-iip1 199 200 DO ij = ijb ,ije-1 201 ww = wsur2 ( ij ) + wsur2( ij+1 ) 202 uu = 0.5 * ( ucov(ij,l) + ucov(ij,l+1) ) 203 du1(ij,l) = ww * ( uu - uav(ij, l ) )/massebx(ij, l ) 204 du2(ij,l+1)= ww * ( uu - uav(ij,l+1) )/massebx(ij,l+1) 205 ENDDO 197 206 198 207 c ................. calcul pour dv ..................... 199 ijb=ij_begin200 ije=ij_end201 if (pole_sud) ije=ij_end-iip1202 203 DO 8ij = ijb, ije204 ww = wsur2( ij+iip1 ) + wsur2( ij )205 vv = 0.5 * ( vcov(ij,l) + vcov(ij,l+1) )206 dv1(ij,l) = ww * (vv - vav(ij, l ) )/masseby(ij, l )207 dv2(ij,l+1)= ww * (vv - vav(ij,l+1) )/masseby(ij,l+1)208 8 CONTINUE208 ijb=ij_begin 209 ije=ij_end 210 if (pole_sud) ije=ij_end-iip1 211 212 DO ij = ijb, ije 213 ww = wsur2( ij+iip1 ) + wsur2( ij ) 214 vv = 0.5 * ( vcov(ij,l) + vcov(ij,l+1) ) 215 dv1(ij,l) = ww * (vv - vav(ij, l ) )/masseby(ij, l ) 216 dv2(ij,l+1)= ww * (vv - vav(ij,l+1) )/masseby(ij,l+1) 217 ENDDO 209 218 210 219 c … … 220 229 ije=ij_end 221 230 222 DO 15ij = ijb, ije231 DO ij = ijb, ije 223 232 ww = wsur2(ij) * (teta(ij,l) + teta(ij,l+1) ) 224 233 dteta1(ij, l ) = ww 225 234 dteta2(ij,l+1) = ww 226 15 CONTINUE235 ENDDO 227 236 228 237 c ym ---> conser a voir plus tard … … 237 246 c END IF 238 247 239 20 CONTINUE248 ENDDO ! of DO l = 1, llmm1 240 249 c$OMP END DO 241 250 … … 279 288 c$OMP END DO NOWAIT 280 289 281 RETURN282 290 END -
trunk/LMDZ.COMMON/libf/dynlonlat_phylonlat/calfis.F
r1422 r1459 94 94 c ------------------ 95 95 96 #include "dimensions.h"97 #include "paramet.h"96 include "dimensions.h" 97 include "paramet.h" 98 98 99 99 INTEGER ngridmx 100 100 PARAMETER( ngridmx = 2+(jjm-1)*iim - 1/jjm ) 101 101 102 #include "comgeom2.h"103 #include "iniprint.h"102 include "comgeom2.h" 103 include "iniprint.h" 104 104 105 105 c Arguments : … … 259 259 call tpot2t(llm,tetamoy,tmoy,pkmoy) 260 260 c SI ON TIENT COMPTE DE LA VARIATION DE G AVEC L'ALTITUDE: 261 zlaymoy( :) = g*rad*rad/(g*rad-phimoy(:))-rad261 zlaymoy(1:llm) = g*rad*rad/(g*rad-phimoy(1:llm))-rad 262 262 zlevmoy(1) = phimoy(0)/g 263 263 DO l=2,llm -
trunk/LMDZ.COMMON/libf/dynlonlat_phylonlat/calfis_p.F
r1422 r1459 103 103 c ------------------ 104 104 105 #include "dimensions.h"106 #include "paramet.h"105 include "dimensions.h" 106 include "paramet.h" 107 107 108 108 INTEGER ngridmx 109 109 PARAMETER( ngridmx = 2+(jjm-1)*iim - 1/jjm ) 110 110 111 #include "comgeom2.h"112 #include "iniprint.h"111 include "comgeom2.h" 112 include "iniprint.h" 113 113 #ifdef CPP_MPI 114 114 include 'mpif.h' … … 348 348 call tpot2t_p(1,llm,tetamoy,tmoy,pkmoy) 349 349 c SI ON TIENT COMPTE DE LA VARIATION DE G AVEC L'ALTITUDE: 350 zlaymoy( :) = g*rad*rad/(g*rad-phimoy(:))-rad350 zlaymoy(1:llm) = g*rad*rad/(g*rad-phimoy(1:llm))-rad 351 351 zlevmoy(1) = phimoy(0)/g 352 352 DO l=2,llm
Note: See TracChangeset
for help on using the changeset viewer.