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

Ignore:
Timestamp:
2020-09-24T20:49:07+02:00 (4 years ago)
Author:
hadcv
Message:

Tiling for modules before tra_adv

File:
1 edited

Legend:

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

    r13295 r13518  
    1717   USE oce            ! ocean variables 
    1818   USE dom_oce        ! domain: ocean 
     19   ! TEMP: This change not necessary after trd_tra is tiled 
     20   USE domain, ONLY : dom_tile 
    1921   USE phycst         ! physical constants 
    2022   USE trd_oce        ! trends: ocean variables 
     
    8082      REAL(wp), DIMENSION(jpi,jpj,jpk,jpts,jpt), INTENT(inout) :: pts        ! active tracers and RHS of tracer equation 
    8183      ! 
    82       INTEGER  ::   ji, jj    ! dummy loop indices 
    83       REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   ztrdt   ! 3D workspace 
     84      INTEGER  ::   ji, jj, jk    ! dummy loop indices 
     85      ! TEMP: This change not necessary after trd_tra is tiled 
     86      REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   ztrdt   ! 3D workspace 
    8487      !!---------------------------------------------------------------------- 
    8588      ! 
    8689      IF( ln_timing )   CALL timing_start('tra_bbc') 
    8790      ! 
    88       IF( l_trdtra )   THEN         ! Save the input temperature trend 
    89          ALLOCATE( ztrdt(jpi,jpj,jpk) ) 
    90          ztrdt(:,:,:) = pts(:,:,:,jp_tem,Krhs) 
     91      IF( l_trdtra ) THEN           ! Save the input temperature trend 
     92         IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
     93            ! TEMP: This can be ST_2D(nn_hls) after trd_tra is tiled 
     94            ALLOCATE( ztrdt(jpi,jpj,jpk) ) 
     95         ENDIF 
     96 
     97         DO_3D( 0, 0, 0, 0, 1, jpk ) 
     98            ztrdt(ji,jj,jk) = pts(ji,jj,jk,jp_tem,Krhs) 
     99         END_3D 
    91100      ENDIF 
    92101      !                             !  Add the geothermal trend on temperature 
     
    96105      END_2D 
    97106      ! 
    98       CALL lbc_lnk( 'trabbc', pts(:,:,:,jp_tem,Krhs) , 'T', 1.0_wp ) 
    99       ! 
    100       IF( l_trdtra ) THEN        ! Send the trend for diagnostics 
    101          ztrdt(:,:,:) = pts(:,:,:,jp_tem,Krhs) - ztrdt(:,:,:) 
    102          CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_bbc, ztrdt ) 
    103          DEALLOCATE( ztrdt ) 
    104       ENDIF 
    105       ! 
    106       CALL iom_put ( "hfgeou" , rho0_rcp * qgh_trd0(:,:) ) 
    107       IF(sn_cfctl%l_prtctl)   CALL prt_ctl( tab3d_1=pts(:,:,:,jp_tem,Krhs), clinfo1=' bbc  - Ta: ', mask1=tmask, clinfo3='tra-ta' ) 
     107      ! TEMP: These changes not necessary after trd_tra is tiled, lbc_lnk not necessary if using XIOS (subdomain support, will not output haloes) 
     108      IF( l_trdtra ) THEN 
     109         DO_3D( 0, 0, 0, 0, 1, jpk ) 
     110            ztrdt(ji,jj,jk) = pts(ji,jj,jk,jp_tem,Krhs) - ztrdt(ji,jj,jk) 
     111         END_3D 
     112      ENDIF 
     113 
     114      IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only for the full domain 
     115         ! 
     116         IF( l_trdtra ) THEN        ! Send the trend for diagnostics 
     117            IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 )         ! Use full domain 
     118 
     119            ! TODO: TO BE TILED- trd_tra 
     120            CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_bbc, ztrdt ) 
     121            DEALLOCATE( ztrdt ) 
     122 
     123            IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = nijtile )   ! Revert to tile domain 
     124         ENDIF 
     125         ! 
     126         CALL iom_put ( "hfgeou" , rho0_rcp * qgh_trd0(:,:) ) 
     127      ENDIF 
     128 
     129      IF(sn_cfctl%l_prtctl)   CALL prt_ctl( tab3d_1=pts(:,:,:,jp_tem,Krhs), clinfo1=' bbc  - Ta: ', mask1=tmask, & 
     130         &                                  clinfo3='tra-ta' ) 
    108131      ! 
    109132      IF( ln_timing )   CALL timing_stop('tra_bbc') 
Note: See TracChangeset for help on using the changeset viewer.