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

Changeset 13432 for NEMO/branches


Ignore:
Timestamp:
2020-08-24T15:06:34+02:00 (4 years ago)
Author:
smueller
Message:

Fixing of the number of iterations carried out by the tangent-linear SOR solver to the default number of iterations carried out by its adjoint

Location:
NEMO/branches/NERC/dev_release-3.4_NEMOTAM_consolidated/NEMOGCM/NEMO/OPATAM_SRC/SOL
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/NERC/dev_release-3.4_NEMOTAM_consolidated/NEMOGCM/NEMO/OPATAM_SRC/SOL/sol_oce_tam.F90

    r4587 r13432  
    4141   INTEGER, PARAMETER,  PUBLIC :: & 
    4242#if defined key_orca_r2  ||   defined key_seabass  ||   defined key_gyre 
    43       & jp_it0adj = 300 ! initial value of the number of solver iteration (adj) 
     43      & jp_it0adj = 600  ! number of solver iterations (tl and adj) 
    4444#else 
    45       & jp_it0adj = 1000 ! initial value of the number of solver iteration (adj) 
     45      & jp_it0adj = 1000 ! number of solver iterations (tl and adj) 
    4646#endif 
    4747 
  • NEMO/branches/NERC/dev_release-3.4_NEMOTAM_consolidated/NEMOGCM/NEMO/OPATAM_SRC/SOL/solsor_tam.F90

    r4586 r13432  
    111111      icount = 0 
    112112      !                                                       ! ============== 
    113       DO jn = 1,  nn_nmax                                         ! Iterative loop 
     113      DO jn = 1,  nitsor(kt - nit000 + 1)                     ! Iterative loop 
    114114         !                                                    ! ============== 
    115115         ! applied the lateral boundary conditions 
     
    153153         END DO 
    154154         icount = icount + 1 
    155          ! test of convergence 
    156          IF ( (jn > nn_nmin .AND. MOD( jn-nn_nmin, nn_nmod ) == 0) .OR. jn==nn_nmax) THEN 
     155         ! ! test of convergence 
     156         ! IF ( (jn > nn_nmin .AND. MOD( jn-nn_nmin, nn_nmod ) == 0) .OR. jn==nn_nmax ) THEN 
     157         IF ( jn == nitsor(kt - nit000 + 1) ) THEN 
    157158            SELECT CASE ( nn_sol_arp ) 
    158159            CASE ( 0 ) 
     
    160161               zres2 = MAXVAL( gcr_tl(2:nlci - 1,2:nlcj - 1) ) 
    161162               IF( lk_mpp )  CALL mpp_max( zres2 ) ! max over the global domain 
    162                ! test of convergence 
     163               ! ! test of convergence 
    163164               res = SQRT( zres2 ) 
    164                IF( zres2 < rn_resmax .OR. jn == nn_nmax ) THEN 
    165                   niter = jn 
    166                   ncut = 999 
    167                   ! Store number of iterations for adjoint computation 
    168                   istp = kt - nit000 + 1 
    169                   nitsor(istp) = niter 
    170                ENDIF 
     165               ! IF( zres2 < rn_resmax .OR. jn == nn_nmax ) THEN 
     166               !    niter = jn 
     167               !    ncut = 999 
     168               !    ! Store number of iterations for adjoint computation 
     169               !    istp = kt - nit000 + 1 
     170               !    nitsor(istp) = niter 
     171               ! ENDIF 
    171172            CASE ( 1 )                 ! relative precision 
    172173               ztab(:,:) = 0.0_wp 
    173174               ztab(2:nlci-1,2:nlcj-1) = gcr_tl(2:nlci-1,2:nlcj-1) 
    174175               rnorme = glob_sum(ztab) 
    175                ! test of convergence 
     176               ! ! test of convergence 
    176177               res = SQRT( rnorme ) 
    177                IF( rnorme < epsr .OR. jn == nn_nmax ) THEN 
    178                   niter = jn 
    179                   ncut = 999 
    180                   ! Store number of iterations for adjoint computation 
    181                   istp = kt - nit000 + 1 
    182                   nitsor(istp) = niter 
    183                ENDIF 
     178               ! IF( rnorme < epsr .OR. jn == nn_nmax ) THEN 
     179               !    niter = jn 
     180               !    ncut = 999 
     181               !    ! Store number of iterations for adjoint computation 
     182               !    istp = kt - nit000 + 1 
     183               !    nitsor(istp) = niter 
     184               ! ENDIF 
    184185            END SELECT 
    185186            !**** 
     
    188189            !**** 
    189190         ENDIF 
    190          ! indicator of non-convergence or explosion 
    191          IF( jn == nn_nmax ) nitsor(istp) = jn 
    192          IF( jn == nn_nmax .OR. SQRT(epsr)/eps > 1.e+20 ) kindic = -2 
    193          IF( ncut == 999 ) GOTO 999 
     191         ! ! indicator of non-convergence or explosion 
     192         !      IF( jn == nn_nmax ) nitsor(istp) = jn 
     193         ! IF( jn == nn_nmax .OR. SQRT(epsr)/eps > 1.e+20 ) kindic = -2 
     194         ! IF( ncut == 999 ) GOTO 999 
    194195         !                                              ! ===================== 
    195196      END DO                                            ! END of iterative loop 
Note: See TracChangeset for help on using the changeset viewer.