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 3159 for branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90 – NEMO

Ignore:
Timestamp:
2011-11-18T22:41:44+01:00 (13 years ago)
Author:
cetlod
Message:

New dynamical allocation + timing on TRA/ routines

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90

    r3116 r3159  
    4646   USE agrif_opa_interp 
    4747#endif 
     48   USE wrk_nemo_2      ! Memory allocation 
     49   USE timing          ! Timing 
    4850 
    4951   IMPLICIT NONE 
     
    9294      INTEGER  ::   jk, jn    ! dummy loop indices 
    9395      REAL(wp) ::   zfact     ! local scalars 
    94       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  ztrdt, ztrds 
    95       !!---------------------------------------------------------------------- 
    96  
     96      REAL(wp), POINTER, DIMENSION(:,:,:) ::  ztrdt, ztrds 
     97      !!---------------------------------------------------------------------- 
     98      ! 
     99      IF( nn_timing == 1 )  CALL timing_start( 'tra_nxt') 
     100      ! 
    97101      IF( kt == nit000 ) THEN 
    98102         IF(lwp) WRITE(numout,*) 
     
    125129      ! trends computation initialisation 
    126130      IF( l_trdtra )   THEN                    ! store now fields before applying the Asselin filter 
    127          ALLOCATE( ztrdt(jpi,jpj,jpk) )   ;    ztrdt(:,:,:) = tsn(:,:,:,jp_tem)  
    128          ALLOCATE( ztrds(jpi,jpj,jpk) )   ;    ztrds(:,:,:) = tsn(:,:,:,jp_sal) 
     131         CALL wrk_alloc( jpi, jpj, jpk, ztrdt, ztrds ) 
     132         ztrdt(:,:,:) = tsn(:,:,:,jp_tem)  
     133         ztrds(:,:,:) = tsn(:,:,:,jp_sal) 
    129134      ENDIF 
    130135 
     
    156161         CALL trd_tra( kt, 'TRA', jp_tem, jptra_trd_atf, ztrdt ) 
    157162         CALL trd_tra( kt, 'TRA', jp_sal, jptra_trd_atf, ztrds ) 
    158          DEALLOCATE( ztrdt )      ;     DEALLOCATE( ztrds )  
     163         CALL wrk_dealloc( jpi, jpj, jpk, ztrdt, ztrds ) 
    159164      END IF 
    160165      ! 
     
    162167      IF(ln_ctl)   CALL prt_ctl( tab3d_1=tsn(:,:,:,jp_tem), clinfo1=' nxt  - Tn: ', mask1=tmask,   & 
    163168         &                       tab3d_2=tsn(:,:,:,jp_sal), clinfo2=       ' Sn: ', mask2=tmask ) 
     169      ! 
     170      ! 
     171      IF( nn_timing == 1 )  CALL timing_stop('tra_nxt') 
    164172      ! 
    165173   END SUBROUTINE tra_nxt 
     
    270278      REAL(wp) ::   zfact2, ze3t_b, ze3t_n, ze3t_a, ze3t_f, ze3t_d   !   -      - 
    271279      !!---------------------------------------------------------------------- 
    272  
     280      ! 
    273281      IF( kt == kit000 )  THEN 
    274282         IF(lwp) WRITE(numout,*) 
Note: See TracChangeset for help on using the changeset viewer.