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 14713 for NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/TRA/traldf_triad.F90 – NEMO

Ignore:
Timestamp:
2021-04-14T12:24:08+02:00 (4 years ago)
Author:
hadcv
Message:

#2600: Resolve uninitialised arrays in traldf_triad.F90 from [14667]

File:
1 edited

Legend:

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

    r14680 r14713  
    113113      REAL(wp) ::   ze1ur, ze2vr, ze3wr, zdxt, zdyt, zdzt, zdyt_jp1, ze3wr_jp1, zdzt_jp1, zah_slp1, zah_slp_jp1, zaei_slp_jp1 
    114114      REAL(wp) ::   zah_slp, zaei_slp, zdxt_ip1, ze3wr_ip1, zdzt_ip1, zah_slp_ip1, zaei_slp_ip1, zaei_slp1 
    115       REAL(wp), DIMENSION(A2D(nn_hls),0:1)     ::   zdkt3d                                           ! vertical tracer gradient at 2 levels 
    116       REAL(wp), DIMENSION(A2D(nn_hls)        ) ::   z2d                                              ! 2D workspace 
    117       REAL(wp), DIMENSION(A2D(nn_hls)    ,jpk) ::   zdit, zdjt, zftu, zftv, ztfw, zpsi_uw, zpsi_vw   ! 3D     - 
     115      REAL(wp), DIMENSION(A2D(nn_hls),0:1) ::   zdkt3d                                           ! vertical tracer gradient at 2 levels 
     116      REAL(wp), DIMENSION(A2D(nn_hls)    ) ::   z2d                                              ! 2D workspace 
     117      REAL(wp), DIMENSION(A2D(nn_hls),jpk) ::   zdit, zdjt, zftu, zftv, ztfw, zpsi_uw, zpsi_vw   ! 3D     - 
    118118      !!---------------------------------------------------------------------- 
    119119      ! 
     
    264264         zftu(:,:,:) = 0._wp 
    265265         zftv(:,:,:) = 0._wp 
     266         ! NOTE: [tiling] these are zeroed to avoid floating point exceptions due to undefined values when calculating zdxt_ip1 & zdyt_jp1 
     267         zdit(:,:,:) = 0._wp 
     268         zdjt(:,:,:) = 0._wp 
    266269         ! 
    267270         ! [comm_cleanup] ! DO_3D( 1, 0, 1, 0, 1, jpkm1 )    !==  before lateral T & S gradients at T-level jk  ==! 
    268          DO_3D( iij, iij-1, iij, iij-1, 1, jpkm1 ) 
     271         DO_3D( iij, iij-1, iij, iij-1, 1, jpkm1 )    !==  before lateral T & S gradients at T-level jk  ==! 
    269272            zdit(ji,jj,jk) = ( pt(ji+1,jj  ,jk,jn) - pt(ji,jj,jk,jn) ) * umask(ji,jj,jk) 
    270273            zdjt(ji,jj,jk) = ( pt(ji  ,jj+1,jk,jn) - pt(ji,jj,jk,jn) ) * vmask(ji,jj,jk) 
     
    272275         IF( ln_zps .AND. l_grad_zps ) THEN    ! partial steps: correction at top/bottom ocean level 
    273276            ! [comm_cleanup] ! DO_2D( 1, 0, 1, 0 )                    ! bottom level 
    274             DO_2D( iij, iij-1, iij, iij-1 ) 
     277            DO_2D( iij, iij-1, iij, iij-1 )                    ! bottom level 
    275278               zdit(ji,jj,mbku(ji,jj)) = pgu(ji,jj,jn) 
    276279               zdjt(ji,jj,mbkv(ji,jj)) = pgv(ji,jj,jn) 
     
    306309            ! 
    307310            zaei_slp = 0._wp 
     311            zaei_slp_ip1 = 0._wp 
     312            zaei_slp_jp1 = 0._wp 
     313            zaei_slp1 = 0._wp 
    308314            ! 
    309315            IF( ln_botmix_triad ) THEN 
Note: See TracChangeset for help on using the changeset viewer.