New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 7037 for branches/2016/dev_r6519_HPC_4/NEMOGCM/NEMO/LIM_SRC_2/limsbc_2.F90 – NEMO

Ignore:
Timestamp:
2016-10-18T15:32:04+02:00 (7 years ago)
Author:
mocavero
Message:

ORCA2_LIM_PISCES hybrid version update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2016/dev_r6519_HPC_4/NEMOGCM/NEMO/LIM_SRC_2/limsbc_2.F90

    r6140 r7037  
    128128      !------------------------------------------! 
    129129 
     130!$OMP PARALLEL 
     131!$OMP WORKSHARE 
    130132      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)  
    131135      DO jj = 1, jpj 
    132136         DO ji = 1, jpi 
     
    229233         END DO 
    230234      END DO 
     235!$OMP END DO NOWAIT 
     236!$OMP END PARALLEL 
    231237      !                                !------------------------------------------! 
    232238      !                                !    mass of snow and ice per unit area    ! 
    233239      !                                !------------------------------------------! 
    234240      IF( nn_ice_embd /= 0 ) THEN      ! embedded sea-ice (mass required) 
     241!$OMP PARALLEL WORKSHARE 
    235242         snwice_mass_b(:,:) = snwice_mass(:,:)                  ! save mass from the previous ice time step 
    236243         !                                                      ! new mass per unit area 
     
    238245         !                                                      ! time evolution of snow+ice mass 
    239246         snwice_fmass (:,:) = ( snwice_mass(:,:) - snwice_mass_b(:,:) ) / rdt_ice 
     247!$OMP END PARALLEL WORKSHARE 
    240248      ENDIF 
    241249 
     
    253261 
    254262      IF( ln_cpl) THEN 
     263!$OMP PARALLEL WORKSHARE 
    255264         tn_ice(:,:,1) = sist(:,:)          ! sea-ice surface temperature        
    256265         ht_i(:,:,1) = hicif(:,:) 
    257266         ht_s(:,:,1) = hsnif(:,:) 
    258267         a_i(:,:,1) = fr_i(:,:) 
     268!$OMP END PARALLEL WORKSHARE 
    259269         !                                  ! Computation of snow/ice and ocean albedo 
    260270         CALL albedo_ice( tn_ice, ht_i, ht_s, zalbp, zalb ) 
     271!$OMP PARALLEL WORKSHARE 
    261272         alb_ice(:,:,1) =  0.5 * ( zalbp(:,:,1) + zalb (:,:,1) )   ! Ice albedo (mean clear and overcast skys) 
     273!$OMP END PARALLEL WORKSHARE 
    262274         IF( iom_use('icealb_cea' ) )   CALL iom_put( 'icealb_cea', alb_ice(:,:,1) * fr_i(:,:) )  ! ice albedo 
    263275      ENDIF 
     
    320332         IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN     !==  Ice time-step only  ==! (i.e. surface module time-step) 
    321333            ! 
     334!$OMP PARALLEL 
     335!$OMP DO schedule(static) private(jj,ji,zu_i,zv_i)  
    322336            DO jj = 1, jpj                               !* modulus of ice-ocean relative velocity at I-point 
    323337               DO ji = 1, jpi 
     
    327341               END DO 
    328342            END DO 
     343!$OMP DO schedule(static) private(jj,ji,zumt)  
    329344            DO jj = 1, jpjm1                             !* update the modulus of stress at ocean surface (T-point) 
    330345               DO ji = 1, jpim1   ! NO vector opt. 
     
    336351               END DO 
    337352            END DO 
     353!$OMP END DO NOWAIT 
     354!$OMP END PARALLEL 
    338355            CALL lbc_lnk( taum, 'T', 1. ) 
    339356            ! 
     357!$OMP PARALLEL WORKSHARE 
    340358            utau_oce(:,:) = utau(:,:)                    !* save the air-ocean stresses at ice time-step 
    341359            vtau_oce(:,:) = vtau(:,:) 
     360!$OMP END PARALLEL WORKSHARE 
    342361            ! 
    343362         ENDIF 
     
    346365         ! 
    347366         !                                               !* 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)  
    348369         DO jj = 2, jpj 
    349370            zsang  = SIGN( 1._wp, gphif(1,jj) ) * sangvg          ! change the cosine angle sign in the SH  
     
    359380         END DO 
    360381         !                                               !* surface ocean stresses at u- and v-points 
     382!$OMP DO schedule(static) private(jj,ji,zutau_ice,zvtau_ice,zfrldu,zfrldv)  
    361383         DO jj = 2, jpjm1 
    362384            DO ji = 2, jpim1   ! NO vector opt. 
     
    372394            END DO 
    373395         END DO 
     396!$OMP END DO NOWAIT 
     397!$OMP END PARALLEL 
    374398         CALL lbc_lnk( utau, 'U', -1. )   ;   CALL lbc_lnk( vtau, 'V', -1. )     ! lateral boundary condition 
    375399         ! 
     
    381405         IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN     !==  Ice time-step only  ==! (i.e. surface module time-step) 
    382406            ! 
     407!$OMP PARALLEL DO schedule(static) private(jj,ji,zu_t,zv_t,zmodt)  
    383408            DO jj = 2, jpjm1                          !* modulus of the ice-ocean velocity at T-point 
    384409               DO ji = fs_2, fs_jpim1 
     
    393418            CALL lbc_lnk( taum, 'T', 1. )   ;   CALL lbc_lnk( tmod_io, 'T', 1. ) 
    394419            ! 
     420!$OMP PARALLEL WORKSHARE 
    395421            utau_oce(:,:) = utau(:,:)                 !* save the air-ocean stresses at ice time-step 
    396422            vtau_oce(:,:) = vtau(:,:) 
     423!$OMP END PARALLEL WORKSHARE 
    397424            ! 
    398425         ENDIF 
     
    400427         !                                        !==  at each ocean time-step  ==! 
    401428         ! 
     429!$OMP PARALLEL DO schedule(static) private(jj,ji,zutau_ice,zvtau_ice,zfrldu,zfrldv)  
    402430         DO jj = 2, jpjm1                             !* ice stress over ocean WITHOUT a ice-ocean rotation angle 
    403431            DO ji = fs_2, fs_jpim1 
     
    435463      !! ** input   : Namelist namicedia 
    436464      !!------------------------------------------------------------------- 
    437       INTEGER ::   jk   ! local integer 
     465      INTEGER ::   jk,jj,ji   ! local integer 
    438466      !!------------------------------------------------------------------- 
    439467      ! 
     
    447475      r1_rdtice = 1._wp / rdt_ice 
    448476      ! 
     477!$OMP PARALLEL WORKSHARE 
    449478      soce_0(:,:) = soce                     ! constant SSS and ice salinity used in levitating sea-ice case 
    450479      sice_0(:,:) = sice 
     480!$OMP END PARALLEL WORKSHARE 
    451481      ! 
    452482      IF( cp_cfg == "orca" ) THEN            ! decrease ocean & ice reference salinities in the Baltic sea  
     
    459489      !                                      ! embedded sea ice 
    460490      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 
    461492         snwice_mass  (:,:) = tms(:,:) * ( rhosn * hsnif(:,:) + rhoic * hicif(:,:)  ) * ( 1.0 - frld(:,:) ) 
    462493         snwice_mass_b(:,:) = snwice_mass(:,:) 
     494!$OMP END PARALLEL WORKSHARE 
    463495      ELSE 
     496!$OMP PARALLEL WORKSHARE 
    464497         snwice_mass  (:,:) = 0.e0           ! no mass exchanges 
    465498         snwice_mass_b(:,:) = 0.e0           ! no mass exchanges 
    466499         snwice_fmass (:,:) = 0.e0           ! no mass exchanges 
     500!$OMP END PARALLEL WORKSHARE 
    467501      ENDIF 
    468502      IF( nn_ice_embd == 2 .AND.          &  ! full embedment (case 2) & no restart :  
    469503         &   .NOT.ln_rstart ) THEN           ! deplete the initial ssh below sea-ice area 
     504!$OMP PARALLEL WORKSHARE 
    470505         sshn(:,:) = sshn(:,:) - snwice_mass(:,:) * r1_rau0 
    471506         sshb(:,:) = sshb(:,:) - snwice_mass(:,:) * r1_rau0 
     507!$OMP END PARALLEL WORKSHARE 
    472508!!gm I really don't like this staff here...  Find a way to put that elsewhere or differently 
    473509!!gm 
    474510         IF( .NOT.ln_linssh ) THEN 
    475511 
     512!$OMP PARALLEL 
     513!$OMP DO schedule(static) private(jk) 
    476514            do jk = 1,jpkm1                     ! adjust initial vertical scale factors 
    477515               e3t_n(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshn(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) ) 
    478516               e3t_b(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshb(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) ) 
    479517            end do 
     518!$OMP WORKSHARE 
    480519            e3t_a(:,:,:) = e3t_b(:,:,:) 
     520!$OMP END WORKSHARE NOWAIT 
     521!$OMP END PARALLEL 
    481522            ! Reconstruction of all vertical scale factors at now and before time steps 
    482523            !        ! Horizontal scale factor interpolations 
     
    493534            CALL dom_vvl_interpol( e3v_b(:,:,:), e3vw_b(:,:,:), 'VW' ) 
    494535            !        ! t- and w- points depth 
     536!$OMP PARALLEL 
     537!$OMP WORKSHARE 
    495538            gdept_n(:,:,1) = 0.5_wp * e3w_n(:,:,1) 
    496539            gdepw_n(:,:,1) = 0.0_wp 
    497540            gde3w_n(:,:,1) = gdept_n(:,:,1) - sshn(:,:) 
     541!$OMP END WORKSHARE 
    498542            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 
    503554         ENDIF 
    504555!!gm end 
Note: See TracChangeset for help on using the changeset viewer.