Changeset 2828
 Timestamp:
 20110812T17:36:02+02:00 (9 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

branches/2011/dev_r2802_NOCS_vvlfix/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90
r2827 r2828 188 188 INTEGER :: ji, jj, jk ! dummy loop indices 189 189 INTEGER :: iku, ikv ! local integers 190 INTEGER :: ii0, ii1, ij0, ij1 ! temporary integers 190 191 REAL(wp) :: zvt ! local scalars 191 192 !! … … 208 209 END DO 209 210 END DO 211 212 ! Correct scale factors at locations that have been individually modified in domhgr 213 ! Such modifications break the relationship between e1e2t and e1u*e2u etc. Recompute 214 ! scale factors ignoring the modified metric. 215 ! ! ===================== 216 IF( cp_cfg == "orca" .AND. jp_cfg == 2 ) THEN ! ORCA R2 configuration 217 ! ! ===================== 218 IF( nn_cla == 0 ) THEN 219 ! 220 ii0 = 139 ; ii1 = 140 ! Gibraltar Strait (e2u was modified) 221 ij0 = 102 ; ij1 = 102 222 DO jk = 1, jpkm1 ! set the before scale factors at upoints 223 DO jj = mj0(ij0), mj1(ij1) 224 DO ji = mi0(ii0), mi1(ii1) 225 zvt = fse3t_b(ji,jj,jk) * e1t(ji,jj) 226 pe3u_b(ji,jj,jk) = 0.5_wp * ( zvt + fse3t_b(ji+1,jj,jk) * e1t(ji+1,jj) ) / ( e1u(ji,jj) ) 227 END DO 228 END DO 229 END DO 230 ! 231 ii0 = 160 ; ii1 = 160 ! Bab el Mandeb (e2u and e1v were modified) 232 ij0 = 88 ; ij1 = 88 233 DO jk = 1, jpkm1 ! set the before scale factors at upoints 234 DO jj = mj0(ij0), mj1(ij1) 235 DO ji = mi0(ii0), mi1(ii1) 236 zvt = fse3t_b(ji,jj,jk) * e1t(ji,jj) 237 pe3u_b(ji,jj,jk) = 0.5_wp * ( zvt + fse3t_b(ji+1,jj,jk) * e1t(ji+1,jj) ) / ( e1u(ji,jj) ) 238 END DO 239 END DO 240 END DO 241 DO jk = 1, jpkm1 ! set the before scale factors at vpoints 242 DO jj = mj0(ij0), mj1(ij1) 243 DO ji = mi0(ii0), mi1(ii1) 244 zvt = fse3t_b(ji,jj,jk) * e2t(ji,jj) 245 pe3v_b(ji,jj,jk) = 0.5_wp * ( zvt + fse3t_b(ji,jj+1,jk) * e2t(ji,jj+1) ) / ( e2v(ji,jj) ) 246 END DO 247 END DO 248 END DO 249 ENDIF 250 251 ii0 = 145 ; ii1 = 146 ! Danish Straits (e2u was modified) 252 ij0 = 116 ; ij1 = 116 253 DO jk = 1, jpkm1 ! set the before scale factors at upoints 254 DO jj = mj0(ij0), mj1(ij1) 255 DO ji = mi0(ii0), mi1(ii1) 256 zvt = fse3t_b(ji,jj,jk) * e1t(ji,jj) 257 pe3u_b(ji,jj,jk) = 0.5_wp * ( zvt + fse3t_b(ji+1,jj,jk) * e1t(ji+1,jj) ) / ( e1u(ji,jj) ) 258 END DO 259 END DO 260 END DO 261 ! 262 ENDIF 263 ! ! ===================== 264 IF( cp_cfg == "orca" .AND. jp_cfg == 1 ) THEN ! ORCA R1 configuration 265 ! ! ===================== 266 267 ii0 = 281 ; ii1 = 282 ! Gibraltar Strait (e2u was modified) 268 ij0 = 200 ; ij1 = 200 269 DO jk = 1, jpkm1 ! set the before scale factors at upoints 270 DO jj = mj0(ij0), mj1(ij1) 271 DO ji = mi0(ii0), mi1(ii1) 272 zvt = fse3t_b(ji,jj,jk) * e1t(ji,jj) 273 pe3u_b(ji,jj,jk) = 0.5_wp * ( zvt + fse3t_b(ji+1,jj,jk) * e1t(ji+1,jj) ) / ( e1u(ji,jj) ) 274 END DO 275 END DO 276 END DO 277 278 ii0 = 314 ; ii1 = 315 ! Bhosporus Strait (e2u was modified) 279 ij0 = 208 ; ij1 = 208 280 DO jk = 1, jpkm1 ! set the before scale factors at upoints 281 DO jj = mj0(ij0), mj1(ij1) 282 DO ji = mi0(ii0), mi1(ii1) 283 zvt = fse3t_b(ji,jj,jk) * e1t(ji,jj) 284 pe3u_b(ji,jj,jk) = 0.5_wp * ( zvt + fse3t_b(ji+1,jj,jk) * e1t(ji+1,jj) ) / ( e1u(ji,jj) ) 285 END DO 286 END DO 287 END DO 288 289 ii0 = 44 ; ii1 = 44 ! Lombok Strait (e1v was modified) 290 ij0 = 124 ; ij1 = 125 291 DO jk = 1, jpkm1 ! set the before scale factors at vpoints 292 DO jj = mj0(ij0), mj1(ij1) 293 DO ji = mi0(ii0), mi1(ii1) 294 zvt = fse3t_b(ji,jj,jk) * e2t(ji,jj) 295 pe3v_b(ji,jj,jk) = 0.5_wp * ( zvt + fse3t_b(ji,jj+1,jk) * e2t(ji,jj+1) ) / ( e2v(ji,jj) ) 296 END DO 297 END DO 298 END DO 299 300 ii0 = 48 ; ii1 = 48 ! Sumba Strait (e1v was modified) [closed from bathy_11 on] 301 ij0 = 124 ; ij1 = 125 302 DO jk = 1, jpkm1 ! set the before scale factors at vpoints 303 DO jj = mj0(ij0), mj1(ij1) 304 DO ji = mi0(ii0), mi1(ii1) 305 zvt = fse3t_b(ji,jj,jk) * e2t(ji,jj) 306 pe3v_b(ji,jj,jk) = 0.5_wp * ( zvt + fse3t_b(ji,jj+1,jk) * e2t(ji,jj+1) ) / ( e2v(ji,jj) ) 307 END DO 308 END DO 309 END DO 310 311 ii0 = 53 ; ii1 = 53 ! Ombai Strait (e1v was modified) 312 ij0 = 124 ; ij1 = 125 313 DO jk = 1, jpkm1 ! set the before scale factors at vpoints 314 DO jj = mj0(ij0), mj1(ij1) 315 DO ji = mi0(ii0), mi1(ii1) 316 zvt = fse3t_b(ji,jj,jk) * e2t(ji,jj) 317 pe3v_b(ji,jj,jk) = 0.5_wp * ( zvt + fse3t_b(ji,jj+1,jk) * e2t(ji,jj+1) ) / ( e2v(ji,jj) ) 318 END DO 319 END DO 320 END DO 321 322 ii0 = 56 ; ii1 = 56 ! Timor Passage (e1v was modified) 323 ij0 = 124 ; ij1 = 125 324 DO jk = 1, jpkm1 ! set the before scale factors at vpoints 325 DO jj = mj0(ij0), mj1(ij1) 326 DO ji = mi0(ii0), mi1(ii1) 327 zvt = fse3t_b(ji,jj,jk) * e2t(ji,jj) 328 pe3v_b(ji,jj,jk) = 0.5_wp * ( zvt + fse3t_b(ji,jj+1,jk) * e2t(ji,jj+1) ) / ( e2v(ji,jj) ) 329 END DO 330 END DO 331 END DO 332 333 ii0 = 55 ; ii1 = 55 ! West Halmahera Strait (e1v was modified) 334 ij0 = 141 ; ij1 = 142 335 DO jk = 1, jpkm1 ! set the before scale factors at vpoints 336 DO jj = mj0(ij0), mj1(ij1) 337 DO ji = mi0(ii0), mi1(ii1) 338 zvt = fse3t_b(ji,jj,jk) * e2t(ji,jj) 339 pe3v_b(ji,jj,jk) = 0.5_wp * ( zvt + fse3t_b(ji,jj+1,jk) * e2t(ji,jj+1) ) / ( e2v(ji,jj) ) 340 END DO 341 END DO 342 END DO 343 344 ii0 = 58 ; ii1 = 58 ! East Halmahera Strait (e1v was modified) 345 ij0 = 141 ; ij1 = 142 346 DO jk = 1, jpkm1 ! set the before scale factors at vpoints 347 DO jj = mj0(ij0), mj1(ij1) 348 DO ji = mi0(ii0), mi1(ii1) 349 zvt = fse3t_b(ji,jj,jk) * e2t(ji,jj) 350 pe3v_b(ji,jj,jk) = 0.5_wp * ( zvt + fse3t_b(ji,jj+1,jk) * e2t(ji,jj+1) ) / ( e2v(ji,jj) ) 351 END DO 352 END DO 353 END DO 354 355 ! 356 ENDIF 357 ! ! ====================== 358 IF( cp_cfg == "orca" .AND. jp_cfg == 05 ) THEN ! ORCA R05 configuration 359 ! ! ====================== 360 ii0 = 563 ; ii1 = 564 ! Gibraltar Strait (e2u was modified) 361 ij0 = 327 ; ij1 = 327 362 DO jk = 1, jpkm1 ! set the before scale factors at upoints 363 DO jj = mj0(ij0), mj1(ij1) 364 DO ji = mi0(ii0), mi1(ii1) 365 zvt = fse3t_b(ji,jj,jk) * e1t(ji,jj) 366 pe3u_b(ji,jj,jk) = 0.5_wp * ( zvt + fse3t_b(ji+1,jj,jk) * e1t(ji+1,jj) ) / ( e1u(ji,jj) ) 367 END DO 368 END DO 369 END DO 370 ! 371 ii0 = 627 ; ii1 = 628 ! Bosphore Strait (e2u was modified) 372 ij0 = 343 ; ij1 = 343 373 DO jk = 1, jpkm1 ! set the before scale factors at upoints 374 DO jj = mj0(ij0), mj1(ij1) 375 DO ji = mi0(ii0), mi1(ii1) 376 zvt = fse3t_b(ji,jj,jk) * e1t(ji,jj) 377 pe3u_b(ji,jj,jk) = 0.5_wp * ( zvt + fse3t_b(ji+1,jj,jk) * e1t(ji+1,jj) ) / ( e1u(ji,jj) ) 378 END DO 379 END DO 380 END DO 381 ! 382 ii0 = 93 ; ii1 = 94 ! Sumba Strait (e2u was modified) 383 ij0 = 232 ; ij1 = 232 384 DO jk = 1, jpkm1 ! set the before scale factors at upoints 385 DO jj = mj0(ij0), mj1(ij1) 386 DO ji = mi0(ii0), mi1(ii1) 387 zvt = fse3t_b(ji,jj,jk) * e1t(ji,jj) 388 pe3u_b(ji,jj,jk) = 0.5_wp * ( zvt + fse3t_b(ji+1,jj,jk) * e1t(ji+1,jj) ) / ( e1u(ji,jj) ) 389 END DO 390 END DO 391 END DO 392 ! 393 ii0 = 103 ; ii1 = 103 ! Ombai Strait (e2u was modified) 394 ij0 = 232 ; ij1 = 232 395 DO jk = 1, jpkm1 ! set the before scale factors at upoints 396 DO jj = mj0(ij0), mj1(ij1) 397 DO ji = mi0(ii0), mi1(ii1) 398 zvt = fse3t_b(ji,jj,jk) * e1t(ji,jj) 399 pe3u_b(ji,jj,jk) = 0.5_wp * ( zvt + fse3t_b(ji+1,jj,jk) * e1t(ji+1,jj) ) / ( e1u(ji,jj) ) 400 END DO 401 END DO 402 END DO 403 ! 404 ii0 = 15 ; ii1 = 15 ! Palk Strait (e2u was modified) 405 ij0 = 270 ; ij1 = 270 406 DO jk = 1, jpkm1 ! set the before scale factors at upoints 407 DO jj = mj0(ij0), mj1(ij1) 408 DO ji = mi0(ii0), mi1(ii1) 409 zvt = fse3t_b(ji,jj,jk) * e1t(ji,jj) 410 pe3u_b(ji,jj,jk) = 0.5_wp * ( zvt + fse3t_b(ji+1,jj,jk) * e1t(ji+1,jj) ) / ( e1u(ji,jj) ) 411 END DO 412 END DO 413 END DO 414 ! 415 ii0 = 87 ; ii1 = 87 ! Lombok Strait (e1v was modified) 416 ij0 = 232 ; ij1 = 233 417 DO jk = 1, jpkm1 ! set the before scale factors at vpoints 418 DO jj = mj0(ij0), mj1(ij1) 419 DO ji = mi0(ii0), mi1(ii1) 420 zvt = fse3t_b(ji,jj,jk) * e2t(ji,jj) 421 pe3v_b(ji,jj,jk) = 0.5_wp * ( zvt + fse3t_b(ji,jj+1,jk) * e2t(ji,jj+1) ) / ( e2v(ji,jj) ) 422 END DO 423 END DO 424 END DO 425 ! 426 ii0 = 662 ; ii1 = 662 ! Bab el Mandeb (e1v was modified) 427 ij0 = 276 ; ij1 = 276 428 DO jk = 1, jpkm1 ! set the before scale factors at vpoints 429 DO jj = mj0(ij0), mj1(ij1) 430 DO ji = mi0(ii0), mi1(ii1) 431 zvt = fse3t_b(ji,jj,jk) * e2t(ji,jj) 432 pe3v_b(ji,jj,jk) = 0.5_wp * ( zvt + fse3t_b(ji,jj+1,jk) * e2t(ji,jj+1) ) / ( e2v(ji,jj) ) 433 END DO 434 END DO 435 END DO 436 ! 437 ENDIF 438 ! End of individual corrections to scale factors 439 210 440 IF( ln_zps ) THEN ! minimum of the e3t at partial cell level 211 441 DO jj = 2, jpjm1 … … 218 448 END DO 219 449 ENDIF 450 220 451 pe3u_b(:,:,:) = pe3u_b(:,:,:)  fse3u_0(:,:,:) ! anomaly to avoid zero along closed boundary/extra halos 221 452 pe3v_b(:,:,:) = pe3v_b(:,:,:)  fse3v_0(:,:,:)
Note: See TracChangeset
for help on using the changeset viewer.