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/trazdf_imp_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/trazdf_imp_tam.F90

    r1885 r2587  
    7474      & ahtw,                & 
    7575      & aht0 
     76#if defined key_ldfslp 
    7677   USE ldfslp        , ONLY: & ! lateral physics: slope of diffusion 
    7778      & wslpi,               & !: i_slope at W-points 
    7879      & wslpj                  !: j-slope at W-points 
     80#endif  
    7981#if defined key_zdfddm 
    8082   USE zdfddm        , ONLY: & 
    8183      & avs 
    8284#endif  
     85   USE traldf_tam 
    8386   USE in_out_manager, ONLY: & ! I/O manager  
    8487      & lwp,          & 
     
    106109   PUBLIC tra_zdf_imp_adj       !  routine called by tra_zdf_adj.F90 
    107110   PUBLIC tra_zdf_imp_adj_tst   !  routine called by tst.F90 
     111#if defined key_tst_tlm 
    108112   PUBLIC tra_zdf_imp_tlm_tst   !  routine called by tamtst.F90  
     113#endif 
    109114 
    110115   !! * Substitutions 
     
    483488      !!--------------------------------------------------------------------- 
    484489 
    485       IF( kt == nit000 ) THEN 
     490      IF( kt == nitend ) THEN 
    486491         IF(lwp)WRITE(numout,*) 
    487492         IF(lwp)WRITE(numout,*) 'tra_zdf_imp_adj : implicit vertical mixing' 
    488493         IF(lwp)WRITE(numout,*) '~~~~~~~~~~~~~~~ ' 
     494         CALL ldf_ctl_tam  ! init of l_traldf_rot 
    489495         zavi = 0._wp      ! avoid warning at compilation phase when lk_ldfslp=F 
    490496      ENDIF 
     
    985991 
    986992   END SUBROUTINE tra_zdf_imp_adj_tst 
    987  
     993#if defined key_tst_tlm 
    988994   SUBROUTINE tra_zdf_imp_tlm_tst( kumadt ) 
    989995      !!----------------------------------------------------------------------- 
     
    10191025      USE tamtrj              ! writing out state trajectory 
    10201026      USE par_tlm,    ONLY: & 
     1027        & tlm_bch,          & 
    10211028        & cur_loop,         & 
    10221029        & h_ratio 
     
    10771084      CHARACTER(LEN=14) ::& 
    10781085         & cl_name 
    1079       CHARACTER (LEN=128) :: file_out, file_wop 
     1086      CHARACTER (LEN=128) :: file_out, file_wop, file_xdx 
    10801087      CHARACTER (LEN=90) :: & 
    10811088         & FMT 
     
    11261133      ! Output filename Xn=F(X0) 
    11271134      !-------------------------------------------------------------------- 
    1128       file_wop='trj_wop_trazdf_imp' 
    11291135      CALL tlm_namrd 
    11301136      gamma = h_ratio 
     1137      file_wop='trj_wop_trazdf_imp' 
     1138      file_xdx='trj_xdx_trazdf_imp' 
    11311139      !-------------------------------------------------------------------- 
    11321140      ! Initialize the tangent input with random noise: dx 
     
    11691177      ! Complete Init for Direct 
    11701178      !------------------------------------------------------------------- 
    1171       CALL istate_p   
     1179      IF ( tlm_bch /= 2 )      CALL istate_p   
    11721180 
    11731181      ! *** initialize the reference trajectory 
     
    11921200      !  Compute the direct model F(X0,t=n) = Xn 
    11931201      !-------------------------------------------------------------------- 
    1194       CALL tra_zdf_imp(nit000, rdttra) 
    1195  
    1196       IF ( cur_loop .EQ. 0) CALL trj_wri_spl(file_wop) 
    1197  
     1202      IF ( tlm_bch /= 2 )  CALL tra_zdf_imp(nit000, rdttra) 
     1203      IF ( tlm_bch == 0 )  CALL trj_wri_spl(file_wop) 
     1204      IF ( tlm_bch == 1 )  CALL trj_wri_spl(file_xdx) 
    11981205      !-------------------------------------------------------------------- 
    11991206      !  Compute the Tangent  
    12001207      !-------------------------------------------------------------------- 
    1201       IF ( cur_loop .NE. 0) THEN 
    1202          !-------------------------------------------------------------------- 
    1203          !  Storing data 
    1204          !--------------------------------------------------------------------   
    1205          zta_out  (:,:,:) = ta   (:,:,:) 
    1206          zsa_out  (:,:,:) = sa   (:,:,:) 
     1208      IF ( tlm_bch == 2 ) THEN 
    12071209         !-------------------------------------------------------------------- 
    12081210         ! Initialize the tangent variables: dy^* = W dy   
     
    12351237         zta_wop  (:,:,:) = ta  (:,:,:) 
    12361238         zsa_wop  (:,:,:) = sa  (:,:,:) 
    1237  
     1239         CALL trj_rd_spl(file_xdx)  
     1240         zta_out  (:,:,:) = ta  (:,:,:) 
     1241         zsa_out  (:,:,:) = sa  (:,:,:) 
    12381242         !-------------------------------------------------------------------- 
    12391243         ! Compute the Linearization Error  
     
    13781382   END SUBROUTINE tra_zdf_imp_tlm_tst 
    13791383#endif 
     1384#endif 
    13801385END MODULE trazdf_imp_tam 
Note: See TracChangeset for help on using the changeset viewer.