Changeset 2587 for branches/TAM_V3_0/NEMOTAM/OPATAM_SRC/SOL/sol_oce_tam.F90
- Timestamp:
- 2011-02-15T12:58:59+01:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/TAM_V3_0/NEMOTAM/OPATAM_SRC/SOL/sol_oce_tam.F90
r1885 r2587 31 31 & nmax_fs 32 32 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 33 USE sol_oce , ONLY: & 34 & nmin 35 #if defined key_dynspg_flt 33 36 USE solver , ONLY: & ! Solver 34 37 & solver_init 35 38 #endif 36 39 !! * Routine accessibility 37 40 … … 41 44 PUBLIC & 42 45 & sol_oce_tam_init, & !: routine called by nemovar.F90 46 & sol_oce_tam_deallocate, & 43 47 ! 44 48 & gcx_tl, & !: Tangent of now solution of the elliptic equation … … 48 52 & gcx_ad, & !: Adjoint of solution of the elliptic equation 49 53 & gcxb_ad, & !: Adjoint of before solution of the elliptic equation 50 & gcb_ad 51 54 & gcb_ad , & !: Adjoint of 2nd member of barotropic linear system 55 & nitsor 52 56 !! * Module variables 53 57 INTEGER, DIMENSION(:), ALLOCATABLE :: & … … 89 93 & kindic ! indicate which variables to allocate/initialize 90 94 95 #if defined key_dynspg_flt 91 96 IF ( kindic == 0 .OR. kindic == 1 ) THEN 92 97 98 IF ( kindic == 0 ) CALL solver_init( nit000 ) 99 93 100 IF ( .NOT. ALLOCATED(nitsor) ) THEN 94 101 95 102 ALLOCATE( nitsor( nitend - nit000 + 1 ) ) 96 97 ENDIF 98 99 nitsor(:) = nmax_fs 100 101 IF ( kindic == 0 ) CALL solver_init( nit000 ) 103 nitsor(:) = nmin 104 105 ENDIF 106 102 107 103 108 ENDIF … … 162 167 163 168 ENDIF 164 169 #endif 165 170 END SUBROUTINE sol_oce_tam_init 166 171 SUBROUTINE sol_oce_tam_deallocate(kindic) 172 !!----------------------------------------------------------------------- 173 !! 174 !! *** ROUTINE sol_oce_tam_deallocate *** 175 !! 176 !! ** Purpose : 177 !! 178 !! ** Method : kindic = 0 deallocate both tl and ad variables 179 !! kindic = 1 deallocate only tl variables 180 !! kindic = 2 deallocate only ad variables 181 !! 182 !! ** Action : 183 !! 184 !! References : 185 !! 186 !! History : 187 !! ! 2010-06 (A. Vidard) Initial version 188 !!----------------------------------------------------------------------- 189 !! * Arguments 190 INTEGER, INTENT(IN) :: & 191 & kindic ! indicate which variables to allocate/initialize 192 #if defined key_dynspg_flt 193 IF ( kindic == 0 ) THEN 194 IF ( ALLOCATED(nitsor) ) DEALLOCATE( nitsor ) 195 END IF 196 197 IF ( kindic == 0 .OR. kindic == 1 ) THEN 198 199 IF ( ALLOCATED(gcx_tl) ) DEALLOCATE( gcx_tl ) 200 201 IF ( ALLOCATED(gcxb_tl) ) DEALLOCATE( gcxb_tl ) 202 203 IF ( ALLOCATED(gcb_tl) ) DEALLOCATE( gcb_tl ) 204 205 IF ( ALLOCATED(gcr_tl) ) DEALLOCATE( gcr_tl ) 206 207 ENDIF 208 209 IF ( kindic == 0 .OR. kindic == 2 ) THEN 210 211 IF ( ALLOCATED(gcx_ad) ) DEALLOCATE( gcx_ad ) 212 213 IF ( ALLOCATED(gcxb_ad) ) DEALLOCATE( gcxb_ad ) 214 215 IF ( ALLOCATED(gcb_ad) ) DEALLOCATE( gcb_ad ) 216 217 ENDIF 218 219 #endif 220 END SUBROUTINE sol_oce_tam_deallocate 167 221 END MODULE sol_oce_tam
Note: See TracChangeset
for help on using the changeset viewer.