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

    r2715 r3159  
    2828   USE iom 
    2929   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
     30   USE wrk_nemo_2      ! Memory Allocation 
     31   USE timing          ! Timing 
    3032 
    3133   IMPLICIT NONE 
     
    108110      INTEGER  ::   ji, jj, jk, jn           ! dummy loop indices   
    109111      REAL(wp) ::   zfact, z1_e3t, zsrau, zdep 
    110       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  ztrdt, ztrds 
     112      REAL(wp), POINTER, DIMENSION(:,:,:) ::  ztrdt, ztrds 
    111113      !!---------------------------------------------------------------------- 
    112  
     114      ! 
     115      IF( nn_timing == 1 )  CALL timing_start('tra_sbc') 
     116      ! 
    113117      IF( kt == nit000 ) THEN 
    114118         IF(lwp) WRITE(numout,*) 
     
    120124 
    121125      IF( l_trdtra )   THEN                    !* Save ta and sa trends 
    122          ALLOCATE( ztrdt(jpi,jpj,jpk) )   ;    ztrdt(:,:,:) = tsa(:,:,:,jp_tem) 
    123          ALLOCATE( ztrds(jpi,jpj,jpk) )   ;    ztrds(:,:,:) = tsa(:,:,:,jp_sal) 
     126         CALL wrk_alloc( jpi, jpj, jpk, ztrdt, ztrds )  
     127         ztrdt(:,:,:) = tsa(:,:,:,jp_tem) 
     128         ztrds(:,:,:) = tsa(:,:,:,jp_sal) 
    124129      ENDIF 
    125130 
     
    228233         CALL trd_tra( kt, 'TRA', jp_tem, jptra_trd_nsr, ztrdt ) 
    229234         CALL trd_tra( kt, 'TRA', jp_sal, jptra_trd_nsr, ztrds ) 
    230          DEALLOCATE( ztrdt )      ;     DEALLOCATE( ztrds ) 
     235         CALL wrk_dealloc( jpi, jpj, jpk, ztrdt, ztrds )  
    231236      ENDIF 
    232237      ! 
     
    234239         &                       tab3d_2=tsa(:,:,:,jp_sal), clinfo2=       ' Sa: ', mask2=tmask, clinfo3='tra' ) 
    235240      ! 
     241      IF( nn_timing == 1 )  CALL timing_stop('tra_sbc') 
     242      ! 
    236243   END SUBROUTINE tra_sbc 
    237244 
Note: See TracChangeset for help on using the changeset viewer.