      SUBROUTINE SAVING (LSAV, ISAV,IDT,NUMSEC) 
C 
C     * NOV 18/82 - R.LAPRISE.
C     * SET LOGICAL SWITCH ON THE BASIS OF
C     * ISAV, THE SAVING INTERVAL IN NUMBER OF TIMESTEP,
C     * IDT, THE LENGTH OF THE TIMESTEP, AND
C     * NUMSEC, THE ELAPSED TIME FROM THE BEGINNING OF THE SIMULATION.
C     * AT THE BEGINNING OF A NEW RUN (NEWRUN=1), NO FIELD IS SAVED 
C 
      IMPLICIT REAL (A-H,O-Z),
     +INTEGER (I-N)

      LOGICAL LSAV
C---------------------------------------------------------------------
      LSAV=.FALSE.
      IF(ISAV.LE.0) GO TO 100 
C 
      INTSAV=ISAV*IDT 
      MODNOW=MOD(NUMSEC    ,INTSAV) 
      MODNXT=MOD(NUMSEC+IDT,INTSAV) 
      IF  ( ISAV  .EQ.1 
     1 .OR. MODNOW.LE.0 
     2 .OR.(MODNXT-MODNOW.LT.IDT .AND. MODNXT.NE.0)) LSAV=.TRUE.
C 
  100 CONTINUE
      RETURN
      END 
