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 14636 for NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/ZDF/zdfosm.F90 – NEMO

Ignore:
Timestamp:
2021-03-25T12:51:33+01:00 (3 years ago)
Author:
hadcv
Message:

#2600: Merge in dev_r14393_HPC-03_Mele_Comm_Cleanup [14538:14609]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/ZDF/zdfosm.F90

    r14574 r14636  
    400400     zz0 =       rn_abs       ! surface equi-partition in 2-bands 
    401401     zz1 =  1. - rn_abs 
    402      DO_2D( 0, 0, 0, 0 ) 
     402     ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     403     DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    403404        ! Surface downward irradiance (so always +ve) 
    404405        zrad0(ji,jj) = qsr(ji,jj) * r1_rho0_rcp 
     
    410411     END_2D 
    411412     ! Turbulent surface fluxes and fluxes averaged over depth of the OSBL 
    412      DO_2D( 0, 0, 0, 0 ) 
     413     ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     414     DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    413415        zthermal = rab_n(ji,jj,1,jp_tem) 
    414416        zbeta    = rab_n(ji,jj,1,jp_sal) 
     
    437439     ! Assume constant La#=0.3 
    438440     CASE(0) 
    439         DO_2D( 0, 0, 0, 0 ) 
     441        ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     442        DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    440443           zus_x = zcos_wind(ji,jj) * zustar(ji,jj) / 0.3**2 
    441444           zus_y = zsin_wind(ji,jj) * zustar(ji,jj) / 0.3**2 
     
    446449     ! Assume Pierson-Moskovitz wind-wave spectrum 
    447450     CASE(1) 
    448         DO_2D( 0, 0, 0, 0 ) 
     451        ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     452        DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    449453           ! Use wind speed wndm included in sbc_oce module 
    450454           zustke(ji,jj) =  MAX ( 0.016 * wndm(ji,jj), 1.0e-8 ) 
     
    455459        zfac =  2.0_wp * rpi / 16.0_wp 
    456460 
    457         DO_2D( 0, 0, 0, 0 ) 
     461        ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     462        DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    458463           IF (hsw(ji,jj) > 1.e-4) THEN 
    459464              ! Use  wave fields 
     
    472477     IF (ln_zdfosm_ice_shelter) THEN 
    473478        ! Reduce both Stokes drift and its depth scale by ocean fraction to represent sheltering by ice 
    474         DO_2D( 0, 0, 0, 0 ) 
     479        ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     480        DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    475481           zustke(ji,jj) = zustke(ji,jj) * (1.0_wp - fr_i(ji,jj)) 
    476482           dstokes(ji,jj) = dstokes(ji,jj) * (1.0_wp - fr_i(ji,jj)) 
     
    494500        z_two_thirds = 2.0_wp / 3.0_wp 
    495501 
    496         DO_2D( 0, 0, 0, 0 ) 
     502        ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     503        DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    497504           zthickness = rn_osm_hblfrac*hbl(ji,jj) 
    498505           z2k_times_thickness =  zthickness * 2.0_wp / MAX( ABS( 5.97_wp * dstokes(ji,jj) ), 0.0000001_wp ) 
     
    509516        zsqrtpi = SQRT(rpi) 
    510517 
    511         DO_2D( 0, 0, 0, 0 ) 
     518        ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     519        DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    512520           zthickness = rn_osm_hblfrac*hbl(ji,jj) 
    513521           z2k_times_thickness =  zthickness * 2.0_wp / MAX( ABS( 5.97_wp * dstokes(ji,jj) ), 0.0000001_wp ) 
     
    530538     ! Langmuir velocity scale (zwstrl), La # (zla) 
    531539     ! mixed scale (zvstr), convective velocity scale (zwstrc) 
    532      DO_2D( 0, 0, 0, 0 ) 
     540     ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     541     DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    533542        ! Langmuir velocity scale (zwstrl), at T-point 
    534543        zwstrl(ji,jj) = ( zustar(ji,jj) * zustar(ji,jj) * zustke(ji,jj) )**pthird 
     
    563572      hbl(:,:) = MAX(hbl(:,:), gdepw(:,:,4,Kmm) ) 
    564573      ibld(:,:) = 4 
    565       DO_3D( 1, 1, 1, 1, 5, jpkm1 ) 
     574      ! [comm_cleanup] ! DO_3D( 1, 1, 1, 1, 5, jpkm1 ) 
     575      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 5, jpkm1 ) 
    566576         IF ( hbl(ji,jj) >= gdepw(ji,jj,jk,Kmm) ) THEN 
    567577            ibld(ji,jj) = MIN(mbkt(ji,jj), jk) 
     
    570580     ! ########################################################################## 
    571581 
    572       DO_2D( 0, 0, 0, 0 ) 
     582      ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     583      DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    573584         zhbl(ji,jj) = gdepw(ji,jj,ibld(ji,jj),Kmm) 
    574585         imld(ji,jj) = MAX(3,ibld(ji,jj) - MAX( INT( dh(ji,jj) / e3t(ji, jj, ibld(ji,jj), Kmm )) , 1 )) 
     
    590601! Fox-Kemper Scheme 
    591602         mld_prof = 4 
    592          DO_3D( 0, 0, 0, 0, 5, jpkm1 ) 
     603         ! [comm_cleanup] ! DO_3D( 0, 0, 0, 0, 5, jpkm1 ) 
     604         DO_3D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 5, jpkm1 ) 
    593605         IF ( hmle(ji,jj) >= gdepw(ji,jj,jk,Kmm) ) mld_prof(ji,jj) = MIN(mbkt(ji,jj), jk) 
    594606         END_3D 
     
    596608        CALL zdf_osm_vertical_average(mld_prof, jp_ext_mle, zt_mle, zs_mle, zb_mle, zu_mle, zv_mle, zdt_mle, zds_mle, zdb_mle, zdu_mle, zdv_mle) 
    597609 
    598          DO_2D( 0, 0, 0, 0 ) 
     610         ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     611         DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    599612           zhmle(ji,jj) = gdepw(ji,jj,mld_prof(ji,jj),Kmm) 
    600613         END_2D 
     
    611624         lflux(:,:) = .FALSE. 
    612625         lmle(:,:) = .FALSE. 
    613          DO_2D( 0, 0, 0, 0 ) 
     626         ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     627         DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    614628          IF ( lconv(ji,jj) .AND. zdb_bl(ji,jj) < rn_osm_bl_thresh ) lpyc(ji,jj) = .FALSE. 
    615629         END_2D 
     
    617631 
    618632! Test if pycnocline well resolved 
    619       DO_2D( 0, 0, 0, 0 ) 
     633      ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     634      DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    620635       IF (lconv(ji,jj) ) THEN 
    621636          ztmp = 0.2 * zhbl(ji,jj) / e3w(ji,jj,ibld(ji,jj),Kmm) 
     
    638653! Rate of change of hbl 
    639654      CALL zdf_osm_calculate_dhdt( zdhdt, zddhdt ) 
    640       DO_2D( 0, 0, 0, 0 ) 
     655      ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     656      DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    641657       zhbl_t(ji,jj) = hbl(ji,jj) + (zdhdt(ji,jj) - ww(ji,jj,ibld(ji,jj)))* rn_Dt ! certainly need ww here, so subtract it 
    642658            ! adjustment to represent limiting by ocean bottom 
     
    650666      ibld(:,:) = 4 
    651667 
    652       DO_3D( 0, 0, 0, 0, 4, jpkm1 ) 
     668      ! [comm_cleanup] ! DO_3D( 0, 0, 0, 0, 4, jpkm1 ) 
     669      DO_3D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 4, jpkm1 ) 
    653670         IF ( zhbl_t(ji,jj) >= gdepw(ji,jj,jk,Kmm) ) THEN 
    654671            ibld(ji,jj) = jk 
     
    669686      CALL zdf_osm_pycnocline_thickness( dh, zdh ) 
    670687 
    671       DO_2D( 0, 0, 0, 0 ) 
     688      ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     689      DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    672690       IF ( zdb_bl(ji,jj) < rn_osm_bl_thresh .or. ibld(ji,jj) + jp_ext(ji,jj) >= mbkt(ji,jj) .or. ibld(ji,jj)-imld(ji,jj) == 1 ) lpyc(ji,jj) = .FALSE. 
    673691      END_2D 
     
    709727 
    710728 
    711        DO_2D( 0, 0, 0, 0 ) 
     729       ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     730       DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    712731         IF ( lconv(ji,jj) ) THEN 
    713732           DO jk = 2, imld(ji,jj) 
     
    744763          IF ( iom_use("ghamv_00") ) CALL iom_put( "ghamv_00", wmask*ghamv ) 
    745764       END IF 
    746        DO_2D( 0, 0, 0, 0 ) 
     765       ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     766       DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    747767          IF ( lconv(ji,jj) ) THEN 
    748768             DO jk = 2, imld(ji,jj) 
     
    776796       ENDWHERE 
    777797 
    778        DO_2D( 0, 0, 0, 0 ) 
     798       ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     799       DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    779800          IF (lconv(ji,jj) ) THEN 
    780801             DO jk = 2, imld(ji,jj) 
     
    838859       ENDWHERE 
    839860 
    840        DO_2D( 0, 0, 0, 0 ) 
     861       ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     862       DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    841863          IF ( lconv(ji,jj) ) THEN 
    842864             DO jk = 2 , imld(ji,jj) 
     
    856878       END_2D 
    857879 
    858        DO_2D( 0, 0, 0, 0 ) 
     880       ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     881       DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    859882        IF ( lpyc(ji,jj) ) THEN 
    860883          IF ( j_ddh(ji,jj) == 0 ) THEN 
     
    891914! Transport term in flux-gradient relationship [note : includes ROI ratio (X0.3) ] 
    892915 
    893        DO_2D( 1, 0, 1, 0 ) 
     916       ! [comm_cleanup] ! DO_2D( 1, 0, 1, 0 ) 
     917       DO_2D( nn_hls, nn_hls-1, nn_hls, nn_hls-1 ) 
    894918 
    895919         IF ( lconv(ji,jj) ) THEN 
     
    907931       END_2D 
    908932 
    909        DO_2D( 0, 0, 0, 0 ) 
     933       ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     934       DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    910935         IF ( lconv(ji,jj) ) THEN 
    911936            DO jk = 2, imld(ji,jj) 
     
    954979       ENDWHERE 
    955980 
    956        DO_2D( 0, 0, 0, 0 ) 
     981       ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     982       DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    957983          IF ( lconv(ji,jj) ) THEN 
    958984            DO jk = 2, imld(ji,jj) 
     
    10011027 ! Make surface forced velocity non-gradient terms go to zero at the base of the boundary layer. 
    10021028 
    1003       DO_2D( 0, 0, 0, 0 ) 
     1029      ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     1030      DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    10041031         IF ( .not. lconv(ji,jj) ) THEN 
    10051032            DO jk = 2, ibld(ji,jj) 
     
    10171044 
    10181045      ! pynocline contributions 
    1019        DO_2D( 0, 0, 0, 0 ) 
     1046       ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     1047       DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    10201048         IF ( .not. lconv(ji,jj) ) THEN 
    10211049          IF ( ibld(ji,jj) + jp_ext(ji,jj) < mbkt(ji,jj) ) THEN 
     
    10351063       END IF 
    10361064 
    1037        DO_2D( 0, 0, 0, 0 ) 
     1065       ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     1066       DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    10381067          ghamt(ji,jj,ibld(ji,jj)+ibld_ext) = 0._wp 
    10391068          ghams(ji,jj,ibld(ji,jj)+ibld_ext) = 0._wp 
     
    10601089       ! rotate non-gradient velocity terms back to model reference frame 
    10611090 
    1062        DO_2D( 0, 0, 0, 0 ) 
     1091       ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     1092       DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    10631093          DO jk = 2, ibld(ji,jj) 
    10641094             ztemp = ghamu(ji,jj,jk) 
     
    10761106! KPP-style Ri# mixing 
    10771107       IF( ln_kpprimix) THEN 
    1078           DO_3D( 1, 0, 1, 0, 2, jpkm1 )      !* Shear production at uw- and vw-points (energy conserving form) 
     1108           
     1109          ! [comm_cleanup] ! DO_3D( 1, 0, 1, 0, 2, jpkm1 )      !* Shear production at uw- and vw-points (energy conserving form) 
     1110          DO_3D( nn_hls, nn_hls-1, nn_hls, nn_hls-1, 2, jpkm1 ) 
    10791111             z3du(ji,jj,jk) = 0.5 * (  uu(ji,jj,jk-1,Kmm) -  uu(ji  ,jj,jk,Kmm) )   & 
    10801112                  &                 * (  uu(ji,jj,jk-1,Kbb) -  uu(ji  ,jj,jk,Kbb) ) * wumask(ji,jj,jk) & 
     
    10851117          END_3D 
    10861118      ! 
    1087          DO_3D( 0, 0, 0, 0, 2, jpkm1 ) 
     1119         ! [comm_cleanup] ! DO_3D( 0, 0, 0, 0, 2, jpkm1 ) 
     1120         DO_3D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 2, jpkm1 ) 
    10881121            !                                          ! shear prod. at w-point weightened by mask 
    10891122            zesh2  =  ( z3du(ji-1,jj,jk) + z3du(ji,jj,jk) ) / MAX( 1._wp , umask(ji-1,jj,jk) + umask(ji,jj,jk) )   & 
     
    10961129         END_3D 
    10971130 
    1098           DO_2D( 0, 0, 0, 0 ) 
     1131          ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     1132          DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    10991133             DO jk = ibld(ji,jj) + 1, jpkm1 
    11001134                zdiffut(ji,jj,jk) = zrimix(ji,jj,jk)*rn_difri 
     
    11071141! KPP-style set diffusivity large if unstable below BL 
    11081142       IF( ln_convmix) THEN 
    1109           DO_2D( 0, 0, 0, 0 ) 
     1143          ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     1144          DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    11101145             DO jk = ibld(ji,jj) + 1, jpkm1 
    11111146               IF(  MIN( rn2(ji,jj,jk), rn2b(ji,jj,jk) ) <= -1.e-12 ) zdiffut(ji,jj,jk) = rn_difconv 
     
    11171152 
    11181153       IF ( ln_osm_mle ) THEN  ! set up diffusivity and non-gradient mixing 
    1119           DO_2D( 0, 0, 0, 0 ) 
     1154          ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     1155          DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    11201156              IF ( lflux(ji,jj) ) THEN ! MLE mixing extends below boundary layer 
    11211157             ! Calculate MLE flux contribution from surface fluxes 
     
    11581194       ! GN 25/8: need to change tmask --> wmask 
    11591195 
    1160      DO_3D( 0, 0, 0, 0, 2, jpkm1 ) 
     1196     ! [comm_cleanup] ! DO_3D( 0, 0, 0, 0, 2, jpkm1 ) 
     1197     DO_3D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 2, jpkm1 ) 
    11611198          p_avt(ji,jj,jk) = MAX( zdiffut(ji,jj,jk), avtb(jk) ) * tmask(ji,jj,jk) 
    11621199          p_avm(ji,jj,jk) = MAX( zviscos(ji,jj,jk), avmb(jk) ) * tmask(ji,jj,jk) 
    11631200     END_3D 
    11641201      ! Lateral boundary conditions on ghamu and ghamv, currently on W-grid  (sign unchanged), needed to caclulate gham[uv] on u and v grids 
    1165      CALL lbc_lnk( 'zdfosm', p_avt, 'W', 1.0_wp , p_avm, 'W', 1.0_wp,   & 
    1166         &                    ghamu, 'W', 1.0_wp , ghamv, 'W', 1.0_wp ) 
     1202     IF (nn_hls.eq.1) CALL lbc_lnk( 'zdfosm', p_avt, 'W', 1.0_wp , p_avm, 'W', 1.0_wp,   & 
     1203                         &                    ghamu, 'W', 1.0_wp , ghamv, 'W', 1.0_wp ) 
    11671204       DO_3D( 0, 0, 0, 0, 2, jpkm1 ) 
    11681205            ghamu(ji,jj,jk) = ( ghamu(ji,jj,jk) + ghamu(ji+1,jj,jk) ) & 
     
    11761213       END_3D 
    11771214        ! Lateral boundary conditions on final outputs for hbl,  on T-grid (sign unchanged) 
    1178         CALL lbc_lnk( 'zdfosm', hbl, 'T', 1., dh, 'T', 1., hmle, 'T', 1. ) 
     1215        ! [comm_cleanup] ! no need lbc_lnk for output 
     1216        ! CALL lbc_lnk( 'zdfosm', hbl, 'T', 1., dh, 'T', 1., hmle, 'T', 1. ) 
    11791217        ! Lateral boundary conditions on final outputs for gham[ts],  on W-grid  (sign unchanged) 
    11801218        ! Lateral boundary conditions on final outputs for gham[uv],  on [UV]-grid  (sign changed) 
    1181         CALL lbc_lnk( 'zdfosm', ghamt, 'W',  1.0_wp , ghams, 'W',  1.0_wp,   & 
    1182            &                    ghamu, 'U', -1.0_wp , ghamv, 'V', -1.0_wp ) 
     1219        ! [comm_cleanup] ! no need lbc_lnk for output 
     1220        ! CALL lbc_lnk( 'zdfosm', ghamt, 'W',  1.0_wp , ghams, 'W',  1.0_wp,   & 
     1221        !   &                    ghamu, 'U', -1.0_wp , ghamv, 'V', -1.0_wp ) 
    11831222 
    11841223      IF(ln_dia_osm) THEN 
     
    12801319      REAL(wp), PARAMETER :: rn_vispyc_shr = 0.15 
    12811320 
    1282       DO_2D( 0, 0, 0, 0 ) 
     1321      ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     1322      DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    12831323          IF ( lconv(ji,jj) ) THEN 
    12841324 
     
    13231363      END_2D 
    13241364! 
    1325        DO_2D( 0, 0, 0, 0 ) 
     1365       ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     1366       DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    13261367          IF ( lconv(ji,jj) ) THEN 
    13271368             DO jk = 2, imld(ji,jj)   ! mixed layer diffusivity 
     
    14221463 
    14231464! Determins stability and set flag lconv 
    1424      DO_2D( 0, 0, 0, 0 ) 
     1465     ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     1466     DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    14251467      IF ( zhol(ji,jj) < 0._wp ) THEN 
    14261468         lconv(ji,jj) = .TRUE. 
     
    14391481     j_ddh(:,:) = 1 
    14401482 
    1441      DO_2D( 0, 0, 0, 0 ) 
     1483     ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     1484     DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    14421485      IF ( lconv(ji,jj) ) THEN 
    14431486         IF ( zdb_bl(ji,jj) > 0._wp ) THEN 
     
    14761519! Calculate entrainment buoyancy flux due to surface fluxes. 
    14771520 
    1478      DO_2D( 0, 0, 0, 0 ) 
     1521     ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     1522     DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    14791523      IF ( lconv(ji,jj) ) THEN 
    14801524        zwcor = ABS(ff_t(ji,jj)) * zhbl(ji,jj) + epsln 
     
    15011545     zwb_min(:,:) = 0._wp 
    15021546 
    1503      DO_2D( 0, 0, 0, 0 ) 
     1547     ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     1548     DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    15041549      IF ( lshear(ji,jj) ) THEN 
    15051550        IF ( lconv(ji,jj) ) THEN 
     
    15621607        zu   = 0._wp 
    15631608        zv   = 0._wp 
    1564         DO_2D( 0, 0, 0, 0 ) 
     1609        ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     1610        DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    15651611         zthermal = rab_n(ji,jj,1,jp_tem) !ideally use ibld not 1?? 
    15661612         zbeta    = rab_n(ji,jj,1,jp_sal) 
     
    16191665        REAL(wp) :: ztemp 
    16201666 
    1621         DO_2D( 0, 0, 0, 0 ) 
     1667        ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     1668        DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    16221669           ztemp = zu(ji,jj) 
    16231670           zu(ji,jj) = zu(ji,jj) * zcos_w(ji,jj) + zv(ji,jj) * zsin_w(ji,jj) 
     
    16531700      znd_param(:,:) = 0._wp 
    16541701 
    1655         DO_2D( 0, 0, 0, 0 ) 
     1702        ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     1703        DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    16561704          ztmp =  r1_ft(ji,jj) *  MIN( 111.e3_wp , e1u(ji,jj) ) / rn_osm_mle_lf 
    16571705          zwb_fk(ji,jj) = rn_osm_mle_ce * hmle(ji,jj) * hmle(ji,jj) * ztmp * zdbds_mle(ji,jj) * zdbds_mle(ji,jj) 
    16581706        END_2D 
    1659         DO_2D( 0, 0, 0, 0 ) 
     1707        ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     1708        DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    16601709                 ! 
    16611710         IF ( lconv(ji,jj) ) THEN 
     
    16811730 
    16821731! Diagnosis 
    1683         DO_2D( 0, 0, 0, 0 ) 
     1732        ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     1733        DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    16841734          IF ( lconv(ji,jj) ) THEN 
    16851735            zwb_ent = - 2.0 * 0.2 * zwbav(ji,jj) & 
     
    17511801 
    17521802 
    1753      DO_2D( 0, 0, 0, 0 ) 
     1803     ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     1804     DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    17541805        IF ( jbase(ji,jj)+1 < mbkt(ji,jj) ) THEN 
    17551806           zthermal = rab_n(ji,jj,1,jp_tem) !ideally use ibld not 1?? 
     
    17811832     REAL(wp), PARAMETER :: zgamma_b = 2.25, zzeta_sh = 0.15 
    17821833 
    1783      DO_2D( 0, 0, 0, 0 ) 
     1834     ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     1835     DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    17841836        IF ( ibld(ji,jj) + jp_ext(ji,jj) < mbkt(ji,jj) ) THEN 
    17851837           IF ( lconv(ji,jj) ) THEN  ! convective conditions 
     
    18661918      REAL(wp) :: zzeta_v = 0.45 
    18671919      ! 
    1868       DO_2D( 0, 0, 0, 0 ) 
     1920      ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     1921      DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    18691922         ! 
    18701923         IF ( ibld(ji,jj) + jp_ext(ji,jj) < mbkt(ji,jj) ) THEN 
     
    19291982    REAL, PARAMETER :: a_ddh = 2.5, a_ddh_2 = 3.5 ! also in pycnocline_depth 
    19301983 
    1931   DO_2D( 0, 0, 0, 0 ) 
     1984  ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     1985  DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    19321986 
    19331987    IF ( lshear(ji,jj) ) THEN 
     
    20722126    REAL(wp) :: zthermal, zbeta 
    20732127 
    2074      DO_2D( 0, 0, 0, 0 ) 
     2128     ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     2129     DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    20752130        IF ( ibld(ji,jj) - imld(ji,jj) > 1 ) THEN 
    20762131! 
     
    21762231      REAL, PARAMETER :: a_ddh_2 = 3.5 ! also in pycnocline_depth 
    21772232 
    2178     DO_2D( 0, 0, 0, 0 ) 
     2233    ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     2234    DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    21792235 
    21802236      IF ( lshear(ji,jj) ) THEN 
     
    23222378      zmld(:,:)  = 0._wp               ! here hmlp used as a dummy variable, integrating vertically N^2 
    23232379      zN2_c = grav * rn_osm_mle_rho_c * r1_rho0   ! convert density criteria into N^2 criteria 
    2324       DO_3D( 1, 1, 1, 1, nlb10, jpkm1 ) 
     2380      ! [comm_cleanup] ! DO_3D( 1, 1, 1, 1, nlb10, jpkm1 ) 
     2381      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, nlb10, jpkm1 ) 
    23252382         ikt = mbkt(ji,jj) 
    23262383         zmld(ji,jj) = zmld(ji,jj) + MAX( rn2b(ji,jj,jk) , 0._wp ) * e3w(ji,jj,jk,Kmm) 
    23272384         IF( zmld(ji,jj) < zN2_c )   mld_prof(ji,jj) = MIN( jk , ikt ) + 1   ! Mixed layer level 
    23282385      END_3D 
    2329       DO_2D( 1, 1, 1, 1 ) 
     2386      ! [comm_cleanup] ! DO_2D( 1, 1, 1, 1 ) 
     2387      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    23302388         mld_prof(ji,jj) = MAX(mld_prof(ji,jj),ibld(ji,jj)) 
    23312389         zmld(ji,jj) = gdepw(ji,jj,mld_prof(ji,jj),Kmm) 
     
    23372395      ztm(:,:) = 0._wp 
    23382396      zsm(:,:) = 0._wp 
    2339       DO_3D( 1, 1, 1, 1, 1, ikmax ) 
     2397      ! [comm_cleanup] ! DO_3D( 1, 1, 1, 1, 1, ikmax ) 
     2398      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, ikmax ) 
    23402399         zc = e3t(ji,jj,jk,Kmm) * REAL( MIN( MAX( 0, mld_prof(ji,jj)-jk ) , 1  )  )    ! zc being 0 outside the ML t-points 
    23412400         ztm(ji,jj) = ztm(ji,jj) + zc * ts(ji,jj,jk,jp_tem,Kmm) 
     
    23472406      ! calculate horizontal gradients at u & v points 
    23482407 
    2349       DO_2D( 1, 0, 0, 0 ) 
     2408      ! [comm_cleanup] ! DO_2D( 1, 0, 0, 0 ) 
     2409      DO_2D( nn_hls, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    23502410         zdtdx(ji,jj) = ( ztm(ji+1,jj) - ztm( ji,jj) )  * umask(ji,jj,1) / e1u(ji,jj) 
    23512411         zdsdx(ji,jj) = ( zsm(ji+1,jj) - zsm( ji,jj) )  * umask(ji,jj,1) / e1u(ji,jj) 
     
    23552415      END_2D 
    23562416 
    2357       DO_2D( 0, 0, 1, 0 ) 
     2417      ! [comm_cleanup] ! DO_2D( 0, 0, 1, 0 ) 
     2418      DO_2D( nn_hls-1, nn_hls-1, nn_hls, nn_hls-1 ) 
    23582419         zdtdy(ji,jj) = ( ztm(ji,jj+1) - ztm( ji,jj) ) * vmask(ji,jj,1) / e1v(ji,jj) 
    23592420         zdsdy(ji,jj) = ( zsm(ji,jj+1) - zsm( ji,jj) ) * vmask(ji,jj,1) / e1v(ji,jj) 
     
    23662427      CALL eos_rab(ztsm_midv, zmld_midv, zabv, Kmm) 
    23672428 
    2368       DO_2D( 1, 0, 0, 0 ) 
     2429      ! [comm_cleanup] ! DO_2D( 1, 0, 0, 0 ) 
     2430      DO_2D( nn_hls, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    23692431         dbdx_mle(ji,jj) = grav*(zdtdx(ji,jj)*zabu(ji,jj,jp_tem) - zdsdx(ji,jj)*zabu(ji,jj,jp_sal)) 
    23702432      END_2D 
    2371       DO_2D( 0, 0, 1, 0 ) 
     2433      ! [comm_cleanup] ! DO_2D( 0, 0, 1, 0 ) 
     2434      DO_2D( nn_hls-1, nn_hls-1, nn_hls, nn_hls-1 ) 
    23722435         dbdy_mle(ji,jj) = grav*(zdtdy(ji,jj)*zabv(ji,jj,jp_tem) - zdsdy(ji,jj)*zabv(ji,jj,jp_sal)) 
    23732436      END_2D 
    23742437 
    2375       DO_2D( 0, 0, 0, 0 ) 
     2438      ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     2439      DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    23762440        ztmp =  r1_ft(ji,jj) *  MIN( 111.e3_wp , e1u(ji,jj) ) / rn_osm_mle_lf 
    23772441        zdbds_mle(ji,jj) = SQRT( 0.5_wp * ( dbdx_mle(ji,jj) * dbdx_mle(ji,jj) + dbdy_mle(ji,jj) * dbdy_mle(ji,jj) & 
     
    24002464   ! Calculate vertical buoyancy, heat and salinity fluxes due to MLE. 
    24012465 
    2402       DO_2D( 0, 0, 0, 0 ) 
     2466      ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     2467      DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    24032468       IF ( lconv(ji,jj) ) THEN 
    24042469          ztmp =  r1_ft(ji,jj) *  MIN( 111.e3_wp , e1u(ji,jj) ) / rn_osm_mle_lf 
     
    24092474      END_2D 
    24102475   ! Timestep mixed layer eddy depth. 
    2411       DO_2D( 0, 0, 0, 0 ) 
     2476      ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     2477      DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    24122478        IF ( lmle(ji,jj) ) THEN  ! MLE layer growing. 
    24132479! Buoyancy gradient at base of MLE layer. 
     
    24332499 
    24342500      mld_prof = 4 
    2435       DO_3D( 0, 0, 0, 0, 5, jpkm1 ) 
     2501 
     2502      ! [comm_cleanup] ! DO_3D( 0, 0, 0, 0, 5, jpkm1 ) 
     2503      DO_3D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 5, jpkm1 ) 
    24362504      IF ( hmle(ji,jj) >= gdepw(ji,jj,jk,Kmm) ) mld_prof(ji,jj) = MIN(mbkt(ji,jj), jk) 
    24372505      END_3D 
    2438       DO_2D( 0, 0, 0, 0 ) 
     2506      ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
     2507      DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    24392508         zhmle(ji,jj) = gdepw(ji,jj, mld_prof(ji,jj),Kmm) 
    24402509      END_2D 
     
    25852654         !                                ! 1/(f^2+tau^2)^1/2 at t-point (needed in both nn_osm_mle case) 
    25862655         z1_t2 = 2.e-5 
    2587          DO_2D( 1, 1, 1, 1 ) 
     2656         ! [comm_cleanup] ! DO_2D( 1, 1, 1, 1 ) 
     2657         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    25882658            r1_ft(ji,jj) = MIN(1./( ABS(ff_t(ji,jj)) + epsln ), ABS(ff_t(ji,jj))/z1_t2**2) 
    25892659         END_2D 
     
    26302700        etmean(:,:,:) = 0.e0 
    26312701 
    2632         DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 
     2702        ! [comm_cleanup] ! DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 
     2703        DO_3D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 1, jpkm1 ) 
    26332704           etmean(ji,jj,jk) = tmask(ji,jj,jk)                     & 
    26342705                &  / MAX( 1.,  umask(ji-1,jj  ,jk) + umask(ji,jj,jk)   & 
     
    26442715        etmean(:,:,:) = 0.e0 
    26452716 
    2646         DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 
     2717        ! [comm_cleanup] ! DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 
     2718        DO_3D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 1, jpkm1 ) 
    26472719           etmean(ji,jj,jk) = tmask(ji, jj,jk)                           & 
    26482720                & / MAX( 1., 2.* tmask(ji,jj,jk)                           & 
     
    27592831     ! 
    27602832     hbl(:,:)  = 0._wp              ! here hbl used as a dummy variable, integrating vertically N^2 
    2761      DO_3D( 1, 1, 1, 1, 1, jpkm1 ) 
     2833     ! [comm_cleanup] ! DO_3D( 1, 1, 1, 1, 1, jpkm1 ) 
     2834     DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 ) 
    27622835        ikt = mbkt(ji,jj) 
    27632836        hbl(ji,jj) = hbl(ji,jj) + MAX( rn2(ji,jj,jk) , 0._wp ) * e3w(ji,jj,jk,Kmm) 
     
    27652838     END_3D 
    27662839     ! 
    2767      DO_2D( 1, 1, 1, 1 ) 
     2840     ! [comm_cleanup] ! DO_2D( 1, 1, 1, 1 ) 
     2841     DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    27682842        iiki = MAX(4,imld_rst(ji,jj)) 
    27692843        hbl (ji,jj) = gdepw(ji,jj,iiki,Kmm  )    ! Turbocline depth 
     
    28122886      ENDIF 
    28132887 
    2814       DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 
     2888      ! [comm_cleanup] ! DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 
     2889      DO_3D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 1, jpkm1 ) 
    28152890         pts(ji,jj,jk,jp_tem,Krhs) =  pts(ji,jj,jk,jp_tem,Krhs)                      & 
    28162891            &                 - (  ghamt(ji,jj,jk  )  & 
     
    28792954      !code saving tracer trends removed, replace with trdmxl_oce 
    28802955 
    2881       DO_3D( 0, 0, 0, 0, 1, jpkm1 )       ! add non-local u and v fluxes 
     2956      ! [comm_cleanup] ! DO_3D( 0, 0, 0, 0, 1, jpkm1 )       ! add non-local u and v fluxes 
     2957      DO_3D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 1, jpkm1 )       ! add non-local u and v fluxes 
    28822958         puu(ji,jj,jk,Krhs) =  puu(ji,jj,jk,Krhs)                      & 
    28832959            &                 - (  ghamu(ji,jj,jk  )  & 
Note: See TracChangeset for help on using the changeset viewer.