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 2606 for branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/TRP/trcdmp.F90 – NEMO

Ignore:
Timestamp:
2011-02-22T18:14:24+01:00 (13 years ago)
Author:
trackstand2
Message:

Module arrays made allocatable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/TRP/trcdmp.F90

    r2528 r2606  
    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 
     
    4041   INTEGER  ::   nn_file_tr =    2   ! = 1 create a damping.coeff NetCDF file  
    4142 
    42    REAL(wp), DIMENSION(jpi,jpj,jpk) ::   restotr   ! restoring coeff. on tracers (s-1) 
     43   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   restotr   ! restoring coeff. on tracers (s-1) 
    4344 
    4445   !! * Substitutions 
     
    5152 
    5253CONTAINS 
     54 
     55   FUNCTION trc_dmp_alloc() 
     56      !!---------------------------------------------------------------------- 
     57      !!                   ***  ROUTINE trc_dmp_alloc  *** 
     58      !!---------------------------------------------------------------------- 
     59      INTEGER :: trc_dmp_alloc 
     60      !!---------------------------------------------------------------------- 
     61 
     62      ALLOCATE(restotr(jpi,jpj,jpk), Stat=trc_dmp_alloc) 
     63 
     64      IF(trc_dmp_alloc /= 0)THEN 
     65         CALL ctl_warn('trc_dmp_alloc : failed to allocate array.') 
     66      END IF 
     67 
     68   END FUNCTION trc_dmp_alloc 
     69 
    5370 
    5471   SUBROUTINE trc_dmp( kt ) 
Note: See TracChangeset for help on using the changeset viewer.