- Timestamp:
- 2017-12-11T17:45:55+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/SAS_SRC/nemogcm.F90
r8758 r8979 25 25 USE usrdef_nam ! user defined configuration 26 26 USE daymod ! calendar 27 USE restart ! open restart file 27 28 USE step ! NEMO time-stepping (stp routine) 28 29 USE cpl_oasis3 ! … … 379 380 IF( ln_ctl ) CALL prt_ctl_init ! Print control 380 381 CALL day_init ! model calendar (using both namelist and restart infos) 382 IF( ln_rstart ) CALL rst_read_open 381 383 382 384 CALL sbc_init ! Forcings : surface module … … 611 613 ! 612 614 ! Find the factors of n. 613 IF( kn == 1 ) GOTO 20 614 615 ! nu holds the unfactorised part of the number. 616 ! knfax holds the number of factors found. 617 ! l points to the allowed factor list. 618 ! ifac holds the current factor. 619 ! 620 inu = kn 621 knfax = 0 622 ! 623 DO jl = ntest, 1, -1 624 ! 625 ifac = ilfax(jl) 626 IF( ifac > inu ) CYCLE 627 628 ! Test whether the factor will divide. 629 630 IF( MOD(inu,ifac) == 0 ) THEN 615 IF( kn .NE. 1 ) THEN 616 617 ! nu holds the unfactorised part of the number. 618 ! knfax holds the number of factors found. 619 ! l points to the allowed factor list. 620 ! ifac holds the current factor. 621 ! 622 inu = kn 623 knfax = 0 624 ! 625 DO jl = ntest, 1, -1 631 626 ! 632 knfax = knfax + 1 ! Add the factor to the list 633 IF( knfax > kmaxfax ) THEN 634 kerr = 6 635 write (*,*) 'FACTOR: insufficient space in factor array ', knfax 636 return 627 ifac = ilfax(jl) 628 IF( ifac > inu ) CYCLE 629 630 ! Test whether the factor will divide. 631 632 IF( MOD(inu,ifac) == 0 ) THEN 633 ! 634 knfax = knfax + 1 ! Add the factor to the list 635 IF( knfax > kmaxfax ) THEN 636 kerr = 6 637 write (*,*) 'FACTOR: insufficient space in factor array ', knfax 638 return 639 ENDIF 640 kfax(knfax) = ifac 641 ! Store the other factor that goes with this one 642 knfax = knfax + 1 643 kfax(knfax) = inu / ifac 644 !WRITE (*,*) 'ARPDBG, factors ',knfax-1,' & ',knfax,' are ', kfax(knfax-1),' and ',kfax(knfax) 637 645 ENDIF 638 kfax(knfax) = ifac 639 ! Store the other factor that goes with this one 640 knfax = knfax + 1 641 kfax(knfax) = inu / ifac 642 !WRITE (*,*) 'ARPDBG, factors ',knfax-1,' & ',knfax,' are ', kfax(knfax-1),' and ',kfax(knfax) 643 ENDIF 644 ! 645 END DO 646 ! 647 20 CONTINUE ! Label 20 is the exit point from the factor search loop. 646 ! 647 END DO 648 ! 649 ENDIF 648 650 ! 649 651 END SUBROUTINE factorise
Note: See TracChangeset
for help on using the changeset viewer.