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 2715 for trunk/NEMOGCM/NEMO/TOP_SRC/TRP/trczdf.F90 – NEMO

Ignore:
Timestamp:
2011-03-30T17:58:35+02:00 (13 years ago)
Author:
rblod
Message:

First attempt to put dynamic allocation on the trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/TOP_SRC/TRP/trczdf.F90

    r2528 r2715  
    1111   !!   'key_top'                                                TOP models 
    1212   !!---------------------------------------------------------------------- 
    13    !!---------------------------------------------------------------------- 
    1413   !!   trc_ldf     : update the tracer trend with the lateral diffusion 
    1514   !!       ldf_ctl : initialization, namelist read, and parameters control 
     
    2019   USE trazdf_exp      ! vertical diffusion: explicit (tra_zdf_exp     routine) 
    2120   USE trazdf_imp      ! vertical diffusion: implicit (tra_zdf_imp     routine) 
    22    USE prtctl_trc      ! Print control 
    23    USE in_out_manager  ! I/O manager 
    24    USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
    2521   USE trdmod_oce 
    2622   USE trdtra 
     23   USE prtctl_trc      ! Print control 
    2724 
    2825   IMPLICIT NONE 
    2926   PRIVATE 
    3027 
    31    PUBLIC   trc_zdf    ! called by step.F90  
     28   PUBLIC   trc_zdf          ! called by step.F90  
     29   PUBLIC   trc_zdf_alloc    ! called by nemogcm.F90  
    3230 
    3331   INTEGER ::   nzdf = 0               ! type vertical diffusion algorithm used 
    3432      !                                ! defined from ln_zdf...  namlist logicals) 
    35    REAL(wp), DIMENSION(jpk) ::  r2dt   ! vertical profile time-step, = 2 rdttra 
    36       !                                ! except at nit000 (=rdttra) if neuler=0 
     33   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:) ::  r2dt   ! vertical profile time-step, = 2 rdttra 
     34      !                                                 ! except at nit000 (=rdttra) if neuler=0 
    3735 
    3836   !! * Substitutions 
     
    4341   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
    4442   !! $Id$  
    45    !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
     43   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
    4644   !!---------------------------------------------------------------------- 
    47  
    4845CONTAINS 
    4946    
     47   INTEGER FUNCTION trc_zdf_alloc() 
     48      !!---------------------------------------------------------------------- 
     49      !!                  ***  ROUTINE trc_zdf_alloc  *** 
     50      !!---------------------------------------------------------------------- 
     51      ALLOCATE( r2dt(jpk) , STAT=trc_zdf_alloc ) 
     52      ! 
     53      IF( trc_zdf_alloc /= 0 )   CALL ctl_warn('trc_zdf_alloc : failed to allocate array.') 
     54      ! 
     55   END FUNCTION trc_zdf_alloc 
     56 
     57 
    5058   SUBROUTINE trc_zdf( kt ) 
    5159      !!---------------------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.