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/OPA_SRC/TRA/trazdf_exp.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/OPA_SRC/TRA/trazdf_exp.F90

    r2528 r2715  
    2828   USE zdf_oce         ! ocean vertical physics 
    2929   USE zdfddm          ! ocean vertical physics: double diffusion 
     30   USE trc_oce         ! share passive tracers/Ocean variables 
    3031   USE in_out_manager  ! I/O manager 
    31    USE trc_oce         ! share passive tracers/Ocean variables 
     32   USE lib_mpp         ! MPP library 
    3233 
    3334   IMPLICIT NONE 
     
    4344   !! NEMO/OPA 3.3 , NEMO Consortium (2010) 
    4445   !! $Id$ 
    45    !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
     46   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
    4647   !!---------------------------------------------------------------------- 
    47  
    4848CONTAINS 
    4949 
     
    7373      !! ** Action : - after tracer fields pta 
    7474      !!--------------------------------------------------------------------- 
     75      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released 
     76      USE wrk_nemo, ONLY:   zwx => wrk_3d_6, zwy => wrk_3d_7     ! 3D workspace 
     77      ! 
    7578      INTEGER                              , INTENT(in   ) ::   kt          ! ocean time-step index 
    7679      CHARACTER(len=3)                     , INTENT(in   ) ::   cdtype      ! =TRA or TRC (tracer indicator) 
     
    8083      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb         ! before and now tracer fields 
    8184      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(inout) ::   pta         ! tracer trend  
    82       !!  
     85      ! 
    8386      INTEGER  ::  ji, jj, jk, jn, jl        ! dummy loop indices 
    8487      REAL(wp) ::  zlavmr, zave3r, ze3tr     ! local scalars 
    8588      REAL(wp) ::  ztra, ze3tb               !   -      - 
    86       REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zwx, zwy   ! 3D workspace 
    8789      !!--------------------------------------------------------------------- 
     90 
     91      IF( wrk_in_use(3, 6,7) ) THEN 
     92         CALL ctl_stop('tra_zdf_exp: requested workspace arrays unavailable')   ;   RETURN 
     93      ENDIF 
    8894 
    8995      IF( kt == nit000 )  THEN 
     
    158164      END DO 
    159165      ! 
     166      IF( wrk_not_released(3, 6,7) )   CALL ctl_stop('tra_zdf_exp: failed to release workspace arrays') 
     167      ! 
    160168   END SUBROUTINE tra_zdf_exp 
    161169 
Note: See TracChangeset for help on using the changeset viewer.