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 13899 for NEMO/branches/2020/tickets_icb_1900/src/OCE/DYN/dynspg_ts.F90 – NEMO

Ignore:
Timestamp:
2020-11-27T17:26:33+01:00 (4 years ago)
Author:
mathiot
Message:

ticket #1900: update branch to trunk and add ICB test case

Location:
NEMO/branches/2020/tickets_icb_1900
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/tickets_icb_1900

    • Property svn:externals
      •  

        old new  
        22^/utils/build/makenemo@HEAD   makenemo 
        33^/utils/build/mk@HEAD         mk 
        4 ^/utils/tools/@HEAD           tools 
         4^/utils/tools@HEAD            tools 
        55^/vendors/AGRIF/dev_r12970_AGRIF_CMEMS      ext/AGRIF 
        66^/vendors/FCM@HEAD            ext/FCM 
         
        88 
        99# SETTE 
        10 ^/utils/CI/sette@12931        sette 
         10^/utils/CI/sette@13559        sette 
  • NEMO/branches/2020/tickets_icb_1900/src/OCE/DYN/dynspg_ts.F90

    r13237 r13899  
    264264         IF( ln_wd_il ) THEN                       ! W/D : limiter applied to spgspg 
    265265            CALL wad_spg( pssh(:,:,Kmm), zcpx, zcpy )          ! Calculating W/D gravity filters, zcpx and zcpy 
    266             DO_2D_00_00 
     266            DO_2D( 0, 0, 0, 0 )                                ! SPG with the application of W/D gravity filters 
    267267               zu_trd(ji,jj) = zu_trd(ji,jj) - grav * ( pssh(ji+1,jj  ,Kmm) - pssh(ji  ,jj ,Kmm) )   & 
    268268                  &                          * r1_e1u(ji,jj) * zcpx(ji,jj)  * wdrampu(ji,jj)  !jth 
     
    271271            END_2D 
    272272         ELSE                                      ! now suface pressure gradient 
    273             DO_2D_00_00 
     273            DO_2D( 0, 0, 0, 0 ) 
    274274               zu_trd(ji,jj) = zu_trd(ji,jj) - grav * (  pssh(ji+1,jj  ,Kmm) - pssh(ji  ,jj  ,Kmm)  ) * r1_e1u(ji,jj) 
    275275               zv_trd(ji,jj) = zv_trd(ji,jj) - grav * (  pssh(ji  ,jj+1,Kmm) - pssh(ji  ,jj  ,Kmm)  ) * r1_e2v(ji,jj)  
     
    279279      ENDIF 
    280280      ! 
    281       DO_2D_00_00 
     281      DO_2D( 0, 0, 0, 0 )                          ! Remove coriolis term (and possibly spg) from barotropic trend 
    282282          zu_frc(ji,jj) = zu_frc(ji,jj) - zu_trd(ji,jj) * ssumask(ji,jj) 
    283283          zv_frc(ji,jj) = zv_frc(ji,jj) - zv_trd(ji,jj) * ssvmask(ji,jj) 
     
    291291      IF( ln_apr_dyn ) THEN 
    292292         IF( ln_bt_fw ) THEN                          ! FORWARD integration: use kt+1/2 pressure (NOW+1/2) 
    293             DO_2D_00_00 
     293            DO_2D( 0, 0, 0, 0 ) 
    294294               zu_frc(ji,jj) = zu_frc(ji,jj) + grav * (  ssh_ib (ji+1,jj  ) - ssh_ib (ji,jj) ) * r1_e1u(ji,jj) 
    295295               zv_frc(ji,jj) = zv_frc(ji,jj) + grav * (  ssh_ib (ji  ,jj+1) - ssh_ib (ji,jj) ) * r1_e2v(ji,jj) 
     
    297297         ELSE                                         ! CENTRED integration: use kt-1/2 + kt+1/2 pressure (NOW) 
    298298            zztmp = grav * r1_2 
    299             DO_2D_00_00 
     299            DO_2D( 0, 0, 0, 0 ) 
    300300               zu_frc(ji,jj) = zu_frc(ji,jj) + zztmp * (  ssh_ib (ji+1,jj  ) - ssh_ib (ji,jj)  & 
    301301                    &                                   + ssh_ibb(ji+1,jj  ) - ssh_ibb(ji,jj)  ) * r1_e1u(ji,jj) 
     
    309309      !                                   !  ----------------------------------  ! 
    310310      IF( ln_bt_fw ) THEN                        ! Add wind forcing 
    311          DO_2D_00_00 
     311         DO_2D( 0, 0, 0, 0 ) 
    312312            zu_frc(ji,jj) =  zu_frc(ji,jj) + r1_rho0 * utau(ji,jj) * r1_hu(ji,jj,Kmm) 
    313313            zv_frc(ji,jj) =  zv_frc(ji,jj) + r1_rho0 * vtau(ji,jj) * r1_hv(ji,jj,Kmm) 
     
    315315      ELSE 
    316316         zztmp = r1_rho0 * r1_2 
    317          DO_2D_00_00 
     317         DO_2D( 0, 0, 0, 0 ) 
    318318            zu_frc(ji,jj) =  zu_frc(ji,jj) + zztmp * ( utau_b(ji,jj) + utau(ji,jj) ) * r1_hu(ji,jj,Kmm) 
    319319            zv_frc(ji,jj) =  zv_frc(ji,jj) + zztmp * ( vtau_b(ji,jj) + vtau(ji,jj) ) * r1_hv(ji,jj,Kmm) 
     
    475475            ! 
    476476            !                          ! ocean u- and v-depth at mid-step   (separate DO-loops remove the need of a lbc_lnk) 
    477             DO_2D_11_10 
     477            DO_2D( 1, 1, 1, 0 )   ! not jpi-column 
    478478               zhup2_e(ji,jj) = hu_0(ji,jj) + r1_2 * r1_e1e2u(ji,jj)                        & 
    479479                    &                              * (  e1e2t(ji  ,jj) * zsshp2_e(ji  ,jj)  & 
    480480                    &                                 + e1e2t(ji+1,jj) * zsshp2_e(ji+1,jj)  ) * ssumask(ji,jj) 
    481481            END_2D 
    482             DO_2D_10_11 
     482            DO_2D( 1, 0, 1, 1 )   ! not jpj-row 
    483483               zhvp2_e(ji,jj) = hv_0(ji,jj) + r1_2 * r1_e1e2v(ji,jj)                        & 
    484484                    &                              * (  e1e2t(ji,jj  ) * zsshp2_e(ji,jj  )  & 
     
    515515         !--        ssh    =  ssh   - delta_t' * [ frc + div( flux      ) ]      --! 
    516516         !-------------------------------------------------------------------------! 
    517          DO_2D_00_00 
     517         DO_2D( 0, 0, 0, 0 ) 
    518518            zhdiv = (   zhU(ji,jj) - zhU(ji-1,jj) + zhV(ji,jj) - zhV(ji,jj-1)   ) * r1_e1e2t(ji,jj) 
    519519            ssha_e(ji,jj) = (  sshn_e(ji,jj) - rDt_e * ( zssh_frc(ji,jj) + zhdiv )  ) * ssmask(ji,jj) 
    520520         END_2D 
     521         ! 
     522         CALL lbc_lnk_multi( 'dynspg_ts', ssha_e, 'T', 1._wp,  zhU, 'U', -1._wp,  zhV, 'V', -1._wp ) 
    521523         ! 
    522524         ! Duplicate sea level across open boundaries (this is only cosmetic if linssh=T) 
     
    525527         IF( .NOT.Agrif_Root() )   CALL agrif_ssh_ts( jn ) 
    526528#endif 
    527  
    528          CALL lbc_lnk_multi( 'dynspg_ts', ssha_e, 'T', 1._wp,  zhU, 'U', -1._wp,  zhV, 'V', -1._wp ) 
    529529         ! 
    530530         !                             ! Sum over sub-time-steps to compute advective velocities 
     
    541541         ! Sea Surface Height at u-,v-points (vvl case only) 
    542542         IF( .NOT.ln_linssh ) THEN                                 
    543             DO_2D_00_00 
     543            DO_2D( 0, 0, 0, 0 ) 
    544544               zsshu_a(ji,jj) = r1_2 * ssumask(ji,jj) * r1_e1e2u(ji,jj)    & 
    545545                  &              * ( e1e2t(ji  ,jj  )  * ssha_e(ji  ,jj  ) & 
     
    561561         !                             ! Surface pressure gradient 
    562562         zldg = ( 1._wp - rn_scal_load ) * grav    ! local factor 
    563          DO_2D_00_00 
     563         DO_2D( 0, 0, 0, 0 ) 
    564564            zu_spg(ji,jj) = - zldg * ( zsshp2_e(ji+1,jj) - zsshp2_e(ji,jj) ) * r1_e1u(ji,jj) 
    565565            zv_spg(ji,jj) = - zldg * ( zsshp2_e(ji,jj+1) - zsshp2_e(ji,jj) ) * r1_e2v(ji,jj) 
     
    579579         ! Add tidal astronomical forcing if defined 
    580580         IF ( ln_tide .AND. ln_tide_pot ) THEN 
    581             DO_2D_00_00 
     581            DO_2D( 0, 0, 0, 0 ) 
    582582               zu_trd(ji,jj) = zu_trd(ji,jj) + grav * ( pot_astro(ji+1,jj) - pot_astro(ji,jj) ) * r1_e1u(ji,jj) 
    583583               zv_trd(ji,jj) = zv_trd(ji,jj) + grav * ( pot_astro(ji,jj+1) - pot_astro(ji,jj) ) * r1_e2v(ji,jj) 
     
    588588!jth do implicitly instead 
    589589         IF ( .NOT. ll_wd ) THEN ! Revert to explicit for bit comparison tests in non wad runs 
    590             DO_2D_00_00 
     590            DO_2D( 0, 0, 0, 0 ) 
    591591               zu_trd(ji,jj) = zu_trd(ji,jj) + zCdU_u(ji,jj) * un_e(ji,jj) * hur_e(ji,jj) 
    592592               zv_trd(ji,jj) = zv_trd(ji,jj) + zCdU_v(ji,jj) * vn_e(ji,jj) * hvr_e(ji,jj) 
     
    606606         !------------------------------------------------------------------------------------------------------------------------! 
    607607         IF( ln_dynadv_vec .OR. ln_linssh ) THEN      !* Vector form 
    608             DO_2D_00_00 
     608            DO_2D( 0, 0, 0, 0 ) 
    609609               ua_e(ji,jj) = (                                 un_e(ji,jj)   &  
    610610                         &     + rDt_e * (                   zu_spg(ji,jj)   & 
     
    621621            ! 
    622622         ELSE                           !* Flux form 
    623             DO_2D_00_00 
     623            DO_2D( 0, 0, 0, 0 ) 
    624624               !                    ! hu_e, hv_e hold depth at jn,  zhup2_e, zhvp2_e hold extrapolated depth at jn+1/2 
    625625               !                    ! backward interpolated depth used in spg terms at jn+1/2 
     
    645645!jth implicit bottom friction: 
    646646         IF ( ll_wd ) THEN ! revert to explicit for bit comparison tests in non wad runs 
    647             DO_2D_00_00 
     647            DO_2D( 0, 0, 0, 0 ) 
    648648                  ua_e(ji,jj) =  ua_e(ji,jj) /(1.0 -   rDt_e * zCdU_u(ji,jj) * hur_e(ji,jj)) 
    649649                  va_e(ji,jj) =  va_e(ji,jj) /(1.0 -   rDt_e * zCdU_v(ji,jj) * hvr_e(ji,jj)) 
     
    657657            hvr_e(2:jpim1,2:jpjm1) = ssvmask(2:jpim1,2:jpjm1) / ( hv_e(2:jpim1,2:jpjm1) + 1._wp - ssvmask(2:jpim1,2:jpjm1) ) 
    658658         ENDIF 
    659          !                                                 ! open boundaries 
    660          IF( ln_bdy )   CALL bdy_dyn2d( jn, ua_e, va_e, un_e, vn_e, hur_e, hvr_e, ssha_e ) 
    661 #if defined key_agrif                                                            
    662          IF( .NOT.Agrif_Root() )  CALL agrif_dyn_ts( jn )  ! Agrif 
    663 #endif 
    664659         ! 
    665660         IF( .NOT.ln_linssh ) THEN   !* Update ocean depth (variable volume case only) 
     
    670665            CALL lbc_lnk_multi( 'dynspg_ts', ua_e , 'U', -1._wp, va_e , 'V', -1._wp  ) 
    671666         ENDIF 
    672          ! 
     667         !                                                 ! open boundaries 
     668         IF( ln_bdy )   CALL bdy_dyn2d( jn, ua_e, va_e, un_e, vn_e, hur_e, hvr_e, ssha_e ) 
     669#if defined key_agrif                                                            
     670         IF( .NOT.Agrif_Root() )  CALL agrif_dyn_ts( jn )  ! Agrif 
     671#endif 
    673672         !                                             !* Swap 
    674673         !                                             !  ---- 
     
    713712      IF (ln_bt_fw) THEN 
    714713         IF( .NOT.( kt == nit000 .AND. l_1st_euler ) ) THEN 
    715             DO_2D_11_11 
     714            DO_2D( 1, 1, 1, 1 ) 
    716715               zun_save = un_adv(ji,jj) 
    717716               zvn_save = vn_adv(ji,jj) 
     
    744743      ELSE 
    745744         ! At this stage, pssh(:,:,:,Krhs) has been corrected: compute new depths at velocity points 
    746          DO_2D_10_10 
     745         DO_2D( 1, 0, 1, 0 ) 
    747746            zsshu_a(ji,jj) = r1_2 * ssumask(ji,jj)  * r1_e1e2u(ji,jj) & 
    748747               &              * ( e1e2t(ji  ,jj) * pssh(ji  ,jj,Kaa)      & 
     
    901900         !                                   ! --------------- 
    902901         IF( ln_rstart .AND. ln_bt_fw .AND. (.NOT.l_1st_euler) ) THEN    !* Read the restart file 
    903             CALL iom_get( numror, jpdom_autoglo, 'ub2_b'  , ub2_b  (:,:), ldxios = lrxios )    
    904             CALL iom_get( numror, jpdom_autoglo, 'vb2_b'  , vb2_b  (:,:), ldxios = lrxios )  
    905             CALL iom_get( numror, jpdom_autoglo, 'un_bf'  , un_bf  (:,:), ldxios = lrxios )    
    906             CALL iom_get( numror, jpdom_autoglo, 'vn_bf'  , vn_bf  (:,:), ldxios = lrxios )  
     902            CALL iom_get( numror, jpdom_auto, 'ub2_b'  , ub2_b  (:,:), cd_type = 'U', psgn = -1._wp, ldxios = lrxios )    
     903            CALL iom_get( numror, jpdom_auto, 'vb2_b'  , vb2_b  (:,:), cd_type = 'V', psgn = -1._wp, ldxios = lrxios )  
     904            CALL iom_get( numror, jpdom_auto, 'un_bf'  , un_bf  (:,:), cd_type = 'U', psgn = -1._wp, ldxios = lrxios )    
     905            CALL iom_get( numror, jpdom_auto, 'vn_bf'  , vn_bf  (:,:), cd_type = 'V', psgn = -1._wp, ldxios = lrxios )  
    907906            IF( .NOT.ln_bt_av ) THEN 
    908                CALL iom_get( numror, jpdom_autoglo, 'sshbb_e'  , sshbb_e(:,:), ldxios = lrxios )    
    909                CALL iom_get( numror, jpdom_autoglo, 'ubb_e'    ,   ubb_e(:,:), ldxios = lrxios )    
    910                CALL iom_get( numror, jpdom_autoglo, 'vbb_e'    ,   vbb_e(:,:), ldxios = lrxios ) 
    911                CALL iom_get( numror, jpdom_autoglo, 'sshb_e'   ,  sshb_e(:,:), ldxios = lrxios )  
    912                CALL iom_get( numror, jpdom_autoglo, 'ub_e'     ,    ub_e(:,:), ldxios = lrxios )    
    913                CALL iom_get( numror, jpdom_autoglo, 'vb_e'     ,    vb_e(:,:), ldxios = lrxios ) 
     907               CALL iom_get( numror, jpdom_auto, 'sshbb_e'  , sshbb_e(:,:), cd_type = 'T', psgn =  1._wp, ldxios = lrxios )    
     908               CALL iom_get( numror, jpdom_auto, 'ubb_e'    ,   ubb_e(:,:), cd_type = 'U', psgn = -1._wp, ldxios = lrxios )    
     909               CALL iom_get( numror, jpdom_auto, 'vbb_e'    ,   vbb_e(:,:), cd_type = 'V', psgn = -1._wp, ldxios = lrxios ) 
     910               CALL iom_get( numror, jpdom_auto, 'sshb_e'   ,  sshb_e(:,:), cd_type = 'T', psgn =  1._wp, ldxios = lrxios )  
     911               CALL iom_get( numror, jpdom_auto, 'ub_e'     ,    ub_e(:,:), cd_type = 'U', psgn = -1._wp, ldxios = lrxios )    
     912               CALL iom_get( numror, jpdom_auto, 'vb_e'     ,    vb_e(:,:), cd_type = 'V', psgn = -1._wp, ldxios = lrxios ) 
    914913            ENDIF 
    915914#if defined key_agrif 
    916915            ! Read time integrated fluxes 
    917916            IF ( .NOT.Agrif_Root() ) THEN 
    918                CALL iom_get( numror, jpdom_autoglo, 'ub2_i_b'  , ub2_i_b(:,:), ldxios = lrxios )    
    919                CALL iom_get( numror, jpdom_autoglo, 'vb2_i_b'  , vb2_i_b(:,:), ldxios = lrxios ) 
     917               CALL iom_get( numror, jpdom_auto, 'ub2_i_b'  , ub2_i_b(:,:), cd_type = 'U', psgn = -1._wp, ldxios = lrxios )    
     918               CALL iom_get( numror, jpdom_auto, 'vb2_i_b'  , vb2_i_b(:,:), cd_type = 'V', psgn = -1._wp, ldxios = lrxios ) 
     919            ELSE 
     920               ub2_i_b(:,:) = 0._wp   ;   vb2_i_b(:,:) = 0._wp   ! used in the 1st update of agrif 
    920921            ENDIF 
    921922#endif 
     
    923924            IF(lwp) WRITE(numout,*) 
    924925            IF(lwp) WRITE(numout,*) '   ==>>>   start from rest: set barotropic values to 0' 
    925             ub2_b (:,:) = 0._wp   ;   vb2_b (:,:) = 0._wp   ! used in the 1st interpol of agrif 
    926             un_adv(:,:) = 0._wp   ;   vn_adv(:,:) = 0._wp   ! used in the 1st interpol of agrif 
    927             un_bf (:,:) = 0._wp   ;   vn_bf (:,:) = 0._wp   ! used in the 1st update   of agrif 
     926            ub2_b  (:,:) = 0._wp   ;   vb2_b (:,:) = 0._wp   ! used in the 1st interpol of agrif 
     927            un_adv (:,:) = 0._wp   ;   vn_adv (:,:) = 0._wp   ! used in the 1st interpol of agrif 
     928            un_bf  (:,:) = 0._wp   ;   vn_bf (:,:) = 0._wp   ! used in the 1st update   of agrif 
    928929#if defined key_agrif 
    929             IF ( .NOT.Agrif_Root() ) THEN 
    930                ub2_i_b(:,:) = 0._wp   ;   vb2_i_b(:,:) = 0._wp   ! used in the 1st update of agrif 
    931             ENDIF 
     930            ub2_i_b(:,:) = 0._wp   ;   vb2_i_b(:,:) = 0._wp   ! used in the 1st update of agrif 
    932931#endif 
    933932         ENDIF 
     
    976975      ! Max courant number for ext. grav. waves 
    977976      ! 
    978       DO_2D_11_11 
     977      DO_2D( 0, 0, 0, 0 ) 
    979978         zxr2 = r1_e1t(ji,jj) * r1_e1t(ji,jj) 
    980979         zyr2 = r1_e2t(ji,jj) * r1_e2t(ji,jj) 
     
    982981      END_2D 
    983982      ! 
    984       zcmax = MAXVAL( zcu(:,:) ) 
     983      zcmax = MAXVAL( zcu(Nis0:Nie0,Njs0:Nje0) ) 
    985984      CALL mpp_max( 'dynspg_ts', zcmax ) 
    986985 
     
    11011100         SELECT CASE( nn_een_e3f )              !* ff_f/e3 at F-point 
    11021101         CASE ( 0 )                                   ! original formulation  (masked averaging of e3t divided by 4) 
    1103             DO_2D_10_10 
     1102            DO_2D( 1, 0, 1, 0 ) 
    11041103               zwz(ji,jj) =   ( ht(ji  ,jj+1) + ht(ji+1,jj+1) +                    & 
    11051104                    &           ht(ji  ,jj  ) + ht(ji+1,jj  )   ) * 0.25_wp   
     
    11071106            END_2D 
    11081107         CASE ( 1 )                                   ! new formulation  (masked averaging of e3t divided by the sum of mask) 
    1109             DO_2D_10_10 
     1108            DO_2D( 1, 0, 1, 0 ) 
    11101109               zwz(ji,jj) =             (  ht  (ji  ,jj+1) + ht  (ji+1,jj+1)      & 
    11111110                    &                    + ht  (ji  ,jj  ) + ht  (ji+1,jj  )  )   & 
     
    11181117         ! 
    11191118         ftne(1,:) = 0._wp ; ftnw(1,:) = 0._wp ; ftse(1,:) = 0._wp ; ftsw(1,:) = 0._wp 
    1120          DO_2D_01_01 
     1119         DO_2D( 0, 1, 0, 1 ) 
    11211120            ftne(ji,jj) = zwz(ji-1,jj  ) + zwz(ji  ,jj  ) + zwz(ji  ,jj-1) 
    11221121            ftnw(ji,jj) = zwz(ji-1,jj-1) + zwz(ji-1,jj  ) + zwz(ji  ,jj  ) 
     
    11271126      CASE( np_EET )                  != EEN scheme using e3t energy conserving scheme 
    11281127         ftne(1,:) = 0._wp ; ftnw(1,:) = 0._wp ; ftse(1,:) = 0._wp ; ftsw(1,:) = 0._wp 
    1129          DO_2D_01_01 
     1128         DO_2D( 0, 1, 0, 1 ) 
    11301129            z1_ht = ssmask(ji,jj) / ( ht(ji,jj) + 1._wp - ssmask(ji,jj) ) 
    11311130            ftne(ji,jj) = ( ff_f(ji-1,jj  ) + ff_f(ji  ,jj  ) + ff_f(ji  ,jj-1) ) * z1_ht 
     
    11601159            ! 
    11611160            !zhf(:,:) = hbatf(:,:) 
    1162             DO_2D_10_10 
     1161            DO_2D( 1, 0, 1, 0 ) 
    11631162               zhf(ji,jj) =    (   ht_0  (ji,jj  ) + ht_0  (ji+1,jj  )          & 
    11641163                    &            + ht_0  (ji,jj+1) + ht_0  (ji+1,jj+1)   )      & 
     
    11791178         CALL lbc_lnk( 'dynspg_ts', zhf, 'F', 1._wp ) 
    11801179         ! JC: TBC. hf should be greater than 0  
    1181          DO_2D_11_11 
     1180         DO_2D( 1, 1, 1, 1 ) 
    11821181            IF( zhf(ji,jj) /= 0._wp )   zwz(ji,jj) = 1._wp / zhf(ji,jj) 
    11831182         END_2D 
     
    12021201      SELECT CASE( nvor_scheme ) 
    12031202      CASE( np_ENT )                ! enstrophy conserving scheme (f-point) 
    1204          DO_2D_00_00 
     1203         DO_2D( 0, 0, 0, 0 ) 
    12051204            z1_hu = ssumask(ji,jj) / ( phu(ji,jj) + 1._wp - ssumask(ji,jj) ) 
    12061205            z1_hv = ssvmask(ji,jj) / ( phv(ji,jj) + 1._wp - ssvmask(ji,jj) ) 
     
    12151214         !          
    12161215      CASE( np_ENE , np_MIX )        ! energy conserving scheme (t-point) ENE or MIX 
    1217          DO_2D_00_00 
     1216         DO_2D( 0, 0, 0, 0 ) 
    12181217            zy1 = ( zhV(ji,jj-1) + zhV(ji+1,jj-1) ) * r1_e1u(ji,jj) 
    12191218            zy2 = ( zhV(ji,jj  ) + zhV(ji+1,jj  ) ) * r1_e1u(ji,jj) 
     
    12261225         ! 
    12271226      CASE( np_ENS )                ! enstrophy conserving scheme (f-point) 
    1228          DO_2D_00_00 
     1227         DO_2D( 0, 0, 0, 0 ) 
    12291228            zy1 =   r1_8 * ( zhV(ji  ,jj-1) + zhV(ji+1,jj-1) & 
    12301229              &            + zhV(ji  ,jj  ) + zhV(ji+1,jj  ) ) * r1_e1u(ji,jj) 
     
    12361235         ! 
    12371236      CASE( np_EET , np_EEN )      ! energy & enstrophy scheme (using e3t or e3f)          
    1238          DO_2D_00_00 
     1237         DO_2D( 0, 0, 0, 0 ) 
    12391238            zu_trd(ji,jj) = + r1_12 * r1_e1u(ji,jj) * (  ftne(ji,jj  ) * zhV(ji  ,jj  ) & 
    12401239             &                                         + ftnw(ji+1,jj) * zhV(ji+1,jj  ) & 
     
    12701269      ! 
    12711270      IF( ln_wd_dl_rmp ) THEN      
    1272          DO_2D_11_11 
     1271         DO_2D( 1, 1, 1, 1 ) 
    12731272            IF    ( pssh(ji,jj) + ht_0(ji,jj) >  2._wp * rn_wdmin1 ) THEN  
    12741273               !           IF    ( pssh(ji,jj) + ht_0(ji,jj) >          rn_wdmin2 ) THEN  
     
    12811280         END_2D 
    12821281      ELSE   
    1283          DO_2D_11_11 
     1282         DO_2D( 1, 1, 1, 1 ) 
    12841283            IF ( pssh(ji,jj) + ht_0(ji,jj) >  rn_wdmin1 ) THEN   ;   ptmsk(ji,jj) = 1._wp 
    12851284            ELSE                                                 ;   ptmsk(ji,jj) = 0._wp 
     
    13091308      !!---------------------------------------------------------------------- 
    13101309      ! 
    1311       DO_2D_11_10 
     1310      DO_2D( 1, 1, 1, 0 )   ! not jpi-column 
    13121311         IF ( phU(ji,jj) > 0._wp ) THEN   ;   pUmsk(ji,jj) = pTmsk(ji  ,jj)  
    13131312         ELSE                             ;   pUmsk(ji,jj) = pTmsk(ji+1,jj)   
     
    13171316      END_2D 
    13181317      ! 
    1319       DO_2D_10_11 
     1318      DO_2D( 1, 0, 1, 1 )   ! not jpj-row 
    13201319         IF ( phV(ji,jj) > 0._wp ) THEN   ;   pVmsk(ji,jj) = pTmsk(ji,jj  ) 
    13211320         ELSE                             ;   pVmsk(ji,jj) = pTmsk(ji,jj+1)   
     
    13391338      REAL(wp), DIMENSION(jpi,jpj), INTENT(inout) :: zcpx, zcpy 
    13401339      !!---------------------------------------------------------------------- 
    1341       DO_2D_00_00 
     1340      DO_2D( 0, 0, 0, 0 ) 
    13421341         ll_tmp1 = MIN(  pshn(ji,jj)               ,  pshn(ji+1,jj) ) >                & 
    13431342              &      MAX( -ht_0(ji,jj)               , -ht_0(ji+1,jj) ) .AND.            & 
     
    14061405      !                    !==  Set the barotropic drag coef.  ==! 
    14071406      ! 
    1408       IF( ln_isfcav ) THEN          ! top+bottom friction (ocean cavities) 
     1407      IF( ln_isfcav.OR.ln_drgice_imp ) THEN          ! top+bottom friction (ocean cavities) 
    14091408          
    1410          DO_2D_00_00 
     1409         DO_2D( 0, 0, 0, 0 ) 
    14111410            pCdU_u(ji,jj) = r1_2*( rCdU_bot(ji+1,jj)+rCdU_bot(ji,jj) + rCdU_top(ji+1,jj)+rCdU_top(ji,jj) ) 
    14121411            pCdU_v(ji,jj) = r1_2*( rCdU_bot(ji,jj+1)+rCdU_bot(ji,jj) + rCdU_top(ji,jj+1)+rCdU_top(ji,jj) ) 
    14131412         END_2D 
    14141413      ELSE                          ! bottom friction only 
    1415          DO_2D_00_00 
     1414         DO_2D( 0, 0, 0, 0 ) 
    14161415            pCdU_u(ji,jj) = r1_2*( rCdU_bot(ji+1,jj)+rCdU_bot(ji,jj) ) 
    14171416            pCdU_v(ji,jj) = r1_2*( rCdU_bot(ji,jj+1)+rCdU_bot(ji,jj) ) 
     
    14231422      IF( ln_bt_fw ) THEN                 ! FORWARD integration: use NOW bottom baroclinic velocities 
    14241423          
    1425          DO_2D_00_00 
     1424         DO_2D( 0, 0, 0, 0 ) 
    14261425            ikbu = mbku(ji,jj)        
    14271426            ikbv = mbkv(ji,jj)     
     
    14311430      ELSE                                ! CENTRED integration: use BEFORE bottom baroclinic velocities 
    14321431          
    1433          DO_2D_00_00 
     1432         DO_2D( 0, 0, 0, 0 ) 
    14341433            ikbu = mbku(ji,jj)        
    14351434            ikbv = mbkv(ji,jj)     
     
    14411440      IF( ln_wd_il ) THEN      ! W/D : use the "clipped" bottom friction   !!gm   explain WHY, please ! 
    14421441         zztmp = -1._wp / rDt_e 
    1443          DO_2D_00_00 
     1442         DO_2D( 0, 0, 0, 0 ) 
    14441443            pu_RHSi(ji,jj) = pu_RHSi(ji,jj) + zu_i(ji,jj) *  wdrampu(ji,jj) * MAX(                                 &  
    14451444                 &                              r1_hu(ji,jj,Kmm) * r1_2*( rCdU_bot(ji+1,jj)+rCdU_bot(ji,jj) ) , zztmp  ) 
     
    14491448      ELSE                    ! use "unclipped" drag (even if explicit friction is used in 3D calculation) 
    14501449          
    1451          DO_2D_00_00 
     1450         DO_2D( 0, 0, 0, 0 ) 
    14521451            pu_RHSi(ji,jj) = pu_RHSi(ji,jj) + r1_hu(ji,jj,Kmm) * r1_2*( rCdU_bot(ji+1,jj)+rCdU_bot(ji,jj) ) * zu_i(ji,jj) 
    14531452            pv_RHSi(ji,jj) = pv_RHSi(ji,jj) + r1_hv(ji,jj,Kmm) * r1_2*( rCdU_bot(ji,jj+1)+rCdU_bot(ji,jj) ) * zv_i(ji,jj) 
     
    14571456      !                    !==  TOP stress contribution from baroclinic velocities  ==!   (no W/D case) 
    14581457      ! 
    1459       IF( ln_isfcav ) THEN 
     1458      IF( ln_isfcav.OR.ln_drgice_imp ) THEN 
    14601459         ! 
    14611460         IF( ln_bt_fw ) THEN                ! FORWARD integration: use NOW top baroclinic velocity 
    14621461             
    1463             DO_2D_00_00 
     1462            DO_2D( 0, 0, 0, 0 ) 
    14641463               iktu = miku(ji,jj) 
    14651464               iktv = mikv(ji,jj) 
     
    14691468         ELSE                                ! CENTRED integration: use BEFORE top baroclinic velocity 
    14701469             
    1471             DO_2D_00_00 
     1470            DO_2D( 0, 0, 0, 0 ) 
    14721471               iktu = miku(ji,jj) 
    14731472               iktv = mikv(ji,jj) 
     
    14791478         !                    ! use "unclipped" top drag (even if explicit friction is used in 3D calculation) 
    14801479          
    1481          DO_2D_00_00 
     1480         DO_2D( 0, 0, 0, 0 ) 
    14821481            pu_RHSi(ji,jj) = pu_RHSi(ji,jj) + r1_hu(ji,jj,Kmm) * r1_2*( rCdU_top(ji+1,jj)+rCdU_top(ji,jj) ) * zu_i(ji,jj) 
    14831482            pv_RHSi(ji,jj) = pv_RHSi(ji,jj) + r1_hv(ji,jj,Kmm) * r1_2*( rCdU_top(ji,jj+1)+rCdU_top(ji,jj) ) * zv_i(ji,jj) 
Note: See TracChangeset for help on using the changeset viewer.