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 13551 for NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/trazdf.F90 – NEMO

Ignore:
Timestamp:
2020-10-01T12:04:12+02:00 (4 years ago)
Author:
hadcv
Message:

#2365: Replace trd_tra workarounds with ctl_warn if using tiling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/trazdf.F90

    r13517 r13551  
    1313   !!---------------------------------------------------------------------- 
    1414   USE oce            ! ocean dynamics and tracers variables 
    15    USE dom_oce        ! ocean space and time domain variables  
    16    ! TEMP: This change not necessary after trd_tra is tiled 
    17    USE domain, ONLY : dom_tile 
     15   USE dom_oce        ! ocean space and time domain variables 
    1816   USE domvvl         ! variable volume 
    1917   USE phycst         ! physical constant 
     
    5856      ! 
    5957      INTEGER  ::   ji, jj, jk   ! Dummy loop indices 
    60       ! TEMP: This change not necessary after trd_tra is tiled 
    61       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, SAVE ::   ztrdt, ztrds   ! 3D workspace 
     58      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::   ztrdt, ztrds   ! 3D workspace 
    6259      !!--------------------------------------------------------------------- 
    6360      ! 
     
    7370      ! 
    7471      IF( l_trdtra )   THEN                  !* Save ta and sa trends 
    75          IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
    76             ! TEMP: This can be ST_2D(nn_hls) after trd_tra is tiled 
    77             ALLOCATE( ztrdt(jpi,jpj,jpk), ztrds(jpi,jpj,jpk) ) 
    78          ENDIF 
    79  
    80          DO_3D( 0, 0, 0, 0, 1, jpk ) 
    81             ztrdt(ji,jj,jk) = pts(ji,jj,jk,jp_tem,Kaa) 
    82             ztrds(ji,jj,jk) = pts(ji,jj,jk,jp_sal,Kaa) 
    83          END_3D 
     72         ALLOCATE( ztrdt(jpi,jpj,jpk), ztrds(jpi,jpj,jpk) ) 
     73         ztrdt(:,:,:) = pts(:,:,:,jp_tem,Kaa) 
     74         ztrds(:,:,:) = pts(:,:,:,jp_sal,Kaa) 
    8475      ENDIF 
    8576      ! 
     
    9485!!gm 
    9586 
    96       ! TEMP: These changes not necessary after trd_tra is tiled 
    9787      IF( l_trdtra )   THEN                      ! save the vertical diffusive trends for further diagnostics 
    98          DO_3D( 0, 0, 0, 0, 1, jpk ) 
    99             ztrdt(ji,jj,jk) = ( ( pts(ji,jj,jk,jp_tem,Kaa)*e3t(ji,jj,jk,Kaa) - pts(ji,jj,jk,jp_tem,Kbb)*e3t(ji,jj,jk,Kbb) ) & 
    100                &          / (e3t(ji,jj,jk,Kmm)*rDt) ) - ztrdt(ji,jj,jk) 
    101             ztrds(ji,jj,jk) = ( ( pts(ji,jj,jk,jp_sal,Kaa)*e3t(ji,jj,jk,Kaa) - pts(ji,jj,jk,jp_sal,Kbb)*e3t(ji,jj,jk,Kbb) ) & 
    102               &           / (e3t(ji,jj,jk,Kmm)*rDt) ) - ztrds(ji,jj,jk) 
    103          END_3D 
    104  
    105          IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only for the full domain 
    106             IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 )         ! Use full domain 
    107  
    108             ! TODO: TO BE TILED- trd_tra 
    109             CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_zdf, ztrdt ) 
    110             CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_sal, jptra_zdf, ztrds ) 
    111             DEALLOCATE( ztrdt , ztrds ) 
    112  
    113             IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = nijtile )   ! Revert to tile domain 
    114          ENDIF 
     88         DO jk = 1, jpk 
     89            ztrdt(:,:,jk) = (   (  pts(:,:,jk,jp_tem,Kaa)*e3t(:,:,jk,Kaa)     & 
     90               &                 - pts(:,:,jk,jp_tem,Kbb)*e3t(:,:,jk,Kbb)  )  & 
     91               &              / (  e3t(:,:,jk,Kmm)*rDt  )   )                 & 
     92               &          - ztrdt(:,:,jk) 
     93            ztrds(:,:,jk) = (   (  pts(:,:,jk,jp_sal,Kaa)*e3t(:,:,jk,Kaa)     & 
     94               &                 - pts(:,:,jk,jp_sal,Kbb)*e3t(:,:,jk,Kbb)  )  & 
     95               &             / (   e3t(:,:,jk,Kmm)*rDt  )   )                 & 
     96               &          - ztrds(:,:,jk) 
     97         END DO 
     98         CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_zdf, ztrdt ) 
     99         CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_sal, jptra_zdf, ztrds ) 
     100         DEALLOCATE( ztrdt , ztrds ) 
    115101      ENDIF 
    116102      !                                          ! print mean trends (used for debugging) 
Note: See TracChangeset for help on using the changeset viewer.