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/TRA/traadv_cen2_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/TRA/traadv_cen2_tam.F90

    r1885 r2587  
    127127   PUBLIC   tra_adv_cen2_adj    ! routine called by traadv_tam.F90 
    128128   PUBLIC   tra_adv_cen2_adj_tst! routine called by tst.F90 
     129#if defined key_tst_tlm 
    129130   PUBLIC   tra_adv_cen2_tlm_tst! routine called by tamtst.F90 
     131#endif 
    130132 
    131133   REAL(wp), DIMENSION(jpi,jpj) ::  & 
     
    935937 
    936938   END SUBROUTINE tra_adv_cen2_adj_tst 
    937  
     939#if defined key_tst_tlm 
    938940SUBROUTINE tra_adv_cen2_tlm_tst( kumadt ) 
    939941      !!----------------------------------------------------------------------- 
     
    968970      USE tamtrj              ! writing out state trajectory 
    969971      USE par_tlm,    ONLY: & 
     972        & tlm_bch,          & 
    970973        & cur_loop,         & 
    971974        & h_ratio 
     
    10271030         & z3r 
    10281031      CHARACTER(LEN=14)   :: cl_name 
    1029       CHARACTER (LEN=128) :: file_out, file_wop 
     1032      CHARACTER (LEN=128) :: file_out, file_wop, file_xdx 
    10301033      CHARACTER (LEN=90)  :: FMT 
    10311034      REAL(KIND=wp), DIMENSION(100):: & 
     
    10841087      ! Output filename Xn=F(X0) 
    10851088      !-------------------------------------------------------------------- 
    1086       file_wop='trj_wop_tradv_cen2' 
    10871089      CALL tlm_namrd 
    10881090      gamma = h_ratio      
     1091      file_wop='trj_wop_tradv_cen2' 
     1092      file_xdx='trj_xdx_tradv_cen2'    
    10891093      !-------------------------------------------------------------------- 
    10901094      ! Initialize the tangent input with random noise: dx 
     
    11511155      ! Complete Init for Direct 
    11521156      !------------------------------------------------------------------- 
    1153       CALL istate_p   
     1157      IF ( tlm_bch /= 2 ) CALL istate_p   
    11541158 
    11551159      ! *** initialize the reference trajectory 
     
    11841188      !  Compute the direct model F(X0,t=n) = Xn 
    11851189      !-------------------------------------------------------------------- 
    1186       CALL tra_adv_cen2(nit000, un, vn, wn) 
    1187       IF ( cur_loop .EQ. 0) CALL trj_wri_spl(file_wop) 
     1190      IF ( tlm_bch /= 2 ) CALL tra_adv_cen2(nit000, un, vn, wn) 
     1191      IF ( tlm_bch == 0 ) CALL trj_wri_spl(file_wop) 
     1192      IF ( tlm_bch == 1 ) CALL trj_wri_spl(file_xdx) 
    11881193      !-------------------------------------------------------------------- 
    11891194      !  Compute the Tangent  
    11901195      !-------------------------------------------------------------------- 
    1191       IF ( cur_loop .NE. 0) THEN 
    1192          !-------------------------------------------------------------------- 
    1193          !  Storing data 
    1194          !--------------------------------------------------------------------     
    1195          zta_out  (:,:,:) = ta   (:,:,:) 
    1196          zsa_out  (:,:,:) = sa   (:,:,:)           
    1197  
     1196      IF ( tlm_bch == 2 ) THEN        
    11981197         !-------------------------------------------------------------------- 
    11991198         ! Initialize the tangent variables: dy^* = W dy   
     
    12141213         ! Compute the scalar product: ( L(t0,tn) gamma dx0 ) ) 
    12151214         !-------------------------------------------------------------------- 
    1216  
    12171215         zsp2_Ta    = DOT_PRODUCT( ta_tl, ta_tl  ) 
    12181216         zsp2_Sa    = DOT_PRODUCT( sa_tl, sa_tl  ) 
    12191217 
    12201218         zsp2      = zsp2_Ta + zsp2_Sa 
    1221    
    12221219         !-------------------------------------------------------------------- 
    12231220         !  Storing data 
    12241221         !-------------------------------------------------------------------- 
    12251222         CALL trj_rd_spl(file_wop)  
    1226  
    12271223         zta_wop  (:,:,:) = ta  (:,:,:) 
    12281224         zsa_wop  (:,:,:) = sa  (:,:,:) 
    1229  
     1225         CALL trj_rd_spl(file_xdx)  
     1226         zta_out  (:,:,:) = ta  (:,:,:) 
     1227         zsa_out  (:,:,:) = sa  (:,:,:) 
    12301228         !-------------------------------------------------------------------- 
    12311229         ! Compute the Linearization Error  
     
    13721370  END SUBROUTINE  tra_adv_cen2_tlm_tst 
    13731371#endif 
    1374  
     1372#endif 
    13751373   !!====================================================================== 
    13761374END MODULE traadv_cen2_tam 
Note: See TracChangeset for help on using the changeset viewer.