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 3162 for branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/DOM/dtatsd.F90 – NEMO

Ignore:
Timestamp:
2011-11-20T17:38:17+01:00 (12 years ago)
Author:
cetlod
Message:

New dynamical allocation & timing in OPA_SRC/DOM and OPA_SRC/SOL routines

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/DOM/dtatsd.F90

    r3132 r3162  
    2121   USE phycst          ! physical constants 
    2222   USE lib_mpp         ! MPP library 
     23   USE wrk_nemo_2      ! Memory allocation 
     24   USE timing          ! Timing 
    2325 
    2426   IMPLICIT NONE 
     
    6163      NAMELIST/namtsd/   ln_tsd_init, ln_tsd_tradmp, cn_dir, sn_tem, sn_sal 
    6264      !!---------------------------------------------------------------------- 
    63   
     65      ! 
     66      IF( nn_timing == 1 )  CALL timing_start('dta_tsd_init') 
     67      ! 
    6468      !                             ! set default namelist values  
    6569      cn_dir = './'                       ! directory in which the model is executed 
     
    116120         ! 
    117121      ENDIF 
     122      ! 
     123      IF( nn_timing == 1 )  CALL timing_stop('dta_tsd_init') 
    118124      ! 
    119125   END SUBROUTINE dta_tsd_init 
     
    141147      INTEGER ::   ik, il0, il1, ii0, ii1, ij0, ij1   ! local integers 
    142148      REAL(wp)::   zl, zi 
    143       REAL(wp), DIMENSION(jpk) ::  ztp, zsp   ! 1D workspace 
    144       !!---------------------------------------------------------------------- 
     149      REAL(wp), POINTER, DIMENSION(:) ::  ztp, zsp   ! 1D workspace 
     150      !!---------------------------------------------------------------------- 
     151      ! 
     152      IF( nn_timing == 1 )  CALL timing_start('dta_tsd') 
    145153      ! 
    146154      CALL fld_read( kt, 1, sf_tsd )      !==   read T & S data at kt time step   ==! 
     
    200208      ! 
    201209      IF( ln_sco ) THEN                   !==   s- or mixed s-zps-coordinate   ==! 
     210         ! 
     211         CALL wrk_alloc( jpk, ztp, zsp ) 
    202212         ! 
    203213         IF( kt == nit000 .AND. lwp )THEN 
     
    235245         END DO 
    236246         !  
     247         CALL wrk_dealloc( jpk, ztp, zsp ) 
     248         !  
    237249      ELSE                                !==   z- or zps- coordinate   ==! 
    238250         !                              
     
    286298      ENDIF 
    287299      ! 
     300      IF( nn_timing == 1 )  CALL timing_stop('dta_tsd') 
     301      ! 
    288302   END SUBROUTINE dta_tsd 
    289303 
Note: See TracChangeset for help on using the changeset viewer.