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/trasbc_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/trasbc_tam.F90

    r1885 r2587  
    9696   PUBLIC   tra_sbc_adj     ! routine called by step_tam.F90 
    9797   PUBLIC   tra_sbc_adj_tst ! routine called by tst.F90 
     98#if defined key_tst_tlm 
    9899   PUBLIC   tra_sbc_tlm_tst ! routine calle  by tamtst.F90 
     100#endif 
    99101 
    100102   !! * Substitutions 
     
    579581   END SUBROUTINE tra_sbc_adj_tst 
    580582 
    581  
     583#if defined key_tst_tlm 
    582584   SUBROUTINE tra_sbc_tlm_tst ( kumadt )  
    583585      !!----------------------------------------------------------------------- 
     
    612614      USE tamtrj              ! writing out state trajectory 
    613615      USE par_tlm,    ONLY: & 
     616        & tlm_bch,          & 
    614617        & cur_loop,         & 
    615618        & h_ratio 
     
    676679         & zgsp7  
    677680      CHARACTER (LEN=14)  :: cl_name 
    678       CHARACTER (LEN=128) :: file_out, file_wop 
     681      CHARACTER (LEN=128) :: file_out, file_wop, file_xdx 
    679682      CHARACTER (LEN=90)  ::  FMT 
    680683      REAL(KIND=wp), DIMENSION(100):: & 
     
    731734      ! Output filename Xn=F(X0) 
    732735      !-------------------------------------------------------------------- 
    733       file_wop='trj_wop_trasbc' 
    734736      CALL tlm_namrd 
    735737      gamma = h_ratio 
     738      file_wop='trj_wop_trasbc' 
     739      file_xdx='trj_xdx_trasbc' 
    736740      !-------------------------------------------------------------------- 
    737741      ! Initialize the tangent input with random noise: dx 
     
    778782      ! Complete Init for Direct 
    779783      !------------------------------------------------------------------- 
    780       CALL istate_p   
     784      IF ( tlm_bch /= 2 )      CALL istate_p   
    781785 
    782786      ! *** initialize the reference trajectory 
     
    804808      !  Compute the direct model F(X0,t=n) = Xn 
    805809      !-------------------------------------------------------------------- 
    806       CALL tra_sbc(nit000) 
    807  
    808       IF ( cur_loop .EQ. 0) CALL trj_wri_spl(file_wop) 
    809  
     810      IF ( tlm_bch /= 2 ) CALL tra_sbc(nit000) 
     811      IF ( tlm_bch == 0 ) CALL trj_wri_spl(file_wop) 
     812      IF ( tlm_bch == 1 ) CALL trj_wri_spl(file_xdx) 
    810813      !-------------------------------------------------------------------- 
    811814      !  Compute the Tangent  
    812815      !-------------------------------------------------------------------- 
    813       IF ( cur_loop .NE. 0) THEN 
    814          !-------------------------------------------------------------------- 
    815          !  Storing data 
    816          !--------------------------------------------------------------------   
    817          zta_out  (:,:,:) = ta   (:,:,:) 
    818          zsa_out  (:,:,:) = sa   (:,:,:)           
    819  
     816      IF ( tlm_bch == 2 ) THEN          
    820817         !-------------------------------------------------------------------- 
    821818         ! Initialize the tangent variables: dy^* = W dy   
     
    836833         ! Compute the scalar product: ( L(t0,tn) gamma dx0 ) ) 
    837834         !-------------------------------------------------------------------- 
    838  
    839835         zsp2_1    = DOT_PRODUCT( ta_tl, ta_tl  ) 
    840836         zsp2_2    = DOT_PRODUCT( sa_tl, sa_tl  ) 
     
    847843         zta_wop  (:,:,:) = ta  (:,:,:) 
    848844         zsa_wop  (:,:,:) = sa  (:,:,:) 
     845         CALL trj_rd_spl(file_xdx)  
     846         zta_out  (:,:,:) = ta  (:,:,:) 
     847         zsa_out  (:,:,:) = sa  (:,:,:) 
    849848         !-------------------------------------------------------------------- 
    850849         ! Compute the Linearization Error  
     
    981980!!====================================================================== 
    982981#endif 
     982#endif 
    983983END MODULE trasbc_tam 
Note: See TracChangeset for help on using the changeset viewer.