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/DYN/dynhpg_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/DYN/dynhpg_tam.F90

    r1885 r2587  
    109109   PUBLIC   dyn_hpg_adj    ! routine called by step_tam module 
    110110   PUBLIC   dyn_hpg_adj_tst! routine called by test module 
     111#if defined key_tst_tlm 
    111112   PUBLIC   dyn_hpg_tlm_tst! routine called by test module 
     113#endif 
    112114 
    113115   !!* Namelist nam_dynhpg : Choice of horizontal pressure gradient computation 
     
    10591061         &              ) 
    10601062   END SUBROUTINE dyn_hpg_adj_tst 
    1061  
     1063#if defined key_tst_tlm 
    10621064   SUBROUTINE dyn_hpg_tlm_tst( kumadt ) 
    10631065      !!----------------------------------------------------------------------- 
     
    10891091      USE tamtrj              ! writing out state trajectory 
    10901092      USE par_tlm,    ONLY: & 
     1093        & tlm_bch,          & 
    10911094        & cur_loop,         & 
    10921095        & h_ratio 
     
    11601163         & jk 
    11611164      CHARACTER(LEN=14)   :: cl_name 
    1162       CHARACTER (LEN=128) :: file_out, file_wop 
     1165      CHARACTER (LEN=128) :: file_out, file_wop, file_xdx 
    11631166      CHARACTER (LEN=90)  ::  FMT 
    11641167      REAL(KIND=wp), DIMENSION(100):: & 
     
    12281231      ! Output filename Xn=F(X0) 
    12291232      !-------------------------------------------------------------------- 
    1230       file_wop='trj_wop_dynhpg' 
    1231  
    12321233      CALL tlm_namrd 
    12331234      gamma = h_ratio   
    1234  
     1235      file_wop='trj_wop_dynhpg' 
     1236      file_xdx='trj_xdx_dynhpg' 
    12351237       !-------------------------------------------------------------------- 
    12361238      ! Initialize the tangent input with random noise: dx 
     
    12621264      ! Complete Init for Direct 
    12631265      !------------------------------------------------------------------- 
    1264       CALL istate_p   
     1266      IF ( tlm_bch /= 2 )      CALL istate_p   
    12651267 
    12661268      ! *** initialize the reference trajectory 
     
    12961298      !  Compute the direct model F(X0,t=n) = Xn 
    12971299      !-------------------------------------------------------------------- 
    1298       CALL dyn_hpg(nit000) 
    1299       IF ( cur_loop .EQ. 0) CALL trj_wri_spl(file_wop) 
     1300      IF ( tlm_bch /= 2 ) CALL dyn_hpg(nit000) 
     1301      IF ( tlm_bch == 0 ) CALL trj_wri_spl(file_wop) 
     1302      IF ( tlm_bch == 1 ) CALL trj_wri_spl(file_xdx) 
    13001303      !-------------------------------------------------------------------- 
    13011304      !  Compute the Tangent  
    13021305      !-------------------------------------------------------------------- 
    1303       IF ( cur_loop .NE. 0) THEN 
    1304          !-------------------------------------------------------------------- 
    1305          !  Storing data 
    1306          !--------------------------------------------------------------------   
    1307          zua_out  (:,:,:) = ua   (:,:,:) 
    1308          zva_out  (:,:,:) = va   (:,:,:)           
    1309  
     1306      IF ( tlm_bch == 2 ) THEN 
    13101307         !-------------------------------------------------------------------- 
    13111308         ! Initialize the tangent variables  
     
    13241321         ! Compute the scalar product: ( L(t0,tn) gamma dx0 ) ) 
    13251322         !-------------------------------------------------------------------- 
    1326  
    13271323         zsp2_1    = DOT_PRODUCT( ua_tl, ua_tl  ) 
    13281324         zsp2_2    = DOT_PRODUCT( va_tl, va_tl  ) 
     
    13341330         zua_wop  (:,:,:) = ua  (:,:,:) 
    13351331         zva_wop  (:,:,:) = va  (:,:,:) 
     1332         CALL trj_rd_spl(file_xdx)  
     1333         zua_out  (:,:,:) = ua  (:,:,:) 
     1334         zva_out  (:,:,:) = va  (:,:,:) 
    13361335         !-------------------------------------------------------------------- 
    13371336         ! Compute the Linearization Error  
     
    14741473   !!====================================================================== 
    14751474#endif 
     1475#endif 
    14761476END MODULE dynhpg_tam 
Note: See TracChangeset for help on using the changeset viewer.