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 15620 – NEMO

Changeset 15620


Ignore:
Timestamp:
2021-12-29T10:51:43+01:00 (2 years ago)
Author:
techene
Message:

#2605 update RK3 loops according to the trunk transformation

Location:
NEMO/branches/2021/dev_r14318_RK3_stage1/src/OCE
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2021/dev_r14318_RK3_stage1/src/OCE/DYN/divhor.F90

    r15574 r15620  
    8484      pe3divUh(:,:,:) = 0._wp    !!gm to be applied to the halos only 
    8585      ! 
    86       DO_3D( 0, 0, 0, 0, 1, jpkm1 )                                                   
     86      DO_3D_OVR( nn_hls-1, nn_hls, nn_hls-1, nn_hls, 1, jpkm1 ) 
    8787         hdiv(ji,jj,jk) = (   e2u(ji  ,jj) * e3u(ji  ,jj,jk,Kmm) * puu(ji  ,jj,jk)      & 
    8888            &               - e2u(ji-1,jj) * e3u(ji-1,jj,jk,Kmm) * puu(ji-1,jj,jk)      & 
     
    101101      IF( ln_isf )   CALL isf_hdiv( kt, Kmm, hdiv )            !==  + ice-shelf mass exchange ==! 
    102102      ! 
    103       CALL lbc_lnk( 'divhor', hdiv, 'T', 1._wp )   !   (no sign change) 
     103      IF( nn_hls==1 )   CALL lbc_lnk( 'divhor', hdiv, 'T', 1._wp )   !   (no sign change) 
    104104      ! 
    105105!!gm Patch before suppression of hdiv from all modules that use it 
     
    108108!      END_3D 
    109109!JC: over whole domain, and after lbclnk on hdiv to prevent from reproducibility issues 
    110       DO jk=1, jpkm1 
    111          pe3divUh(:,:,jk) = hdiv(:,:,jk) * e3t(:,:,jk,Kmm) 
    112       END DO 
     110      DO_3D_OVR( nn_hls-1, nn_hls, nn_hls-1, nn_hls, 1, jpkm1 ) 
     111         pe3divUh(ji,jj,jk) = hdiv(ji,jj,jk) * e3t(ji,jj,jk,Kmm) 
     112      END_3D 
    113113!!gm end 
    114114      ! 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/src/OCE/DYN/sshwzv.F90

    r15574 r15620  
    329329            ! horizontal divergence of thickness diffusion transport ( velocity multiplied by e3t) 
    330330            ! - ML - note: computation already done in dom_vvl_sf_nxt. Could be optimized (not critical and clearer this way) 
    331             DO_2D( 0, 0, 0, 0 ) 
     331            DO_2D( nn_hls-1, nn_hls, nn_hls-1, nn_hls )  
    332332               zhdiv(ji,jj,jk) = r1_e1e2t(ji,jj) * ( un_td(ji,jj,jk) - un_td(ji-1,jj,jk) + vn_td(ji,jj,jk) - vn_td(ji,jj-1,jk) ) 
    333333            END_2D 
    334334         END DO 
    335          CALL lbc_lnk('sshwzv', zhdiv, 'T', 1.0_wp)  ! - ML - Perhaps not necessary: not used for horizontal "connexions" 
     335         IF( nn_hls == 1)   CALL lbc_lnk('sshwzv', zhdiv, 'T', 1.0_wp)  ! - ML - Perhaps not necessary: not used for horizontal "connexions" 
    336336         !                             ! Is it problematic to have a wrong vertical velocity in boundary cells? 
    337337         !                             ! Same question holds for hdiv. Perhaps just for security 
    338          DO jk = jpkm1, 1, -1                       ! integrate from the bottom the hor. divergence 
    339             ! computation of w 
    340             pww(:,:,jk) = pww(:,:,jk+1) - (   ze3div(:,:,jk) + zhdiv(:,:,jk)   & 
    341                &                            + r1_Dt * (  e3t(:,:,jk,Kaa)       & 
    342                &                                       - e3t(:,:,jk,Kbb) )   ) * tmask(:,:,jk) 
    343          END DO 
    344          !          IF( ln_vvl_layer ) pww(:,:,:) = 0.e0 
     338         DO_3DS( nn_hls-1, nn_hls, nn_hls-1, nn_hls, jpkm1, 1, -1 )     ! integrate from the bottom the hor. divergence 
     339            pww(ji,jj,jk) = pww(ji,jj,jk+1) - (   ze3div(ji,jj,jk) + zhdiv(ji,jj,jk)   & 
     340                 &                            + r1_Dt * (  e3t(ji,jj,jk,Kaa)       & 
     341                 &                                       - e3t(ji,jj,jk,Kbb) )   ) * tmask(ji,jj,jk) 
     342         END_3D 
     343         ! 
    345344         DEALLOCATE( zhdiv )  
    346345         !                                            !=================================! 
    347346      ELSEIF( ln_linssh )   THEN                      !==  linear free surface cases  ==! 
    348347         !                                            !=================================! 
    349          DO jk = jpkm1, 1, -1                               ! integrate from the bottom the hor. divergence 
    350             pww(:,:,jk) = pww(:,:,jk+1) - ze3div(:,:,jk) 
    351          END DO 
     348         DO_3DS( nn_hls-1, nn_hls, nn_hls-1, nn_hls, jpkm1, 1, -1 )     ! integrate from the bottom the hor. divergence 
     349            pww(ji,jj,jk) = pww(ji,jj,jk+1) - ze3div(ji,jj,jk)  
     350         END_3D 
    352351         !                                            !==========================================! 
    353352      ELSE                                            !==  Quasi-Eulerian vertical coordinate  ==!   ('key_qco') 
    354353         !                                            !==========================================! 
    355          DO jk = jpkm1, 1, -1                               ! integrate from the bottom the hor. divergence 
    356             !                                               ! NB: [e3t[a] -e3t[b] ]=e3t_0*[r3t[a]-r3t[b]] 
    357             pww(:,:,jk) = pww(:,:,jk+1) - (  ze3div(:,:,jk)                            & 
    358                &                            + r1_Dt * e3t_0(:,:,jk) * ( r3t(:,:,Kaa) - r3t(:,:,Kbb) )  ) * tmask(:,:,jk) 
    359          END DO 
     354         DO_3DS( nn_hls-1, nn_hls, nn_hls-1, nn_hls, jpkm1, 1, -1 )     ! integrate from the bottom the hor. divergence 
     355         !                                                              ! NB: [e3t[a] -e3t[b] ]=e3t_0*[r3t[a]-r3t[b]] 
     356            pww(ji,jj,jk) = pww(ji,jj,jk+1) - (  ze3div(ji,jj,jk)                            & 
     357               &                               + r1_Dt * e3t_0(ji,jj,jk) * ( r3t(ji,jj,Kaa) - r3t(ji,jj,Kbb) )  ) * tmask(ji,jj,jk) 
     358         END_3D 
    360359      ENDIF 
    361360 
    362361      IF( ln_bdy ) THEN 
    363362         DO jk = 1, jpkm1 
    364             pww(:,:,jk) = pww(:,:,jk) * bdytmask(:,:) 
     363            DO_2D( nn_hls-1, nn_hls, nn_hls-1, nn_hls ) 
     364               pww(ji,jj,jk) = pww(ji,jj,jk) * bdytmask(ji,jj) 
     365            END_2D 
    365366         END DO 
    366367      ENDIF 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/src/OCE/TRA/traqsr.F90

    r15574 r15620  
    180180         END_3D 
    181181         !                                                     !- sea-ice : store the 1st level attenuation coefficient 
    182          WHERE( etot3(A2D(0),1) /= 0._wp )   ;   fraqsr_1lev(A2D(0)) = 1._wp - etot3(A2D(0),2) / etot3(A2D(0),1) 
    183          ELSEWHERE                           ;   fraqsr_1lev(A2D(0)) = 1._wp 
     182         WHERE( etot3(A2D(nn_hls),1) /= 0._wp )   ;   fraqsr_1lev(A2D(nn_hls)) = 1._wp - etot3(A2D(nn_hls),2) / etot3(A2D(nn_hls),1) 
     183         ELSEWHERE                                ;   fraqsr_1lev(A2D(nn_hls)) = 1._wp 
    184184         END WHERE 
    185185         ! 
     
    208208      END_3D 
    209209      ! 
    210 !!st7-2 
    211210      ! sea-ice: store the 1st ocean level attenuation coefficient 
    212       DO_2D_OVR( nn_hls, nn_hls, nn_hls, nn_hls ) 
     211      DO_2D( 0, 0, 0, 0 ) 
    213212         IF( qsr(ji,jj) /= 0._wp ) THEN   ;   fraqsr_1lev(ji,jj) = qsr_hc(ji,jj,1) / ( r1_rho0_rcp * qsr(ji,jj) ) 
    214213         ELSE                             ;   fraqsr_1lev(ji,jj) = 1._wp 
     
    218217      !                                       !                otherwise restartability and reproducibility are broken  
    219218      CALL lbc_lnk( 'tra_qsr', fraqsr_1lev(:,:), 'T', 1._wp ) 
    220 !!st      CALL lbc_lnk( 'tra_qsr', qsr_hc(:,:,:), 'T', 1._wp ) 
    221219      ! 
    222220      IF( iom_use('qsr3d') ) THEN      ! output the shortwave Radiation distribution 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/src/OCE/TRA/trasbc.F90

    r15574 r15620  
    276276!!gm  This should be moved into sbcmod.F90 module ? (especially now that ln_traqsr is read in namsbc namelist) 
    277277      IF( .NOT.ln_traqsr  .AND. kstg == 1) THEN     ! no solar radiation penetration 
    278          DO_2D( 0, 0, 0, 0 ) 
     278         DO_2D_OVR( nn_hls, nn_hls, nn_hls, nn_hls ) 
    279279            qns(ji,jj) = qns(ji,jj) + qsr(ji,jj)         ! total heat flux in qns 
    280280            qsr(ji,jj) = 0._wp                           ! qsr set to zero 
Note: See TracChangeset for help on using the changeset viewer.