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 14757 for NEMO/branches/2021/dev_r14393_HPC-03_Mele_Comm_Cleanup/src/OCE/ZDF/zdfgls.F90 – NEMO

Ignore:
Timestamp:
2021-04-27T17:33:44+02:00 (3 years ago)
Author:
francesca
Message:

Fortran 77 '.EQ.' operator replacement in conditional statements; [comm_cleanup] tags removal - ticket #2607

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2021/dev_r14393_HPC-03_Mele_Comm_Cleanup/src/OCE/ZDF/zdfgls.F90

    r14601 r14757  
    179179 
    180180      ! Compute surface, top and bottom friction at T-points 
    181       ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 )          !==  surface ocean friction 
    182181      DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 )          !==  surface ocean friction  
    183182         ustar2_surf(ji,jj) = r1_rho0 * taum(ji,jj) * tmask(ji,jj,1)   ! surface friction 
     
    187186      ! 
    188187      IF( .NOT.ln_drg_OFF ) THEN     !== top/bottom friction   (explicit before friction) 
    189          ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 )         ! bottom friction (explicit before friction) 
    190188         DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 )          ! bottom friction (explicit before friction) 
    191189            zmsku = 0.5_wp * ( 2._wp - umask(ji-1,jj,mbkt(ji,jj)) * umask(ji,jj,mbkt(ji,jj)) ) 
     
    195193         END_2D 
    196194         IF( ln_isfcav ) THEN 
    197             ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 )      ! top friction 
    198195            DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 )      ! top friction 
    199196               zmsku = 0.5_wp * ( 2. - umask(ji-1,jj,mikt(ji,jj)) * umask(ji,jj,mikt(ji,jj)) ) 
     
    223220      zhsro(:,:) = ( (1._wp-zice_fra(:,:)) * zhsro(:,:) + zice_fra(:,:) * rn_hsri )*tmask(:,:,1)  + (1._wp - tmask(:,:,1))*rn_hsro 
    224221      ! 
    225       ! [comm_cleanup] ! DO_3D( 0, 0, 0, 0, 2, jpkm1 )  !==  Compute dissipation rate  ==! 
    226222      DO_3D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 2, jpkm1 )  !==  Compute dissipation rate  ==! 
    227223         eps(ji,jj,jk)  = rc03 * en(ji,jj,jk) * SQRT( en(ji,jj,jk) ) / hmxl_n(ji,jj,jk) 
     
    233229 
    234230      IF( nn_clos == 0 ) THEN    ! Mellor-Yamada 
    235          ! [comm_cleanup] ! DO_3D( 0, 0, 0, 0, 2, jpkm1 ) 
    236231         DO_3D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 2, jpkm1 ) 
    237232            zup   = hmxl_n(ji,jj,jk) * gdepw(ji,jj,mbkt(ji,jj)+1,Kmm) 
     
    255250      ! Warning : after this step, en : right hand side of the matrix 
    256251 
    257       ! [comm_cleanup] ! DO_3D( 0, 0, 0, 0, 2, jpkm1 ) 
    258252      DO_3D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 2, jpkm1 ) 
    259253         ! 
     
    333327      ! at k=2, set de/dz=Fw 
    334328      !cbr 
    335       ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 )   ! zdiag zd_lw not defined/used on the halo 
    336329      DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 )   ! zdiag zd_lw not defined/used on the halo 
    337330         zdiag(ji,jj,2) = zdiag(ji,jj,2) +  zd_lw(ji,jj,2) ! Remove zd_lw from zdiag 
     
    355348         !                      ! en(ibot) = u*^2 / Co2 and hmxl_n(ibot) = rn_lmin 
    356349         !                      ! Balance between the production and the dissipation terms 
    357          ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
    358350         DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    359351!!gm This means that bottom and ocean w-level above have a specified "en" value.   Sure ???? 
     
    374366         ! 
    375367         IF( ln_isfcav) THEN     ! top boundary   (ocean cavity) 
    376             ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
    377368            DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    378369               itop   = mikt(ji,jj)       ! k   top w-point 
     
    393384      CASE ( 1 )             ! Neumman boundary condition 
    394385         ! 
    395          ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
    396386         DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    397387            ibot   = mbkt(ji,jj) + 1      ! k   bottom level of w-point 
     
    409399         END_2D 
    410400         IF( ln_isfcav) THEN     ! top boundary   (ocean cavity) 
    411             ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
    412401            DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    413402               itop   = mikt(ji,jj)       ! k   top w-point 
     
    431420      ! ---------------------------------------------------------- 
    432421      ! 
    433       ! [comm_cleanup] ! DO_3D( 0, 0, 0, 0, 2, jpkm1 )                ! First recurrence : Dk = Dk - Lk * Uk-1 / Dk-1  
    434422      DO_3D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 2, jpkm1 )                ! First recurrence : Dk = Dk - Lk * Uk-1 / Dk-1 
    435423         zdiag(ji,jj,jk) = zdiag(ji,jj,jk) - zd_lw(ji,jj,jk) * zd_up(ji,jj,jk-1) / zdiag(ji,jj,jk-1) 
    436424      END_3D 
    437       ! [comm_cleanup] ! DO_3D( 0, 0, 0, 0, 2, jpkm1 )                ! Second recurrence : Lk = RHSk - Lk / Dk-1 * Lk-1 
    438425      DO_3D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 2, jpkm1 )                ! Second recurrence : Lk = RHSk - Lk / Dk-1 * Lk-1 
    439426         zd_lw(ji,jj,jk) = en(ji,jj,jk) - zd_lw(ji,jj,jk) / zdiag(ji,jj,jk-1) * zd_lw(ji,jj,jk-1) 
    440427      END_3D 
    441       ! [comm_cleanup] ! DO_3DS( 0, 0, 0, 0, jpkm1, 2, -1 )           ! Third recurrence : Ek = ( Lk - Uk * Ek+1 ) / Dk 
    442428      DO_3DS( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, jpkm1, 2, -1 )           ! Third recurrence : Ek = ( Lk - Uk * Ek+1 ) / Dk 
    443429         en(ji,jj,jk) = ( zd_lw(ji,jj,jk) - zd_up(ji,jj,jk) * en(ji,jj,jk+1) ) / zdiag(ji,jj,jk) 
     
    455441      ! 
    456442      CASE( 0 )               ! k-kl  (Mellor-Yamada) 
    457          ! [comm_cleanup] ! DO_3D( 0, 0, 0, 0, 2, jpkm1 ) 
    458443         DO_3D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 2, jpkm1 ) 
    459444            psi(ji,jj,jk)  = eb(ji,jj,jk) * hmxl_b(ji,jj,jk) 
     
    461446         ! 
    462447      CASE( 1 )               ! k-eps 
    463          ! [comm_cleanup] ! DO_3D( 0, 0, 0, 0, 2, jpkm1 ) 
    464448         DO_3D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 2, jpkm1 ) 
    465449            psi(ji,jj,jk)  = eps(ji,jj,jk) 
     
    467451         ! 
    468452      CASE( 2 )               ! k-w 
    469          ! [comm_cleanup] ! DO_3D( 0, 0, 0, 0, 2, jpkm1 ) 
    470453         DO_3D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 2, jpkm1 ) 
    471454            psi(ji,jj,jk)  = SQRT( eb(ji,jj,jk) ) / ( rc0 * hmxl_b(ji,jj,jk) ) 
     
    473456         ! 
    474457      CASE( 3 )               ! generic 
    475          ! [comm_cleanup] ! DO_3D( 0, 0, 0, 0, 2, jpkm1 ) 
    476458         DO_3D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 2, jpkm1 ) 
    477459            psi(ji,jj,jk)  = rc02 * eb(ji,jj,jk) * hmxl_b(ji,jj,jk)**rnn 
     
    487469      ! Warning : after this step, en : right hand side of the matrix 
    488470 
    489       ! [comm_cleanup] ! DO_3D( 0, 0, 0, 0, 2, jpkm1 ) 
    490471      DO_3D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 2, jpkm1 ) 
    491472         ! 
     
    560541         ! 
    561542         ! Neumann condition at k=2 
    562          ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 )   ! zdiag zd_lw not defined/used on the halo 
    563543         DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 )   ! zdiag zd_lw not defined/used on the halo 
    564544            zdiag(ji,jj,2) = zdiag(ji,jj,2) +  zd_lw(ji,jj,2) ! Remove zd_lw from zdiag 
     
    589569         !                      ! en(ibot) = u*^2 / Co2 and hmxl_n(ibot) = vkarmn * r_z0_bot 
    590570         !                      ! Balance between the production and the dissipation terms 
    591          ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
    592571         DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    593572            ibot   = mbkt(ji,jj) + 1      ! k   bottom level of w-point 
     
    609588      CASE ( 1 )             ! Neumman boundary condition 
    610589         ! 
    611          ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 
    612590         DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 
    613591            ibot   = mbkt(ji,jj) + 1      ! k   bottom level of w-point 
     
    638616      ! ---------------- 
    639617      ! 
    640       ! [comm_cleanup] ! DO_3D( 0, 0, 0, 0, 2, jpkm1 )                ! First recurrence : Dk = Dk - Lk * Uk-1 / Dk-1  
    641618      DO_3D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 2, jpkm1 )                ! First recurrence : Dk = Dk - Lk * Uk-1 / Dk-1 
    642619         zdiag(ji,jj,jk) = zdiag(ji,jj,jk) - zd_lw(ji,jj,jk) * zd_up(ji,jj,jk-1) / zdiag(ji,jj,jk-1) 
    643620      END_3D 
    644       ! [comm_cleanup] ! DO_3D( 0, 0, 0, 0, 2, jpkm1 )                ! Second recurrence : Lk = RHSk - Lk / Dk-1 * Lk-1 
    645621      DO_3D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 2, jpkm1 )                ! Second recurrence : Lk = RHSk - Lk / Dk-1 * Lk-1 
    646622         zd_lw(ji,jj,jk) = psi(ji,jj,jk) - zd_lw(ji,jj,jk) / zdiag(ji,jj,jk-1) * zd_lw(ji,jj,jk-1) 
    647623      END_3D 
    648       ! [comm_cleanup] ! DO_3DS( 0, 0, 0, 0, jpkm1, 2, -1 )           ! Third recurrence : Ek = ( Lk - Uk * Ek+1 ) / Dk 
    649624      DO_3DS( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, jpkm1, 2, -1 )           ! Third recurrence : Ek = ( Lk - Uk * Ek+1 ) / Dk 
    650625         psi(ji,jj,jk) = ( zd_lw(ji,jj,jk) - zd_up(ji,jj,jk) * psi(ji,jj,jk+1) ) / zdiag(ji,jj,jk) 
     
    657632      ! 
    658633      CASE( 0 )               ! k-kl  (Mellor-Yamada) 
    659          ! [comm_cleanup] ! DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 
    660634         DO_3D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 1, jpkm1 ) 
    661635            eps(ji,jj,jk) = rc03 * en(ji,jj,jk) * en(ji,jj,jk) * SQRT( en(ji,jj,jk) ) / MAX( psi(ji,jj,jk), rn_epsmin) 
     
    663637         ! 
    664638      CASE( 1 )               ! k-eps 
    665          ! [comm_cleanup] ! DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 
    666639         DO_3D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 1, jpkm1 ) 
    667640            eps(ji,jj,jk) = psi(ji,jj,jk) 
     
    669642         ! 
    670643      CASE( 2 )               ! k-w 
    671          ! [comm_cleanup] ! DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 
    672644         DO_3D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 1, jpkm1 ) 
    673645            eps(ji,jj,jk) = rc04 * en(ji,jj,jk) * psi(ji,jj,jk) 
     
    678650         zex1  =      ( 1.5_wp + rmm/rnn ) 
    679651         zex2  = -1._wp / rnn 
    680          ! [comm_cleanup] ! DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 
    681652         DO_3D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 1, jpkm1 ) 
    682653            eps(ji,jj,jk) = zcoef * en(ji,jj,jk)**zex1 * psi(ji,jj,jk)**zex2 
     
    687658      ! Limit dissipation rate under stable stratification 
    688659      ! -------------------------------------------------- 
    689       ! [comm_cleanup] ! DO_3D( 0, 0, 0, 0, 1, jpkm1 )   ! Note that this set boundary conditions on hmxl_n at the same time 
    690660      DO_3D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 1, jpkm1 )   ! Note that this set boundary conditions on hmxl_n at the same time 
    691661         ! limitation 
     
    704674      ! 
    705675      CASE ( 0 , 1 )             ! Galperin or Kantha-Clayson stability functions 
    706          ! [comm_cleanup] ! DO_3D( 0, 0, 0, 0, 2, jpkm1 ) 
    707676         DO_3D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 2, jpkm1 ) 
    708677            ! zcof =  l²/q² 
     
    722691         ! 
    723692      CASE ( 2, 3 )               ! Canuto stability functions 
    724          ! [comm_cleanup] ! DO_3D( 0, 0, 0, 0, 2, jpkm1 ) 
    725693         DO_3D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 2, jpkm1 ) 
    726694            ! zcof =  l²/q² 
     
    755723      ! default value, in case jpk > mbkt(ji,jj)+1. Not needed but avoid a bug when looking for undefined values (-fpe0) 
    756724      zstm(:,:,jpk) = 0. 
    757       ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 )             ! update bottom with good values 
    758725      DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 )             ! update bottom with good values 
    759726         zstm(ji,jj,mbkt(ji,jj)+1) = zstm(ji,jj,mbkt(ji,jj)) 
     
    771738      !     later overwritten by surface/bottom boundaries conditions, so we don't really care of p_avm(:,:1) and p_avm(:,:jpk) 
    772739      !     for zd_lw and zd_up but they have to be defined to avoid a bug when looking for undefined values (-fpe0) 
    773       ! [comm_cleanup] ! DO_3D( 0, 0, 0, 0, 1, jpk ) 
    774740      DO_3D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 1, jpk ) 
    775741         zsqen = SQRT( 2._wp * en(ji,jj,jk) ) * hmxl_n(ji,jj,jk) 
Note: See TracChangeset for help on using the changeset viewer.