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 12906 for NEMO/branches/UKMO/dev_r12866_HPC-02_Daley_Tiling_trial_extra_halo/src/OCE/TRA/traldf.F90 – NEMO

Ignore:
Timestamp:
2020-05-11T19:19:46+02:00 (4 years ago)
Author:
hadcv
Message:

Implement tiling trial in extended haloes development

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/dev_r12866_HPC-02_Daley_Tiling_trial_extra_halo/src/OCE/TRA/traldf.F90

    r12377 r12906  
    5858      !!---------------------------------------------------------------------- 
    5959      ! 
    60       IF( ln_timing )   CALL timing_start('tra_ldf') 
     60      IF( ntile == 1 )  THEN                      ! Do only on the first tile 
     61         ! TODO: TO BE TILED 
     62         IF( ln_timing )   CALL timing_start('tra_ldf') 
     63      ENDIF 
    6164      ! 
    62       IF( l_trdtra )   THEN                    !* Save ta and sa trends 
    63          ALLOCATE( ztrdt(jpi,jpj,jpk) , ztrds(jpi,jpj,jpk) )  
    64          ztrdt(:,:,:) = pts(:,:,:,jp_tem,Krhs)  
    65          ztrds(:,:,:) = pts(:,:,:,jp_sal,Krhs) 
     65      IF( ntile == nijtile )  THEN                ! Do only after all tiles finish 
     66         IF( l_trdtra )   THEN                    !* Save ta and sa trends 
     67            ! TODO: TO BE TILED 
     68            ALLOCATE( ztrdt(jpi,jpj,jpk) , ztrds(jpi,jpj,jpk) ) 
     69            ztrdt(:,:,:) = pts(:,:,:,jp_tem,Krhs) 
     70            ztrds(:,:,:) = pts(:,:,:,jp_sal,Krhs) 
     71         ENDIF 
    6672      ENDIF 
    6773      ! 
     
    7783      END SELECT 
    7884      ! 
    79       IF( l_trdtra )   THEN                    !* save the horizontal diffusive trends for further diagnostics 
    80          ztrdt(:,:,:) = pts(:,:,:,jp_tem,Krhs) - ztrdt(:,:,:) 
    81          ztrds(:,:,:) = pts(:,:,:,jp_sal,Krhs) - ztrds(:,:,:) 
    82          CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_ldf, ztrdt ) 
    83          CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_sal, jptra_ldf, ztrds ) 
    84          DEALLOCATE( ztrdt, ztrds )  
     85      IF( ntile == nijtile )  THEN                ! Do only after all tiles finish 
     86         IF( l_trdtra )   THEN                    !* save the horizontal diffusive trends for further diagnostics 
     87            ! TODO: TO BE TILED 
     88            ztrdt(:,:,:) = pts(:,:,:,jp_tem,Krhs) - ztrdt(:,:,:) 
     89            ztrds(:,:,:) = pts(:,:,:,jp_sal,Krhs) - ztrds(:,:,:) 
     90            ! TODO: TO BE TILED 
     91            CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_ldf, ztrdt ) 
     92            CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_sal, jptra_ldf, ztrds ) 
     93            DEALLOCATE( ztrdt, ztrds ) 
     94         ENDIF 
     95 
     96         !                                        !* print mean trends (used for debugging) 
     97         ! TODO: TO BE TILED 
     98         IF(sn_cfctl%l_prtctl)   CALL prt_ctl( tab3d_1=pts(:,:,:,jp_tem,Krhs), clinfo1=' ldf  - Ta: ', mask1=tmask,               & 
     99            &                                  tab3d_2=pts(:,:,:,jp_sal,Krhs), clinfo2=       ' Sa: ', mask2=tmask, clinfo3='tra' ) 
     100         ! 
     101         ! TODO: TO BE TILED 
     102         IF( ln_timing )   CALL timing_stop('tra_ldf') 
    85103      ENDIF 
    86       !                                        !* print mean trends (used for debugging) 
    87       IF(sn_cfctl%l_prtctl)   CALL prt_ctl( tab3d_1=pts(:,:,:,jp_tem,Krhs), clinfo1=' ldf  - Ta: ', mask1=tmask,               & 
    88          &                                  tab3d_2=pts(:,:,:,jp_sal,Krhs), clinfo2=       ' Sa: ', mask2=tmask, clinfo3='tra' ) 
    89       ! 
    90       IF( ln_timing )   CALL timing_stop('tra_ldf') 
    91104      ! 
    92105   END SUBROUTINE tra_ldf 
Note: See TracChangeset for help on using the changeset viewer.