Changeset 407
 Timestamp:
 20060320T17:19:50+01:00 (15 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/NEMO/OPA_SRC/DIA/diafwb.F90
r389 r407 68 68 !! * Local declarations 69 69 INTEGER :: ji, jj, jk, jt ! dummy loop indices 70 INTEGER :: ii0, ii1, ij0, ij1 70 71 REAL(wp) :: zarea, zvol, zwei 71 72 REAL(wp) :: ztemi(4), ztemo(4), zsali(4), zsalo(4), zflxi(4), zflxo(4) … … 137 138 END DO 138 139 IF( lk_mpp ) CALL mpp_sum( a_saln ) ! sum over the global domain 140 IF( lk_mpp ) CALL mpp_sum( zvol ) ! sum over the global domain 139 141 140 142 a_aminus = a_aminus / ( nitend  nit000 + 1 ) … … 186 188 CASE ( 4 ) ! ORCA_R4 configuration 187 189 ! ! ======================= 188 ji = mi1(70)189 jj = mj1(52)190 ii0 = 70 ; ii1 = 70 191 ij0 = 52 ; ij1 = 52 190 192 ! ! ======================= 191 193 CASE ( 2 ) ! ORCA_R2 configuration 192 194 ! ! ======================= 193 ji = mi1(139)194 jj = mj1(102)195 ii0 = 139 ; ii1 = 139 196 ij0 = 102 ; ij1 = 102 195 197 ! ! ======================= 196 198 CASE DEFAULT ! ORCA R05 or R025 … … 202 204 END SELECT 203 205 ! 204 205 DO jk = 1, 18 206 zt = 0.5 * ( tn(ji,jj,jk) + tn(ji+1,jj,jk) ) 207 zs = 0.5 * ( sn(ji,jj,jk) + sn(ji+1,jj,jk) ) 208 zu = un(ji,jj,jk) * fse3t(ji,jj,jk) * e2u(ji,jj) 209 210 IF( un(ji,jj,jk) > 0.e0 ) THEN 211 zflxi(1) = zflxi(1) + zu 212 ztemi(1) = ztemi(1) + zt*zu 213 zsali(1) = zsali(1) + zs*zu 214 ELSE 215 zflxo(1) = zflxo(1) + zu 216 ztemo(1) = ztemo(1) + zt*zu 217 zsalo(1) = zsalo(1) + zs*zu 218 ENDIF 219 END DO 206 DO ji = mi0(ii0), mi1(ii1) 207 DO jj = mj0(ij0), mj1(ij1) 208 DO jk = 1, 18 209 zt = 0.5 * ( tn(ji,jj,jk) + tn(ji+1,jj,jk) ) 210 zs = 0.5 * ( sn(ji,jj,jk) + sn(ji+1,jj,jk) ) 211 zu = un(ji,jj,jk) * fse3t(ji,jj,jk) * e2u(ji,jj) 212 213 IF( un(ji,jj,jk) > 0.e0 ) THEN 214 zflxi(1) = zflxi(1) + zu 215 ztemi(1) = ztemi(1) + zt*zu 216 zsali(1) = zsali(1) + zs*zu 217 ELSE 218 zflxo(1) = zflxo(1) + zu 219 ztemo(1) = ztemo(1) + zt*zu 220 zsalo(1) = zsalo(1) + zs*zu 221 ENDIF 222 END DO 223 END DO 224 END DO 220 225 ENDIF 221 226 … … 227 232 CASE ( 4 ) ! ORCA_R4 configuration 228 233 ! ! ======================= 229 ji = mi1(69 )230 jj = mj1(52 )234 ii0 = 69 ; ii1 = 69 235 ij0 = 52 ; ij1 = 52 231 236 ! ! ======================= 232 237 CASE ( 2 ) ! ORCA_R2 configuration 233 238 ! ! ======================= 234 ji = mi1(137)235 jj = mj1(102)239 ii0 = 137 ; ii1 = 137 240 ij0 = 102 ; ij1 = 102 236 241 ! ! ======================= 237 242 CASE DEFAULT ! ORCA R05 or R025 … … 243 248 END SELECT 244 249 ! 245 246 DO jk = 1, 23 247 zt = 0.5 * ( tn(ji,jj,jk) + tn(ji+1,jj,jk) ) 248 zs = 0.5 * ( sn(ji,jj,jk) + sn(ji+1,jj,jk) ) 249 zu = un(ji,jj,jk) * fse3t(ji,jj,jk) * e2u(ji,jj) 250 251 IF( un(ji,jj,jk) > 0.e0 ) THEN 252 zflxi(2) = zflxi(2) + zu 253 ztemi(2) = ztemi(2) + zt*zu 254 zsali(2) = zsali(2) + zs*zu 255 ELSE 256 zflxo(2) = zflxo(2) + zu 257 ztemo(2) = ztemo(2) + zt*zu 258 zsalo(2) = zsalo(2) + zs*zu 259 ENDIF 260 END DO 250 DO ji = mi0(ii0), mi1(ii1) 251 DO jj = mj0(ij0), mj1(ij1) 252 DO jk = 1, 23 253 zt = 0.5 * ( tn(ji,jj,jk) + tn(ji+1,jj,jk) ) 254 zs = 0.5 * ( sn(ji,jj,jk) + sn(ji+1,jj,jk) ) 255 zu = un(ji,jj,jk) * fse3t(ji,jj,jk) * e2u(ji,jj) 256 257 IF( un(ji,jj,jk) > 0.e0 ) THEN 258 zflxi(2) = zflxi(2) + zu 259 ztemi(2) = ztemi(2) + zt*zu 260 zsali(2) = zsali(2) + zs*zu 261 ELSE 262 zflxo(2) = zflxo(2) + zu 263 ztemo(2) = ztemo(2) + zt*zu 264 zsalo(2) = zsalo(2) + zs*zu 265 ENDIF 266 END DO 267 END DO 268 END DO 261 269 ENDIF 262 270 … … 268 276 CASE ( 4 ) ! ORCA_R4 configuration 269 277 ! ! ======================= 270 ji = mi1(83 )271 jj = mj1(45 )278 ii0 = 83 ; ii1 = 83 279 ij0 = 45 ; ij1 = 45 272 280 ! ! ======================= 273 281 CASE ( 2 ) ! ORCA_R2 configuration 274 282 ! ! ======================= 275 ji = mi1(161)276 jj = mj1( 88)283 ii0 = 161 ; ii1 = 161 284 ij0 = 88 ; ij1 = 88 277 285 ! ! ======================= 278 286 CASE DEFAULT ! ORCA R05 or R025 … … 284 292 END SELECT 285 293 ! 286 287 DO jk = 1, 15 288 zt = 0.5 * ( tn(ji,jj,jk) + tn(ji+1,jj,jk) ) 289 zs = 0.5 * ( sn(ji,jj,jk) + sn(ji+1,jj,jk) ) 290 zu = un(ji,jj,jk) * fse3t(ji,jj,jk) * e2u(ji,jj) 291 292 IF( un(ji,jj,jk) > 0.e0 ) THEN 293 zflxi(3) = zflxi(3) + zu 294 ztemi(3) = ztemi(3) + zt*zu 295 zsali(3) = zsali(3) + zs*zu 296 ELSE 297 zflxo(3) = zflxo(3) + zu 298 ztemo(3) = ztemo(3) + zt*zu 299 zsalo(3) = zsalo(3) + zs*zu 300 ENDIF 301 END DO 294 DO ji = mi0(ii0), mi1(ii1) 295 DO jj = mj0(ij0), mj1(ij1) 296 DO jk = 1, 15 297 zt = 0.5 * ( tn(ji,jj,jk) + tn(ji+1,jj,jk) ) 298 zs = 0.5 * ( sn(ji,jj,jk) + sn(ji+1,jj,jk) ) 299 zu = un(ji,jj,jk) * fse3t(ji,jj,jk) * e2u(ji,jj) 300 301 IF( un(ji,jj,jk) > 0.e0 ) THEN 302 zflxi(3) = zflxi(3) + zu 303 ztemi(3) = ztemi(3) + zt*zu 304 zsali(3) = zsali(3) + zs*zu 305 ELSE 306 zflxo(3) = zflxo(3) + zu 307 ztemo(3) = ztemo(3) + zt*zu 308 zsalo(3) = zsalo(3) + zs*zu 309 ENDIF 310 END DO 311 END DO 312 END DO 302 313 ENDIF 303 314 … … 309 320 CASE ( 4 ) ! ORCA_R4 configuration 310 321 ! ! ======================= 311 ji = 1 ! Not in the domain312 jj =1322 ii0 = 1 ; ii1 = 1 323 ij0 = 1 ; ij1 = 1 313 324 ! ! ======================= 314 325 CASE ( 2 ) ! ORCA_R2 configuration 315 326 ! ! ======================= 316 ji = mi1(146)317 jj = mj1(116)327 ii0 = 146 ; ii1 = 146 328 ij0 = 116 ; ij1 = 116 318 329 ! ! ======================= 319 330 CASE DEFAULT ! ORCA R05 or R025 … … 325 336 END SELECT 326 337 ! 327 328 DO jk = 1, 20 329 zt = 0.5 * ( tn(ji,jj,jk) + tn(ji+1,jj,jk) ) 330 zs = 0.5 * ( sn(ji,jj,jk) + sn(ji+1,jj,jk) ) 331 zu = un(ji,jj,jk) * fse3t(ji,jj,jk) * e2u(ji,jj) 332 333 IF( un(ji,jj,jk) > 0.e0 ) THEN 334 zflxi(4) = zflxi(4) + zu 335 ztemi(4) = ztemi(4) + zt*zu 336 zsali(4) = zsali(4) + zs*zu 337 ELSE 338 zflxo(4) = zflxo(4) + zu 339 ztemo(4) = ztemo(4) + zt*zu 340 zsalo(4) = zsalo(4) + zs*zu 341 ENDIF 342 END DO 338 DO ji = mi0(ii0), mi1(ii1) 339 DO jj = mj0(ij0), mj1(ij1) 340 DO jk = 1, 20 341 zt = 0.5 * ( tn(ji,jj,jk) + tn(ji+1,jj,jk) ) 342 zs = 0.5 * ( sn(ji,jj,jk) + sn(ji+1,jj,jk) ) 343 zu = un(ji,jj,jk) * fse3t(ji,jj,jk) * e2u(ji,jj) 344 345 IF( un(ji,jj,jk) > 0.e0 ) THEN 346 zflxi(4) = zflxi(4) + zu 347 ztemi(4) = ztemi(4) + zt*zu 348 zsali(4) = zsali(4) + zs*zu 349 ELSE 350 zflxo(4) = zflxo(4) + zu 351 ztemo(4) = ztemo(4) + zt*zu 352 zsalo(4) = zsalo(4) + zs*zu 353 ENDIF 354 END DO 355 END DO 356 END DO 343 357 ENDIF 344 358 … … 364 378 a_salo(jt) = a_salo(jt) / FLOAT( nitend  nit000 + 1 ) 365 379 END DO 380 IF( lk_mpp ) THEN 381 CALL mpp_sum( a_flxi, 4 ) ! sum over the global domain 382 CALL mpp_sum( a_temi, 4 ) ! sum over the global domain 383 CALL mpp_sum( a_sali, 4 ) ! sum over the global domain 384 385 CALL mpp_sum( a_flxo, 4 ) ! sum over the global domain 386 CALL mpp_sum( a_temo, 4 ) ! sum over the global domain 387 CALL mpp_sum( a_salo, 4 ) ! sum over the global domain 388 ENDIF 366 389 ENDIF 367 390
Note: See TracChangeset
for help on using the changeset viewer.