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/trasbc.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/trasbc.F90

    r13518 r13551  
    1919   USE sbc_oce        ! surface boundary condition: ocean 
    2020   USE dom_oce        ! ocean space domain variables 
    21    ! TEMP: This change not necessary after trd_tra is tiled 
    22    USE domain, ONLY : dom_tile 
    2321   USE phycst         ! physical constant 
    2422   USE eosbn2         ! Equation Of State 
     
    8179      INTEGER  ::   ikt, ikb                    ! local integers 
    8280      REAL(wp) ::   zfact, z1_e3t, zdep, ztim   ! local scalar 
    83       ! TEMP: This change not necessary after trd_tra is tiled 
    84       REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::  ztrdt, ztrds 
     81      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::  ztrdt, ztrds 
    8582      !!---------------------------------------------------------------------- 
    8683      ! 
     
    9693      ! 
    9794      IF( l_trdtra ) THEN                    !* Save ta and sa trends 
    98          IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
    99             ! TEMP: This can be ST_2D(nn_hls) after trd_tra is tiled 
    100             ALLOCATE( ztrdt(jpi,jpj,jpk), ztrds(jpi,jpj,jpk) ) 
    101          ENDIF 
    102  
    103          DO_3D( 0, 0, 0, 0, 1, jpk ) 
    104             ztrdt(ji,jj,jk) = pts(ji,jj,jk,jp_tem,Krhs) 
    105             ztrds(ji,jj,jk) = pts(ji,jj,jk,jp_sal,Krhs) 
    106          END_3D 
     95         ALLOCATE( ztrdt(jpi,jpj,jpk), ztrds(jpi,jpj,jpk) ) 
     96         ztrdt(:,:,:) = pts(:,:,:,jp_tem,Krhs) 
     97         ztrds(:,:,:) = pts(:,:,:,jp_sal,Krhs) 
    10798      ENDIF 
    10899      ! 
     
    160151      DO jn = 1, jpts               !==  update tracer trend  ==! 
    161152         DO_2D( 0, 0, 0, 0 ) 
    162             pts(ji,jj,1,jn,Krhs) = pts(ji,jj,1,jn,Krhs) + zfact * ( sbc_tsc_b(ji,jj,jn) + sbc_tsc(ji,jj,jn) ) / e3t(ji,jj,1,Kmm) 
     153            pts(ji,jj,1,jn,Krhs) = pts(ji,jj,1,jn,Krhs) + zfact * ( sbc_tsc_b(ji,jj,jn) + sbc_tsc(ji,jj,jn) )    & 
     154               &                                                / e3t(ji,jj,1,Kmm) 
    163155         END_2D 
    164156      END DO 
     
    192184      ENDIF 
    193185 
    194       IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
     186      IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only on the last tile 
    195187         IF( iom_use('rnf_x_sst') )   CALL iom_put( "rnf_x_sst", rnf*pts(:,:,1,jp_tem,Kmm) )   ! runoff term on sst 
    196188         IF( iom_use('rnf_x_sss') )   CALL iom_put( "rnf_x_sss", rnf*pts(:,:,1,jp_sal,Kmm) )   ! runoff term on sss 
     
    223215#endif 
    224216      ! 
    225       ! TEMP: These changes not necessary after trd_tra is tiled 
    226217      IF( l_trdtra )   THEN                      ! save the horizontal diffusive trends for further diagnostics 
    227          DO_3D( 0, 0, 0, 0, 1, jpk ) 
    228             ztrdt(ji,jj,jk) = pts(ji,jj,jk,jp_tem,Krhs) - ztrdt(ji,jj,jk) 
    229             ztrds(ji,jj,jk) = pts(ji,jj,jk,jp_sal,Krhs) - ztrds(ji,jj,jk) 
    230          END_3D 
    231  
    232          IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only for the full domain 
    233             IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 )         ! Use full domain 
    234  
    235             ! TODO: TO BE TILED- trd_tra 
    236             CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_nsr, ztrdt ) 
    237             CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_sal, jptra_nsr, ztrds ) 
    238             DEALLOCATE( ztrdt , ztrds ) 
    239  
    240             IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = nijtile )   ! Revert to tile domain 
    241          ENDIF 
     218         ztrdt(:,:,:) = pts(:,:,:,jp_tem,Krhs) - ztrdt(:,:,:) 
     219         ztrds(:,:,:) = pts(:,:,:,jp_sal,Krhs) - ztrds(:,:,:) 
     220         CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_nsr, ztrdt ) 
     221         CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_sal, jptra_nsr, ztrds ) 
     222         DEALLOCATE( ztrdt , ztrds ) 
    242223      ENDIF 
    243224      ! 
Note: See TracChangeset for help on using the changeset viewer.