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

    r2528 r2715  
    2929   PRIVATE 
    3030 
    31    PUBLIC trc_dmp      ! routine called by step.F90 
     31   PUBLIC trc_dmp            ! routine called by step.F90 
     32   PUBLIC trc_dmp_alloc      ! routine called by nemogcm.F90 
    3233 
    3334   LOGICAL , PUBLIC, PARAMETER ::   lk_trcdmp = .TRUE.   !: internal damping flag 
    34    !                             !!* Namelist namtrc_dmp : passive tracer newtonian damping * 
     35 
     36   !                                !!* Namelist namtrc_dmp : passive tracer newtonian damping * 
    3537   INTEGER  ::   nn_hdmp_tr =   -1   ! = 0/-1/'latitude' for damping over passive tracer 
    3638   INTEGER  ::   nn_zdmp_tr =    0   ! = 0/1/2 flag for damping in the mixed layer 
     
    4042   INTEGER  ::   nn_file_tr =    2   ! = 1 create a damping.coeff NetCDF file  
    4143 
    42    REAL(wp), DIMENSION(jpi,jpj,jpk) ::   restotr   ! restoring coeff. on tracers (s-1) 
     44   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   restotr   ! restoring coeff. on tracers (s-1) 
    4345 
    4446   !! * Substitutions 
     
    4749   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
    4850   !! $Header: /home/opalod/NEMOCVSROOT/NEMO/TOP_SRC/TRP/trcdmp.F90,v 1.11 2006/09/01 14:03:49 opalod Exp $  
    49    !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    50    !!---------------------------------------------------------------------- 
    51  
     51   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     52   !!---------------------------------------------------------------------- 
    5253CONTAINS 
     54 
     55   INTEGER FUNCTION trc_dmp_alloc() 
     56      !!---------------------------------------------------------------------- 
     57      !!                   ***  ROUTINE trc_dmp_alloc  *** 
     58      !!---------------------------------------------------------------------- 
     59      ALLOCATE( restotr(jpi,jpj,jpk) , STAT=trc_dmp_alloc ) 
     60      ! 
     61      IF( trc_dmp_alloc /= 0 )   CALL ctl_warn('trc_dmp_alloc: failed to allocate array') 
     62      ! 
     63   END FUNCTION trc_dmp_alloc 
     64 
    5365 
    5466   SUBROUTINE trc_dmp( kt ) 
     
    161173      !! 
    162174      !! ** Method  :   read the nammbf namelist and check the parameters 
    163       !!      called by trc_dmp at the first timestep (nit000) 
     175      !!              called by trc_dmp at the first timestep (nit000) 
    164176      !!---------------------------------------------------------------------- 
    165177 
Note: See TracChangeset for help on using the changeset viewer.