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 2704 for branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/prtctl_trc.F90 – NEMO

Ignore:
Timestamp:
2011-03-25T09:37:58+01:00 (11 years ago)
Author:
cetlod
Message:

Used correct working arrays in print control routines used for debugging : prtctl.F90 & prtctl_trc.F90

File:
1 edited

Legend:

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

    r2643 r2704  
    6060      !!                it must looks like: CALL prt_ctl( mask=tmask ). 
    6161      !!---------------------------------------------------------------------- 
    62       USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 
    63       USE wrk_nemo, ONLY: zmask => wrk_3d_1, ztab3d => wrk_3d_2 
    64       !! 
    6562      REAL(wp)         , DIMENSION(:,:,:,:), INTENT(in), OPTIONAL ::   tab4d     ! 4D array 
    6663      REAL(wp)         , DIMENSION(:,:,:)  , INTENT(in), OPTIONAL ::   mask      ! 3D mask to apply to the tab4d array 
     
    7067      INTEGER                              , INTENT(in), OPTIONAL ::   kdim      ! k- direction for 4D arrays 
    7168      !! 
     69      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: zmask, ztab3d  
    7270      INTEGER  ::   overlap, jn, js, sind, eind, kdir, j_id 
    7371      REAL(wp) ::   zsum, zvctl 
     
    7674      !!---------------------------------------------------------------------- 
    7775 
    78       IF( wrk_in_use(3, 1,2) ) THEN 
    79          CALL ctl_stop('prt_ctl_trc : requested workspace arrays unavailable.') 
    80          RETURN 
    81       END IF 
    82  
     76      ALLOCATE( zmask (jpi,jpj,jpk) ) 
     77      ALLOCATE( ztab3d(jpi,jpj,jpk) ) 
    8378      !                                      ! Arrays, scalars initialization  
    8479      overlap       = 0 
     
    156151      END DO 
    157152      ! 
    158       IF( wrk_not_released(3, 1,2) ) CALL ctl_stop('prt_ctl_trc : failed to release workspace arrays.') 
     153      DEALLOCATE( zmask  ) 
     154      DEALLOCATE( ztab3d ) 
    159155      ! 
    160156   END SUBROUTINE prt_ctl_trc 
Note: See TracChangeset for help on using the changeset viewer.