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 2587 for branches/TAM_V3_0/NEMOTAM/OPATAM_SRC/trc_oce_tam.F90 – NEMO

Ignore:
Timestamp:
2011-02-15T12:58:59+01:00 (13 years ago)
Author:
vidard
Message:

refer to ticket #798

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/TAM_V3_0/NEMOTAM/OPATAM_SRC/trc_oce_tam.F90

    r1885 r2587  
    3737   PUBLIC & 
    3838      & trc_oce_tam_init, & !: Initialize the trend TAM fields 
     39      & trc_oce_tam_deallocate, & !: Deallocate the trend TAM fields 
    3940      & etot3_tl, & 
    4041      & etot3_ad 
     
    103104 
    104105   END SUBROUTINE trc_oce_tam_init 
     106   SUBROUTINE trc_oce_tam_deallocate( kindic ) 
     107      !!----------------------------------------------------------------------- 
     108      !! 
     109      !!                  ***  ROUTINE trc_oce_tam_deallocate  *** 
     110      !! 
     111      !! ** Purpose : Deallocate the tangent linear and 
     112      !!              adjoint arrays 
     113      !! 
     114      !! ** Method  : kindic = 0  deallocate both tl and ad variables 
     115      !!              kindic = 1  deallocate only tl variables 
     116      !!              kindic = 2  deallocate only ad variables 
     117      !! 
     118      !! ** Action  : 
     119      !! 
     120      !! References : 
     121      !! 
     122      !! History : 
     123      !!        ! 2010-06 (A. Vidard) Initial version 
     124      !!----------------------------------------------------------------------- 
     125      !! * Arguments 
     126      INTEGER, INTENT(IN) :: & 
     127         & kindic        ! indicate which variables to deallocate 
    105128 
     129      !! * Local declarations 
     130      ! Deallocate tangent linear variable arrays 
     131      ! --------------------------------------- 
     132 
     133      IF ( kindic == 0 .OR. kindic == 1 ) THEN 
     134 
     135         IF ( ALLOCATED(etot3_tl) ) DEALLOCATE( etot3_tl ) 
     136 
     137      END IF 
     138 
     139      IF ( kindic == 0 .OR. kindic == 2 ) THEN 
     140             
     141         ! Deallocate adjoint variable arrays 
     142         ! -------------------------------- 
     143 
     144         IF ( ALLOCATED(etot3_ad) ) DEALLOCATE( etot3_ad ) 
     145 
     146      END IF 
     147 
     148   END SUBROUTINE trc_oce_tam_deallocate 
    106149#endif 
    107150END MODULE trc_oce_tam 
Note: See TracChangeset for help on using the changeset viewer.