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

    r13517 r13551  
    1717   USE oce            ! ocean dynamics and active tracers 
    1818   USE dom_oce        ! ocean space and time domain 
    19    ! TEMP: This change not necessary after trd_tra is tiled and extra haloes development (lbc_lnk removed) 
     19   ! TEMP: This change not necessary after extra haloes development (lbc_lnk removed) 
    2020   USE domain, ONLY : dom_tile 
    2121   USE phycst         ! physical constants 
     
    7777      REAL(wp), DIMENSION(ST_2D(nn_hls),jpk     )   ::   zn2              ! N^2 
    7878      REAL(wp), DIMENSION(ST_2D(nn_hls),jpk,jpts)   ::   zab              ! alpha and beta 
    79       ! TEMP: This change not necessary after trd_tra is tiled 
    80       REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   ztrdt, ztrds ! 3D workspace 
     79      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   ztrdt, ztrds ! 3D workspace 
    8180      ! 
    8281      LOGICAL, PARAMETER :: l_LB_debug = .FALSE. ! set to true if you want to follow what is 
     
    8685      ! 
    8786      IF( ln_timing )   CALL timing_start('tra_npc') 
    88  
    89       IF( l_trdtra )   THEN 
    90          IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
    91             ! TEMP: This can be ST_2D(nn_hls) after trd_tra is tiled 
    92             ALLOCATE( ztrdt(jpi,jpj,jpk), ztrds(jpi,jpj,jpk) ) 
    93          ENDIF 
    94       ENDIF 
    9587      ! 
    9688      IF( MOD( kt, nn_npc ) == 0 ) THEN 
    9789         ! 
    9890         IF( l_trdtra )   THEN                    !* Save initial after fields 
    99             DO_3D( 0, 0, 0, 0, 1, jpk ) 
    100                ztrdt(ji,jj,jk) = pts(ji,jj,jk,jp_tem,Kaa) 
    101                ztrds(ji,jj,jk) = pts(ji,jj,jk,jp_sal,Kaa) 
    102             END_3D 
     91            ALLOCATE( ztrdt(jpi,jpj,jpk) , ztrds(jpi,jpj,jpk) ) 
     92            ztrdt(:,:,:) = pts(:,:,:,jp_tem,Kaa) 
     93            ztrds(:,:,:) = pts(:,:,:,jp_sal,Kaa) 
    10394         ENDIF 
    10495         ! 
     
    314305         END_2D 
    315306         ! 
    316          ! TEMP: These changes not necessary after trd_tra is tiled and extra haloes development (lbc_lnk removed) 
    317          IF( l_trdtra ) THEN 
     307         IF( l_trdtra ) THEN         ! send the Non penetrative mixing trends for diagnostic 
    318308            z1_rDt = 1._wp / (2._wp * rn_Dt) 
    319  
    320             DO_3D( 0, 0, 0, 0, 1, jpk ) 
    321                ztrdt(ji,jj,jk) = ( pts(ji,jj,jk,jp_tem,Kaa) - ztrdt(ji,jj,jk) ) * z1_rDt 
    322                ztrds(ji,jj,jk) = ( pts(ji,jj,jk,jp_sal,Kaa) - ztrds(ji,jj,jk) ) * z1_rDt 
    323             END_3D 
     309            ztrdt(:,:,:) = ( pts(:,:,:,jp_tem,Kaa) - ztrdt(:,:,:) ) * z1_rDt 
     310            ztrds(:,:,:) = ( pts(:,:,:,jp_sal,Kaa) - ztrds(:,:,:) ) * z1_rDt 
     311            CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_npc, ztrdt ) 
     312            CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_sal, jptra_npc, ztrds ) 
     313            DEALLOCATE( ztrdt, ztrds ) 
    324314         ENDIF 
    325  
     315         ! 
     316         ! TEMP: This change not necessary after extra haloes development (lbc_lnk removed) 
    326317         IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only for the full domain 
    327             IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 )         ! Use full domain 
    328  
    329             IF( l_trdtra ) THEN         ! send the Non penetrative mixing trends for diagnostic 
    330                ! TODO: TO BE TILED- trd_tra 
    331                CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_npc, ztrdt ) 
    332                CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_sal, jptra_npc, ztrds ) 
    333                DEALLOCATE( ztrdt, ztrds ) 
    334             ENDIF 
    335  
    336             IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = nijtile )   ! Revert to tile domain 
    337             ! 
    338318            CALL lbc_lnk_multi( 'tranpc', pts(:,:,:,jp_tem,Kaa), 'T', 1.0_wp, pts(:,:,:,jp_sal,Kaa), 'T', 1.0_wp ) 
    339319            ! 
Note: See TracChangeset for help on using the changeset viewer.