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 11467 for NEMO/branches/UKMO/dev_r10037_GPU/src/OCE/TRA/traadv.F90 – NEMO

Ignore:
Timestamp:
2019-08-22T11:49:08+02:00 (5 years ago)
Author:
andmirek
Message:

Ticket #2197 allocate arrays at the beggining of the run

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/dev_r10037_GPU/src/OCE/TRA/traadv.F90

    r10843 r11467  
    8383      !! ** Method  : - Update (ua,va) with the advection term following nadv 
    8484      !!---------------------------------------------------------------------- 
     85      USE scoce, ONLY : zun => scr1, zvn => scr2, zwn => scr3, &  ! 3D workspace 
     86                       ztrdt => scr4, ztrds => scr5 
    8587      INTEGER, INTENT(in) ::   kt   ! ocean time-step index 
    8688      ! 
    8789      INTEGER ::   jk   ! dummy loop index 
    88       REAL(wp), DIMENSION(jpi,jpj,jpk)        :: zun, zvn, zwn   ! 3D workspace 
    89       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::   ztrdt, ztrds 
    9090      !!---------------------------------------------------------------------- 
    9191      ! 
     
    138138      ! 
    139139      IF( l_trdtra )   THEN                    !* Save ta and sa trends 
    140          ALLOCATE( ztrdt(jpi,jpj,jpk), ztrds(jpi,jpj,jpk) ) 
    141140         ztrdt(:,:,:) = tsa(:,:,:,jp_tem) 
    142141         ztrds(:,:,:) = tsa(:,:,:,jp_sal) 
     
    165164         CALL trd_tra( kt, 'TRA', jp_tem, jptra_totad, ztrdt ) 
    166165         CALL trd_tra( kt, 'TRA', jp_sal, jptra_totad, ztrds ) 
    167          DEALLOCATE( ztrdt, ztrds ) 
    168166      ENDIF 
    169167      !                                              ! print mean trends (used for debugging) 
Note: See TracChangeset for help on using the changeset viewer.