- Timestamp:
- 2016-10-18T15:32:04+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2016/dev_r6519_HPC_4/NEMOGCM/NEMO/LIM_SRC_2/limsbc_2.F90
r6140 r7037 128 128 !------------------------------------------! 129 129 130 !$OMP PARALLEL 131 !$OMP WORKSHARE 130 132 zqnsoce(:,:) = qns(:,:) 133 !$OMP END WORKSHARE NOWAIT 134 !$OMP DO schedule(static) private(jj,ji,zinda,ifvt,i1mfr,idfr,iflt,ial,iadv,ifral,ifrdv,zqsr,zqns,zqhc,zemp,zemp_snw,zfmm,zfsalt,zcd) 131 135 DO jj = 1, jpj 132 136 DO ji = 1, jpi … … 229 233 END DO 230 234 END DO 235 !$OMP END DO NOWAIT 236 !$OMP END PARALLEL 231 237 ! !------------------------------------------! 232 238 ! ! mass of snow and ice per unit area ! 233 239 ! !------------------------------------------! 234 240 IF( nn_ice_embd /= 0 ) THEN ! embedded sea-ice (mass required) 241 !$OMP PARALLEL WORKSHARE 235 242 snwice_mass_b(:,:) = snwice_mass(:,:) ! save mass from the previous ice time step 236 243 ! ! new mass per unit area … … 238 245 ! ! time evolution of snow+ice mass 239 246 snwice_fmass (:,:) = ( snwice_mass(:,:) - snwice_mass_b(:,:) ) / rdt_ice 247 !$OMP END PARALLEL WORKSHARE 240 248 ENDIF 241 249 … … 253 261 254 262 IF( ln_cpl) THEN 263 !$OMP PARALLEL WORKSHARE 255 264 tn_ice(:,:,1) = sist(:,:) ! sea-ice surface temperature 256 265 ht_i(:,:,1) = hicif(:,:) 257 266 ht_s(:,:,1) = hsnif(:,:) 258 267 a_i(:,:,1) = fr_i(:,:) 268 !$OMP END PARALLEL WORKSHARE 259 269 ! ! Computation of snow/ice and ocean albedo 260 270 CALL albedo_ice( tn_ice, ht_i, ht_s, zalbp, zalb ) 271 !$OMP PARALLEL WORKSHARE 261 272 alb_ice(:,:,1) = 0.5 * ( zalbp(:,:,1) + zalb (:,:,1) ) ! Ice albedo (mean clear and overcast skys) 273 !$OMP END PARALLEL WORKSHARE 262 274 IF( iom_use('icealb_cea' ) ) CALL iom_put( 'icealb_cea', alb_ice(:,:,1) * fr_i(:,:) ) ! ice albedo 263 275 ENDIF … … 320 332 IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN !== Ice time-step only ==! (i.e. surface module time-step) 321 333 ! 334 !$OMP PARALLEL 335 !$OMP DO schedule(static) private(jj,ji,zu_i,zv_i) 322 336 DO jj = 1, jpj !* modulus of ice-ocean relative velocity at I-point 323 337 DO ji = 1, jpi … … 327 341 END DO 328 342 END DO 343 !$OMP DO schedule(static) private(jj,ji,zumt) 329 344 DO jj = 1, jpjm1 !* update the modulus of stress at ocean surface (T-point) 330 345 DO ji = 1, jpim1 ! NO vector opt. … … 336 351 END DO 337 352 END DO 353 !$OMP END DO NOWAIT 354 !$OMP END PARALLEL 338 355 CALL lbc_lnk( taum, 'T', 1. ) 339 356 ! 357 !$OMP PARALLEL WORKSHARE 340 358 utau_oce(:,:) = utau(:,:) !* save the air-ocean stresses at ice time-step 341 359 vtau_oce(:,:) = vtau(:,:) 360 !$OMP END PARALLEL WORKSHARE 342 361 ! 343 362 ENDIF … … 346 365 ! 347 366 ! !* ice/ocean stress WITH a ice-ocean rotation angle at I-point 367 !$OMP PARALLEL 368 !$OMP DO schedule(static) private(jj,ji,zsang,zu_i,zv_i,zmodi) 348 369 DO jj = 2, jpj 349 370 zsang = SIGN( 1._wp, gphif(1,jj) ) * sangvg ! change the cosine angle sign in the SH … … 359 380 END DO 360 381 ! !* surface ocean stresses at u- and v-points 382 !$OMP DO schedule(static) private(jj,ji,zutau_ice,zvtau_ice,zfrldu,zfrldv) 361 383 DO jj = 2, jpjm1 362 384 DO ji = 2, jpim1 ! NO vector opt. … … 372 394 END DO 373 395 END DO 396 !$OMP END DO NOWAIT 397 !$OMP END PARALLEL 374 398 CALL lbc_lnk( utau, 'U', -1. ) ; CALL lbc_lnk( vtau, 'V', -1. ) ! lateral boundary condition 375 399 ! … … 381 405 IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN !== Ice time-step only ==! (i.e. surface module time-step) 382 406 ! 407 !$OMP PARALLEL DO schedule(static) private(jj,ji,zu_t,zv_t,zmodt) 383 408 DO jj = 2, jpjm1 !* modulus of the ice-ocean velocity at T-point 384 409 DO ji = fs_2, fs_jpim1 … … 393 418 CALL lbc_lnk( taum, 'T', 1. ) ; CALL lbc_lnk( tmod_io, 'T', 1. ) 394 419 ! 420 !$OMP PARALLEL WORKSHARE 395 421 utau_oce(:,:) = utau(:,:) !* save the air-ocean stresses at ice time-step 396 422 vtau_oce(:,:) = vtau(:,:) 423 !$OMP END PARALLEL WORKSHARE 397 424 ! 398 425 ENDIF … … 400 427 ! !== at each ocean time-step ==! 401 428 ! 429 !$OMP PARALLEL DO schedule(static) private(jj,ji,zutau_ice,zvtau_ice,zfrldu,zfrldv) 402 430 DO jj = 2, jpjm1 !* ice stress over ocean WITHOUT a ice-ocean rotation angle 403 431 DO ji = fs_2, fs_jpim1 … … 435 463 !! ** input : Namelist namicedia 436 464 !!------------------------------------------------------------------- 437 INTEGER :: jk ! local integer465 INTEGER :: jk,jj,ji ! local integer 438 466 !!------------------------------------------------------------------- 439 467 ! … … 447 475 r1_rdtice = 1._wp / rdt_ice 448 476 ! 477 !$OMP PARALLEL WORKSHARE 449 478 soce_0(:,:) = soce ! constant SSS and ice salinity used in levitating sea-ice case 450 479 sice_0(:,:) = sice 480 !$OMP END PARALLEL WORKSHARE 451 481 ! 452 482 IF( cp_cfg == "orca" ) THEN ! decrease ocean & ice reference salinities in the Baltic sea … … 459 489 ! ! embedded sea ice 460 490 IF( nn_ice_embd /= 0 ) THEN ! mass exchanges between ice and ocean (case 1 or 2) set the snow+ice mass 491 !$OMP PARALLEL WORKSHARE 461 492 snwice_mass (:,:) = tms(:,:) * ( rhosn * hsnif(:,:) + rhoic * hicif(:,:) ) * ( 1.0 - frld(:,:) ) 462 493 snwice_mass_b(:,:) = snwice_mass(:,:) 494 !$OMP END PARALLEL WORKSHARE 463 495 ELSE 496 !$OMP PARALLEL WORKSHARE 464 497 snwice_mass (:,:) = 0.e0 ! no mass exchanges 465 498 snwice_mass_b(:,:) = 0.e0 ! no mass exchanges 466 499 snwice_fmass (:,:) = 0.e0 ! no mass exchanges 500 !$OMP END PARALLEL WORKSHARE 467 501 ENDIF 468 502 IF( nn_ice_embd == 2 .AND. & ! full embedment (case 2) & no restart : 469 503 & .NOT.ln_rstart ) THEN ! deplete the initial ssh below sea-ice area 504 !$OMP PARALLEL WORKSHARE 470 505 sshn(:,:) = sshn(:,:) - snwice_mass(:,:) * r1_rau0 471 506 sshb(:,:) = sshb(:,:) - snwice_mass(:,:) * r1_rau0 507 !$OMP END PARALLEL WORKSHARE 472 508 !!gm I really don't like this staff here... Find a way to put that elsewhere or differently 473 509 !!gm 474 510 IF( .NOT.ln_linssh ) THEN 475 511 512 !$OMP PARALLEL 513 !$OMP DO schedule(static) private(jk) 476 514 do jk = 1,jpkm1 ! adjust initial vertical scale factors 477 515 e3t_n(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshn(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) ) 478 516 e3t_b(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshb(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) ) 479 517 end do 518 !$OMP WORKSHARE 480 519 e3t_a(:,:,:) = e3t_b(:,:,:) 520 !$OMP END WORKSHARE NOWAIT 521 !$OMP END PARALLEL 481 522 ! Reconstruction of all vertical scale factors at now and before time steps 482 523 ! ! Horizontal scale factor interpolations … … 493 534 CALL dom_vvl_interpol( e3v_b(:,:,:), e3vw_b(:,:,:), 'VW' ) 494 535 ! ! t- and w- points depth 536 !$OMP PARALLEL 537 !$OMP WORKSHARE 495 538 gdept_n(:,:,1) = 0.5_wp * e3w_n(:,:,1) 496 539 gdepw_n(:,:,1) = 0.0_wp 497 540 gde3w_n(:,:,1) = gdept_n(:,:,1) - sshn(:,:) 541 !$OMP END WORKSHARE 498 542 DO jk = 2, jpk 499 gdept_n(:,:,jk) = gdept_n(:,:,jk-1) + e3w_n(:,:,jk) 500 gdepw_n(:,:,jk) = gdepw_n(:,:,jk-1) + e3t_n(:,:,jk-1) 501 gde3w_n(:,:,jk) = gdept_n(:,:,jk ) - sshn (:,:) 502 END DO 543 !$OMP DO schedule(static) private(jj,ji) 544 DO jj = 1, jpj 545 DO ji = 1, jpi 546 gdept_n(ji,jj,jk) = gdept_n(ji,jj,jk-1) + e3w_n(ji,jj,jk) 547 gdepw_n(ji,jj,jk) = gdepw_n(ji,jj,jk-1) + e3t_n(ji,jj,jk-1) 548 gde3w_n(ji,jj,jk) = gdept_n(ji,jj,jk ) - sshn (ji,jj) 549 END DO 550 END DO 551 !$OMP END DO NOWAIT 552 END DO 553 !$OMP END PARALLEL 503 554 ENDIF 504 555 !!gm end
Note: See TracChangeset
for help on using the changeset viewer.