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 2830 for branches/2011/dev_r2802_TOP_substepping/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_cen2.F90 – NEMO

Ignore:
Timestamp:
2011-08-23T12:20:06+02:00 (13 years ago)
Author:
kpedwards
Message:

Updates to average physics variables for TOP substepping.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2011/dev_r2802_TOP_substepping/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_cen2.F90

    r2715 r2830  
    3232   USE trc_oce         ! share passive tracers/Ocean variables 
    3333   USE lib_mpp         ! MPP library 
     34#if defined key_top 
     35   USE trc, ONLY: nittrc000  !get first time step for passive tracers 
     36#endif 
    3437 
    3538   IMPLICIT NONE 
     
    131134      !!---------------------------------------------------------------------- 
    132135 
    133       IF( wrk_in_use(2, 1) .OR. wrk_in_use(3, 1,2) ) THEN 
     136      IF( wrk_in_use(2, 35) .OR. wrk_in_use(3, 14,15) ) THEN 
    134137         CALL ctl_stop('tra_adv_cen2: requested workspace arrays unavailable')   ;   RETURN 
    135138      ENDIF 
    136139 
     140#if defined key_top 
     141      IF( kt == nit000 .OR. (kt == nittrc000 .AND. cdtype == 'TRC'))  THEN 
     142#else 
    137143      IF( kt == nit000 )  THEN 
     144#endif 
    138145         IF(lwp) WRITE(numout,*) 
    139146         IF(lwp) WRITE(numout,*) 'tra_adv_cen2 : 2nd order centered advection scheme on ', cdtype 
     
    141148         IF(lwp) WRITE(numout,*) 
    142149         ! 
    143          ALLOCATE( upsmsk(jpi,jpj), STAT=ierr ) 
    144          IF( ierr /= 0 )   CALL ctl_stop('STOP', 'tra_adv_cen2: unable to allocate array') 
     150         IF (.not. ALLOCATED(upsmsk))THEN 
     151             ALLOCATE( upsmsk(jpi,jpj), STAT=ierr ) 
     152             IF( ierr /= 0 )   CALL ctl_stop('STOP', 'tra_adv_cen2: unable to allocate array') 
     153         ENDIF 
     154 
    145155         ! 
    146156         upsmsk(:,:) = 0._wp                             ! not upstream by default 
     
    275285      ENDIF 
    276286      ! 
    277       IF( wrk_not_released(2, 1)   .OR.   & 
    278           wrk_not_released(3, 1,2) )   CALL ctl_stop('tra_adv_cen2: failed to release workspace arrays') 
     287      IF( wrk_not_released(2, 35)   .OR.   & 
     288          wrk_not_released(3, 14,15) )   CALL ctl_stop('tra_adv_cen2: failed to release workspace arrays') 
    279289      ! 
    280290   END SUBROUTINE tra_adv_cen2 
Note: See TracChangeset for help on using the changeset viewer.