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

    r2528 r2715  
    1717   USE par_trc          ! TOP parameters 
    1818   USE oce_trc          ! ocean space and time domain variables 
    19    USE in_out_manager   ! I/O manager 
    20    USE lib_mpp          ! distributed memory computing 
    2119 
    2220   IMPLICIT NONE 
     
    6967      INTEGER                              , INTENT(in), OPTIONAL ::   kdim      ! k- direction for 4D arrays 
    7068      !! 
     69      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: zmask, ztab3d  
    7170      INTEGER  ::   overlap, jn, js, sind, eind, kdir, j_id 
    7271      REAL(wp) ::   zsum, zvctl 
    73       REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zmask, ztab3d 
    7472      CHARACTER (len=20), DIMENSION(jptra) ::   cl 
    7573      CHARACTER (len=10) ::   cl2 
    7674      !!---------------------------------------------------------------------- 
    7775 
     76      ALLOCATE( zmask (jpi,jpj,jpk) ) 
     77      ALLOCATE( ztab3d(jpi,jpj,jpk) ) 
    7878      !                                      ! Arrays, scalars initialization  
    7979      overlap       = 0 
     
    150150         ! 
    151151      END DO 
     152      ! 
     153      DEALLOCATE( zmask  ) 
     154      DEALLOCATE( ztab3d ) 
    152155      ! 
    153156   END SUBROUTINE prt_ctl_trc 
Note: See TracChangeset for help on using the changeset viewer.