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 8979 for branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90 – NEMO

Ignore:
Timestamp:
2017-12-11T17:45:55+01:00 (6 years ago)
Author:
acc
Message:

Branch 2017/dev_r8126_ROBUST08_no_ghost. Merge in trunk changes up to rev 8864 in preparation for the merge. Sette tests OK except for AGRIF restartability but uncertain about the trunks status for this?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90

    r8758 r8979  
    207207#if defined key_agrif 
    208208      IF( .NOT. Agrif_Root() ) THEN 
    209                          CALL Agrif_ParentGrid_To_ChildGrid() 
    210          IF( ln_diaobs ) CALL dia_obs_wri 
     209         CALL Agrif_ParentGrid_To_ChildGrid() 
     210         IF( ln_diaobs )        CALL dia_obs_wri 
    211211         IF( nn_timing == 1 )   CALL timing_finalize 
    212                                 CALL Agrif_ChildGrid_To_ParentGrid() 
     212         CALL Agrif_ChildGrid_To_ParentGrid() 
    213213      ENDIF 
    214214#endif 
     
    464464      !                                      ! external forcing  
    465465!!gm to be added : creation and call of sbc_apr_init 
     466!==> cbr: sbc_apr_init in sbcmod as sbc_rnf_init 
    466467                            CALL    tide_init   ! tidal harmonics 
    467468                            CALL     sbc_init   ! surface boundary conditions (including sea-ice) 
     
    763764      ! 
    764765      ! Find the factors of n. 
    765       IF( kn == 1 )   GOTO 20 
    766  
    767       ! nu holds the unfactorised part of the number. 
    768       ! knfax holds the number of factors found. 
    769       ! l points to the allowed factor list. 
    770       ! ifac holds the current factor. 
    771       ! 
    772       inu   = kn 
    773       knfax = 0 
    774       ! 
    775       DO jl = ntest, 1, -1 
     766      IF( kn .NE. 1 ) THEN 
     767 
     768         ! nu holds the unfactorised part of the number. 
     769         ! knfax holds the number of factors found. 
     770         ! l points to the allowed factor list. 
     771         ! ifac holds the current factor. 
    776772         ! 
    777          ifac = ilfax(jl) 
    778          IF( ifac > inu )   CYCLE 
    779  
    780          ! Test whether the factor will divide. 
    781  
    782          IF( MOD(inu,ifac) == 0 ) THEN 
     773         inu   = kn 
     774         knfax = 0 
     775         ! 
     776         DO jl = ntest, 1, -1 
    783777            ! 
    784             knfax = knfax + 1            ! Add the factor to the list 
    785             IF( knfax > kmaxfax ) THEN 
    786                kerr = 6 
    787                write (*,*) 'FACTOR: insufficient space in factor array ', knfax 
    788                return 
     778            ifac = ilfax(jl) 
     779            IF( ifac > inu )   CYCLE 
     780    
     781            ! Test whether the factor will divide. 
     782    
     783            IF( MOD(inu,ifac) == 0 ) THEN 
     784               ! 
     785               knfax = knfax + 1            ! Add the factor to the list 
     786               IF( knfax > kmaxfax ) THEN 
     787                  kerr = 6 
     788                  write (*,*) 'FACTOR: insufficient space in factor array ', knfax 
     789                  return 
     790               ENDIF 
     791               kfax(knfax) = ifac 
     792               ! Store the other factor that goes with this one 
     793               knfax = knfax + 1 
     794               kfax(knfax) = inu / ifac 
     795               !WRITE (*,*) 'ARPDBG, factors ',knfax-1,' & ',knfax,' are ', kfax(knfax-1),' and ',kfax(knfax) 
    789796            ENDIF 
    790             kfax(knfax) = ifac 
    791             ! Store the other factor that goes with this one 
    792             knfax = knfax + 1 
    793             kfax(knfax) = inu / ifac 
    794             !WRITE (*,*) 'ARPDBG, factors ',knfax-1,' & ',knfax,' are ', kfax(knfax-1),' and ',kfax(knfax) 
    795          ENDIF 
     797            ! 
     798         END DO 
    796799         ! 
    797       END DO 
    798       ! 
    799    20 CONTINUE      ! Label 20 is the exit point from the factor search loop. 
     800      ENDIF 
    800801      ! 
    801802   END SUBROUTINE factorise 
Note: See TracChangeset for help on using the changeset viewer.