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 4589 for branches – NEMO

Changeset 4589 for branches


Ignore:
Timestamp:
2014-03-26T11:24:30+01:00 (10 years ago)
Author:
pabouttier
Message:

Remove useless options and cosmetic changes in step_tam.F90

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2012/dev_v3_4_STABLE_2012/NEMOGCM/NEMO/OPATAM_SRC/step_tam.F90

    r3658 r4589  
    152152      ! apply tracer assimilation increment   ... not needed in tangent 
    153153                             CALL tra_sbc_tan( kstp )       ! surface boundary condition 
    154       IF( ln_traqsr      )   CALL tra_qsr_tan( kstp )       ! penetrative solar radiation qsr 
     154      !IF( ln_traqsr      )   CALL tra_qsr_tan( kstp )       ! penetrative solar radiation qsr 
    155155      IF( ln_trabbc      )   CALL tra_bbc_tan( kstp )       ! bottom heat flux 
    156156      IF( lk_trabbl  )       CALL tra_bbl_tan( kstp )   ! diffusive bottom boundary layer scheme 
     
    279279 
    280280      IF( ln_dynhpg_imp  ) THEN                             ! semi-implicit hpg 
    281          IF( ln_zps    )     CALL zps_hde_adj( kstp, jpts, tsa, gtsu, gtsv, tsa_ad,      &   ! Partial steps: time filtered hor. gradient 
     281         IF( ln_zps    )     CALL zps_hde_adj( kstp, jpts, tsa, tsa_ad,      &   ! Partial steps: time filtered hor. gradient 
    282282            &                                  rhd_ad, gtsu_ad, gru_ad, gtsv_ad,         &   ! of t, s, rd at the bottom ocean level 
    283283            &                                  grv_ad ) 
     
    286286      ELSE                                                                                   ! centered hpg (default case) 
    287287                             CALL tra_nxt_adj( kstp )                                        ! tracer fields at next time step 
    288          IF( ln_zps    )     CALL zps_hde_adj( kstp, jpts, tsn, gtsu, gtsv, tsn_ad,      &   ! Partial steps: time filtered hor. gradient 
     288         IF( ln_zps    )     CALL zps_hde_adj( kstp, jpts, tsn, tsn_ad,      &   ! Partial steps: time filtered hor. gradient 
    289289            &                                  rhd_ad, gtsu_ad, gru_ad, gtsv_ad,         &   ! of t, s, rd at the bottom ocean level 
    290290            &                                  grv_ad ) 
     
    303303      IF( ln_trabbc      )   CALL tra_bbc_adj( kstp )       ! bottom heat flux 
    304304 
    305       IF( ln_traqsr      )   CALL tra_qsr_adj( kstp )       ! penetrative solar radiation qsr 
     305      !IF( ln_traqsr      )   CALL tra_qsr_adj( kstp )       ! penetrative solar radiation qsr 
    306306 
    307307                             CALL tra_sbc_adj( kstp )       ! surface boundary condition 
     
    499499 
    500500 
    501       !DO jpert = 1, jpertmax 
    502       jpert = 6 
     501      DO jpert = jpertmax, 1, -1 
     502       
    503503         !-------------------------------------------------------------------- 
    504504         ! Reset the tangent and adjoint variables 
     
    580580         ENDIF 
    581581 
    582          IF (jpert>0) THEN 
     582         CALL     oce_tam_init( 1 )    ! allocate/initialize tl variables 
     583         CALL sbc_oce_tam_init( 1 ) 
     584         CALL sol_oce_tam_init( 1 ) 
     585#if defined key_tradmp 
     586         CALL trc_oce_tam_init( 1 ) 
     587         strdmp_tl = 0.0_wp 
     588         ttrdmp_tl = 0.0_wp 
     589#endif 
    583590 
    584591            !CALL     oce_tam_init( 1 )    ! allocate/initialize tl variables 
     
    591598 
    592599            emp_tl(:,:) = 0.0_wp 
    593 #if defined key_tradmp 
    594             strdmp_tl = 0.0_wp 
    595             ttrdmp_tl = 0.0_wp 
    596 #endif 
    597600            a_fwb_tl = 0.0_wp 
    598601 
     
    639642                          &               * e1u(ji,jj) * e2u(ji,jj) * fse3u(ji,jj,jk) & 
    640643                          &               * umask(ji,jj,jk) * wesp_u 
    641                   END DO 
    642                END DO 
    643             END DO 
    644  
    645             DO jk = 1, jpk 
    646                DO jj = nldj, nlej 
    647                   DO ji = nldi, nlei 
    648644                     zvn_adin(ji,jj,jk) = zvn_tlout(ji,jj,jk) & 
    649645                          &               * e1v(ji,jj) * e2v(ji,jj) * fse3v(ji,jj,jk) & 
    650646                          &               * vmask(ji,jj,jk) * wesp_u 
    651                   END DO 
    652                END DO 
    653             END DO 
    654  
    655             DO jk = 1, jpk 
    656                DO jj = nldj, nlej 
    657                   DO ji = nldi, nlei 
    658647                     ztn_adin(ji,jj,jk) = ztn_tlout(ji,jj,jk) & 
    659648                          &               * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) & 
    660649                          &               * tmask(ji,jj,jk) * wesp_t(jk) 
    661                   END DO 
    662                END DO 
    663             END DO 
    664  
    665             DO jk = 1, jpk 
    666                DO jj = nldj, nlej 
    667                   DO ji = nldi, nlei 
    668650                     zsn_adin(ji,jj,jk) = zsn_tlout(ji,jj,jk) & 
    669651                          &               * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) & 
     
    696678            ! Call the adjoint routine: dx^* = L^T dy^* 
    697679            !-------------------------------------------------------------------- 
    698             !CALL     oce_tam_init( 2 )    ! allocate/initialize adj variables 
    699             !CALL sbc_oce_tam_init( 2 ) 
    700             !CALL sol_oce_tam_init( 2 ) 
    701             !CALL trc_oce_tam_init( 2 ) 
    702  
     680            CALL     oce_tam_init( 2 )    ! allocate/initialize adj variables 
     681            CALL sbc_oce_tam_init( 2 ) 
     682            CALL sol_oce_tam_init( 2 ) 
     683#if defined key_tradmp 
     684            CALL trc_oce_tam_init( 2 ) 
     685            strdmp_ad = 0.0_wp 
     686            ttrdmp_ad = 0.0_wp 
     687#endif 
    703688            qrp_ad = 0.0_wp 
    704689            erp_ad = 0.0_wp 
    705690            emp_ad(:,:) = 0.0_wp 
    706 #if defined key_tradmp 
    707             strdmp_ad = 0.0_wp 
    708             ttrdmp_ad = 0.0_wp 
    709 #endif 
     691 
    710692            a_fwb_ad = 0.0_wp 
    711693 
     
    720702            !CALL sol_oce_tam_deallocate( 1 ) 
    721703            !CALL trc_oce_tam_deallocate( 1 ) 
     704            istp = nitend 
     705            CALL  trj_rea( istp, -1 ) 
    722706 
    723707            DO istp = nitend, nit000, -1 
     
    762746            END SELECT 
    763747            CALL prntst_adj( cl_name, kumadt, zsp1, zsp2 ) 
    764          endif 
    765       !END DO 
     748      END DO 
     749 
     750      nitsor(:) = jp_it0adj  ! restore nitsor to avoid non reproducible results with or without the tests 
    766751 
    767752      DEALLOCATE(                                 & 
Note: See TracChangeset for help on using the changeset viewer.