- Timestamp:
- 2017-12-01T09:43:23+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2017/dev_METO_2017/NEMOGCM/NEMO/SAS_SRC/nemogcm.F90
r7761 r8868 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 ! … … 364 365 IF( ln_ctl ) CALL prt_ctl_init ! Print control 365 366 CALL day_init ! model calendar (using both namelist and restart infos) 367 IF( ln_rstart ) CALL rst_read_open 366 368 367 369 CALL sbc_init ! Forcings : surface module … … 596 598 ! 597 599 ! Find the factors of n. 598 IF( kn == 1 ) GOTO 20 599 600 ! nu holds the unfactorised part of the number. 601 ! knfax holds the number of factors found. 602 ! l points to the allowed factor list. 603 ! ifac holds the current factor. 604 ! 605 inu = kn 606 knfax = 0 607 ! 608 DO jl = ntest, 1, -1 609 ! 610 ifac = ilfax(jl) 611 IF( ifac > inu ) CYCLE 612 613 ! Test whether the factor will divide. 614 615 IF( MOD(inu,ifac) == 0 ) THEN 600 IF( kn .NE. 1 ) THEN 601 602 ! nu holds the unfactorised part of the number. 603 ! knfax holds the number of factors found. 604 ! l points to the allowed factor list. 605 ! ifac holds the current factor. 606 ! 607 inu = kn 608 knfax = 0 609 ! 610 DO jl = ntest, 1, -1 616 611 ! 617 knfax = knfax + 1 ! Add the factor to the list 618 IF( knfax > kmaxfax ) THEN 619 kerr = 6 620 write (*,*) 'FACTOR: insufficient space in factor array ', knfax 621 return 612 ifac = ilfax(jl) 613 IF( ifac > inu ) CYCLE 614 615 ! Test whether the factor will divide. 616 617 IF( MOD(inu,ifac) == 0 ) THEN 618 ! 619 knfax = knfax + 1 ! Add the factor to the list 620 IF( knfax > kmaxfax ) THEN 621 kerr = 6 622 write (*,*) 'FACTOR: insufficient space in factor array ', knfax 623 return 624 ENDIF 625 kfax(knfax) = ifac 626 ! Store the other factor that goes with this one 627 knfax = knfax + 1 628 kfax(knfax) = inu / ifac 629 !WRITE (*,*) 'ARPDBG, factors ',knfax-1,' & ',knfax,' are ', kfax(knfax-1),' and ',kfax(knfax) 622 630 ENDIF 623 kfax(knfax) = ifac 624 ! Store the other factor that goes with this one 625 knfax = knfax + 1 626 kfax(knfax) = inu / ifac 627 !WRITE (*,*) 'ARPDBG, factors ',knfax-1,' & ',knfax,' are ', kfax(knfax-1),' and ',kfax(knfax) 628 ENDIF 629 ! 630 END DO 631 ! 632 20 CONTINUE ! Label 20 is the exit point from the factor search loop. 631 ! 632 END DO 633 ! 634 ENDIF 633 635 ! 634 636 END SUBROUTINE factorise
Note: See TracChangeset
for help on using the changeset viewer.