C
C                         MFIRE 2.10
C     TRANSIENT-STATE SIMULATION PROGRAM FOR MINE VENTILATION
C                  UNDER THE INFLUENCE OF FIRES
C
C                      VERSION OF APRIL 1994
C
C                WRITTEN BY    XINTAN CHANG, PH.D
C                SUPERVISED BY   DR. R. E. GREUER
C    MODIFIED BY X.ZHOU AND L.LAAGE       
C
      PROGRAM MFIRE
      INCLUDE 'CMMNW.DAT'
C
C     PARAMETER
C    .  ( NMX=400, NMY=300, NMZ=150, IMX=15, IMY=10, IMZ=10, LMX=10000 )
C
C     REAL LA
C     INTEGER CONCT
C
C     COMMON  /CONTRL/ NB,NJ,NFNUM,NVPN,NETW,NTEMP,MADJ,ITN,DR,TR,TINC,
C    .                 SPAN,NHM,CRITW,IOUT,TOUT,CONCT
C
C     NB: NUMBER OF AIRWAYS IN NETWORK.
C     NJ: NUMBER OF JUNCTIONS IN NETWORK.
C     NFNUM: NUMBER OF FAN CHARACTERISTICS.
C     NVPN: MARK FOR PRESENCE OF JUNCTION CARDS, 1: PRESENT.
C     NETW: MARK, 1: ONLY THE NETWORK PART WILL BE PERFORMED.
C     NTEMP: MARK, 1: ONLY UP TO THE TEMP. PART WILL BE PERFORMED.
C     MADJ: MAX. NO. OF ITERATION IN TEMP. PART.
C     ITN: MAX. NO. OF ITERATION IN NETWORK BALANCE.
C     DR: REFERENCE DENSITY OF AIR, LBM/FT3.
C     TR: REFERENCE TEMPERATURE OF AIR, DEG. F.
C     TINC: TIME INCREMENT IN SIMULATION, SEC..
C     SPAN: TIME SPAN OF SIMULATION, MIN..
C     NHM: MARK FOR WET CASE CALCULATION, 0 DRY; 1 WET.
C     CRITW: CRITERION IN WALL TEMP. ASSUMING DRY, DEG. F.
C     IOUT: OUTPUT, 0: BRIEF; 1: NORMAL; -1: DETAIL; -2: MORE DETAILED.
C
C     COMMON  /CTRL/ NAV,MAXJ,INFLOW,CRITSM,CRITGS,CRITHT
C
C     NAV: MARK FOR PRESENCE OF AVE. VALUE CARDS.
C     MAXJ: HIGHEST JUNCTION NUMBER.
C     INFLOW: NUMBER OF CONTAMINATION CARDS.
C     CRITSM: ACCURACY OF FUME CALCULATION.
C     CRITGS: ACCURACY OF METHAME CALCULATION.
C     CRITHT: ACCURACY OF TEMPERATURE CALCULATION.
C
C     COMMON  /NTWK/ NO(NMX),JS(NMX),JF(NMX),NWTYP(NMX),R(NMX),Q(NMX),
C    .               P(NMX),KF(NMX),LA(NMX),A(NMX),O(NMX),RSTD(NMX),
C    .               DZRD(NMX),FRNVP(NMX),NREV(NMX),RDCH4(NMX),
C    .               RDPROP(NMX),TRD(NMX),TJS(NMX),RDOP(NMX),RCH4(NMX),
C    .               FFRNVP(NMX),RA(NMX),NNREV(NMX),RDH2O(NMX),RH2O(NMX)
C
C     NO(NMX): AIRWAY NUMBER.
C     JS(NMX): JUNCTION NUMBER OF AIRWAY BEGINNING.
C     JF(NMX): JUNCTION NUMBER OF AIRWAY END.
C     NWTYP(NMX): AIRWAY TYPE.
C     R(NMX): RESISTANCE OF AIRWAY 10**10 IN. W.G./(CFM)**2.
C     Q(NMX): BALANCED AIRFLOW RATE, ASSUMING EQUILIBRIA, CFM
C     P(NMX): CALCULATED PRESSURE LOSS IN IN. W.G..
C     KF(NMX): FRICTION FACTOR.
C     LA(NMX): AIRWAY LENGTH IN FT.
C     A(NMX): AIRWAY CROSS SECTIONAL AREA IN FT**2.
C     O(NMX): AIRWAY PERIMETER IN FT.
C     RSTD(NMX): RESISTANCE FACTOR BASED ON TR.
C     DZRD(NMX): ELEVATION CHANGE IN AIRWAY IN FT.
C     FRNVP(NMX): PRODUCT TMRS*DZRD.
C     NREV(NMX): NUMBER OF AIRFLOW REVERSALS IN AN INTERVAL.
C     RDCH4(NMX): METHANE CONCENTRATION AT ROADWAY ENDS.
C     RDPROP(NMX): CONTAMINANT CONCENTRATION AT ROADWAY ENDS.
C     TRD(NMX): TEMPERATURE AT ROADWAY ENDS.
C     TJS(NMX): TEMPERATURE AT ROADWAY BEGINNING.
C     RDOP(NMX): BACKUP ARRAY FOR RDPROP.
C     RCH4(NMX): BACKUP ARRAY FOR RDCH4.
C     FFRNVP(NMX): BACKUP ARRAY FOR FRNVP.
C     RA(NMX): BACKUP ARRAY FOR R.
C     NNREV(NMX): NUMBER OF AIRFLOW REVERSALS SINCE TIME ZERO..
C     RDH2O(NMX): HUM. RATIO AT ENDS OF AIRWAYS.
C     RH2O(NMX): BACKUP ARRAY FOR RDH2O.
C
C     COMMON  /FAN/ NOF(IMX),NFREG(IMX),RGRAD(IMX),NFCW(IMX),MPTS(IMX),
C    .              QF(IMX,IMY),PF(IMX,IMY),NSKP(IMX),NEGQ(IMX),JSB(NMX)
C
C     NOF(IMX): AIRWAY NUMBER OF FAN.
C     NFREG(IMX): LIST OF FANS WITH CHARACTERISTICS.
C     RGRAD(IMX): SLOPE OF FAN CHARACTERISTIC.
C     NFCW(IMX): LIST OF FANS WHOSE CHAR. EXCEEDED.
C     MPTS(IMX): NUMBER OF POINTS DEFINING FAN CHAR.
C     QF(IMX,IMY): AIRFLOW AT GIVEN POINT OF FAN CHAR.
C     PF(IMX,IMY): PRESSURE AT GIVEN POINT OF FAN CHAR.
C     NSKP(IMX): MARK INDICATING PERFORMANCE OF SPLINE.
C     NEGQ(IMX): MARK INDICATING AIRFLOW REVERSAL IN FAN BRANCH.
C     JSB(NMX): BACKUP ARRAY FOR JS.
C
C     COMMON  /MESH/ MNO,MEND(NMY),MSL(LMX),FNVP(NMY),RQ(NMX),INU(NMX),
C    .               KNO(NMX),KJS(NMX),KJF(NMX)
C
C     MNO: NUMBER OF MESHES IN NETWORK.
C     MEND(NMY): LIST OF MESH ENDS IN MSL-LIST.
C     MSL(LMX): LIST OF ALL INDEPENDENT MESHES.
C     FNVP(NMY): LIST OF NVP IN MESHES.
C     RQ(NMX): AUXILIARY LIST OF R*Q.
C     INU(NMX): AUXILIARY LIST FOR FORMING BASE SYST.
C     KNO(NMX): LIST OF AIRWAYS IN BASE SYSTEM.
C     KJS(NMX): LIST OF JUNCTIONS IN BASE SYSTEM.
C     KJF(NMX): LIST OF JUNCTIONS IN BASE SYSTEM.
C
C     COMMON  /JUNCT/ JNO(NMY),T(NMY),Z(NMY),CH4C(NMY),JNOL(NMY),
C    .                PROP(NMY),PRCH4(NMY),JLR(NMY),HJN(NMY),PRH2O(NMY)
C
C     JNO(NMY): JUNCTION NUMBER.
C     T(NMY): TEMPERATURE OF AIR IN JUNCTIONS.
C     Z(NMY): ELEVATION OF JUNCTIONS.
C     CH4C(NMY): METHANE CONCENTRATION IN JUNCTION.
C     JNOL(NMY): LIST OF JUNCTION NUMBERS IN INCREASING ORDER.
C     PROP(NMY): CONTAMINANT CONCENTRATION IN JUNCTION.
C     PRCH4(NMY): METHANE CONCENTRATION IN JUNCTION.
C     JLR(NMY): LIST RELATING JNO- AND JNOL-LISTS.
C     HJN(NMY): RELATIVE HUMIDITY IN JUNCTIONS, PERCENTAGE.
C     PRH2O(NMY): ABSOLUTE HUMIDITY IN JUNCTIONS.
C
C     COMMON  /TEMP/ TROCK(NMX),TMRD(NMX),HA(NMX),HK(NMX)
C
C     TROCK(NMX): AVERAGE ROCK TEMPERATURE IN AIRWAY.
C     TMRD(NMX): MEAN TEMPERATURE OF AIR IN AIRWAY.
C     HA(NMX): THERMAL DIFFUSIVITY OF ROCK.
C     HK(NMX): THERMAL CONDUCTIVITY OF ROCK.
C
C     COMMON  /FUME/ NCENT(NMX),CH4V(NMX),CH4PA(NMX),CONT(IMX),CONC(IMX)
C    .               ,HEAT(IMX),O2MIN(IMX),SMPO2(IMX),HTPO2(IMX),
C    .               TFSI(IMX),CN(IMX),HN(IMX),O2BEH(IMX),TPR(IMX),
C    .               HTAD(IMX),QCENT(IMX)
C
C     NCENT(NMX): NUMBER OF AIRWAYS INTO WHICH FUME ENTERS.
C     CH4V(NMX): METHANE EMISION RATE IN AIRWAYS.
C     CH4PA(NMX): METHANE EMISION RATE PER UNIT SURFACE AREA.
C     CONT(IMX): VOLUME FLOW RATE OF CONTAMINATED GAS INFLOW.
C     CONC(IMX): CONCENTRATION OF CONTAMINANT IN GAS INFLOW.
C     HEAT(IMX): HEAT ENTERING AIRWAY.
C     O2MIN(IMX): OXYGEN CONCENTRATION OF FUMES LEAVING FIRE ZONE
C     SMPO2(IMX): CONTAMINANT PRODUCTION PER CUBIC FT OF OXYGEN.
C     HTPO2(IMX): HEAT PRODUCTION PER CUBIC FT OF OXYGEN DELIVERY
C     TFSI(IMX): AIR TEMPERATURE BEHIND HEAT SOURCE.
C     CN(IMX): EVERAGE CARBON CONTENT IN FUEL.
C     HN(IMX): EVERAGE HYDROGEN CONTENT IN FUEL.
C     O2BEH(IMX): OXYGEN CONTENT BEHIND FIRE SOURCES.
C     TPR(IMX): TRANSITION TIME OF FIRE IN MIN.
C     HTAD(IMX): REDUCED HEAT INPUT DUE TO HIGH AIR TEMPERATURE.
C     QCENT(IMX): "STD. Q' AT WHCIH FIRE TAKES THE INPUT PARAMETERS.
C
C     COMMON  /SCHEME/ NGIN(NMX),MIN(NMX),NGOUT(NMX),LOUT(NMX)
C
C     NGIN(NMX): LIST OF AIRWAYS ENTERING JUNCTION.
C     MIN(NMX): LIST OF LAST AIRWAY PER JUNCTION IN NGIN-LIST.
C     NGOUT(NMX): LIST OF AIRWAYS LEAVING JUNCTION.
C     LOUT(NMX): LIST OF LAST AIRWAY PER JUNCTION IN NGOUT-LIST.
C
C     COMMON  /EST/ MEMREC(NMX),NOREC(NMX),ESTPR(NMX),ESTCH4(NMX),
C    .              ESTTR(NMX)
C
C     MEMREC(NMX): TEMPORARY LIST OF AIRWAYS CARRYING RECIRC. AIR.
C     NOREC(NMX): PERMANENT LIST OF AIRWAYS.
C     ESTPR(NMX): ESTIMATED CONCENTRATION FOR RECIRCULATED AIR.
C     ESTCH4(NMX): ESTIMATED METHANE CONCENTRATION.
C     ESTTR(NMX): ESTIMATED TEMPERATURE.
C
C     COMMON  /FACTOR/ XNEW(NMX),DCOAGE(NMX),WTCORR(NMZ,10),NSEQS(NMZ)
C
C     XNEW(NMX): EXPONENT FOR TEMPERATURE CALCULATION.
C     DCOAGE(NMX): COEFF. OF AGE FOR "DRY CASE".
C     WTCORR(NMZ,10): TEMPERATURE CORRECTION IN WET CASE.
C     NSEQS(NMZ): COUNTER OF TIME INTERVALS.
C
C     COMMON  /TTJ/ TIME,TSTART,JSTART,TLEFT(NMX)
C
C     TIME: TIME ASSUMING QUASI-EQUILIBRIA.
C     TSTART: TEMPERATURE AT THE START JUNCTION.
C     JSTART: START JUNCTION (ATMOSPHERE).
C     TLEFT(NMX): TIME INCREMENT FOR MAKING UP A NORMAL INTERVAL.
C
C     COMMON  /SUM/ SUMQ(NMY),SUMC(NMY),SUMM(NMY),SMHEAT(NMY),SUMW(NMY)
C
C     SUMQ(NMY): TOTAL AIRFLOW RATES ENTERING JUNCTION.
C     SUMC(NMY): TOTAL CONTAMINANT FLOW RATES ENTERING JUNCTION.
C     SUMM(NMY): TOTAL METHANE FLOW RATES ENTERING JUNCTION.
C     SMHEAT(NMY): TOTAL ENTHALPY/REFRENCE DENSITY ENTERING JUNCTI
C     SUMW(NMY): TOTAL WATER VAPOR ENTERING JUNCTION.
C
C     COMMON  /AUX/ PROPS(NMX),PRCH4S(NMX),QQ(NMX),QTP(NMX),TTJS(NMX),
C    .              TTRD(NMX),TAS(NMX),TMM(NMX),BI(NMX),CNT(NMX),
C    .              EXPN(NMX),FAW(NMX)
C
C     PROPS(NMX): BACKUP ARRAY FOR PROP.
C     PRCH4S(NMX): BACKUP ARRAY FOR PRCH4.
C     QQ(NMX): DAMPED AND TIME-AVERAGED AIRFLOW RATE.
C     QTP(NMX): BACKUP ARRAY FOR Q, FIXED IN EACH INTERVAL.
C     TTJS(NMX): BACKUP ARRAY FOR TJS.
C     TTRD(NMX): BACKUP ARRAY FOR TRD.
C     TAS(NMX): BACKUP ARRAY OF T.
C     TMM(NMX): (NOT IN EFFECTIVE USE.)
C     BI(NMX): BIOT NUMBER.
C     CNT(NMX): INTERMEDIATE STORAGE ARRAY.
C     EXPN(NMX): INTERMEDIATE STORAGE ARRAY.
C     FAW(NMX): EXPONENTIAL FACTOR IN TEMP. EVALUATION.
C***  FBN(NMX): WEIGHING FACTOR IN CALCULATING JUNCTION TEMPERATURE.
C
C     COMMON  /HUMID/ PRH2OS(NMY),HSTART,PSI(NMX),NSP(NMX),STV(NMZ,10),
C    .                HABS(NMZ,10),NSEQE(NMZ),TDA(NMZ,10),WMTR(NMZ,10),
C    .                GFF(NMZ,10)
C
C     PRH2OS(NMY): BACKUP ARRAY FOR PRH2O.
C     HSTART: REL. HUM. IN THE START JUNCTION.
C     PSI(NMX): WETNESS RATIO OF AIRWAYS.
C     NSP(NMX): NUMBER OF SECTIONS FOR T. CORR. EVALUATION.
C     STV(NMZ,10): INTERMEDIATE DATA FOR TEMP. CORR.
C     HABS(NMZ,10): ABS. HUMIDITY AT SECTION BOUNDARY.
C     NSEQE(NMZ): ADDRESS OF RECORD FOR WET TEMP. CORR.
C     TDA(NMZ,10): AIR TEMP. AT STATIONS.
C     WMTR(NMZ,10): MASS TRANSFER OF WATER VAPOR, LBM/FT**2.
C     GFF(NMZ,10): VAPOR CONDENSED AS MIST, LB/LB.
C
C     COMMON  /WRN/ WRNPR,WRNGS,WRNSM,WRNHT,IOMIT(IMX),ROMIT(IMX,3),IAC
C
C     WRNPR: PRESSURE DROP WARNING CRITERIA.
C     WRNGS: METHANE CONCENTRATION WARNING CRITERIA.
C     WRNSM: FUME CONCENTRATION WARNING CRITERIA.
C     WRNHT: HIGH TEMPERATURE WARNING CRITERIA.
C     IOMIT(IMX): AIRWAYS FOR WHICH DETAILED DATA RECORDS WERE OMITTED.
C     ROMIT(IMX,3): DATA AT STARTING J OF DATA-OMITTED AIRWAY.
C     IAC: COUNTER OF IOMIT AND ROMIT.
C
C     COMMON  /TRANS/ DELTAT,SUMFNV
C
C     DELTAT: SPAN OF TIME INCREMENT.
C     SUMFNV: SUM OF NVP CORRECTION IN SYSTEM.
C
C     COMMON  /RCD/ IBTN(NMX),DPPA(NMZ,10,5),NSAC(NMX,2),TMRDA(NMX),
C    .              DELTAQ(NMX),DPPB(NMZ,10,5),NSACB(NMX,2),GBTN(10,5),
C    .              JCH(NMY),TAUXA(NMZ,10),TAUXB(NMZ,10),TAUXC(NMZ),
C    .              TAUXD(NMZ),FMASS(NMZ)
C
C     IBTN(NMX): ARRAY HOLDING ADDRESS OF RECORD FOR AIRWAY (N
C     DPPA(NMZ,10,5): MASTER DATA STORAGE ARRAY IN DYNAMIC SIMULATI
C     NSAC(NMX,2): DATA RECORD STATUS OF AIRWAY (NMX).
C     TMRDA(NMX): BACKUP ARRAY FOR TMRD.
C     DELTAQ(NMX): VARIATION OF AIRFLOW IN AIRWAYS.
C     DPPB(NMZ,10,5): BACKUP ARRAY FOR DPPA.
C     NSACB(NMX,2): BACKUP ARRAY FOR NSAC.
C     GBTN(10,5): AUXILIARY ARRAY FOR DATA TRANSFER.
C     JCH(NMY): MARK INDICATING JUNCTION COND. CHANGE.
C     TAUXA(NMZ,10): AIR TEMP. AT REAR ENDING OF SEGMENTS.
C     TAUXB(NMZ,10): BACKUP ARRAY FOR TAUXA.
C     TAUXC(NMZ): AIR TEMP. BEYOND THE FIRST SEGMENT.
C     TAUXD(NMZ): BACKUP ARRAY OF TAUXC.
C     FMASS(NMZ): MASS OF AIR BEYOND THE FIRST SEGMENT.
C
C     COMMON  /CDEV/ GFS(IMX),TACC
C
C     GFS(IMX): HUMIDITY RATIO BEHIND FIRE SOURCE.
C     TACC: CUMULATED TIME AFTER EVENT IN SEC.
C
C     COMMON  /CCJ/ JDP, JDPP(IMX)
C
C     JDP: NUMBER OF JUNCTIONS INITIATING DATA RECORDS.
C     JDPP(IMX): JUNCTIONS WHICH INITIATE DATA RECORDS.
C
C     COMMON  /TREND/ QRCD(NMX,10),TMRCD(NMX,10)
C
C     QRCD(NMX,10): AIRFLOW RATES DURING ITERATIONS.
C     TMRCD(NMX,10): MEAN AIR TEMP. IN AIRWAYS DURING ITERATION.
C
      LOGICAL EXISTS
      CHARACTER*50 MD1
      CHARACTER*1 CONKEY
C
C     MDATA: NAME OF THE INPUT DATA FILE.
C
C  ** NETWORK PART
C
C     MARKX: 0: THE PROG. HAS NOT REACHED THE DYNAMIC SIMULATION
C            PART YET.  1: THE DYNAMIC PART HAS BEEN REACHED.
C     MARKY: 0: BEFORE FINAL QUASI-EQUILIBRIUM SIMULATION.
C            1: IN THE FINAL QUASI-EQUIL. STAGE, READY FOR TERMINATION.
C     MARKN: 0: NORMAL CONDITION.  1: NETWORK BALANCING WAS TERMINATED
C            DUE TO USER-SPECIFIED MAX. MUNBER OF ITERATIONS EXCEEDED.
C     MARKC: 0: NORMAL CONDITION.  1: CALCULATION IN TEMP. PART WAS
C            TERMINATED DUE TO MAX. NUMBER OF ITERATIONS EXCEEDED.
C     NSTOP: MARK FOR INPUT DATA ERROR.
C
      NSTOP=0
      MARKX=0
      MARKY=0
      ITT=0
      MD1='                                                  '
      WRITE (6,910)
      WRITE (6,900)
5     WRITE (6,680)
      READ (5,'(A)') MD1
C 
      INQUIRE (FILE = MD1, EXIST = EXISTS)
      IF (.NOT. EXISTS) THEN
         WRITE (*, '(2A/)') '  CAN NOT FIND FILE ', MD1
10       WRITE (*, '(2A/)') '  DO YOU WANT TO CONTINUE?'
         WRITE (*, '(2A/)') '   Y(es)  or  Q(uit)'
         READ (*,'(A)') CONKEY
           IF (CONKEY .EQ. 'Q') THEN
             STOP
           ELSEIF (CONKEY .EQ. 'q') THEN
             STOP
           END IF
           IF (CONKEY .EQ. 'Y') THEN
             GOTO 5
           ELSEIF (CONKEY .EQ.'y') THEN
             GOTO 5
           END IF
           GOTO 10
      END IF
      CONTINUE
C
      OPEN (9,FILE=MD1,STATUS='UNKNOWN')
      OPEN (8,FILE='WFOUT',STATUS='UNKNOWN')
1     REWIND (9)
      CALL INPUT (1,NSTOP,MARKY,MAXNO)
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
      IF (NPLOT.EQ.0) NPLOT=2
      DO 2 I=1,NFNUM
         IF (NSWT(I).EQ.0) NSWT(I)=1
2     CONTINUE 
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC 
      IF (NSTOP.GE.1) GO TO 300
      CALL CHECK1 (NSTOP,MAXNO)
      IF (NETW.NE.1) CALL INPUT (3,NSTOP,MARKY,MAXNO)
      IF (NSTOP.GE.1) GO TO 300
      CALL OUTPUT (1,MARKX,MARKN,MARKC,MARKY,ITT,MADJC)
      MADJC=0
      MARKN=0
      IF (MARKY.EQ.1) GO TO 100
C     ==========================
      NSTOP1=0
C     ==========
      CALL CHSFIT (NSTOP1)
C     ====================
100   ITCT=0
      IF (MARKY.EQ.0) WRITE (6,920)
      CALL ARR (MARKX)
      CALL BASE (NSTOP)
      IF (NSTOP.GE.1) GO TO 300
      CALL MSLIST
      CALL MBLNC
      CALL NVP1
      CALL ITR (MARKX,MARKN,NSFLOW,0,MADJC,ITCT)
      CALL RGLT
      CALL OUTPUT (2,MARKX,MARKN,MARKC,MARKY,ITT,MADJC)
      IF (MARKY.EQ.0) WRITE (6,930)
      IF (NETW.EQ.1) THEN
         WRITE (8,510)
         WRITE (6,1000)
         GO TO 300
      ENDIF
C
C  ** TEMPERATURE PART
C
      MARKZ=0
      ITCT=0
      CALL INPUT (2,NSTOP,MARKY,MAXNO)
      IF (NSTOP.GE.1) GO TO 300
      CALL CCDATA (MARKY,NSTOP)
      IF (NSTOP.GE.1) GO TO 300
      IF (MARKY.EQ.1) THEN
         TACC=SPAN*60.0
         CALL CDCH (NSTOP,1)
         IF (NSTOP.GE.1) GO TO 300
      ENDIF
      CALL OUTPUT (3,MARKX,MARKN,MARKC,MARKY,ITT,MADJC)
      IF (MARKY.EQ.0) THEN
         WRITE (6,940)
      ELSE
         WRITE (6,950)
      ENDIF
40    NSFLOW=1
      CALL FWCT (NSFLOW,0)
C      IF (NSFLOW.LE.0) THEN
C         CALL ARR (MARKX)
C         CALL BASE (NSTOP)
C         CALL MSLIST
C      ENDIF
      IF (MARKZ.EQ.0) THEN
         CALL CH4EVA
         MARKZ=1
      ENDIF
C
C     DETERMINATION OF CONDITIONS IN THE STARTING JUNCTION.
C
      DO 50 I=1,NJ
         PROP(I)=0.0
         PRCH4(I)=0.0
         IF (JNOL(I).EQ.JSTART) THEN
            MSTART=I
            ISTART=JLR(I)
            T(ISTART)=TSTART
            PRH2OS(ISTART)=HSTART
         ENDIF
50    CONTINUE
70    MRC=0
      MARKC=0
      L=ISTART
      NSTART=MSTART
90    CALL CDENDS (MARKY,NSTART,L,NSTOP)
      IF (NSTOP.GE.1) GO TO 300
      JUMPBK=0
      CALL CDJUNC (NSTART,JUMPBK,L,MOMIT,0)
      IF (JUMPBK.EQ.1) GO TO 90
      CALL RECIRC (MRC,JUMPBK,NSTART,L)
      IF (JUMPBK.EQ.1) GO TO 90
      CALL PREP (MRC,LST)
      IF (MRC.NE.0) THEN
C
C     ITN: USER-SPECIFIED MAX. NUMBER 0F ITERATION IN NETWORK BALANCING
C          (SUB. ITR) AND DATA PREPARATION (TEMP. PART).
C     ITCT: COUNTER OF ITERATIONS.
C
         ITCT=ITCT+1
         IF (LST.NE.0) THEN
            IF (ITCT.LE.ITN) THEN
               L=ISTART
               NSTART=MSTART
               GO TO 90
            ENDIF
            MARKC=1
         ENDIF
      ENDIF
      CALL TEVAL
C
C     NSFLOW: 0: DATA PREPARATION FOR NETWORK BALANCING IN TEMP. PART
C             HAS NOT BEEN COMPLETED. AIRFLOW REVERSAL EXISTS IN THE
C             SYSTEM.  1: DATA PREPARATION COMLETED.
C     SUMFNV: SUM OF ABSOLUTE DIFFERENCE OF NVP IN SUCCESSIVE INTERVALS.
C
C
C     MADJ: USER-SPECIFIED MAX. NUMBER OF ITERATIONS IN ONE PROG. RUN.
C     MADJC: COUNTER OF ITERATIONS IN ONE PROG. RUN.
C
      IF (MADJC.LT.MADJ) THEN
         MADJC=MADJC+1
         ITCT=0
         MARKN=0
         DO 120 I=1,NB
            IF (JF(I).LT.0) JF(I)=-JF(I)
120      CONTINUE
        IF (NSFLOW.LE.0) THEN
            CALL ARR (MARKX)
            CALL BASE (NSTOP)
            CALL MSLIST
            CALL MBLNC
         ENDIF
         CALL NVP2
         CALL ITR (MARKX,MARKN,NSFLOW,1,MADJC,ITCT)
         WRITE (6,960) MADJC,SUMFNV/MNO
         IF (MADJC.LE.2.AND.MARKY.EQ.1) GO TO 124
         IF (MADJC.EQ.1) GO TO 124
C        *****************************************
         IF ((SUMFNV/MNO).LE.2.E-4) GO TO 130
124      IF (MADJC.GE.(MADJ-9)) THEN
            J=MADJC-MADJ+10
            DO 125 I=1,NB
               QRCD(I,J)=ABS(Q(I))
               IF (JSB(I).NE.IABS(JS(I)).AND.Q(I).GT.0.0)
     .            QRCD(I,J)=-ABS(Q(I))
               IF (JSB(I).EQ.IABS(JS(I)).AND.Q(I).LT.0.0)
     .            QRCD(I,J)=-ABS(Q(I))
               TMRCD(I,J)=TMRD(I)
125         CONTINUE
         ENDIF
         ITCT=0
         DO 30 I=1,NB
            IF (Q(I).LT.0.0) GO TO 40
30       CONTINUE
         NSFLOW=1
         GO TO 70
      ENDIF
130   CALL HUMI
      IF (MARKY.EQ.0) WRITE (8,620)
      MARKL=0
      CALL FWCT (NSFLOW,0)
      CALL OUTPUT (4,MARKX,MARKN,MARKC,MARKY,ITT,MADJC)
      CALL FWCT (NSFLOW,1)
C      DO 140 I=1,NB
C         DCOAGE(I)=-1.0
C140   CONTINUE
      IF (NTEMP.EQ.1) THEN
         WRITE (8,520)
         WRITE (6,1000)
         GO TO 300
      ENDIF
      IF (MARKY.EQ.1) THEN
         WRITE (6,1000)
         GO TO 300
      ENDIF
      MADJC=0
      IF (NSFLOW.EQ.0) THEN
         CALL BASE (NSTOP)
         CALL MSLIST
      ENDIF
C
C  ** DYNAMIC SIMULATION PART
C
C     MARKR: 0: OUTPUT WAS GIVEN IN THE LAST INTERVAL.
C            1: OUTPUT WILL BE OMITTED IN THE PRESENT INTERVAL DUE TO
C            INSIGNIFICANCY OF CHANGE. CHANGES IN Q WILL BE CUMULATED.
C     MH: CONTROLLING THE WRITING OF THE HEADLINE FOR THE CONVERGENCE
C         INFORMATION OF OMITTED OUTPUT.
C     ISQC: COUNTER OF AIRWAYS WHICH HAVE THEIR DETAILED DATA RECORDS.
C
      MARKR=0
      MH=0
      MARKX=1
      JDP=0
      INIFAN=0
C     ********
      TACC=0.0
      ISQC=0
      QS=100.0
      WRITE (8,560)
      WRITE (8,550)
      CALL INIT (1)
      WRITE (6,970)
C
C     TINC: USER-SPECIFIED SPAN OF TIME INTERVAL IN SEC..
C     QSTD: A CERTAIN PERCENTAGE OF THE SUM OF ABSOLUTE AIRFLOW CHANGES
C           IN AIRWAYS IN THE FIRST INTERVAL.
C     QS: VARIATION IN SUM OF ABS. AIRFLOW CHANGES IN SUCCESSIVE
C         INTERVALS, CRITERION FOR OUTPUT DURING DYNAMIC SIMULATION.
C     DELTAT: TIME INCREMENT THAT IS ACTUALY ADOPTED IN THE CURRENT
C             SIMULATION UPDATING.
C
      IF (TINC.LE.0.0) TINC=15.0
      DELTAT=TINC
C
C       ENTERING THE PRIMARY DO-LOOP WITH TIME INCREMENT AS
C     THE ADVANCING STEP.
C
      DO 290 MASTER=1,1000
         IF (TACC.GT.SPAN*60.0) GO TO 300
         IF (MARKR.EQ.0) WRITE (8,560)
C
C     SUB. CDCH UPDATES CONDITION CHANGES ACCORDING TO A USER-SPECIFIED
C     TIME TABLE.
C
         CALL CDCH (NSTOP,0)
         IF (NSTOP.GE.1) GO TO 300
C
C     MARKP: 0: CONVERGENT RESULTS FOR THE PRESENT INTERVAL HAVE NOT
C            BEEN REACHED.  1: CONVERGENT RESULTS OBTAINED.
C     ITT: COUNTER OF ITERATION IN NETWORK BALANCING.
C     IBB: COUNTER OF ITERATION IN DATA PREPARATION.
C
         MARKP=0
         ITT=0
         IBB=0
         CALL INIT (2)
C
C     MARKS: TIMER FOR DATA HANDLING.     0: ADVANCING OF EXISTING
C            C.V. IN AIRWAYS.  =>1: ADVANCING NEW C.V. INTO AIRWAYS
C            IF NECESSARY, CHECKING TO SEE IF THERE IS ANY C.V. WHICH
c            WAS SET UP IN THE PRESENT INTERVAL AND TRAVELLED MORE
C            THAN ONE AIRWAY.
C     MARKQ: 0: NORMAL CONDITION.  1: SIGNIFICANT CONDITION CHANGES
C            IN JUNCTIONS ARE DETECTED, MORE ITERATIONS ARE NEEDED.
C
160      MARKS=0
C
C     MARKL: 0: NORMAL CONDITION.  1: AIRFLOW REVERSAL FOUND IN THE
C            SYSTEM, RECONSTRUCTION OF MESH FORMATION IS NEEDED.
C
         MARKL=0
         CALL  DTTR (MARKL,MARKP)
         IF (MARKL.NE.0) THEN
            CALL BASE (NSTOP)
            CALL MSLIST
         ENDIF
         DO 165 I=1,NJ
            TLEFT(I)=-0.1
165      CONTINUE
C        DO 168 I=1,NB
C           FBN(I)=0.0
C168     CONTINUE
170      MARKQ=0
         CALL CDJN (ISQC,MARKS,NSTOP)
         IF (NSTOP.GE.1) GO TO 300
         DO 180 I=1,NJ
            SUMQ(I)=0.0
            SUMC(I)=0.0
            SUMM(I)=0.0
            SMHEAT(I)=0.0
            SUMW(I)=0.0
180      CONTINUE
         DO 240 I=1,NB
            IQ=IBTN(I)
            IS=NSACB(I,2)
            IF (IBTN(I).NE.0) THEN
C
C     ADVANCING C.V. IN AIRWAYS.
C
               TMM(I)=TMRD(I)
               IF (MARKS.GE.1) THEN
                  CALL ADPT (IS,IQ,MARKS,I)
               ELSE
                  TMST=TACC+DELTAT
                  CALL KALPHA (TMST,TM,FX,CP,I,1)
                  COAGE=BI(I)-FX*BI(I)*BI(I)/(0.375+BI(I))
                  DCOAGE(I)=COAGE
                  XNEW(I)=HK(I)*O(I)*O(I)*COAGE/(120.*DR*QQ(I)*A(I))
                  CALL ADPT (IS,IQ,MARKS,I)
               ENDIF
C
C       SUB. WDT EVALUATES PARAMETERS AT STATIONS IN THE AIRWAYS
C     IN WHICH SIGNIFICANT CONDITION CHANGES HAPPENED FOR THE
C     EVALUATION OF TEMP. CORR. IN WET CASES.
C
               IF (NHM.GT.0) CALL WDT (I)
            ELSE
C
C     RHH2O: HUMIDITY RATIO AT AIRWAY ENDING.
C
               IF (NHM.GT.0.AND.NWTYP(I).EQ.10) THEN
                  DO 190 IJ=1,INFLOW
                     IF (NCENT(IJ).EQ.NO(I)) THEN
                        RDH2O(I)=GFS(IJ)
                        GO TO 200
                     ENDIF
190               CONTINUE
               ENDIF
C
C       EVALUATION OF CH4 CONCENTRATION AT THE END OF AIRWAYS WHICH
C     HAVE NO DETAILED DATA RECORDS.
C
200            DO 215 IJ=1,NJ
                  KN=JLR(IJ)
                  IF(JS(I).EQ.JNO(KN)) THEN
                     DST=QQ(I)*DELTAT/(A(I)*60.0)
                     IF (DST.GT.LA(I)) DST=LA(I)
                     CH4B=(RCH4(I)-PRCH4S(KN))*(LA(I)-DST)/LA(I)+
     .                    PRCH4S(KN)
                     RDCH4(I)=(CH4B*QQ(I)+CH4V(I)*DST/LA(I))/
     .                        (QQ(I)+CH4V(I)*DST/LA(I))
                  ENDIF
215            CONTINUE
            ENDIF
C           TTB=(TRD(I)+TTRD(I))/2.0
C           IF (NSAC(I,2).GE.1) TTB=TRD(I)*FBN(I)+TTRD(I)*(1.0-FBN(I))
            TTB=TRD(I)
            JJ=IABS(JF(I))
            DO 220 J=1,NJ
               IF (JNO(J).EQ.JJ) THEN
                  SUMQ(J)=SUMQ(J)+QQ(I)
                  SUMC(J)=SUMC(J)+QQ(I)*RDPROP(I)
                  SUMM(J)=SUMM(J)+QQ(I)*RDCH4(I)
                  SMHEAT(J)=SMHEAT(J)+(0.2376*TTB+1.2E-5*TTB*TTB)*QQ(I)
                  SUMW(J)=SUMW(J)+QQ(I)*RDH2O(I)
                  GO TO 240
               ENDIF
220         CONTINUE
240      CONTINUE
         DO 245 I=1,NJ
            JCH(I)=0
245      CONTINUE
C
C
      DO 250 I=1,NJ
         IF (JNOL(I).EQ.JSTART.OR.(JNOL(I).GE.900.AND.JNOL(I).LE.950))
C         IF (JNOL(I).EQ.900)
C        **********************
     .      GO TO 250
C
C       UPDATING THERMAL STATES IN JUNCTIONS EXCEPT FOR THE USER-
C     SPECIFIED STARTING JUNCTION (USUALLY THE ATMOSPHERE).
C
         K=JLR(I)
         MARKW=0
         TPP=T(K)
         PRPP=PROP(K)
         PRCPP=PRCH4(K)
C
C     PROP(K): CONTENT OF CONTAMINANTS IN AIRFLOW.
C     PRCH4(K): CONTENT OF CH4 IN AIRFLOW.
C     PRH2O(K): CONTENT OF WATER VAPOR IN AIRFLOW.
C     T(K): TEMPERATURE OF AIRFLOW.
C     THE ABOVE PARAMETERS ARE EXPRESSED AS MASS RATIOS WITH RESPECT
C     TO THAT OF AIR CURRENT.
C
         PROP(K)=SUMC(K)/SUMQ(K)
         PRCH4(K)=SUMM(K)/SUMQ(K)
         PRH2O(K)=SUMW(K)/SUMQ(K)
         PTCONT=9.801E7+2.0*SMHEAT(K)/(SUMQ(K)*2.4E-5)
         T(K)=-9900.+SQRT(PTCONT)
C
C       MARKW=1 INDICATES THAT ALL THE DOWN-STREAM AIRWAYS OF JUNCTION
C     JNO(K) NEED TO HAVE THEIR DETAILED DATA RECORDS.
C
         IF (ABS(TPP-T(K)).GE.1.0) MARKW=1
         IF (ABS(PRPP-PROP(K)).GE.1.E-6) MARKW=1
C                                    **
         IF (ABS(PRCPP-PRCH4(K)).GE.1.E-4) MARKW=1
C                                      **
         IF (MARKW.EQ.1) JCH(K)=1
         IF (MARKW.EQ.1) MARKQ=1
250   CONTINUE
C
C
         IF (MARKS.LT.1.OR.MARKQ.NE.0) THEN
C
C       DATA PREPARATION HAS NOT BEEN COMPLETED, MORE ITERATIONS ARE
C     NEEDED.
C
            IBB=IBB+1
            IF (IBB.LE.7) THEN
               MARKS=MARKS+1
               GO TO 170
            ELSE
               WRITE (8,580) TACC
            ENDIF
         ENDIF
         CALL PARAM
         CALL NVP2
         ITT=ITT+1
         ITCT=0
C        *******
         CALL ITR (MARKX,MARKN,NSFLOW,1,MADJC,ITCT)
         IF (ITT.GE.(ITN-9)) THEN
            J=ITT-ITN+10
            DO 260 I=1,NB
               QRCD(I,J)=ABS(Q(I))
               IF (JSB(I).NE.IABS(JS(I)).AND.Q(I).GT.0.0)
     .            QRCD(I,J)=-ABS(Q(I))
               IF (JSB(I).EQ.IABS(JS(I)).AND.Q(I).LT.0.0)
     .            QRCD(I,J)=-ABS(Q(I))
               TMRCD(I,J)=TMRD(I)
260         CONTINUE
         ENDIF
         IF (ITT.GE.ITN.OR.(SUMFNV/MNO.LE.2.E-4.AND.ITT.GE.2)) THEN
C
C       DATA HANDLING AFTER NETWORK IS BALANCED.
C
            WRITE (6,990) ITT,SUMFNV/MNO
            CALL EVHT (MARKX,MARKP,MARKL,MARKR,QSUM,QS)
         ELSE
C
C       INTERMEDIATE DATA HANDLING BETWEEN INTERVALS.
C
            WRITE (6,990) ITT,SUMFNV/MNO
            CALL DISP (MARKX,ISQC,IBB)
            GO TO 160
         ENDIF
         IF (MASTER.LE.1) QSTD=QSUM/7.
         WRITE (6,980) TACC
         IF (TACC.LT.(SPAN*60.)) THEN
            IF (QSUM.LE.QSTD.AND.ITT.LT.ITN.AND.MARKR.LE.5.
     .          AND.IOUT.GT.(-2)) THEN
C
C       CALCULATION FOR THE PRESENT INTERVAL IS COMPLETED BUT NO
C     OUTPUT IS NEEDED.
C
               MARKR=MARKR+1
               TACC1=TACC/60.0
               IF (MH.EQ.0) THEN
                  MH=1
                  WRITE (8,590)
               ENDIF
               WRITE (8,600) SUMFNV/MNO,ITT,TACC1
            ELSE
               CALL FWCT (NSFLOW,0)
               MARKR=0
               MH=0
               CALL OUTPUT (4,MARKX,MARKN,MARKC,MARKY,ITT,MADJC)
               CALL FWCT (NSFLOW,1)
               IF (IOUT.LE.(-2)) THEN
                  CALL OUTPUT (5,MARKX,MARKN,MARKC,MARKY,ITT,MADJC)
                  IF (NHM.GT.0)
     .               CALL OUTPUT (7,MARKX,MARKN,MARKC,MARKY,ITT,MADJC)
               ENDIF
               IF (IOUT.LE.(-1))
     .            CALL OUTPUT (6,MARKX,MARKN,MARKC,MARKY,ITT,MADJC)
            ENDIF
         ELSE
C
C       TIME SPAN FOR DYNAMIC SIMULATION IS EXCEEDED, QUASI-EQUIL.
C     SIMULATION IS GOING TO PERFORM.
C
            CALL FWCT (NSFLOW,0)
            CALL OUTPUT (4,MARKX,MARKN,MARKC,MARKY,ITT,MADJC)
            CALL FWCT (NSFLOW,1)
            IF (IOUT.LE.(-2)) THEN
               CALL OUTPUT (5,MARKX,MARKN,MARKC,MARKY,ITT,MADJC)
               IF (NHM.GT.0)
     .            CALL OUTPUT (7,MARKX,MARKN,MARKC,MARKY,ITT,MADJC)
            ENDIF
            CALL OUTPUT (6,MARKX,MARKN,MARKC,MARKY,ITT,MADJC)
            MARKX=0
            MARKY=1
            DO 285 I=1,NB
               TROCK(I)=0.0
               NNREV(I)=0
               DZRD(I)=0.0
285         CONTINUE
            DO 286 I=1,IMX
               NSKP(I)=0
286         CONTINUE
            DO 288 I=1,NJ
               PROP(I)=0.0
               PRCH4(I)=0.0
288         CONTINUE
            DO 289 I=1,LMX
               MSL(I)=0
289         CONTINUE
            WRITE (8,630)
            GO TO 1
         ENDIF
290   CONTINUE
C
300   STOP
C
510   FORMAT (//,1X,'NO FURTHER CALCULATIONS BEYOND NETWORK ',
     .       'BALANCING WERE',/,' DEMANDED DUE TO NETW=1, PROG. ',
     .       'RUN COMPLETED.',/)
520   FORMAT (//,1X,'NO FURTHER CALCULATIONS BEYOND TEMP. ',
     .       'CALCULATIONS WERE',/,' DEMANDED DUE TO NTEMP=1, PROG.',
     .       ' RUN COMPLETED.',/)
550   FORMAT (/,T19,'NON-STEADY STATE SIMULATION OUTPUT',/)
560   FORMAT (/,72('*'),/)
570   FORMAT (//,1X,'AIRFLOW OSCILLATION IN A PORTION OF THE SYSTEM',
     .        1X,'MAY HAVE HAPPENED.',/,' THE FOLLOWING IS AN ',
     .        'AUXILIARY OUTPUT FOR THE',I3,'TH ITERATION,'/)
580   FORMAT (//,1X,'* ATTN *  SIMULATION STEP DELTAT NEEDS TO BE ',
     .        'SHORTENED AT AROUND',F7.0,/,' SEC. AFTER EVENT FOR A',
     .        'BETTER ACCURACY.',/)
590   FORMAT (//,1X,'OUTPUT FOR THE FOLLOWING TIME INCREMENTS',
     .       ' WERE OMITTED DUE TO',/,' INSIGNIFICANT CONDITION',
     .       ' CHANGES:',//,'  SUM OF NVP CORR.',T30,'ITERATIONS',T50,
     .       'TIME (MIN.)',/)
600   FORMAT (3X,F10.4,T31,I5,T50,F7.2)
620   FORMAT (//,72('*'),///,T18,'OUTPUT OF THE TEMPERATURE',
     .       ' PART',///,72('*'))
630   FORMAT (//,72('*'),//,T14,'QUASI-EQUILIBRIUM STATE',
     .       ' SIMULATION OUTPUT',//,72('*'))
680   FORMAT (1X,'NAME YOUR INPUT FILE  "D:\PATH\FNAME1.EXT".',/)
900   FORMAT (T19,10('-'),' MFIRE 2.10 DECEMBER 1994',11('-'),/,T20,'A PRO
     .GRAM FOR DYNAMIC SIMULATION OF MINE',/,T21,'VENTILATION AND FIRE I
     .NTERACTIONS',/,T16,'WITH WATER EVAPORATION AND CONDENSATION CONSID
     .ERED',//,T18,'WRITTEN BY:  DR. X. CHANG AND DR. R. GREUER',/,T10,'
     . U.S. BUREAU OF MINES AND MICHIGAN TECHNOLOGICAL UNIVERSITY',//)
910          FORMAT (T35,'DISCLAIMER',/,T10,'The Bureau of Mines express
     .ly declares that there are no',/,T10,'warranties express or implie
     .d which apply to the software',/,T10,'contained herein. By accepta
     .nce and use of said software',/,T10,'which is conveyed to the user
     . without consideration by the',/,T10,'Bureau of Mines, the user he
     .rof expressly waives any and',/,T10,'all claims for damage and/or
     .suits for or by reason of',/,T10,'personal injury, or property dam
     .age, including special',/,T10,'consequential or other similar dama
     .ages arising out of or',/,T10,'in any way connected with the use o
     .f the software',/,T10,'contained herein.',)
920   FORMAT (//,' DATA INPUT COMPLETED.')
930   FORMAT (//,' NETWORK CALCULATIONS COMPLETED.')
940   FORMAT (//,' TEMPARATURE PART STARTED',/,' ACCURACY CRITERIA = ',
     .        '0.0002 IN.W.G. PER MESH.',//)
950   FORMAT (//,' STEADY STATE PART STARTED',/,' ACCURACY CRITERIA =',
     .        ' 0.0002 IN.W.G. PER MESH.',//)
960   FORMAT (5X,'ITERATION ',I4,' COMPLETED, CURRENT ERROR ',F9.5)
970   FORMAT (//,' NON-STEADY STATE SIMULATION PART STARTED.',/,
     .       ' ACCURACY CRITERIA = 0.0002 IN.W.G. PER MESH.',//)
980   FORMAT (/,5X,'SIMULATION GOES ON, ',F7.1,' SEC PASSED.',/)
990   FORMAT (10X,'ITERATION ',I4,' COMPLETED, CURRENT ERROR ',F9.5)
1000  FORMAT (//,' PROGRAM RUN COMPLETED. THE OUTPUT IS SAVED IN ',
     .        'FILE "WFOUT".',/)
C
      END
C
C
      BLOCK DATA
C
C     -----------------------------------------------------------------
C
C     INITIATION OF THE VARIABLES AND ARRAYS IN COMMON BLOCKS.
C
C     -----------------------------------------------------------------
C
      INCLUDE 'CMMNW.DAT'
C
      PARAMETER (KMX=IMX*IMY, KMY=NMZ*10, KMZ=NMZ*10*5, KNX=NMX*2,
     .           KNY=IMX*3, KNZ=NMX*10, KLX=IMX*20*4)
C
      DATA  NO,JS,JF,NWTYP,R,Q,P,KF,LA,A,O,RSTD,DZRD,FRNVP,NREV,RDCH4,
     .      RDPROP,TRD,TJS,RDOP,RCH4,FFRNVP,RA,NNREV,RDH2O,RH2O
     .      /NMX*0,NMX*0,NMX*0,NMX*0,NMX*0.0,NMX*0.0,NMX*0.0,NMX*0,
     .      NMX*0.0,NMX*0.0,NMX*0.0,NMX*0.0,NMX*0.0,NMX*0.0,NMX*0,
     .      NMX*0.0,NMX*0.0,NMX*0.0,NMX*0.0,NMX*0.0,NMX*0.0,NMX*0.0,
     .      NMX*0.0,NMX*0,NMX*0.0,NMX*0.0/
      DATA  NOF,NFREG,RGRAD,NFCW,MPTS,QF,PF,NSKP,NEGQ,JSB
     .      /IMX*0,IMX*0,IMX*0.0,IMX*0,IMX*0,KMX*0.0,KMX*0.0,IMX*0,
     .      IMX*0,NMX*0/
      DATA  MNO,MEND,MSL,FNVP,RQ,INU,KNO,KJS,KJF
     .      /0,NMY*0,LMX*0,NMY*0.0,NMX*0.0,NMX*0,NMX*0,NMX*0,NMX*0/
      DATA  JNO,T,Z,CH4C,JNOL,PROP,PRCH4,JLR,HJN,PRH2O
     .      /NMY*0,NMY*0.0,NMY*0.0,NMY*0.0,NMY*0,NMY*0.0,NMY*0.0,NMY*0,
     .      NMY*0.0,NMY*0.0/
      DATA  TROCK,TMRD,HA,HK
     .      /NMX*0.0,NMX*0.0,NMX*0.0,NMX*0.0/
      DATA  NCENT,CH4V,CH4PA,CONT,CONC,HEAT,O2MIN,SMPO2,HTPO2,TFSI,CN,
     .      HN,O2BEH,TPR,HTAD,QCENT
     .      /NMX*0,NMX*0.0,NMX*0.0,IMX*0.0,IMX*0.0,IMX*0.0,IMX*0.0,
     .      IMX*0.0,IMX*0.0,IMX*0.0,IMX*0.0,IMX*0.0,IMX*0.0,IMX*0.0,
     .      IMX*0.0,IMX*0.0/
      DATA  NGIN,MIN,NGOUT,LOUT
     .      /NMX*0,NMX*0,NMX*0,NMX*0/
      DATA  MEMREC,NOREC,ESTPR,ESTCH4,ESTTR
     .      /NMX*0,NMX*0,NMX*0.0,NMX*0.0,NMX*0.0/
      DATA  XNEW,DCOAGE,WTCORR,NSEQS
     .      /NMX*0.0,NMX*0.0,KMY*0.0,NMZ*0/
      DATA  TIME,TSTART,JSTART,TLEFT
     .      /0.0,0.0,0,NMX*0.0/
      DATA  SUMQ,SUMC,SUMM,SMHEAT,SUMW
     .      /NMY*0.0,NMY*0.0,NMY*0.0,NMY*0.0,NMY*0.0/
      DATA  PROPS,PRCH4S,QQ,QTP,TTJS,TTRD,TAS,TMM,BI,CNT,EXPN,FAW
     .      /NMX*0.0,NMX*0.0,NMX*0.0,NMX*0.0,NMX*0.0,NMX*0.0,NMX*0.0,
     .      NMX*0.0,NMX*0.0,NMX*0.0,NMX*0.0,NMX*0.0/
      DATA  PRH2OS,HSTART,PSI,NSP,STV,HABS,NSEQE,TDA,WMTR,GFF
     .      /NMY*0.0,0.0,NMX*0.0,NMX*0,KMY*0.0,KMY*0.0,NMZ*0,KMY*0.0,
     .      KMY*0.0,KMY*0.0/
      DATA  DELTAT,SUMFNV
     .      /0.0,0.0/
      DATA  IBTN,DPPA,NSAC,TMRDA,DELTAQ,DPPB,NSACB,GBTN,JCH,TAUXA,
     .      TAUXB,TAUXC,TAUXD,FMASS
     .      /NMX*0,KMZ*0.0,KNX*0,NMX*0.0,NMX*0.0,KMZ*0.0,KNX*0,50*0.0,
     .       NMY*0,KMY*0.0,KMY*0.0,NMZ*0.0,NMZ*0.0,NMZ*0.0/
      DATA  GFS,TACC,NPP,HABS1
     .      /IMX*0.0,0.0,NMZ*0,KMY*0.0/
      DATA  JDP,JDPP
     .      /0,IMX*0/
      DATA  WRNPR,WRNGS,WRNSM,WRNHT,IOMIT,ROMIT,IAC
     .      /4*0.0,IMX*0,KNY*0.0,0/
      DATA  QRCD,TMRCD
     .      /KNZ*0.0,KNZ*0.0/
      DATA  FC,DK,FK,FKQ
     .      /400*0.0,20*0.0,20*0.0,KLX*0.0/
C
C
      END
