      include 'gplapncd.for'
C This code was written by the program
C <TABLO  Version 5.5   February 2005>
      use tgmnz
      use gpcm
      use gsinc1
      use gsinc3
      use gsinc4
      use gsinc5
      use gsinc5b
      use gsinc6
      use gsinc7
      use gsinc8
      use gscomp
      use TGSMVL
      use gpbas1
      use tgdebg
      use gpmain1
      use smvlst0
      use psimmod1
      use psimmod2
      USE SIMRES0
      use gtpvew_
      include 'tggsdec1.for'
      CHARACTER*70 PROGNV
      PARAMETER(PROGNV=
     *'<gtpvew.for 25-JUL-2007 (a TABLO-generated program)>')
      INTEGER PRVERI
      PARAMETER(PRVERI=34000)
      CHARACTER (LEN=9) DATES
      PARAMETER(DATES='1987-2005')
      CHARACTER*6 PRNAME
      PARAMETER(PRNAME='TGPROG')
      INTEGER DMMTOG
C Map from coefficient names in code to names in model specification
C
C      Name in code       Name used in model specification
C      ---------------------------------------------------
C         C00001            EVOA
C         C00002            EVFA
C         C00003            save
C         C00004            VIFA
C         C00005            VDFA
C         C00006            VIPA
C         C00007            VDPA
C         C00008            VIGA
C         C00009            VDGA
C         C00010            VKB
C         C00011            VDEP
C         C00012            VXMD
C         C00013            VST
C         C00014            VFM
C         C00015            VIFM
C         C00016            VDFM
C         C00017            VIPM
C         C00018            VDPM
C         C00019            VIGM
C         C00020            VDGM
C         C00021            VIMS
C         C00022            VXWD
C         C00023            VIWS
C         C00024            VTWR
C         C00025            VPA
C         C00026            PRIVEXP
C         C00027            VFA
C         C00028            VOA
C         C00029            REGINV
C         C00030            VGA
C         C00031            GOVEXP
C         C00032            VEXPORTS
C         C00033            VIMPORTS
C         C00034            GDPEXP
C         C00035            NETFACTINC
C         C00036            VDM
C         C00037            VOM
C         C00038            NETAXES
C         C00039            GDPSRC
C         C00040            NETINV
C         C00041            CAPITALACCT
C         C00042            CURRENTACCT
C         C00043            VALEXPORTS
C         C00044            VALIMPORTS
C         C00045            CIFDECOMP
C         C00046            OUTDISP
C         C00047            DOMSALESDISP
C         C00048            IMPSALESDISP
C         C00049            VALOUTPUT
C         C00050            SUFFICIENCY
C         C00051            NVFA
C         C00052            NVPA
C         C00053            NVGA
C         C00054            rTO
C         C00055            rTF
C         C00056            rTPD
C         C00057            rTPI
C         C00058            rTGD
C         C00059            rTGI
C         C00060            rTFD
C         C00061            rTFI
C         C00062            rTXS
C         C00063            rTMS
C         C00064            CHKMKTCLIMP
C         C00065            SURPLUS
C         C00066            VTWR_M
C         C00067            CHKTRANS_D
C         C00068            VSTT
C         C00069            CHKTRANS_S
C         C00070            SUMTRANS_S
C         C00071            SUMTRANS_D
C         C00072            SUMSURPLUS
C         C00073            SUMMKTCLIMP
C         C00074            SUMIMBALS
C         C00075            SIGNEPR
C         C00076            SIGNER
C         C00077            SIGNMR
C         C00078            SIGNMTRR
C         C00079            SIGNR
C         C00080            SIGNTPR
C         C00081            SIGNTR
C         C00082            SIGNTRR
C
C Declarations of all coefficients
C      REAL C00001(0,0),C00002(0,0,0),C00003(0),C00004(0,0,0)
C      REAL C00005(0,0,0),C00006(0,0),C00007(0,0),C00008(0,0)
C      REAL C00009(0,0),C00010(0),C00011(0),C00012(0,0,0),C00013(0,0)
C      REAL C00014(0,0,0),C00015(0,0,0),C00016(0,0,0),C00017(0,0)
C      REAL C00018(0,0),C00019(0,0),C00020(0,0),C00021(0,0,0)
C      REAL C00022(0,0,0),C00023(0,0,0),C00024(0,0,0,0),C00025(0,0)
C      REAL C00026(0),C00027(0,0,0),C00028(0,0),C00029(0),C00030(0,0)
C      REAL C00031(0),C00032(0),C00033(0),C00034(0,5),C00035(0)
C      REAL C00036(0,0),C00037(0,0),C00038(0),C00039(0,3),C00040(0)
C      REAL C00041(0,2),C00042(0,2,0),C00043(0,0,0,2),C00044(0,0,0,2)
C      REAL C00045(0,0,0,2),C00046(0,3,0),C00047(0,3,0),C00048(0,3,0)
C      REAL C00049(0,0,2),C00050(0,0),C00051(0,0,0,2,2),C00052(0,0,2,2)
C      REAL C00053(0,0,2,2),C00054(0,0),C00055(0,0,0),C00056(0,0)
C      REAL C00057(0,0),C00058(0,0),C00059(0,0),C00060(0,0,0)
C      REAL C00061(0,0,0),C00062(0,0,0),C00063(0,0,0),C00064(0,0)
C      REAL C00065(0),C00066(0,0,0),C00067(0,0,0),C00068(0,0),C00069(1)
C      REAL C00070(1),C00071(1),C00072(1),C00073(1),C00074(1)
C      REAL C00075(0,0,0),C00076(0,0),C00077(0,0),C00078(0,0,0,0)
C      REAL C00079(0),C00080(0,0,0),C00081(0,0),C00082(0,0,0)
C Finish of declarations of all coefficients
C Map from index names in code to names in model specification
C
C      Name in code       Name used in model specification
C      ---------------------------------------------------
C         I00001            i
C         I00002            r
C         I00003            j
C         I00004            s
C         I00005            m
C         I00006            k
C         I00007            h
      istgprog=.TRUE.
      isgemsim=.NOT.istgprog
      dmmtog=0
      mxgsrs=0
      mxgsis=0
      mxgslg=0
      mxgsop=0
      mxgsin=0
      mxgsrc=0
      mxgsic=0
      AXSFIL='gtpvew'
      AXTFIL=AXSFIL
      include 'tggscod1.for'
      include 'tggscod2.for'
      include 'tggscod3.for'
200    CONTINUE
      include 'tggscod4.for'
      CALL M00001(RDUN,MMI,MMR,
     *  LFNORD,LFNOWR,LFFOWR,RDFSNO,WRFSNO,WTMO,
     *  KSINT,NSINT,KSINTA,
     *  RWA,NUMFL,
     *  IWA,OVOK,
     *  KMSTSL,AUTACC,SILEN,MINSIL,MINSFL,
     *  UDRTST,INRTST,CONTSI,
     *  AXSUN,AXTUN,WRUN,CWKUN,MMRDR,DSPUN,DSPPW,DSPPL,DSPDEC,
     *  DODS,DOWR,DOEQ,DSALLS,WTALLS,KSTEPA,NPASSA,SERTAB,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  DSSMAP,SSMAP,
     *  DOUD,
     *  CALC1,FSTPAS,CTRTHR,SUVFI,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL M00002(RDUN,MMI,MMR,
     *  LFNORD,LFNOWR,LFFOWR,RDFSNO,WRFSNO,WTMO,
     *  KSINT,NSINT,KSINTA,
     *  RWA,NUMFL,
     *  IWA,OVOK,
     *  KMSTSL,AUTACC,SILEN,MINSIL,MINSFL,
     *  UDRTST,INRTST,CONTSI,
     *  AXSUN,AXTUN,WRUN,CWKUN,MMRDR,DSPUN,DSPPW,DSPPL,DSPDEC,
     *  DODS,DOWR,DOEQ,DSALLS,WTALLS,KSTEPA,NPASSA,SERTAB,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  DSSMAP,SSMAP,
     *  DOUD,
     *  CALC1,FSTPAS,CTRTHR,SUVFI,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL M00003(RDUN,MMI,MMR,
     *  LFNORD,LFNOWR,LFFOWR,RDFSNO,WRFSNO,WTMO,
     *  KSINT,NSINT,KSINTA,
     *  RWA,NUMFL,
     *  IWA,OVOK,
     *  KMSTSL,AUTACC,SILEN,MINSIL,MINSFL,
     *  UDRTST,INRTST,CONTSI,
     *  AXSUN,AXTUN,WRUN,CWKUN,MMRDR,DSPUN,DSPPW,DSPPL,DSPDEC,
     *  DODS,DOWR,DOEQ,DSALLS,WTALLS,KSTEPA,NPASSA,SERTAB,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  DSSMAP,SSMAP,
     *  DOUD,
     *  CALC1,FSTPAS,CTRTHR,SUVFI,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL M00004(RDUN,MMI,MMR,
     *  LFNORD,LFNOWR,LFFOWR,RDFSNO,WRFSNO,WTMO,
     *  KSINT,NSINT,KSINTA,
     *  RWA,NUMFL,
     *  IWA,OVOK,
     *  KMSTSL,AUTACC,SILEN,MINSIL,MINSFL,
     *  UDRTST,INRTST,CONTSI,
     *  AXSUN,AXTUN,WRUN,CWKUN,MMRDR,DSPUN,DSPPW,DSPPL,DSPDEC,
     *  DODS,DOWR,DOEQ,DSALLS,WTALLS,KSTEPA,NPASSA,SERTAB,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  DSSMAP,SSMAP,
     *  DOUD,
     *  CALC1,FSTPAS,CTRTHR,SUVFI,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL M00005(RDUN,MMI,MMR,
     *  LFNORD,LFNOWR,LFFOWR,RDFSNO,WRFSNO,WTMO,
     *  KSINT,NSINT,KSINTA,
     *  RWA,NUMFL,
     *  IWA,OVOK,
     *  KMSTSL,AUTACC,SILEN,MINSIL,MINSFL,
     *  UDRTST,INRTST,CONTSI,
     *  AXSUN,AXTUN,WRUN,CWKUN,MMRDR,DSPUN,DSPPW,DSPPL,DSPDEC,
     *  DODS,DOWR,DOEQ,DSALLS,WTALLS,KSTEPA,NPASSA,SERTAB,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  DSSMAP,SSMAP,
     *  DOUD,
     *  CALC1,FSTPAS,CTRTHR,SUVFI,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(EXSUSE) THEN
        CALL GPREW(EXSUN,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
1000  CONTINUE
      include 'tgdeac3t.for'
      include 'tggscod6.for'
3000  CONTINUE
 3380 CONTINUE
      GOTO 5900
5850  CONTINUE
      include 'tggspre1.for'
      include 'tggsei0.for'
8300  continue
7006  CONTINUE
8100  CONTINUE
      include 'tggsend2.for'
9000  CONTINUE
      include 'tggsend3.for'
      END
      SUBROUTINE M00001(RDUN,MMI,MMR,
     *  LFNORD,LFNOWR,LFFOWR,RDFSNO,WRFSNO,WTMO,
     *  KSINT,NSINT,KSINTA,
     *  RWA,NUMFL,
     *  IWA,OVOK,
     *  KMSTSL,AUTACC,SILEN,MINSIL,MINSFL,
     *  UDRTST,INRTST,CONTSI,
     *  AXSUN,AXTUN,WRUN,CWKUN,MMRDR,DSPUN,DSPPW,DSPPL,DSPDEC,
     *  DODS,DOWR,DOEQ,DSALLS,WTALLS,KSTEPA,NPASSA,SERTAB,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  DSSMAP,SSMAP,
     *  DOUD,
     *  CALC1,FSTPAS,CTRTHR,SUVFI,ERRMES)
      USE GSINC4
      USE GSINC7
      USE GSINC4
      USE gtpvew_c5
      USE TGSMVL
      USE GSINC1
      USE GSINC5
      USE SMVLST0
      USE TGDEBG
      USE PSIMMOD1
      USE SIMRES0
      USE GSINC3
      USE GSINC6
      INTEGER MMI,MMR
      INTEGER RDUN,WRUN,CWKUN,MMRDR
      INTEGER NUMFL,AXSUN,AXTUN
      INTEGER KSINT,NSINT,KSINTA
      REAL RWA(DWA)
      INTEGER DSPUN,DSPPW,DSPPL,DSPDEC
      INTEGER IWA(DIWA),TMPI1
      INTEGER KMSTSL
      LOGICAL AUTACC,CONTSI
      CHARACTER*(*) MINSFL,UDRTST,INRTST
      REAL MINSIL
      DOUBLE PRECISION SILEN
      INTEGER DRCOW
      PARAMETER(DRCOW=1)
      REAL RCOW(DRCOW)
      CHARACTER*(*) LFFOWR,WTMO
      CHARACTER*(*) ERRMES
      LOGICAL DOUD
      LOGICAL SKPSMD,LOWMEM,CALC1,FSTPAS,CTRTHR,SUVFI,TMPLG1
      LOGICAL DSALLS,WTALLS,DODS,DOWR,DOEQ,OVOK,SERTAB
      LOGICAL DSPANP,DSPOIM,D1DROW,NELTX
      INTEGER KSTEPA,NPASSA,DSPCPN,DSPCLN
      INTEGER DSSMAP,SSMAP(DSSMAP)
      INTEGER LFNORD,LFNOWR,RDFSNO,WRFSNO
      INTEGER SSNO,LITSN,SETNO
      CHARACTER SSTP,SETTP
      LOGICAL DOTHIS
      COMMON/DTHIS/DOTHIS
      LOWMEM=.FALSE.
      IF(PRELIM) THEN
       CALL SSAL1C(69,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(70,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(71,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(72,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(73,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(74,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      CALL TGST('tg',AXSUN,SETNO,MMNST,NUMST,SSZ,SZUB,
     *  STIST,ELAD,STNM,STELST,STTP,
     *  MMNFL,AFN,AFS,LFNORD,RDFSNO,RDUN,FSTPAS,
     *  MMNCS,CSPOS,CSPOSTSIM,MMNVC,VCWKST,
     *  DSSMP,SSMP,MMNSS,SSMPST,SERTAB,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(PRELIM) THEN
       CALL SSAL1C(3,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(10,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(11,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(26,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(29,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(31,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(32,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(33,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(35,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(38,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(40,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(65,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(79,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      CALL TGST('tg',AXSUN,SETNO,MMNST,NUMST,SSZ,SZUB,
     *  STIST,ELAD,STNM,STELST,STTP,
     *  MMNFL,AFN,AFS,LFNORD,RDFSNO,RDUN,FSTPAS,
     *  MMNCS,CSPOS,CSPOSTSIM,MMNVC,VCWKST,
     *  DSSMP,SSMP,MMNSS,SSMPST,SERTAB,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(PRELIM) THEN
       CALL SSAL1C(6,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(7,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(8,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(9,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(12,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(17,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(18,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(19,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(20,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(21,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(22,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(23,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(25,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(30,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(36,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(50,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(56,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(57,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(58,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(59,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(62,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(63,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(64,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(66,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(67,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(68,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(81,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(82,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      CALL TGST('tg',AXSUN,SETNO,MMNST,NUMST,SSZ,SZUB,
     *  STIST,ELAD,STNM,STELST,STTP,
     *  MMNFL,AFN,AFS,LFNORD,RDFSNO,RDUN,FSTPAS,
     *  MMNCS,CSPOS,CSPOSTSIM,MMNVC,VCWKST,
     *  DSSMP,SSMP,MMNSS,SSMPST,SERTAB,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(PRELIM) THEN
       CALL SSAL1C(13,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(24,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(77,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(78,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM.OR.POSTSIMPASS2) THEN
       LITSN=3
       SSNO=1
       IF((PRELIM.AND.SSPOSTSIM(SSNO).EQ.'n').OR.
     *     (POSTSIMPASS2.AND.SSPOSTSIM(SSNO).EQ.'y')) THEN
        IF(SSMPST(SSNO).LE.0) THEN
         SSMPST(SSNO)=NSSMP+1
         NSSMP=NSSMP+SSZ(LITSN)
         CALL TGINCP(NSSMP+MAX(1,SSZ(LITSN))-SSZ(LITSN),
     *     DSSMP,'DSSMP',ERRMES)
         IF(ERRMES(1:1).EQ.'E') GOTO 15000
        END IF
       END IF
      END IF
      CALL TGNISS('tg',AXSUN,1,DSSMP,SSMP,
     *  MMNST,STNM,SSZ,SZUB,ELAD,MMEL,STEL,
     *  MMNFL,AFN,AFS,LFNORD,RDFSNO,RDUN,FSTPAS,MMNSS,SSMPST,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGST('tg',AXSUN,SETNO,MMNST,NUMST,SSZ,SZUB,
     *  STIST,ELAD,STNM,STELST,STTP,
     *  MMNFL,AFN,AFS,LFNORD,RDFSNO,RDUN,FSTPAS,
     *  MMNCS,CSPOS,CSPOSTSIM,MMNVC,VCWKST,
     *  DSSMP,SSMP,MMNSS,SSMPST,SERTAB,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(PRELIM.OR.POSTSIMPASS2) THEN
       LITSN=4
       SSNO=2
       IF((PRELIM.AND.SSPOSTSIM(SSNO).EQ.'n').OR.
     *     (POSTSIMPASS2.AND.SSPOSTSIM(SSNO).EQ.'y')) THEN
        IF(SSMPST(SSNO).LE.0) THEN
         SSMPST(SSNO)=NSSMP+1
         NSSMP=NSSMP+SSZ(LITSN)
         CALL TGINCP(NSSMP+MAX(1,SSZ(LITSN))-SSZ(LITSN),
     *     DSSMP,'DSSMP',ERRMES)
         IF(ERRMES(1:1).EQ.'E') GOTO 15000
        END IF
       END IF
      END IF
      CALL TGNISS('tg',AXSUN,2,DSSMP,SSMP,
     *  MMNST,STNM,SSZ,SZUB,ELAD,MMEL,STEL,
     *  MMNFL,AFN,AFS,LFNORD,RDFSNO,RDUN,FSTPAS,MMNSS,SSMPST,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGST('tg',AXSUN,SETNO,MMNST,NUMST,SSZ,SZUB,
     *  STIST,ELAD,STNM,STELST,STTP,
     *  MMNFL,AFN,AFS,LFNORD,RDFSNO,RDUN,FSTPAS,
     *  MMNCS,CSPOS,CSPOSTSIM,MMNVC,VCWKST,
     *  DSSMP,SSMP,MMNSS,SSMPST,SERTAB,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGST('tg',AXSUN,SETNO,MMNST,NUMST,SSZ,SZUB,
     *  STIST,ELAD,STNM,STELST,STTP,
     *  MMNFL,AFN,AFS,LFNORD,RDFSNO,RDUN,FSTPAS,
     *  MMNCS,CSPOS,CSPOSTSIM,MMNVC,VCWKST,
     *  DSSMP,SSMP,MMNSS,SSMPST,SERTAB,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(PRELIM) THEN
       CALL SSAL1C(1,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(76,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      CALL TGST('tg',AXSUN,SETNO,MMNST,NUMST,SSZ,SZUB,
     *  STIST,ELAD,STNM,STELST,STTP,
     *  MMNFL,AFN,AFS,LFNORD,RDFSNO,RDUN,FSTPAS,
     *  MMNCS,CSPOS,CSPOSTSIM,MMNVC,VCWKST,
     *  DSSMP,SSMP,MMNSS,SSMPST,SERTAB,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGST('tg',AXSUN,SETNO,MMNST,NUMST,SSZ,SZUB,
     *  STIST,ELAD,STNM,STELST,STTP,
     *  MMNFL,AFN,AFS,LFNORD,RDFSNO,RDUN,FSTPAS,
     *  MMNCS,CSPOS,CSPOSTSIM,MMNVC,VCWKST,
     *  DSSMP,SSMP,MMNSS,SSMPST,SERTAB,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(PRELIM) THEN
       CALL SSAL1C(2,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(4,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(5,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(14,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(15,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(16,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(55,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(60,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(61,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(75,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(80,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM.OR.POSTSIMPASS2) THEN
       LITSN=2
       SSNO=3
       IF((PRELIM.AND.SSPOSTSIM(SSNO).EQ.'n').OR.
     *     (POSTSIMPASS2.AND.SSPOSTSIM(SSNO).EQ.'y')) THEN
        IF(SSMPST(SSNO).LE.0) THEN
         SSMPST(SSNO)=NSSMP+1
         NSSMP=NSSMP+SSZ(LITSN)
         CALL TGINCP(NSSMP+MAX(1,SSZ(LITSN))-SSZ(LITSN),
     *     DSSMP,'DSSMP',ERRMES)
         IF(ERRMES(1:1).EQ.'E') GOTO 15000
        END IF
       END IF
      END IF
      CALL TGNISS('tg',AXSUN,3,DSSMP,SSMP,
     *  MMNST,STNM,SSZ,SZUB,ELAD,MMEL,STEL,
     *  MMNFL,AFN,AFS,LFNORD,RDFSNO,RDUN,FSTPAS,MMNSS,SSMPST,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(PRELIM.OR.POSTSIMPASS2) THEN
       LITSN=5
       SSNO=4
       IF((PRELIM.AND.SSPOSTSIM(SSNO).EQ.'n').OR.
     *     (POSTSIMPASS2.AND.SSPOSTSIM(SSNO).EQ.'y')) THEN
        IF(SSMPST(SSNO).LE.0) THEN
         SSMPST(SSNO)=NSSMP+1
         NSSMP=NSSMP+SSZ(LITSN)
         CALL TGINCP(NSSMP+MAX(1,SSZ(LITSN))-SSZ(LITSN),
     *     DSSMP,'DSSMP',ERRMES)
         IF(ERRMES(1:1).EQ.'E') GOTO 15000
        END IF
       END IF
      END IF
      CALL TGNISS('tg',AXSUN,4,DSSMP,SSMP,
     *  MMNST,STNM,SSZ,SZUB,ELAD,MMEL,STEL,
     *  MMNFL,AFN,AFS,LFNORD,RDFSNO,RDUN,FSTPAS,MMNSS,SSMPST,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGST('tg',AXSUN,SETNO,MMNST,NUMST,SSZ,SZUB,
     *  STIST,ELAD,STNM,STELST,STTP,
     *  MMNFL,AFN,AFS,LFNORD,RDFSNO,RDUN,FSTPAS,
     *  MMNCS,CSPOS,CSPOSTSIM,MMNVC,VCWKST,
     *  DSSMP,SSMP,MMNSS,SSMPST,SERTAB,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(PRELIM) THEN
       CALL SSAL1C(27,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM.OR.POSTSIMPASS2) THEN
       LITSN=6
       SSNO=5
       IF((PRELIM.AND.SSPOSTSIM(SSNO).EQ.'n').OR.
     *     (POSTSIMPASS2.AND.SSPOSTSIM(SSNO).EQ.'y')) THEN
        IF(SSMPST(SSNO).LE.0) THEN
         SSMPST(SSNO)=NSSMP+1
         NSSMP=NSSMP+SSZ(LITSN)
         CALL TGINCP(NSSMP+MAX(1,SSZ(LITSN))-SSZ(LITSN),
     *     DSSMP,'DSSMP',ERRMES)
         IF(ERRMES(1:1).EQ.'E') GOTO 15000
        END IF
       END IF
      END IF
      CALL TGNISS('tg',AXSUN,5,DSSMP,SSMP,
     *  MMNST,STNM,SSZ,SZUB,ELAD,MMEL,STEL,
     *  MMNFL,AFN,AFS,LFNORD,RDFSNO,RDUN,FSTPAS,MMNSS,SSMPST,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(PRELIM.OR.POSTSIMPASS2) THEN
       LITSN=2
       SSNO=6
       IF((PRELIM.AND.SSPOSTSIM(SSNO).EQ.'n').OR.
     *     (POSTSIMPASS2.AND.SSPOSTSIM(SSNO).EQ.'y')) THEN
        IF(SSMPST(SSNO).LE.0) THEN
         SSMPST(SSNO)=NSSMP+1
         NSSMP=NSSMP+SSZ(LITSN)
         CALL TGINCP(NSSMP+MAX(1,SSZ(LITSN))-SSZ(LITSN),
     *     DSSMP,'DSSMP',ERRMES)
         IF(ERRMES(1:1).EQ.'E') GOTO 15000
        END IF
       END IF
      END IF
      CALL TGNISS('tg',AXSUN,6,DSSMP,SSMP,
     *  MMNST,STNM,SSZ,SZUB,ELAD,MMEL,STEL,
     *  MMNFL,AFN,AFS,LFNORD,RDFSNO,RDUN,FSTPAS,MMNSS,SSMPST,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGST('tg',AXSUN,SETNO,MMNST,NUMST,SSZ,SZUB,
     *  STIST,ELAD,STNM,STELST,STTP,
     *  MMNFL,AFN,AFS,LFNORD,RDFSNO,RDUN,FSTPAS,
     *  MMNCS,CSPOS,CSPOSTSIM,MMNVC,VCWKST,
     *  DSSMP,SSMP,MMNSS,SSMPST,SERTAB,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(PRELIM) THEN
       CALL SSAL1C(28,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(37,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(54,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM.OR.POSTSIMPASS2) THEN
       LITSN=9
       SSNO=7
       IF((PRELIM.AND.SSPOSTSIM(SSNO).EQ.'n').OR.
     *     (POSTSIMPASS2.AND.SSPOSTSIM(SSNO).EQ.'y')) THEN
        IF(SSMPST(SSNO).LE.0) THEN
         SSMPST(SSNO)=NSSMP+1
         NSSMP=NSSMP+SSZ(LITSN)
         CALL TGINCP(NSSMP+MAX(1,SSZ(LITSN))-SSZ(LITSN),
     *     DSSMP,'DSSMP',ERRMES)
         IF(ERRMES(1:1).EQ.'E') GOTO 15000
        END IF
       END IF
      END IF
      CALL TGNISS('tg',AXSUN,7,DSSMP,SSMP,
     *  MMNST,STNM,SSZ,SZUB,ELAD,MMEL,STEL,
     *  MMNFL,AFN,AFS,LFNORD,RDFSNO,RDUN,FSTPAS,MMNSS,SSMPST,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(PRELIM.OR.POSTSIMPASS2) THEN
       LITSN=5
       SSNO=8
       IF((PRELIM.AND.SSPOSTSIM(SSNO).EQ.'n').OR.
     *     (POSTSIMPASS2.AND.SSPOSTSIM(SSNO).EQ.'y')) THEN
        IF(SSMPST(SSNO).LE.0) THEN
         SSMPST(SSNO)=NSSMP+1
         NSSMP=NSSMP+SSZ(LITSN)
         CALL TGINCP(NSSMP+MAX(1,SSZ(LITSN))-SSZ(LITSN),
     *     DSSMP,'DSSMP',ERRMES)
         IF(ERRMES(1:1).EQ.'E') GOTO 15000
        END IF
       END IF
      END IF
      CALL TGNISS('tg',AXSUN,8,DSSMP,SSMP,
     *  MMNST,STNM,SSZ,SZUB,ELAD,MMEL,STEL,
     *  MMNFL,AFN,AFS,LFNORD,RDFSNO,RDUN,FSTPAS,MMNSS,SSMPST,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(PRELIM.OR.POSTSIMPASS2) THEN
       LITSN=8
       SSNO=9
       IF((PRELIM.AND.SSPOSTSIM(SSNO).EQ.'n').OR.
     *     (POSTSIMPASS2.AND.SSPOSTSIM(SSNO).EQ.'y')) THEN
        IF(SSMPST(SSNO).LE.0) THEN
         SSMPST(SSNO)=NSSMP+1
         NSSMP=NSSMP+SSZ(LITSN)
         CALL TGINCP(NSSMP+MAX(1,SSZ(LITSN))-SSZ(LITSN),
     *     DSSMP,'DSSMP',ERRMES)
         IF(ERRMES(1:1).EQ.'E') GOTO 15000
        END IF
       END IF
      END IF
      CALL TGNISS('tg',AXSUN,9,DSSMP,SSMP,
     *  MMNST,STNM,SSZ,SZUB,ELAD,MMEL,STEL,
     *  MMNFL,AFN,AFS,LFNORD,RDFSNO,RDUN,FSTPAS,MMNSS,SSMPST,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(PRELIM.OR.POSTSIMPASS2) THEN
       LITSN=7
       SSNO=10
       IF((PRELIM.AND.SSPOSTSIM(SSNO).EQ.'n').OR.
     *     (POSTSIMPASS2.AND.SSPOSTSIM(SSNO).EQ.'y')) THEN
        IF(SSMPST(SSNO).LE.0) THEN
         SSMPST(SSNO)=NSSMP+1
         NSSMP=NSSMP+SSZ(LITSN)
         CALL TGINCP(NSSMP+MAX(1,SSZ(LITSN))-SSZ(LITSN),
     *     DSSMP,'DSSMP',ERRMES)
         IF(ERRMES(1:1).EQ.'E') GOTO 15000
        END IF
       END IF
      END IF
      CALL TGNISS('tg',AXSUN,10,DSSMP,SSMP,
     *  MMNST,STNM,SSZ,SZUB,ELAD,MMEL,STEL,
     *  MMNFL,AFN,AFS,LFNORD,RDFSNO,RDUN,FSTPAS,MMNSS,SSMPST,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGST('tg',AXSUN,SETNO,MMNST,NUMST,SSZ,SZUB,
     *  STIST,ELAD,STNM,STELST,STTP,
     *  MMNFL,AFN,AFS,LFNORD,RDFSNO,RDUN,FSTPAS,
     *  MMNCS,CSPOS,CSPOSTSIM,MMNVC,VCWKST,
     *  DSSMP,SSMP,MMNSS,SSMPST,SERTAB,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(PRELIM) THEN
       CALL SSAL1C(34,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      CALL TGST('tg',AXSUN,SETNO,MMNST,NUMST,SSZ,SZUB,
     *  STIST,ELAD,STNM,STELST,STTP,
     *  MMNFL,AFN,AFS,LFNORD,RDFSNO,RDUN,FSTPAS,
     *  MMNCS,CSPOS,CSPOSTSIM,MMNVC,VCWKST,
     *  DSSMP,SSMP,MMNSS,SSMPST,SERTAB,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(PRELIM) THEN
       CALL SSAL1C(39,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      CALL TGST('tg',AXSUN,SETNO,MMNST,NUMST,SSZ,SZUB,
     *  STIST,ELAD,STNM,STELST,STTP,
     *  MMNFL,AFN,AFS,LFNORD,RDFSNO,RDUN,FSTPAS,
     *  MMNCS,CSPOS,CSPOSTSIM,MMNVC,VCWKST,
     *  DSSMP,SSMP,MMNSS,SSMPST,SERTAB,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(PRELIM) THEN
       CALL SSAL1C(41,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      CALL TGST('tg',AXSUN,SETNO,MMNST,NUMST,SSZ,SZUB,
     *  STIST,ELAD,STNM,STELST,STTP,
     *  MMNFL,AFN,AFS,LFNORD,RDFSNO,RDUN,FSTPAS,
     *  MMNCS,CSPOS,CSPOSTSIM,MMNVC,VCWKST,
     *  DSSMP,SSMP,MMNSS,SSMPST,SERTAB,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(PRELIM) THEN
       CALL SSAL1C(42,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      CALL TGST('tg',AXSUN,SETNO,MMNST,NUMST,SSZ,SZUB,
     *  STIST,ELAD,STNM,STELST,STTP,
     *  MMNFL,AFN,AFS,LFNORD,RDFSNO,RDUN,FSTPAS,
     *  MMNCS,CSPOS,CSPOSTSIM,MMNVC,VCWKST,
     *  DSSMP,SSMP,MMNSS,SSMPST,SERTAB,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(PRELIM) THEN
       CALL SSAL1C(45,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      CALL TGST('tg',AXSUN,SETNO,MMNST,NUMST,SSZ,SZUB,
     *  STIST,ELAD,STNM,STELST,STTP,
     *  MMNFL,AFN,AFS,LFNORD,RDFSNO,RDUN,FSTPAS,
     *  MMNCS,CSPOS,CSPOSTSIM,MMNVC,VCWKST,
     *  DSSMP,SSMP,MMNSS,SSMPST,SERTAB,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(PRELIM) THEN
       CALL SSAL1C(46,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      CALL TGST('tg',AXSUN,SETNO,MMNST,NUMST,SSZ,SZUB,
     *  STIST,ELAD,STNM,STELST,STTP,
     *  MMNFL,AFN,AFS,LFNORD,RDFSNO,RDUN,FSTPAS,
     *  MMNCS,CSPOS,CSPOSTSIM,MMNVC,VCWKST,
     *  DSSMP,SSMP,MMNSS,SSMPST,SERTAB,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(PRELIM) THEN
       CALL SSAL1C(47,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(48,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      CALL TGST('tg',AXSUN,SETNO,MMNST,NUMST,SSZ,SZUB,
     *  STIST,ELAD,STNM,STELST,STTP,
     *  MMNFL,AFN,AFS,LFNORD,RDFSNO,RDUN,FSTPAS,
     *  MMNCS,CSPOS,CSPOSTSIM,MMNVC,VCWKST,
     *  DSSMP,SSMP,MMNSS,SSMPST,SERTAB,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGST('tg',AXSUN,SETNO,MMNST,NUMST,SSZ,SZUB,
     *  STIST,ELAD,STNM,STELST,STTP,
     *  MMNFL,AFN,AFS,LFNORD,RDFSNO,RDUN,FSTPAS,
     *  MMNCS,CSPOS,CSPOSTSIM,MMNVC,VCWKST,
     *  DSSMP,SSMP,MMNSS,SSMPST,SERTAB,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(PRELIM) THEN
       CALL SSAL1C(51,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(52,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(PRELIM) THEN
       CALL SSAL1C(53,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      CALL TGST('tg',AXSUN,SETNO,MMNST,NUMST,SSZ,SZUB,
     *  STIST,ELAD,STNM,STELST,STTP,
     *  MMNFL,AFN,AFS,LFNORD,RDFSNO,RDUN,FSTPAS,
     *  MMNCS,CSPOS,CSPOSTSIM,MMNVC,VCWKST,
     *  DSSMP,SSMP,MMNSS,SSMPST,SERTAB,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(PRELIM) THEN
       CALL SSAL1C(49,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      CALL TGST('tg',AXSUN,SETNO,MMNST,NUMST,SSZ,SZUB,
     *  STIST,ELAD,STNM,STELST,STTP,
     *  MMNFL,AFN,AFS,LFNORD,RDFSNO,RDUN,FSTPAS,
     *  MMNCS,CSPOS,CSPOSTSIM,MMNVC,VCWKST,
     *  DSSMP,SSMP,MMNSS,SSMPST,SERTAB,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(PRELIM) THEN
       CALL SSAL1C(43,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      CALL TGST('tg',AXSUN,SETNO,MMNST,NUMST,SSZ,SZUB,
     *  STIST,ELAD,STNM,STELST,STTP,
     *  MMNFL,AFN,AFS,LFNORD,RDFSNO,RDUN,FSTPAS,
     *  MMNCS,CSPOS,CSPOSTSIM,MMNVC,VCWKST,
     *  DSSMP,SSMP,MMNSS,SSMPST,SERTAB,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(PRELIM) THEN
       CALL SSAL1C(44,MMNST,SSZ,ERRMES)
       IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('M00001')
      RETURN
      END
      SUBROUTINE S00001(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00006,C00007,C00025,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00004
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00006(SSZ(2),SSZ(1))
      REAL C00007(SSZ(2),SSZ(1))
      REAL C00025(SSZ(2),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "VPA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00004=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      C00025(I00001,I00004)=C00007(I00001,I00004)+C00006(I00001,I00004)
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "VPA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00001')
      RETURN
      END
      SUBROUTINE S00002(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00025,C00026,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL ECHO1
      REAL C00025(SSZ(2),SSZ(1))
      REAL C00026(SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "PRIVEXP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 1 I00002=1,SSZ(1)
      RS1=0.0
      DO 2 I00001=1,SSZ(2)
      RS1=RS1+C00025(I00001,I00002)
    2 CONTINUE
      C00026(I00002)=RS1
    1 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "PRIVEXP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00002')
      RETURN
      END
      SUBROUTINE S00003(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00002,C00027,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00003
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00002(SSZ(6),SSZ(8),SSZ(1))
      REAL C00027(SSZ(9),SSZ(8),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "VFA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 3 I00002=1,SSZ(1)
      DO 2 I00003=1,SSZ(8)
      DO 1 I00001=1,SSZ(6)
      C00027(SSMP(SSMPST(5)-1+I00001),I00003,I00002)=
     *  C00002(I00001,I00003,I00002)
    1 CONTINUE
    2 CONTINUE
    3 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "VFA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00003')
      RETURN
      END
      SUBROUTINE S00004(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00004,C00005,C00027,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00003
      INTEGER I00004
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00004(SSZ(2),SSZ(8),SSZ(1))
      REAL C00005(SSZ(2),SSZ(8),SSZ(1))
      REAL C00027(SSZ(9),SSZ(8),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "VFA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 3 I00004=1,SSZ(1)
      DO 2 I00003=1,SSZ(8)
      DO 1 I00001=1,SSZ(2)
      C00027(SSMP(SSMPST(6)-1+I00001),I00003,I00004)=
     *  C00005(I00001,I00003,I00004)+C00004(I00001,I00003,I00004)
    1 CONTINUE
    2 CONTINUE
    3 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "VFA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00004')
      RETURN
      END
      SUBROUTINE S00005(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00001,C00028,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00001(SSZ(6),SSZ(1))
      REAL C00028(SSZ(10),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "VOA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(6)
      C00028(SSMP(SSMPST(7)-1+SSMP(SSMPST(5)-1+I00001)),I00002)=
     *  C00001(I00001,I00002)
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "VOA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00005')
      RETURN
      END
      SUBROUTINE S00006(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00027,C00028,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00003
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL ECHO1
      REAL C00027(SSZ(9),SSZ(8),SSZ(1))
      REAL C00028(SSZ(10),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "VOA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(8)
      RS1=0.0
      DO 3 I00003=1,SSZ(9)
      RS1=RS1+C00027(I00003,I00001,I00002)
    3 CONTINUE
      C00028(SSMP(SSMPST(9)-1+I00001),I00002)=RS1
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "VOA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00006')
      RETURN
      END
      SUBROUTINE S00007(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00028,C00029,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00002
      INTEGER I00006
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL ECHO1
      REAL C00028(SSZ(10),SSZ(1))
      REAL C00029(SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "REGINV"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 1 I00002=1,SSZ(1)
      RS1=0.0
      DO 2 I00006=1,SSZ(5)
      RS1=RS1+C00028(SSMP(SSMPST(9)-1+SSMP(SSMPST(4)-1+I00006)),I00002)
    2 CONTINUE
      C00029(I00002)=RS1
    1 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "REGINV"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00007')
      RETURN
      END
      SUBROUTINE S00008(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00008,C00009,C00030,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00004
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00008(SSZ(2),SSZ(1))
      REAL C00009(SSZ(2),SSZ(1))
      REAL C00030(SSZ(2),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "VGA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00004=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      C00030(I00001,I00004)=C00009(I00001,I00004)+C00008(I00001,I00004)
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "VGA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00008')
      RETURN
      END
      SUBROUTINE S00009(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00030,C00031,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL ECHO1
      REAL C00030(SSZ(2),SSZ(1))
      REAL C00031(SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "GOVEXP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 1 I00002=1,SSZ(1)
      RS1=0.0
      DO 2 I00001=1,SSZ(2)
      RS1=RS1+C00030(I00001,I00002)
    2 CONTINUE
      C00031(I00002)=RS1
    1 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "GOVEXP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00009')
      RETURN
      END
      SUBROUTINE S00010(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00013,C00022,C00032,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00004
      INTEGER I00005
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1,RS2,RS3,RS4
      LOGICAL ECHO1
      REAL C00013(SSZ(3),SSZ(1))
      REAL C00022(SSZ(2),SSZ(1),SSZ(1))
      REAL C00032(SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "VEXPORTS"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 1 I00002=1,SSZ(1)
      RS1=0.0
      DO 3 I00004=1,SSZ(1)
      RS2=0.0
      DO 2 I00001=1,SSZ(4)
      RS2=RS2+C00022(SSMP(SSMPST(2)-1+I00001),I00002,I00004)
    2 CONTINUE
      RS1=RS1+RS2
    3 CONTINUE
      RS3=0.0
      DO 4 I00005=1,SSZ(3)
      RS4=0.0
      DO 5 I00004=1,SSZ(1)
      RS4=RS4+C00022(SSMP(SSMPST(1)-1+I00005),I00002,I00004)
    5 CONTINUE
      RS3=RS3+RS4+C00013(I00005,I00002)
    4 CONTINUE
      C00032(I00002)=RS1+RS3
    1 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "VEXPORTS"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00010')
      RETURN
      END
      SUBROUTINE S00011(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00023,C00033,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00004
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1,RS2
      LOGICAL ECHO1
      REAL C00023(SSZ(2),SSZ(1),SSZ(1))
      REAL C00033(SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "VIMPORTS"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 1 I00004=1,SSZ(1)
      RS1=0.0
      DO 3 I00002=1,SSZ(1)
      RS2=0.0
      DO 2 I00001=1,SSZ(2)
      RS2=RS2+C00023(I00001,I00002,I00004)
    2 CONTINUE
      RS1=RS1+RS2
    3 CONTINUE
      C00033(I00004)=RS1
    1 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "VIMPORTS"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00011')
      RETURN
      END
      SUBROUTINE S00012(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00026,C00034,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00002
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00026(SSZ(1))
      REAL C00034(SSZ(1),SSZ(11))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "GDPEXP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 1 I00002=1,SSZ(1)
      C00034(I00002,1)=C00026(I00002)
    1 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "GDPEXP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00012')
      RETURN
      END
      SUBROUTINE S00013(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00029,C00034,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00002
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00029(SSZ(1))
      REAL C00034(SSZ(1),SSZ(11))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "GDPEXP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 1 I00002=1,SSZ(1)
      C00034(I00002,2)=C00029(I00002)
    1 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "GDPEXP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00013')
      RETURN
      END
      SUBROUTINE S00014(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00031,C00034,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00002
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00031(SSZ(1))
      REAL C00034(SSZ(1),SSZ(11))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "GDPEXP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 1 I00002=1,SSZ(1)
      C00034(I00002,3)=C00031(I00002)
    1 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "GDPEXP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00014')
      RETURN
      END
      SUBROUTINE S00015(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00032,C00034,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00002
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00032(SSZ(1))
      REAL C00034(SSZ(1),SSZ(11))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "GDPEXP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 1 I00002=1,SSZ(1)
      C00034(I00002,4)=C00032(I00002)
    1 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "GDPEXP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00015')
      RETURN
      END
      SUBROUTINE S00016(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00033,C00034,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00002
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00033(SSZ(1))
      REAL C00034(SSZ(1),SSZ(11))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "GDPEXP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 1 I00002=1,SSZ(1)
      C00034(I00002,5)=-C00033(I00002)
    1 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "GDPEXP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00016')
      RETURN
      END
      SUBROUTINE S00017(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00011,C00028,C00035,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL ECHO1
      REAL C00011(SSZ(1))
      REAL C00028(SSZ(10),SSZ(1))
      REAL C00035(SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "NETFACTINC"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 1 I00002=1,SSZ(1)
      RS1=0.0
      DO 2 I00001=1,SSZ(6)
      RS1=RS1+C00028(SSMP(SSMPST(7)-1+SSMP(SSMPST(5)-1+I00001)),I00002)
    2 CONTINUE
      C00035(I00002)=RS1-C00011(I00002)
    1 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "NETFACTINC"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00017')
      RETURN
      END
      SUBROUTINE S00018(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00016,C00018,C00020,C00036,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00003
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL ECHO1
      REAL C00016(SSZ(2),SSZ(8),SSZ(1))
      REAL C00018(SSZ(2),SSZ(1))
      REAL C00020(SSZ(2),SSZ(1))
      REAL C00036(SSZ(2),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "VDM"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      RS1=0.0
      DO 3 I00003=1,SSZ(8)
      RS1=RS1+C00016(I00001,I00003,I00002)
    3 CONTINUE
      C00036(I00001,I00002)=C00018(I00001,I00002)+C00020(I00001,I00002)+
     *  RS1
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "VDM"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00018')
      RETURN
      END
      SUBROUTINE S00019(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00014,C00037,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00003
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL ECHO1
      REAL C00014(SSZ(6),SSZ(8),SSZ(1))
      REAL C00037(SSZ(10),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "VOM"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(6)
      RS1=0.0
      DO 3 I00003=1,SSZ(8)
      RS1=RS1+C00014(I00001,I00003,I00002)
    3 CONTINUE
      C00037(SSMP(SSMPST(7)-1+SSMP(SSMPST(5)-1+I00001)),I00002)=RS1
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "VOM"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00019')
      RETURN
      END
      SUBROUTINE S00020(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00012,C00013,C00036,C00037,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00002
      INTEGER I00004
      INTEGER I00005
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL ECHO1
      REAL C00012(SSZ(2),SSZ(1),SSZ(1))
      REAL C00013(SSZ(3),SSZ(1))
      REAL C00036(SSZ(2),SSZ(1))
      REAL C00037(SSZ(10),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "VOM"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00002=1,SSZ(1)
      DO 1 I00005=1,SSZ(3)
      RS1=0.0
      DO 3 I00004=1,SSZ(1)
      RS1=RS1+C00012(SSMP(SSMPST(1)-1+I00005),I00002,I00004)
    3 CONTINUE
      C00037(SSMP(SSMPST(9)-1+SSMP(SSMPST(3)-1+SSMP(SSMPST(1)-1+
     *  I00005))),I00002)=C00036(SSMP(SSMPST(1)-1+I00005),I00002)+RS1+
     *  C00013(I00005,I00002)
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "VOM"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00020')
      RETURN
      END
      SUBROUTINE S00021(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00012,C00036,C00037,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00004
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL ECHO1
      REAL C00012(SSZ(2),SSZ(1),SSZ(1))
      REAL C00036(SSZ(2),SSZ(1))
      REAL C00037(SSZ(10),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "VOM"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(4)
      RS1=0.0
      DO 3 I00004=1,SSZ(1)
      RS1=RS1+C00012(SSMP(SSMPST(2)-1+I00001),I00002,I00004)
    3 CONTINUE
      C00037(SSMP(SSMPST(9)-1+SSMP(SSMPST(3)-1+SSMP(SSMPST(2)-1+
     *  I00001))),I00002)=C00036(SSMP(SSMPST(2)-1+I00001),I00002)+RS1
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "VOM"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00021')
      RETURN
      END
      SUBROUTINE S00022(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00028,C00037,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00002
      INTEGER I00007
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00028(SSZ(10),SSZ(1))
      REAL C00037(SSZ(10),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "VOM"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00002=1,SSZ(1)
      DO 1 I00007=1,SSZ(5)
      C00037(SSMP(SSMPST(9)-1+SSMP(SSMPST(4)-1+I00007)),I00002)=
     *  C00028(SSMP(SSMPST(9)-1+SSMP(SSMPST(4)-1+I00007)),I00002)
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "VOM"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00022')
      RETURN
      END
      SUBROUTINE S00023(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00004,C00005,C00006,C00007,C00008,C00009,C00012,C00014,
     *  C00015,C00016,C00017,C00018,C00019,C00020,C00021,C00022,
     *  C00023,C00027,C00028,C00037,C00038,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00003
      INTEGER I00004
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1,RS2,RS3,RS4,RS5,RS6,RS7,RS8,RS9,RS10,RS11,RS12,RS13,RS14
      REAL RS15
      LOGICAL ECHO1
      REAL C00004(SSZ(2),SSZ(8),SSZ(1))
      REAL C00005(SSZ(2),SSZ(8),SSZ(1))
      REAL C00006(SSZ(2),SSZ(1))
      REAL C00007(SSZ(2),SSZ(1))
      REAL C00008(SSZ(2),SSZ(1))
      REAL C00009(SSZ(2),SSZ(1))
      REAL C00012(SSZ(2),SSZ(1),SSZ(1))
      REAL C00014(SSZ(6),SSZ(8),SSZ(1))
      REAL C00015(SSZ(2),SSZ(8),SSZ(1))
      REAL C00016(SSZ(2),SSZ(8),SSZ(1))
      REAL C00017(SSZ(2),SSZ(1))
      REAL C00018(SSZ(2),SSZ(1))
      REAL C00019(SSZ(2),SSZ(1))
      REAL C00020(SSZ(2),SSZ(1))
      REAL C00021(SSZ(2),SSZ(1),SSZ(1))
      REAL C00022(SSZ(2),SSZ(1),SSZ(1))
      REAL C00023(SSZ(2),SSZ(1),SSZ(1))
      REAL C00027(SSZ(9),SSZ(8),SSZ(1))
      REAL C00028(SSZ(10),SSZ(1))
      REAL C00037(SSZ(10),SSZ(1))
      REAL C00038(SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "NETAXES"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 1 I00002=1,SSZ(1)
      RS1=0.0
      DO 2 I00001=1,SSZ(10)
      RS1=RS1+C00037(I00001,I00002)-C00028(I00001,I00002)
    2 CONTINUE
      RS2=0.0
      DO 3 I00003=1,SSZ(8)
      RS3=0.0
      DO 4 I00001=1,SSZ(6)
      RS3=RS3+C00027(SSMP(SSMPST(5)-1+I00001),I00003,I00002)-
     *  C00014(I00001,I00003,I00002)
    4 CONTINUE
      RS2=RS2+RS3
    3 CONTINUE
      RS4=0.0
      DO 5 I00001=1,SSZ(2)
      RS4=RS4+C00006(I00001,I00002)-C00017(I00001,I00002)
    5 CONTINUE
      RS5=0.0
      DO 6 I00001=1,SSZ(2)
      RS5=RS5+C00007(I00001,I00002)-C00018(I00001,I00002)
    6 CONTINUE
      RS6=0.0
      DO 7 I00001=1,SSZ(2)
      RS6=RS6+C00008(I00001,I00002)-C00019(I00001,I00002)
    7 CONTINUE
      RS7=0.0
      DO 8 I00001=1,SSZ(2)
      RS7=RS7+C00009(I00001,I00002)-C00020(I00001,I00002)
    8 CONTINUE
      RS8=0.0
      DO 9 I00003=1,SSZ(8)
      RS9=0.0
      DO 10 I00001=1,SSZ(2)
      RS9=RS9+C00004(I00001,I00003,I00002)-C00015(I00001,I00003,I00002)
   10 CONTINUE
      RS8=RS8+RS9
    9 CONTINUE
      RS10=0.0
      DO 11 I00003=1,SSZ(8)
      RS11=0.0
      DO 12 I00001=1,SSZ(2)
      RS11=RS11+C00005(I00001,I00003,I00002)-
     *  C00016(I00001,I00003,I00002)
   12 CONTINUE
      RS10=RS10+RS11
   11 CONTINUE
      RS12=0.0
      DO 13 I00001=1,SSZ(2)
      RS13=0.0
      DO 14 I00004=1,SSZ(1)
      RS13=RS13+C00022(I00001,I00002,I00004)-
     *  C00012(I00001,I00002,I00004)
   14 CONTINUE
      RS12=RS12+RS13
   13 CONTINUE
      RS14=0.0
      DO 15 I00001=1,SSZ(2)
      RS15=0.0
      DO 16 I00004=1,SSZ(1)
      RS15=RS15+C00021(I00001,I00004,I00002)-
     *  C00023(I00001,I00004,I00002)
   16 CONTINUE
      RS14=RS14+RS15
   15 CONTINUE
      C00038(I00002)=RS1+RS2+RS4+RS5+RS6+RS7+RS8+RS10+RS12+RS14
    1 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "NETAXES"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00023')
      RETURN
      END
      SUBROUTINE S00024(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00035,C00039,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00002
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00035(SSZ(1))
      REAL C00039(SSZ(1),SSZ(12))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "GDPSRC"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 1 I00002=1,SSZ(1)
      C00039(I00002,1)=C00035(I00002)
    1 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "GDPSRC"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00024')
      RETURN
      END
      SUBROUTINE S00025(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00038,C00039,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00002
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00038(SSZ(1))
      REAL C00039(SSZ(1),SSZ(12))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "GDPSRC"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 1 I00002=1,SSZ(1)
      C00039(I00002,2)=C00038(I00002)
    1 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "GDPSRC"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00025')
      RETURN
      END
      SUBROUTINE S00026(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00011,C00039,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00002
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00011(SSZ(1))
      REAL C00039(SSZ(1),SSZ(12))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "GDPSRC"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 1 I00002=1,SSZ(1)
      C00039(I00002,3)=C00011(I00002)
    1 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "GDPSRC"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00026')
      RETURN
      END
      SUBROUTINE S00027(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00011,C00029,C00040,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00002
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00011(SSZ(1))
      REAL C00029(SSZ(1))
      REAL C00040(SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "NETINV"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 1 I00002=1,SSZ(1)
      C00040(I00002)=C00029(I00002)-C00011(I00002)
    1 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "NETINV"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00027')
      RETURN
      END
      SUBROUTINE S00028(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00003,C00041,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00002
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00003(SSZ(1))
      REAL C00041(SSZ(1),SSZ(13))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "CAPITALACCT"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 1 I00002=1,SSZ(1)
      C00041(I00002,1)=C00003(I00002)
    1 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "CAPITALACCT"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00028')
      RETURN
      END
      SUBROUTINE S00029(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00040,C00041,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00002
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00040(SSZ(1))
      REAL C00041(SSZ(1),SSZ(13))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "CAPITALACCT"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 1 I00002=1,SSZ(1)
      C00041(I00002,2)=-C00040(I00002)
    1 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "CAPITALACCT"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00029')
      RETURN
      END
      SUBROUTINE S00030(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00013,C00022,C00042,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00002
      INTEGER I00004
      INTEGER I00005
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL ECHO1
      REAL C00013(SSZ(3),SSZ(1))
      REAL C00022(SSZ(2),SSZ(1),SSZ(1))
      REAL C00042(SSZ(1),SSZ(14),SSZ(2))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "CURRENTACCT"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 1 I00002=1,SSZ(1)
      DO 2 I00005=1,SSZ(3)
      RS1=0.0
      DO 3 I00004=1,SSZ(1)
      RS1=RS1+C00022(SSMP(SSMPST(1)-1+I00005),I00002,I00004)
    3 CONTINUE
      C00042(I00002,1,SSMP(SSMPST(1)-1+I00005))=RS1+
     *  C00013(I00005,I00002)
    2 CONTINUE
    1 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "CURRENTACCT"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00030')
      RETURN
      END
      SUBROUTINE S00031(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00022,C00042,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00004
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL ECHO1
      REAL C00022(SSZ(2),SSZ(1),SSZ(1))
      REAL C00042(SSZ(1),SSZ(14),SSZ(2))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "CURRENTACCT"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 1 I00002=1,SSZ(1)
      DO 2 I00001=1,SSZ(4)
      RS1=0.0
      DO 3 I00004=1,SSZ(1)
      RS1=RS1+C00022(SSMP(SSMPST(2)-1+I00001),I00002,I00004)
    3 CONTINUE
      C00042(I00002,1,SSMP(SSMPST(2)-1+I00001))=RS1
    2 CONTINUE
    1 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "CURRENTACCT"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00031')
      RETURN
      END
      SUBROUTINE S00032(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00023,C00042,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00004
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL ECHO1
      REAL C00023(SSZ(2),SSZ(1),SSZ(1))
      REAL C00042(SSZ(1),SSZ(14),SSZ(2))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "CURRENTACCT"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 1 I00002=1,SSZ(1)
      DO 2 I00001=1,SSZ(2)
      RS1=0.0
      DO 3 I00004=1,SSZ(1)
      RS1=RS1+C00023(I00001,I00004,I00002)
    3 CONTINUE
      C00042(I00002,2,I00001)=-RS1
    2 CONTINUE
    1 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "CURRENTACCT"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00032')
      RETURN
      END
      SUBROUTINE S00033(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00012,C00043,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00004
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00012(SSZ(2),SSZ(1),SSZ(1))
      REAL C00043(SSZ(2),SSZ(1),SSZ(1),SSZ(21))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "VALEXPORTS"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 3 I00004=1,SSZ(1)
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      C00043(I00001,I00002,I00004,1)=C00012(I00001,I00002,I00004)
    1 CONTINUE
    2 CONTINUE
    3 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "VALEXPORTS"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00033')
      RETURN
      END
      SUBROUTINE S00034(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00012,C00022,C00043,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00004
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00012(SSZ(2),SSZ(1),SSZ(1))
      REAL C00022(SSZ(2),SSZ(1),SSZ(1))
      REAL C00043(SSZ(2),SSZ(1),SSZ(1),SSZ(21))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "VALEXPORTS"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 3 I00004=1,SSZ(1)
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      C00043(I00001,I00002,I00004,2)=C00022(I00001,I00002,I00004)-
     *  C00012(I00001,I00002,I00004)
    1 CONTINUE
    2 CONTINUE
    3 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "VALEXPORTS"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00034')
      RETURN
      END
      SUBROUTINE S00035(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00023,C00044,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00004
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00023(SSZ(2),SSZ(1),SSZ(1))
      REAL C00044(SSZ(2),SSZ(1),SSZ(1),SSZ(22))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "VALIMPORTS"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 3 I00004=1,SSZ(1)
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      C00044(I00001,I00002,I00004,1)=C00023(I00001,I00002,I00004)
    1 CONTINUE
    2 CONTINUE
    3 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "VALIMPORTS"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00035')
      RETURN
      END
      SUBROUTINE S00036(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00021,C00023,C00044,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00004
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00021(SSZ(2),SSZ(1),SSZ(1))
      REAL C00023(SSZ(2),SSZ(1),SSZ(1))
      REAL C00044(SSZ(2),SSZ(1),SSZ(1),SSZ(22))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "VALIMPORTS"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 3 I00004=1,SSZ(1)
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      C00044(I00001,I00002,I00004,2)=C00021(I00001,I00002,I00004)-
     *  C00023(I00001,I00002,I00004)
    1 CONTINUE
    2 CONTINUE
    3 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "VALIMPORTS"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00036')
      RETURN
      END
      SUBROUTINE S00037(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00022,C00045,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00004
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00022(SSZ(2),SSZ(1),SSZ(1))
      REAL C00045(SSZ(2),SSZ(1),SSZ(1),SSZ(15))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "CIFDECOMP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 3 I00004=1,SSZ(1)
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      C00045(I00001,I00002,I00004,1)=C00022(I00001,I00002,I00004)
    1 CONTINUE
    2 CONTINUE
    3 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "CIFDECOMP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00037')
      RETURN
      END
      SUBROUTINE S00038(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00022,C00023,C00045,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00004
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00022(SSZ(2),SSZ(1),SSZ(1))
      REAL C00023(SSZ(2),SSZ(1),SSZ(1))
      REAL C00045(SSZ(2),SSZ(1),SSZ(1),SSZ(15))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "CIFDECOMP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 3 I00004=1,SSZ(1)
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      C00045(I00001,I00002,I00004,2)=C00023(I00001,I00002,I00004)-
     *  C00022(I00001,I00002,I00004)
    1 CONTINUE
    2 CONTINUE
    3 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "CIFDECOMP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00038')
      RETURN
      END
      SUBROUTINE S00039(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00046,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00003
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00046(SSZ(2),SSZ(16),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "OUTDISP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 3 I00002=1,SSZ(1)
      DO 2 I00003=1,SSZ(16)
      DO 1 I00001=1,SSZ(2)
      C00046(I00001,I00003,I00002)=0.0
    1 CONTINUE
    2 CONTINUE
    3 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "OUTDISP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00039')
      RETURN
      END
      SUBROUTINE S00040(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00036,C00046,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00036(SSZ(2),SSZ(1))
      REAL C00046(SSZ(2),SSZ(16),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "OUTDISP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      C00046(I00001,1,I00002)=C00036(I00001,I00002)
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "OUTDISP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00040')
      RETURN
      END
      SUBROUTINE S00041(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00013,C00046,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00002
      INTEGER I00005
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00013(SSZ(3),SSZ(1))
      REAL C00046(SSZ(2),SSZ(16),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "OUTDISP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00002=1,SSZ(1)
      DO 1 I00005=1,SSZ(3)
      C00046(SSMP(SSMPST(1)-1+I00005),2,I00002)=C00013(I00005,I00002)
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "OUTDISP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00041')
      RETURN
      END
      SUBROUTINE S00042(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00012,C00046,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00004
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL ECHO1
      REAL C00012(SSZ(2),SSZ(1),SSZ(1))
      REAL C00046(SSZ(2),SSZ(16),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "OUTDISP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      RS1=0.0
      DO 3 I00004=1,SSZ(1)
      RS1=RS1+C00012(I00001,I00002,I00004)
    3 CONTINUE
      C00046(I00001,3,I00002)=RS1
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "OUTDISP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00042')
      RETURN
      END
      SUBROUTINE S00043(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00016,C00047,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00003
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL ECHO1
      REAL C00016(SSZ(2),SSZ(8),SSZ(1))
      REAL C00047(SSZ(2),SSZ(17),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "DOMSALESDISP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      RS1=0.0
      DO 3 I00003=1,SSZ(8)
      RS1=RS1+C00016(I00001,I00003,I00002)
    3 CONTINUE
      C00047(I00001,1,I00002)=RS1
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "DOMSALESDISP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00043')
      RETURN
      END
      SUBROUTINE S00044(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00018,C00047,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00018(SSZ(2),SSZ(1))
      REAL C00047(SSZ(2),SSZ(17),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "DOMSALESDISP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      C00047(I00001,2,I00002)=C00018(I00001,I00002)
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "DOMSALESDISP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00044')
      RETURN
      END
      SUBROUTINE M00002(RDUN,MMI,MMR,
     *  LFNORD,LFNOWR,LFFOWR,RDFSNO,WRFSNO,WTMO,
     *  KSINT,NSINT,KSINTA,
     *  RWA,NUMFL,
     *  IWA,OVOK,
     *  KMSTSL,AUTACC,SILEN,MINSIL,MINSFL,
     *  UDRTST,INRTST,CONTSI,
     *  AXSUN,AXTUN,WRUN,CWKUN,MMRDR,DSPUN,DSPPW,DSPPL,DSPDEC,
     *  DODS,DOWR,DOEQ,DSALLS,WTALLS,KSTEPA,NPASSA,SERTAB,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  DSSMAP,SSMAP,
     *  DOUD,
     *  CALC1,FSTPAS,CTRTHR,SUVFI,ERRMES)
      USE GSINC4
      USE GSINC7
      USE GSINC4
      USE gtpvew_c5
      USE TGSMVL
      USE GSINC1
      USE GSINC5
      USE SMVLST0
      USE TGDEBG
      USE PSIMMOD1
      USE SIMRES0
      USE GSINC3
      USE GSINC6
      INTEGER MMI,MMR
      INTEGER RDUN,WRUN,CWKUN,MMRDR
      INTEGER NUMFL,AXSUN,AXTUN
      INTEGER KSINT,NSINT,KSINTA
      REAL RWA(DWA)
      INTEGER DSPUN,DSPPW,DSPPL,DSPDEC
      INTEGER IWA(DIWA),TMPI1
      INTEGER KMSTSL
      LOGICAL AUTACC,CONTSI
      CHARACTER*(*) MINSFL,UDRTST,INRTST
      REAL MINSIL
      DOUBLE PRECISION SILEN
      INTEGER DRCOW
      PARAMETER(DRCOW=1)
      REAL RCOW(DRCOW)
      CHARACTER*(*) LFFOWR,WTMO
      CHARACTER*(*) ERRMES
      LOGICAL DOUD
      LOGICAL SKPSMD,LOWMEM,CALC1,FSTPAS,CTRTHR,SUVFI,TMPLG1
      LOGICAL DSALLS,WTALLS,DODS,DOWR,DOEQ,OVOK,SERTAB
      LOGICAL DSPANP,DSPOIM,D1DROW,NELTX
      INTEGER KSTEPA,NPASSA,DSPCPN,DSPCLN
      INTEGER DSSMAP,SSMAP(DSSMAP)
      INTEGER LFNORD,LFNOWR,RDFSNO,WRFSNO
      INTEGER SSNO,LITSN,SETNO
      CHARACTER SSTP,SETTP
      LOGICAL DOTHIS
      COMMON/DTHIS/DOTHIS
      LOWMEM=.FALSE.
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(ECHO1.AND.DOIG(87).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'VPA',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(87).NE.'n') then
      CALL S00001(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(87),
     *  C00006,C00007,C00025,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(89).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'PRIVEXP',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(89).NE.'n') then
      CALL S00002(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(89),
     *  C00025,C00026,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(91).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'VFA',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(91).NE.'n') then
      CALL S00003(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(91),
     *  C00002,C00027,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(92).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'VFA',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(92).NE.'n') then
      CALL S00004(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(92),
     *  C00004,C00005,C00027,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(94).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'VOA',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(94).NE.'n') then
      CALL S00005(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(94),
     *  C00001,C00028,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(95).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'VOA',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(95).NE.'n') then
      CALL S00006(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(95),
     *  C00027,C00028,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(97).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'REGINV',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(97).NE.'n') then
      CALL S00007(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(97),
     *  C00028,C00029,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(99).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'VGA',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(99).NE.'n') then
      CALL S00008(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(99),
     *  C00008,C00009,C00030,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(101).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'GOVEXP',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(101).NE.'n') then
      CALL S00009(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(101),
     *  C00030,C00031,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(103).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'VEXPORTS',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(103).NE.'n') then
      CALL S00010(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(103),
     *  C00013,C00022,C00032,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(105).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'VIMPORTS',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(105).NE.'n') then
      CALL S00011(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(105),
     *  C00023,C00033,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(107).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'GDPEXP',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(107).NE.'n') then
      CALL S00012(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(107),
     *  C00026,C00034,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(108).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'GDPEXP',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(108).NE.'n') then
      CALL S00013(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(108),
     *  C00029,C00034,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(109).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'GDPEXP',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(109).NE.'n') then
      CALL S00014(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(109),
     *  C00031,C00034,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(110).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'GDPEXP',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(110).NE.'n') then
      CALL S00015(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(110),
     *  C00032,C00034,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(111).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'GDPEXP',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(111).NE.'n') then
      CALL S00016(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(111),
     *  C00033,C00034,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(113).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'NETFACTINC',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(113).NE.'n') then
      CALL S00017(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(113),
     *  C00011,C00028,C00035,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(115).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'VDM',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(115).NE.'n') then
      CALL S00018(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(115),
     *  C00016,C00018,C00020,C00036,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(117).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'VOM',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(117).NE.'n') then
      CALL S00019(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(117),
     *  C00014,C00037,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(118).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'VOM',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(118).NE.'n') then
      CALL S00020(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(118),
     *  C00012,C00013,C00036,C00037,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(119).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'VOM',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(119).NE.'n') then
      CALL S00021(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(119),
     *  C00012,C00036,C00037,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(120).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'VOM',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(120).NE.'n') then
      CALL S00022(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(120),
     *  C00028,C00037,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(122).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'NETAXES',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(122).NE.'n') then
      CALL S00023(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(122),
     *  C00004,C00005,C00006,C00007,C00008,C00009,C00012,C00014,
     *  C00015,C00016,C00017,C00018,C00019,C00020,C00021,C00022,
     *  C00023,C00027,C00028,C00037,C00038,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(124).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'GDPSRC',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(124).NE.'n') then
      CALL S00024(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(124),
     *  C00035,C00039,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(125).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'GDPSRC',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(125).NE.'n') then
      CALL S00025(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(125),
     *  C00038,C00039,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(126).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'GDPSRC',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(126).NE.'n') then
      CALL S00026(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(126),
     *  C00011,C00039,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(128).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'NETINV',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(128).NE.'n') then
      CALL S00027(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(128),
     *  C00011,C00029,C00040,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(130).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'CAPITALACCT',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(130).NE.'n') then
      CALL S00028(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(130),
     *  C00003,C00041,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(131).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'CAPITALACCT',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(131).NE.'n') then
      CALL S00029(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(131),
     *  C00040,C00041,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(133).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'CURRENTACCT',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(133).NE.'n') then
      CALL S00030(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(133),
     *  C00013,C00022,C00042,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(134).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'CURRENTACCT',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(134).NE.'n') then
      CALL S00031(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(134),
     *  C00022,C00042,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(135).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'CURRENTACCT',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(135).NE.'n') then
      CALL S00032(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(135),
     *  C00023,C00042,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(137).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'VALEXPORTS',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(137).NE.'n') then
      CALL S00033(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(137),
     *  C00012,C00043,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(138).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'VALEXPORTS',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(138).NE.'n') then
      CALL S00034(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(138),
     *  C00012,C00022,C00043,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(140).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'VALIMPORTS',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(140).NE.'n') then
      CALL S00035(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(140),
     *  C00023,C00044,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(141).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'VALIMPORTS',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(141).NE.'n') then
      CALL S00036(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(141),
     *  C00021,C00023,C00044,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(143).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'CIFDECOMP',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(143).NE.'n') then
      CALL S00037(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(143),
     *  C00022,C00045,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(144).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'CIFDECOMP',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(144).NE.'n') then
      CALL S00038(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(144),
     *  C00022,C00023,C00045,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(146).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'OUTDISP',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(146).NE.'n') then
      CALL S00039(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(146),
     *  C00046,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(147).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'OUTDISP',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(147).NE.'n') then
      CALL S00040(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(147),
     *  C00036,C00046,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(148).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'OUTDISP',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(148).NE.'n') then
      CALL S00041(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(148),
     *  C00013,C00046,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(149).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'OUTDISP',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(149).NE.'n') then
      CALL S00042(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(149),
     *  C00012,C00046,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(151).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'DOMSALESDISP',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(151).NE.'n') then
      CALL S00043(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(151),
     *  C00016,C00047,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(152).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'DOMSALESDISP',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(152).NE.'n') then
      CALL S00044(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(152),
     *  C00018,C00047,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      RETURN
15000 CALL PERET('M00002')
      RETURN
      END
      SUBROUTINE S00045(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00020,C00047,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00020(SSZ(2),SSZ(1))
      REAL C00047(SSZ(2),SSZ(17),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "DOMSALESDISP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      C00047(I00001,3,I00002)=C00020(I00001,I00002)
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "DOMSALESDISP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00045')
      RETURN
      END
      SUBROUTINE S00046(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00015,C00048,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00003
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL ECHO1
      REAL C00015(SSZ(2),SSZ(8),SSZ(1))
      REAL C00048(SSZ(2),SSZ(17),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "IMPSALESDISP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      RS1=0.0
      DO 3 I00003=1,SSZ(8)
      RS1=RS1+C00015(I00001,I00003,I00002)
    3 CONTINUE
      C00048(I00001,1,I00002)=RS1
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "IMPSALESDISP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00046')
      RETURN
      END
      SUBROUTINE S00047(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00017,C00048,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00017(SSZ(2),SSZ(1))
      REAL C00048(SSZ(2),SSZ(17),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "IMPSALESDISP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      C00048(I00001,2,I00002)=C00017(I00001,I00002)
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "IMPSALESDISP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00047')
      RETURN
      END
      SUBROUTINE S00048(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00019,C00048,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00019(SSZ(2),SSZ(1))
      REAL C00048(SSZ(2),SSZ(17),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "IMPSALESDISP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      C00048(I00001,3,I00002)=C00019(I00001,I00002)
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "IMPSALESDISP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00048')
      RETURN
      END
      SUBROUTINE S00049(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00028,C00049,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00028(SSZ(10),SSZ(1))
      REAL C00049(SSZ(2),SSZ(1),SSZ(20))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "VALOUTPUT"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      C00049(I00001,I00002,1)=C00028(SSMP(SSMPST(9)-1+SSMP(SSMPST(3)-1+
     *  I00001)),I00002)
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "VALOUTPUT"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00049')
      RETURN
      END
      SUBROUTINE S00050(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00028,C00037,C00049,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00028(SSZ(10),SSZ(1))
      REAL C00037(SSZ(10),SSZ(1))
      REAL C00049(SSZ(2),SSZ(1),SSZ(20))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "VALOUTPUT"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      C00049(I00001,I00002,2)=C00037(SSMP(SSMPST(9)-1+SSMP(SSMPST(3)-1+
     *  I00001)),I00002)-C00028(SSMP(SSMPST(9)-1+SSMP(SSMPST(3)-1+
     *  I00001)),I00002)
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "VALOUTPUT"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00050')
      RETURN
      END
      SUBROUTINE S00051(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00021,C00036,C00037,C00050,
     *  ZDZVAL,NDZVAL,ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00004
      REAL ZDZVAL,NDZVAL
      INTEGER NZDZ,NNDZ
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1,RS2,RS3,RS4
      LOGICAL ECHO1
      REAL C00021(SSZ(2),SSZ(1),SSZ(1))
      REAL C00036(SSZ(2),SSZ(1))
      REAL C00037(SSZ(10),SSZ(1))
      REAL C00050(SSZ(2),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "SUFFICIENCY"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      NZDZ=0
      NNDZ=0
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      RS1=0.0
      DO 3 I00004=1,SSZ(1)
      RS1=RS1+C00021(I00001,I00004,I00002)
    3 CONTINUE
      RS2=C00037(SSMP(SSMPST(9)-1+SSMP(SSMPST(3)-1+I00001)),I00002)
      RS3=C00036(I00001,I00002)+RS1
      IF(RS3.NE.0.0) THEN
        RS4=RS2/RS3
      ELSE IF(RS2.EQ.0.0) THEN
        RS4=ZDZVAL
        NZDZ=NZDZ+1
      ELSE
        RS4=NDZVAL
        NNDZ=NNDZ+1
      END IF
      C00050(I00001,I00002)=RS4
    1 CONTINUE
    2 CONTINUE
      IF(ECHO1.AND.IER.EQ.0) THEN
       CALL TBEDZ(NZDZ,ZDZVAL,NNDZ,NDZVAL,'fm',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "SUFFICIENCY"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00051')
      RETURN
      END
      SUBROUTINE S00052(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00014,C00051,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00003
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00014(SSZ(6),SSZ(8),SSZ(1))
      REAL C00051(SSZ(9),SSZ(8),SSZ(1),SSZ(19),SSZ(18))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "NVFA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 3 I00002=1,SSZ(1)
      DO 2 I00003=1,SSZ(8)
      DO 1 I00001=1,SSZ(6)
      C00051(SSMP(SSMPST(5)-1+I00001),I00003,I00002,1,1)=
     *  C00014(I00001,I00003,I00002)
    1 CONTINUE
    2 CONTINUE
    3 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "NVFA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00052')
      RETURN
      END
      SUBROUTINE S00053(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00051,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00003
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00051(SSZ(9),SSZ(8),SSZ(1),SSZ(19),SSZ(18))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "NVFA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 3 I00002=1,SSZ(1)
      DO 2 I00003=1,SSZ(8)
      DO 1 I00001=1,SSZ(6)
      C00051(SSMP(SSMPST(5)-1+I00001),I00003,I00002,2,1)=0
    1 CONTINUE
    2 CONTINUE
    3 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "NVFA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00053')
      RETURN
      END
      SUBROUTINE S00054(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00016,C00051,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00003
      INTEGER I00004
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00016(SSZ(2),SSZ(8),SSZ(1))
      REAL C00051(SSZ(9),SSZ(8),SSZ(1),SSZ(19),SSZ(18))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "NVFA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 3 I00004=1,SSZ(1)
      DO 2 I00003=1,SSZ(8)
      DO 1 I00001=1,SSZ(2)
      C00051(SSMP(SSMPST(6)-1+I00001),I00003,I00004,1,1)=
     *  C00016(I00001,I00003,I00004)
    1 CONTINUE
    2 CONTINUE
    3 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "NVFA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00054')
      RETURN
      END
      SUBROUTINE S00055(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00015,C00051,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00003
      INTEGER I00004
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00015(SSZ(2),SSZ(8),SSZ(1))
      REAL C00051(SSZ(9),SSZ(8),SSZ(1),SSZ(19),SSZ(18))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "NVFA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 3 I00004=1,SSZ(1)
      DO 2 I00003=1,SSZ(8)
      DO 1 I00001=1,SSZ(2)
      C00051(SSMP(SSMPST(6)-1+I00001),I00003,I00004,2,1)=
     *  C00015(I00001,I00003,I00004)
    1 CONTINUE
    2 CONTINUE
    3 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "NVFA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00055')
      RETURN
      END
      SUBROUTINE S00056(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00002,C00014,C00051,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00003
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00002(SSZ(6),SSZ(8),SSZ(1))
      REAL C00014(SSZ(6),SSZ(8),SSZ(1))
      REAL C00051(SSZ(9),SSZ(8),SSZ(1),SSZ(19),SSZ(18))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "NVFA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 3 I00002=1,SSZ(1)
      DO 2 I00003=1,SSZ(8)
      DO 1 I00001=1,SSZ(6)
      C00051(SSMP(SSMPST(5)-1+I00001),I00003,I00002,1,2)=
     *  C00002(I00001,I00003,I00002)-C00014(I00001,I00003,I00002)
    1 CONTINUE
    2 CONTINUE
    3 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "NVFA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00056')
      RETURN
      END
      SUBROUTINE S00057(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00051,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00003
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00051(SSZ(9),SSZ(8),SSZ(1),SSZ(19),SSZ(18))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "NVFA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 3 I00002=1,SSZ(1)
      DO 2 I00003=1,SSZ(8)
      DO 1 I00001=1,SSZ(6)
      C00051(SSMP(SSMPST(5)-1+I00001),I00003,I00002,2,2)=0
    1 CONTINUE
    2 CONTINUE
    3 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "NVFA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00057')
      RETURN
      END
      SUBROUTINE S00058(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00005,C00016,C00051,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00003
      INTEGER I00004
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00005(SSZ(2),SSZ(8),SSZ(1))
      REAL C00016(SSZ(2),SSZ(8),SSZ(1))
      REAL C00051(SSZ(9),SSZ(8),SSZ(1),SSZ(19),SSZ(18))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "NVFA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 3 I00004=1,SSZ(1)
      DO 2 I00003=1,SSZ(8)
      DO 1 I00001=1,SSZ(2)
      C00051(SSMP(SSMPST(6)-1+I00001),I00003,I00004,1,2)=
     *  C00005(I00001,I00003,I00004)-C00016(I00001,I00003,I00004)
    1 CONTINUE
    2 CONTINUE
    3 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "NVFA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00058')
      RETURN
      END
      SUBROUTINE S00059(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00004,C00015,C00051,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00003
      INTEGER I00004
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00004(SSZ(2),SSZ(8),SSZ(1))
      REAL C00015(SSZ(2),SSZ(8),SSZ(1))
      REAL C00051(SSZ(9),SSZ(8),SSZ(1),SSZ(19),SSZ(18))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "NVFA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 3 I00004=1,SSZ(1)
      DO 2 I00003=1,SSZ(8)
      DO 1 I00001=1,SSZ(2)
      C00051(SSMP(SSMPST(6)-1+I00001),I00003,I00004,2,2)=
     *  C00004(I00001,I00003,I00004)-C00015(I00001,I00003,I00004)
    1 CONTINUE
    2 CONTINUE
    3 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "NVFA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00059')
      RETURN
      END
      SUBROUTINE S00060(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00018,C00052,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00004
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00018(SSZ(2),SSZ(1))
      REAL C00052(SSZ(2),SSZ(1),SSZ(19),SSZ(18))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "NVPA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00004=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      C00052(I00001,I00004,1,1)=C00018(I00001,I00004)
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "NVPA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00060')
      RETURN
      END
      SUBROUTINE S00061(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00017,C00052,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00004
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00017(SSZ(2),SSZ(1))
      REAL C00052(SSZ(2),SSZ(1),SSZ(19),SSZ(18))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "NVPA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00004=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      C00052(I00001,I00004,2,1)=C00017(I00001,I00004)
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "NVPA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00061')
      RETURN
      END
      SUBROUTINE S00062(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00007,C00018,C00052,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00004
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00007(SSZ(2),SSZ(1))
      REAL C00018(SSZ(2),SSZ(1))
      REAL C00052(SSZ(2),SSZ(1),SSZ(19),SSZ(18))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "NVPA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00004=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      C00052(I00001,I00004,1,2)=C00007(I00001,I00004)-
     *  C00018(I00001,I00004)
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "NVPA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00062')
      RETURN
      END
      SUBROUTINE S00063(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00006,C00017,C00052,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00004
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00006(SSZ(2),SSZ(1))
      REAL C00017(SSZ(2),SSZ(1))
      REAL C00052(SSZ(2),SSZ(1),SSZ(19),SSZ(18))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "NVPA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00004=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      C00052(I00001,I00004,2,2)=C00006(I00001,I00004)-
     *  C00017(I00001,I00004)
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "NVPA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00063')
      RETURN
      END
      SUBROUTINE S00064(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00020,C00053,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00004
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00020(SSZ(2),SSZ(1))
      REAL C00053(SSZ(2),SSZ(1),SSZ(19),SSZ(18))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "NVGA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00004=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      C00053(I00001,I00004,1,1)=C00020(I00001,I00004)
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "NVGA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00064')
      RETURN
      END
      SUBROUTINE S00065(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00019,C00053,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00004
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00019(SSZ(2),SSZ(1))
      REAL C00053(SSZ(2),SSZ(1),SSZ(19),SSZ(18))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "NVGA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00004=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      C00053(I00001,I00004,2,1)=C00019(I00001,I00004)
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "NVGA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00065')
      RETURN
      END
      SUBROUTINE S00066(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00009,C00020,C00053,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00004
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00009(SSZ(2),SSZ(1))
      REAL C00020(SSZ(2),SSZ(1))
      REAL C00053(SSZ(2),SSZ(1),SSZ(19),SSZ(18))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "NVGA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00004=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      C00053(I00001,I00004,1,2)=C00009(I00001,I00004)-
     *  C00020(I00001,I00004)
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "NVGA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00066')
      RETURN
      END
      SUBROUTINE S00067(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00008,C00019,C00053,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00004
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00008(SSZ(2),SSZ(1))
      REAL C00019(SSZ(2),SSZ(1))
      REAL C00053(SSZ(2),SSZ(1),SSZ(19),SSZ(18))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "NVGA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00004=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      C00053(I00001,I00004,2,2)=C00008(I00001,I00004)-
     *  C00019(I00001,I00004)
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "NVGA"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00067')
      RETURN
      END
      SUBROUTINE S00068(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00028,C00037,C00054,
     *  ZDZVAL,NDZVAL,ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      REAL ZDZVAL,NDZVAL
      INTEGER NZDZ,NNDZ
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1,RS2,RS3
      LOGICAL ECHO1
      REAL C00028(SSZ(10),SSZ(1))
      REAL C00037(SSZ(10),SSZ(1))
      REAL C00054(SSZ(10),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "rTO"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      NZDZ=0
      NNDZ=0
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(10)
      RS1=C00028(I00001,I00002)
      RS2=C00037(I00001,I00002)
      IF(RS2.NE.0.0) THEN
        RS3=RS1/RS2
      ELSE IF(RS1.EQ.0.0) THEN
        RS3=ZDZVAL
        NZDZ=NZDZ+1
      ELSE
        RS3=1.0
        IER=4
      END IF
      C00054(I00001,I00002)=100*(RS3-1  )
    1 CONTINUE
    2 CONTINUE
      IF(ECHO1.AND.IER.EQ.0) THEN
       CALL TBEDZ(NZDZ,ZDZVAL,NNDZ,NDZVAL,'fm',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "rTO"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00068')
      RETURN
      END
      SUBROUTINE S00069(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00014,C00027,C00055,
     *  ZDZVAL,NDZVAL,ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00003
      REAL ZDZVAL,NDZVAL
      INTEGER NZDZ,NNDZ
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1,RS2,RS3
      LOGICAL ECHO1
      REAL C00014(SSZ(6),SSZ(8),SSZ(1))
      REAL C00027(SSZ(9),SSZ(8),SSZ(1))
      REAL C00055(SSZ(6),SSZ(8),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "rTF"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      NZDZ=0
      NNDZ=0
      DO 3 I00002=1,SSZ(1)
      DO 2 I00003=1,SSZ(8)
      DO 1 I00001=1,SSZ(6)
      RS1=C00027(SSMP(SSMPST(5)-1+I00001),I00003,I00002)
      RS2=C00014(I00001,I00003,I00002)
      IF(RS2.NE.0.0) THEN
        RS3=RS1/RS2
      ELSE IF(RS1.EQ.0.0) THEN
        RS3=ZDZVAL
        NZDZ=NZDZ+1
      ELSE
        RS3=1.0
        IER=4
      END IF
      C00055(I00001,I00003,I00002)=100*(RS3-1  )
    1 CONTINUE
    2 CONTINUE
    3 CONTINUE
      IF(ECHO1.AND.IER.EQ.0) THEN
       CALL TBEDZ(NZDZ,ZDZVAL,NNDZ,NDZVAL,'fm',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "rTF"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00069')
      RETURN
      END
      SUBROUTINE S00070(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00007,C00018,C00056,
     *  ZDZVAL,NDZVAL,ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      REAL ZDZVAL,NDZVAL
      INTEGER NZDZ,NNDZ
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1,RS2,RS3
      LOGICAL ECHO1
      REAL C00007(SSZ(2),SSZ(1))
      REAL C00018(SSZ(2),SSZ(1))
      REAL C00056(SSZ(2),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "rTPD"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      NZDZ=0
      NNDZ=0
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      RS1=C00007(I00001,I00002)
      RS2=C00018(I00001,I00002)
      IF(RS2.NE.0.0) THEN
        RS3=RS1/RS2
      ELSE IF(RS1.EQ.0.0) THEN
        RS3=ZDZVAL
        NZDZ=NZDZ+1
      ELSE
        RS3=1.0
        IER=4
      END IF
      C00056(I00001,I00002)=100*(RS3-1  )
    1 CONTINUE
    2 CONTINUE
      IF(ECHO1.AND.IER.EQ.0) THEN
       CALL TBEDZ(NZDZ,ZDZVAL,NNDZ,NDZVAL,'fm',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "rTPD"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00070')
      RETURN
      END
      SUBROUTINE S00071(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00006,C00017,C00057,
     *  ZDZVAL,NDZVAL,ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      REAL ZDZVAL,NDZVAL
      INTEGER NZDZ,NNDZ
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1,RS2,RS3
      LOGICAL ECHO1
      REAL C00006(SSZ(2),SSZ(1))
      REAL C00017(SSZ(2),SSZ(1))
      REAL C00057(SSZ(2),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "rTPI"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      NZDZ=0
      NNDZ=0
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      RS1=C00006(I00001,I00002)
      RS2=C00017(I00001,I00002)
      IF(RS2.NE.0.0) THEN
        RS3=RS1/RS2
      ELSE IF(RS1.EQ.0.0) THEN
        RS3=ZDZVAL
        NZDZ=NZDZ+1
      ELSE
        RS3=1.0
        IER=4
      END IF
      C00057(I00001,I00002)=100*(RS3-1  )
    1 CONTINUE
    2 CONTINUE
      IF(ECHO1.AND.IER.EQ.0) THEN
       CALL TBEDZ(NZDZ,ZDZVAL,NNDZ,NDZVAL,'fm',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "rTPI"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00071')
      RETURN
      END
      SUBROUTINE S00072(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00009,C00020,C00058,
     *  ZDZVAL,NDZVAL,ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      REAL ZDZVAL,NDZVAL
      INTEGER NZDZ,NNDZ
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1,RS2,RS3
      LOGICAL ECHO1
      REAL C00009(SSZ(2),SSZ(1))
      REAL C00020(SSZ(2),SSZ(1))
      REAL C00058(SSZ(2),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "rTGD"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      NZDZ=0
      NNDZ=0
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      RS1=C00009(I00001,I00002)
      RS2=C00020(I00001,I00002)
      IF(RS2.NE.0.0) THEN
        RS3=RS1/RS2
      ELSE IF(RS1.EQ.0.0) THEN
        RS3=ZDZVAL
        NZDZ=NZDZ+1
      ELSE
        RS3=1.0
        IER=4
      END IF
      C00058(I00001,I00002)=100*(RS3-1  )
    1 CONTINUE
    2 CONTINUE
      IF(ECHO1.AND.IER.EQ.0) THEN
       CALL TBEDZ(NZDZ,ZDZVAL,NNDZ,NDZVAL,'fm',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "rTGD"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00072')
      RETURN
      END
      SUBROUTINE S00073(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00008,C00019,C00059,
     *  ZDZVAL,NDZVAL,ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      REAL ZDZVAL,NDZVAL
      INTEGER NZDZ,NNDZ
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1,RS2,RS3
      LOGICAL ECHO1
      REAL C00008(SSZ(2),SSZ(1))
      REAL C00019(SSZ(2),SSZ(1))
      REAL C00059(SSZ(2),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "rTGI"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      NZDZ=0
      NNDZ=0
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      RS1=C00008(I00001,I00002)
      RS2=C00019(I00001,I00002)
      IF(RS2.NE.0.0) THEN
        RS3=RS1/RS2
      ELSE IF(RS1.EQ.0.0) THEN
        RS3=ZDZVAL
        NZDZ=NZDZ+1
      ELSE
        RS3=1.0
        IER=4
      END IF
      C00059(I00001,I00002)=100*(RS3-1  )
    1 CONTINUE
    2 CONTINUE
      IF(ECHO1.AND.IER.EQ.0) THEN
       CALL TBEDZ(NZDZ,ZDZVAL,NNDZ,NDZVAL,'fm',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "rTGI"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00073')
      RETURN
      END
      SUBROUTINE S00074(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00005,C00016,C00060,
     *  ZDZVAL,NDZVAL,ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00003
      REAL ZDZVAL,NDZVAL
      INTEGER NZDZ,NNDZ
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1,RS2,RS3
      LOGICAL ECHO1
      REAL C00005(SSZ(2),SSZ(8),SSZ(1))
      REAL C00016(SSZ(2),SSZ(8),SSZ(1))
      REAL C00060(SSZ(2),SSZ(8),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "rTFD"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      NZDZ=0
      NNDZ=0
      DO 3 I00002=1,SSZ(1)
      DO 2 I00003=1,SSZ(8)
      DO 1 I00001=1,SSZ(2)
      RS1=C00005(I00001,I00003,I00002)
      RS2=C00016(I00001,I00003,I00002)
      IF(RS2.NE.0.0) THEN
        RS3=RS1/RS2
      ELSE IF(RS1.EQ.0.0) THEN
        RS3=ZDZVAL
        NZDZ=NZDZ+1
      ELSE
        RS3=1.0
        IER=4
      END IF
      C00060(I00001,I00003,I00002)=100*(RS3-1  )
    1 CONTINUE
    2 CONTINUE
    3 CONTINUE
      IF(ECHO1.AND.IER.EQ.0) THEN
       CALL TBEDZ(NZDZ,ZDZVAL,NNDZ,NDZVAL,'fm',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "rTFD"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00074')
      RETURN
      END
      SUBROUTINE S00075(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00004,C00015,C00061,
     *  ZDZVAL,NDZVAL,ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00003
      REAL ZDZVAL,NDZVAL
      INTEGER NZDZ,NNDZ
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1,RS2,RS3
      LOGICAL ECHO1
      REAL C00004(SSZ(2),SSZ(8),SSZ(1))
      REAL C00015(SSZ(2),SSZ(8),SSZ(1))
      REAL C00061(SSZ(2),SSZ(8),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "rTFI"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      NZDZ=0
      NNDZ=0
      DO 3 I00002=1,SSZ(1)
      DO 2 I00003=1,SSZ(8)
      DO 1 I00001=1,SSZ(2)
      RS1=C00004(I00001,I00003,I00002)
      RS2=C00015(I00001,I00003,I00002)
      IF(RS2.NE.0.0) THEN
        RS3=RS1/RS2
      ELSE IF(RS1.EQ.0.0) THEN
        RS3=ZDZVAL
        NZDZ=NZDZ+1
      ELSE
        RS3=1.0
        IER=4
      END IF
      C00061(I00001,I00003,I00002)=100*(RS3-1  )
    1 CONTINUE
    2 CONTINUE
    3 CONTINUE
      IF(ECHO1.AND.IER.EQ.0) THEN
       CALL TBEDZ(NZDZ,ZDZVAL,NNDZ,NDZVAL,'fm',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "rTFI"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00075')
      RETURN
      END
      SUBROUTINE S00076(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00012,C00022,C00062,
     *  ZDZVAL,NDZVAL,ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00004
      REAL ZDZVAL,NDZVAL
      INTEGER NZDZ,NNDZ
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1,RS2,RS3
      LOGICAL ECHO1
      REAL C00012(SSZ(2),SSZ(1),SSZ(1))
      REAL C00022(SSZ(2),SSZ(1),SSZ(1))
      REAL C00062(SSZ(2),SSZ(1),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "rTXS"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      NZDZ=0
      NNDZ=0
      DO 3 I00004=1,SSZ(1)
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      RS1=C00012(I00001,I00002,I00004)
      RS2=C00022(I00001,I00002,I00004)
      IF(RS2.NE.0.0) THEN
        RS3=RS1/RS2
      ELSE IF(RS1.EQ.0.0) THEN
        RS3=ZDZVAL
        NZDZ=NZDZ+1
      ELSE
        RS3=1.0
        IER=4
      END IF
      C00062(I00001,I00002,I00004)=100*(RS3-1  )
    1 CONTINUE
    2 CONTINUE
    3 CONTINUE
      IF(ECHO1.AND.IER.EQ.0) THEN
       CALL TBEDZ(NZDZ,ZDZVAL,NNDZ,NDZVAL,'fm',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "rTXS"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00076')
      RETURN
      END
      SUBROUTINE S00077(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00021,C00023,C00063,
     *  ZDZVAL,NDZVAL,ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00004
      REAL ZDZVAL,NDZVAL
      INTEGER NZDZ,NNDZ
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1,RS2,RS3
      LOGICAL ECHO1
      REAL C00021(SSZ(2),SSZ(1),SSZ(1))
      REAL C00023(SSZ(2),SSZ(1),SSZ(1))
      REAL C00063(SSZ(2),SSZ(1),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "rTMS"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      NZDZ=0
      NNDZ=0
      DO 3 I00004=1,SSZ(1)
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      RS1=C00021(I00001,I00002,I00004)
      RS2=C00023(I00001,I00002,I00004)
      IF(RS2.NE.0.0) THEN
        RS3=RS1/RS2
      ELSE IF(RS1.EQ.0.0) THEN
        RS3=ZDZVAL
        NZDZ=NZDZ+1
      ELSE
        RS3=1.0
        IER=4
      END IF
      C00063(I00001,I00002,I00004)=100*(RS3-1  )
    1 CONTINUE
    2 CONTINUE
    3 CONTINUE
      IF(ECHO1.AND.IER.EQ.0) THEN
       CALL TBEDZ(NZDZ,ZDZVAL,NNDZ,NDZVAL,'fm',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "rTMS"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00077')
      RETURN
      END
      SUBROUTINE M00003(RDUN,MMI,MMR,
     *  LFNORD,LFNOWR,LFFOWR,RDFSNO,WRFSNO,WTMO,
     *  KSINT,NSINT,KSINTA,
     *  RWA,NUMFL,
     *  IWA,OVOK,
     *  KMSTSL,AUTACC,SILEN,MINSIL,MINSFL,
     *  UDRTST,INRTST,CONTSI,
     *  AXSUN,AXTUN,WRUN,CWKUN,MMRDR,DSPUN,DSPPW,DSPPL,DSPDEC,
     *  DODS,DOWR,DOEQ,DSALLS,WTALLS,KSTEPA,NPASSA,SERTAB,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  DSSMAP,SSMAP,
     *  DOUD,
     *  CALC1,FSTPAS,CTRTHR,SUVFI,ERRMES)
      USE GSINC4
      USE GSINC7
      USE GSINC4
      USE gtpvew_c5
      USE TGSMVL
      USE GSINC1
      USE GSINC5
      USE SMVLST0
      USE TGDEBG
      USE PSIMMOD1
      USE SIMRES0
      USE GSINC3
      USE GSINC6
      INTEGER MMI,MMR
      INTEGER RDUN,WRUN,CWKUN,MMRDR
      INTEGER NUMFL,AXSUN,AXTUN
      INTEGER KSINT,NSINT,KSINTA
      REAL RWA(DWA)
      INTEGER DSPUN,DSPPW,DSPPL,DSPDEC
      INTEGER IWA(DIWA),TMPI1
      INTEGER KMSTSL
      LOGICAL AUTACC,CONTSI
      CHARACTER*(*) MINSFL,UDRTST,INRTST
      REAL MINSIL
      DOUBLE PRECISION SILEN
      INTEGER DRCOW
      PARAMETER(DRCOW=1)
      REAL RCOW(DRCOW)
      CHARACTER*(*) LFFOWR,WTMO
      CHARACTER*(*) ERRMES
      LOGICAL DOUD
      LOGICAL SKPSMD,LOWMEM,CALC1,FSTPAS,CTRTHR,SUVFI,TMPLG1
      LOGICAL DSALLS,WTALLS,DODS,DOWR,DOEQ,OVOK,SERTAB
      LOGICAL DSPANP,DSPOIM,D1DROW,NELTX
      INTEGER KSTEPA,NPASSA,DSPCPN,DSPCLN
      INTEGER DSSMAP,SSMAP(DSSMAP)
      INTEGER LFNORD,LFNOWR,RDFSNO,WRFSNO
      INTEGER SSNO,LITSN,SETNO
      CHARACTER SSTP,SETTP
      LOGICAL DOTHIS
      COMMON/DTHIS/DOTHIS
      LOWMEM=.FALSE.
      IF(ECHO1.AND.DOIG(153).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'DOMSALESDISP',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(153).NE.'n') then
      CALL S00045(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(153),
     *  C00020,C00047,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(155).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'IMPSALESDISP',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(155).NE.'n') then
      CALL S00046(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(155),
     *  C00015,C00048,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(156).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'IMPSALESDISP',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(156).NE.'n') then
      CALL S00047(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(156),
     *  C00017,C00048,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(157).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'IMPSALESDISP',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(157).NE.'n') then
      CALL S00048(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(157),
     *  C00019,C00048,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(159).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'VALOUTPUT',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(159).NE.'n') then
      CALL S00049(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(159),
     *  C00028,C00049,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(160).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'VALOUTPUT',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(160).NE.'n') then
      CALL S00050(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(160),
     *  C00028,C00037,C00049,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(.NOT.POSTSIMPASS2.AND.(.NOT.POSTSIMPASS3)) THEN
      ZDZVAL=0
      END IF
      IF(.NOT.POSTSIMPASS2.AND.(.NOT.POSTSIMPASS3)) THEN
      NDZVAL=0
      END IF
      IF(ECHO1.AND.DOIG(164).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'SUFFICIENCY',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(164).NE.'n') then
      CALL S00051(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(164),
     *  C00021,C00036,C00037,C00050,
     *  ZDZVAL,NDZVAL,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(168).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'NVFA',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(168).NE.'n') then
      CALL S00052(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(168),
     *  C00014,C00051,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(169).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'NVFA',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(169).NE.'n') then
      CALL S00053(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(169),
     *  C00051,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(170).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'NVFA',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(170).NE.'n') then
      CALL S00054(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(170),
     *  C00016,C00051,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(171).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'NVFA',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(171).NE.'n') then
      CALL S00055(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(171),
     *  C00015,C00051,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(172).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'NVFA',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(172).NE.'n') then
      CALL S00056(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(172),
     *  C00002,C00014,C00051,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(173).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'NVFA',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(173).NE.'n') then
      CALL S00057(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(173),
     *  C00051,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(174).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'NVFA',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(174).NE.'n') then
      CALL S00058(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(174),
     *  C00005,C00016,C00051,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(175).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'NVFA',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(175).NE.'n') then
      CALL S00059(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(175),
     *  C00004,C00015,C00051,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(177).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'NVPA',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(177).NE.'n') then
      CALL S00060(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(177),
     *  C00018,C00052,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(178).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'NVPA',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(178).NE.'n') then
      CALL S00061(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(178),
     *  C00017,C00052,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(179).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'NVPA',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(179).NE.'n') then
      CALL S00062(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(179),
     *  C00007,C00018,C00052,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(180).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'NVPA',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(180).NE.'n') then
      CALL S00063(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(180),
     *  C00006,C00017,C00052,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(182).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'NVGA',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(182).NE.'n') then
      CALL S00064(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(182),
     *  C00020,C00053,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(183).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'NVGA',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(183).NE.'n') then
      CALL S00065(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(183),
     *  C00019,C00053,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(184).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'NVGA',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(184).NE.'n') then
      CALL S00066(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(184),
     *  C00009,C00020,C00053,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(185).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'NVGA',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(185).NE.'n') then
      CALL S00067(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(185),
     *  C00008,C00019,C00053,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(.NOT.POSTSIMPASS2.AND.(.NOT.POSTSIMPASS3)) THEN
      ZDZVAL=1
      END IF
      IF(ECHO1.AND.DOIG(214).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'rTO',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(214).NE.'n') then
      CALL S00068(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(214),
     *  C00028,C00037,C00054,
     *  ZDZVAL,NDZVAL,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(215).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'rTF',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(215).NE.'n') then
      CALL S00069(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(215),
     *  C00014,C00027,C00055,
     *  ZDZVAL,NDZVAL,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(216).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'rTPD',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(216).NE.'n') then
      CALL S00070(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(216),
     *  C00007,C00018,C00056,
     *  ZDZVAL,NDZVAL,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(217).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'rTPI',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(217).NE.'n') then
      CALL S00071(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(217),
     *  C00006,C00017,C00057,
     *  ZDZVAL,NDZVAL,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(218).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'rTGD',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(218).NE.'n') then
      CALL S00072(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(218),
     *  C00009,C00020,C00058,
     *  ZDZVAL,NDZVAL,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(219).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'rTGI',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(219).NE.'n') then
      CALL S00073(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(219),
     *  C00008,C00019,C00059,
     *  ZDZVAL,NDZVAL,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(220).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'rTFD',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(220).NE.'n') then
      CALL S00074(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(220),
     *  C00005,C00016,C00060,
     *  ZDZVAL,NDZVAL,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(221).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'rTFI',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(221).NE.'n') then
      CALL S00075(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(221),
     *  C00004,C00015,C00061,
     *  ZDZVAL,NDZVAL,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(222).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'rTXS',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(222).NE.'n') then
      CALL S00076(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(222),
     *  C00012,C00022,C00062,
     *  ZDZVAL,NDZVAL,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(223).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'rTMS',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(223).NE.'n') then
      CALL S00077(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(223),
     *  C00021,C00023,C00063,
     *  ZDZVAL,NDZVAL,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      RETURN
15000 CALL PERET('M00003')
      RETURN
      END
      SUBROUTINE S00078(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00015,C00017,C00019,C00021,C00064,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00003
      INTEGER I00004
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1,RS2
      LOGICAL ECHO1
      REAL C00015(SSZ(2),SSZ(8),SSZ(1))
      REAL C00017(SSZ(2),SSZ(1))
      REAL C00019(SSZ(2),SSZ(1))
      REAL C00021(SSZ(2),SSZ(1),SSZ(1))
      REAL C00064(SSZ(2),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "CHKMKTCLIMP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00004=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      RS1=0.0
      DO 3 I00002=1,SSZ(1)
      RS1=RS1+C00021(I00001,I00002,I00004)
    3 CONTINUE
      RS2=0.0
      DO 4 I00003=1,SSZ(8)
      RS2=RS2+C00015(I00001,I00003,I00004)
    4 CONTINUE
      C00064(I00001,I00004)=RS1-RS2-C00017(I00001,I00004)-
     *  C00019(I00001,I00004)
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "CHKMKTCLIMP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00078')
      RETURN
      END
      SUBROUTINE S00079(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00003,C00004,C00005,C00006,C00007,C00008,C00009,C00011,
     *  C00012,C00014,C00015,C00016,C00017,C00018,C00019,C00020,
     *  C00021,C00022,C00023,C00025,C00027,C00028,C00030,C00037,
     *  C00065,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00003
      INTEGER I00004
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1,RS2,RS3,RS4,RS5,RS6,RS7,RS8,RS9,RS10,RS11,RS12,RS13,RS14
      REAL RS15,RS16,RS17
      LOGICAL ECHO1
      REAL C00003(SSZ(1))
      REAL C00004(SSZ(2),SSZ(8),SSZ(1))
      REAL C00005(SSZ(2),SSZ(8),SSZ(1))
      REAL C00006(SSZ(2),SSZ(1))
      REAL C00007(SSZ(2),SSZ(1))
      REAL C00008(SSZ(2),SSZ(1))
      REAL C00009(SSZ(2),SSZ(1))
      REAL C00011(SSZ(1))
      REAL C00012(SSZ(2),SSZ(1),SSZ(1))
      REAL C00014(SSZ(6),SSZ(8),SSZ(1))
      REAL C00015(SSZ(2),SSZ(8),SSZ(1))
      REAL C00016(SSZ(2),SSZ(8),SSZ(1))
      REAL C00017(SSZ(2),SSZ(1))
      REAL C00018(SSZ(2),SSZ(1))
      REAL C00019(SSZ(2),SSZ(1))
      REAL C00020(SSZ(2),SSZ(1))
      REAL C00021(SSZ(2),SSZ(1),SSZ(1))
      REAL C00022(SSZ(2),SSZ(1),SSZ(1))
      REAL C00023(SSZ(2),SSZ(1),SSZ(1))
      REAL C00025(SSZ(2),SSZ(1))
      REAL C00027(SSZ(9),SSZ(8),SSZ(1))
      REAL C00028(SSZ(10),SSZ(1))
      REAL C00030(SSZ(2),SSZ(1))
      REAL C00037(SSZ(10),SSZ(1))
      REAL C00065(SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "SURPLUS"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 1 I00002=1,SSZ(1)
      RS1=0.0
      DO 2 I00001=1,SSZ(6)
      RS1=RS1+C00028(SSMP(SSMPST(7)-1+SSMP(SSMPST(5)-1+I00001)),I00002)
    2 CONTINUE
      RS2=0.0
      DO 3 I00001=1,SSZ(10)
      RS2=RS2+C00037(I00001,I00002)-C00028(I00001,I00002)
    3 CONTINUE
      RS3=0.0
      DO 4 I00003=1,SSZ(8)
      RS4=0.0
      DO 5 I00001=1,SSZ(6)
      RS4=RS4+C00027(SSMP(SSMPST(5)-1+I00001),I00003,I00002)-
     *  C00014(I00001,I00003,I00002)
    5 CONTINUE
      RS3=RS3+RS4
    4 CONTINUE
      RS5=0.0
      DO 6 I00001=1,SSZ(2)
      RS5=RS5+C00006(I00001,I00002)-C00017(I00001,I00002)
    6 CONTINUE
      RS6=0.0
      DO 7 I00001=1,SSZ(2)
      RS6=RS6+C00007(I00001,I00002)-C00018(I00001,I00002)
    7 CONTINUE
      RS7=0.0
      DO 8 I00001=1,SSZ(2)
      RS7=RS7+C00008(I00001,I00002)-C00019(I00001,I00002)
    8 CONTINUE
      RS8=0.0
      DO 9 I00001=1,SSZ(2)
      RS8=RS8+C00009(I00001,I00002)-C00020(I00001,I00002)
    9 CONTINUE
      RS9=0.0
      DO 10 I00003=1,SSZ(8)
      RS10=0.0
      DO 11 I00001=1,SSZ(2)
      RS10=RS10+C00004(I00001,I00003,I00002)-
     *  C00015(I00001,I00003,I00002)
   11 CONTINUE
      RS9=RS9+RS10
   10 CONTINUE
      RS11=0.0
      DO 12 I00003=1,SSZ(8)
      RS12=0.0
      DO 13 I00001=1,SSZ(2)
      RS12=RS12+C00005(I00001,I00003,I00002)-
     *  C00016(I00001,I00003,I00002)
   13 CONTINUE
      RS11=RS11+RS12
   12 CONTINUE
      RS13=0.0
      DO 14 I00001=1,SSZ(2)
      RS14=0.0
      DO 15 I00004=1,SSZ(1)
      RS14=RS14+C00022(I00001,I00002,I00004)-
     *  C00012(I00001,I00002,I00004)
   15 CONTINUE
      RS13=RS13+RS14
   14 CONTINUE
      RS15=0.0
      DO 16 I00001=1,SSZ(2)
      RS16=0.0
      DO 17 I00004=1,SSZ(1)
      RS16=RS16+C00021(I00001,I00004,I00002)-
     *  C00023(I00001,I00004,I00002)
   17 CONTINUE
      RS15=RS15+RS16
   16 CONTINUE
      RS17=0.0
      DO 18 I00001=1,SSZ(2)
      RS17=RS17+C00025(I00001,I00002)+C00030(I00001,I00002)
   18 CONTINUE
      C00065(I00002)=RS1-C00011(I00002)+RS2+RS3+RS5+RS6+RS7+RS8+RS9+
     *  RS11+RS13+RS15-RS17-C00003(I00002)
    1 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "SURPLUS"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00079')
      RETURN
      END
      SUBROUTINE S00080(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00022,C00023,C00066,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00004
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00022(SSZ(2),SSZ(1),SSZ(1))
      REAL C00023(SSZ(2),SSZ(1),SSZ(1))
      REAL C00066(SSZ(2),SSZ(1),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "VTWR_M"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 3 I00004=1,SSZ(1)
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      C00066(I00001,I00002,I00004)=C00023(I00001,I00002,I00004)-
     *  C00022(I00001,I00002,I00004)
    1 CONTINUE
    2 CONTINUE
    3 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "VTWR_M"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00080')
      RETURN
      END
      SUBROUTINE S00081(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00024,C00066,C00067,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00004
      INTEGER I00005
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL ECHO1
      REAL C00024(SSZ(3),SSZ(2),SSZ(1),SSZ(1))
      REAL C00066(SSZ(2),SSZ(1),SSZ(1))
      REAL C00067(SSZ(2),SSZ(1),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "CHKTRANS_D"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 3 I00004=1,SSZ(1)
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      RS1=0.0
      DO 4 I00005=1,SSZ(3)
      RS1=RS1+C00024(I00005,I00001,I00002,I00004)
    4 CONTINUE
      C00067(I00001,I00002,I00004)=C00066(I00001,I00002,I00004)-RS1
    1 CONTINUE
    2 CONTINUE
    3 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "CHKTRANS_D"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00081')
      RETURN
      END
      SUBROUTINE S00082(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00068,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00068(SSZ(2),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "VSTT"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      C00068(I00001,I00002)=0
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "VSTT"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00082')
      RETURN
      END
      SUBROUTINE S00083(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00013,C00068,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00013(SSZ(3),SSZ(1))
      REAL C00068(SSZ(2),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "VSTT"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(3)
      C00068(SSMP(SSMPST(1)-1+I00001),I00002)=C00013(I00001,I00002)
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "VSTT"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00083')
      RETURN
      END
      SUBROUTINE S00084(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00024,C00068,C00069,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00004
      INTEGER I00005
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1,RS2,RS3,RS4,RS5,RS6
      LOGICAL ECHO1
      REAL C00024(SSZ(3),SSZ(2),SSZ(1),SSZ(1))
      REAL C00068(SSZ(2),SSZ(1))
      REAL C00069(1)
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "CHKTRANS_S"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      RS1=0.0
      DO 4 I00004=1,SSZ(1)
      RS2=0.0
      DO 3 I00002=1,SSZ(1)
      RS3=0.0
      DO 2 I00001=1,SSZ(2)
      RS4=0.0
      DO 1 I00005=1,SSZ(3)
      RS4=RS4+C00024(I00005,I00001,I00002,I00004)
    1 CONTINUE
      RS3=RS3+RS4
    2 CONTINUE
      RS2=RS2+RS3
    3 CONTINUE
      RS1=RS1+RS2
    4 CONTINUE
      RS5=0.0
      DO 6 I00002=1,SSZ(1)
      RS6=0.0
      DO 5 I00001=1,SSZ(2)
      RS6=RS6+C00068(I00001,I00002)
    5 CONTINUE
      RS5=RS5+RS6
    6 CONTINUE
      C00069(1)=RS1-RS5
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "CHKTRANS_S"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00084')
      RETURN
      END
      SUBROUTINE S00085(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00069,C00070,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00069(1)
      REAL C00070(1)
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "SUMTRANS_S"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      C00070(1)=ABS(REAL(C00069(1)))
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "SUMTRANS_S"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00085')
      RETURN
      END
      SUBROUTINE S00086(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00067,C00071,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00004
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1,RS2,RS3
      LOGICAL ECHO1
      REAL C00067(SSZ(2),SSZ(1),SSZ(1))
      REAL C00071(1)
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "SUMTRANS_D"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      RS1=0.0
      DO 3 I00004=1,SSZ(1)
      RS2=0.0
      DO 2 I00002=1,SSZ(1)
      RS3=0.0
      DO 1 I00001=1,SSZ(2)
      RS3=RS3+ABS(REAL(C00067(I00001,I00002,I00004)))
    1 CONTINUE
      RS2=RS2+RS3
    2 CONTINUE
      RS1=RS1+RS2
    3 CONTINUE
      C00071(1)=RS1
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "SUMTRANS_D"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00086')
      RETURN
      END
      SUBROUTINE S00087(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00065,C00072,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00002
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL ECHO1
      REAL C00065(SSZ(1))
      REAL C00072(1)
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "SUMSURPLUS"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      RS1=0.0
      DO 1 I00002=1,SSZ(1)
      RS1=RS1+ABS(REAL(C00065(I00002)))
    1 CONTINUE
      C00072(1)=RS1
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "SUMSURPLUS"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00087')
      RETURN
      END
      SUBROUTINE S00088(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00064,C00073,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00004
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1,RS2
      LOGICAL ECHO1
      REAL C00064(SSZ(2),SSZ(1))
      REAL C00073(1)
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "SUMMKTCLIMP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      RS1=0.0
      DO 2 I00004=1,SSZ(1)
      RS2=0.0
      DO 1 I00001=1,SSZ(2)
      RS2=RS2+ABS(REAL(C00064(I00001,I00004)))
    1 CONTINUE
      RS1=RS1+RS2
    2 CONTINUE
      C00073(1)=RS1
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "SUMMKTCLIMP"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00088')
      RETURN
      END
      SUBROUTINE S00089(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00070,C00071,C00072,C00073,C00074,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      LOGICAL ECHO1
      REAL C00070(1)
      REAL C00071(1)
      REAL C00072(1)
      REAL C00073(1)
      REAL C00074(1)
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "SUMIMBALS"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      C00074(1)=C00070(1)+C00071(1)+C00072(1)+C00073(1)
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "SUMIMBALS"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00089')
      RETURN
      END
      SUBROUTINE S00090(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00001,C00076,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL LG1
      LOGICAL ECHO1
      REAL C00001(SSZ(6),SSZ(1))
      REAL C00076(SSZ(6),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "SIGNER"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(6)
      RS1=0.0
      LG1=C00001(I00001,I00002).LT.0
      IF(LG1) THEN
      RS1=1
      END IF
      C00076(I00001,I00002)=RS1
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "SIGNER"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00090')
      RETURN
      END
      SUBROUTINE S00091(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00002,C00075,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00003
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL LG1
      LOGICAL ECHO1
      REAL C00002(SSZ(6),SSZ(8),SSZ(1))
      REAL C00075(SSZ(6),SSZ(8),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "SIGNEPR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 3 I00002=1,SSZ(1)
      DO 2 I00003=1,SSZ(8)
      DO 1 I00001=1,SSZ(6)
      RS1=0.0
      LG1=C00002(I00001,I00003,I00002).LT.0
      IF(LG1) THEN
      RS1=1
      END IF
      C00075(I00001,I00003,I00002)=RS1
    1 CONTINUE
    2 CONTINUE
    3 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "SIGNEPR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00091')
      RETURN
      END
      SUBROUTINE S00092(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00004,C00080,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00003
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL LG1
      LOGICAL ECHO1
      REAL C00004(SSZ(2),SSZ(8),SSZ(1))
      REAL C00080(SSZ(2),SSZ(8),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "SIGNTPR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 3 I00002=1,SSZ(1)
      DO 2 I00003=1,SSZ(8)
      DO 1 I00001=1,SSZ(2)
      RS1=0.0
      LG1=C00004(I00001,I00003,I00002).LT.0
      IF(LG1) THEN
      RS1=1
      END IF
      C00080(I00001,I00003,I00002)=RS1
    1 CONTINUE
    2 CONTINUE
    3 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "SIGNTPR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00092')
      RETURN
      END
      SUBROUTINE S00093(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00005,C00080,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00003
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL LG1
      LOGICAL ECHO1
      REAL C00005(SSZ(2),SSZ(8),SSZ(1))
      REAL C00080(SSZ(2),SSZ(8),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "SIGNTPR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 3 I00002=1,SSZ(1)
      DO 2 I00003=1,SSZ(8)
      DO 1 I00001=1,SSZ(2)
      RS1=0.0
      LG1=C00005(I00001,I00003,I00002).LT.0
      IF(LG1) THEN
      RS1=1
      END IF
      C00080(I00001,I00003,I00002)=RS1
    1 CONTINUE
    2 CONTINUE
    3 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "SIGNTPR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00093')
      RETURN
      END
      SUBROUTINE S00094(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00006,C00081,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL LG1
      LOGICAL ECHO1
      REAL C00006(SSZ(2),SSZ(1))
      REAL C00081(SSZ(2),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "SIGNTR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      RS1=0.0
      LG1=C00006(I00001,I00002).LT.0
      IF(LG1) THEN
      RS1=1
      END IF
      C00081(I00001,I00002)=RS1
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "SIGNTR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00094')
      RETURN
      END
      SUBROUTINE S00095(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00007,C00081,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL LG1
      LOGICAL ECHO1
      REAL C00007(SSZ(2),SSZ(1))
      REAL C00081(SSZ(2),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "SIGNTR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      RS1=0.0
      LG1=C00007(I00001,I00002).LT.0
      IF(LG1) THEN
      RS1=1
      END IF
      C00081(I00001,I00002)=RS1
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "SIGNTR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00095')
      RETURN
      END
      SUBROUTINE S00096(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00008,C00081,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL LG1
      LOGICAL ECHO1
      REAL C00008(SSZ(2),SSZ(1))
      REAL C00081(SSZ(2),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "SIGNTR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      RS1=0.0
      LG1=C00008(I00001,I00002).LT.0
      IF(LG1) THEN
      RS1=1
      END IF
      C00081(I00001,I00002)=RS1
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "SIGNTR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00096')
      RETURN
      END
      SUBROUTINE S00097(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00009,C00081,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL LG1
      LOGICAL ECHO1
      REAL C00009(SSZ(2),SSZ(1))
      REAL C00081(SSZ(2),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "SIGNTR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      RS1=0.0
      LG1=C00009(I00001,I00002).LT.0
      IF(LG1) THEN
      RS1=1
      END IF
      C00081(I00001,I00002)=RS1
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "SIGNTR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00097')
      RETURN
      END
      SUBROUTINE S00098(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00010,C00079,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00002
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL LG1
      LOGICAL ECHO1
      REAL C00010(SSZ(1))
      REAL C00079(SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "SIGNR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 1 I00002=1,SSZ(1)
      RS1=0.0
      LG1=C00010(I00002).LT.0
      IF(LG1) THEN
      RS1=1
      END IF
      C00079(I00002)=RS1
    1 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "SIGNR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00098')
      RETURN
      END
      SUBROUTINE S00099(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00011,C00079,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00002
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL LG1
      LOGICAL ECHO1
      REAL C00011(SSZ(1))
      REAL C00079(SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "SIGNR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 1 I00002=1,SSZ(1)
      RS1=0.0
      LG1=C00011(I00002).LT.0
      IF(LG1) THEN
      RS1=1
      END IF
      C00079(I00002)=RS1
    1 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "SIGNR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00099')
      RETURN
      END
      SUBROUTINE M00004(RDUN,MMI,MMR,
     *  LFNORD,LFNOWR,LFFOWR,RDFSNO,WRFSNO,WTMO,
     *  KSINT,NSINT,KSINTA,
     *  RWA,NUMFL,
     *  IWA,OVOK,
     *  KMSTSL,AUTACC,SILEN,MINSIL,MINSFL,
     *  UDRTST,INRTST,CONTSI,
     *  AXSUN,AXTUN,WRUN,CWKUN,MMRDR,DSPUN,DSPPW,DSPPL,DSPDEC,
     *  DODS,DOWR,DOEQ,DSALLS,WTALLS,KSTEPA,NPASSA,SERTAB,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  DSSMAP,SSMAP,
     *  DOUD,
     *  CALC1,FSTPAS,CTRTHR,SUVFI,ERRMES)
      USE GSINC4
      USE GSINC7
      USE GSINC4
      USE gtpvew_c5
      USE TGSMVL
      USE GSINC1
      USE GSINC5
      USE SMVLST0
      USE TGDEBG
      USE PSIMMOD1
      USE SIMRES0
      USE GSINC3
      USE GSINC6
      INTEGER MMI,MMR
      INTEGER RDUN,WRUN,CWKUN,MMRDR
      INTEGER NUMFL,AXSUN,AXTUN
      INTEGER KSINT,NSINT,KSINTA
      REAL RWA(DWA)
      INTEGER DSPUN,DSPPW,DSPPL,DSPDEC
      INTEGER IWA(DIWA),TMPI1
      INTEGER KMSTSL
      LOGICAL AUTACC,CONTSI
      CHARACTER*(*) MINSFL,UDRTST,INRTST
      REAL MINSIL
      DOUBLE PRECISION SILEN
      INTEGER DRCOW
      PARAMETER(DRCOW=1)
      REAL RCOW(DRCOW)
      CHARACTER*(*) LFFOWR,WTMO
      CHARACTER*(*) ERRMES
      LOGICAL DOUD
      LOGICAL SKPSMD,LOWMEM,CALC1,FSTPAS,CTRTHR,SUVFI,TMPLG1
      LOGICAL DSALLS,WTALLS,DODS,DOWR,DOEQ,OVOK,SERTAB
      LOGICAL DSPANP,DSPOIM,D1DROW,NELTX
      INTEGER KSTEPA,NPASSA,DSPCPN,DSPCLN
      INTEGER DSSMAP,SSMAP(DSSMAP)
      INTEGER LFNORD,LFNOWR,RDFSNO,WRFSNO
      INTEGER SSNO,LITSN,SETNO
      CHARACTER SSTP,SETTP
      LOGICAL DOTHIS
      COMMON/DTHIS/DOTHIS
      LOWMEM=.FALSE.
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(ECHO1.AND.DOIG(236).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'CHKMKTCLIMP',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(236).NE.'n') then
      CALL S00078(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(236),
     *  C00015,C00017,C00019,C00021,C00064,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(238).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'SURPLUS',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(238).NE.'n') then
      CALL S00079(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(238),
     *  C00003,C00004,C00005,C00006,C00007,C00008,C00009,C00011,
     *  C00012,C00014,C00015,C00016,C00017,C00018,C00019,C00020,
     *  C00021,C00022,C00023,C00025,C00027,C00028,C00030,C00037,
     *  C00065,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(240).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'VTWR_M',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(240).NE.'n') then
      CALL S00080(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(240),
     *  C00022,C00023,C00066,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(242).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'CHKTRANS_D',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(242).NE.'n') then
      CALL S00081(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(242),
     *  C00024,C00066,C00067,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(244).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'VSTT',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(244).NE.'n') then
      CALL S00082(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(244),
     *  C00068,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(245).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'VSTT',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(245).NE.'n') then
      CALL S00083(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(245),
     *  C00013,C00068,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(247).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'CHKTRANS_S',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(247).NE.'n') then
      CALL S00084(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(247),
     *  C00024,C00068,C00069,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(249).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'SUMTRANS_S',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(249).NE.'n') then
      CALL S00085(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(249),
     *  C00069,C00070,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(251).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'SUMTRANS_D',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(251).NE.'n') then
      CALL S00086(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(251),
     *  C00067,C00071,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(253).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'SUMSURPLUS',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(253).NE.'n') then
      CALL S00087(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(253),
     *  C00065,C00072,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(255).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'SUMMKTCLIMP',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(255).NE.'n') then
      CALL S00088(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(255),
     *  C00064,C00073,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      IF(ECHO1.AND.DOIG(257).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'SUMIMBALS',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(257).NE.'n') then
      CALL S00089(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(257),
     *  C00070,C00071,C00072,C00073,C00074,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(ECHO1.AND.DOIG(275).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'SIGNER',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(275).NE.'n') then
      CALL S00090(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(275),
     *  C00001,C00076,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(ECHO1.AND.DOIG(277).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'SIGNEPR',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(277).NE.'n') then
      CALL S00091(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(277),
     *  C00002,C00075,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(ECHO1.AND.DOIG(279).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'SIGNTPR',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(279).NE.'n') then
      CALL S00092(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(279),
     *  C00004,C00080,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(ECHO1.AND.DOIG(281).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'SIGNTPR',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(281).NE.'n') then
      CALL S00093(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(281),
     *  C00005,C00080,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(ECHO1.AND.DOIG(283).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'SIGNTR',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(283).NE.'n') then
      CALL S00094(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(283),
     *  C00006,C00081,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(ECHO1.AND.DOIG(285).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'SIGNTR',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(285).NE.'n') then
      CALL S00095(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(285),
     *  C00007,C00081,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(ECHO1.AND.DOIG(287).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'SIGNTR',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(287).NE.'n') then
      CALL S00096(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(287),
     *  C00008,C00081,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(ECHO1.AND.DOIG(289).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'SIGNTR',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(289).NE.'n') then
      CALL S00097(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(289),
     *  C00009,C00081,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(ECHO1.AND.DOIG(291).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'SIGNR',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(291).NE.'n') then
      CALL S00098(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(291),
     *  C00010,C00079,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(ECHO1.AND.DOIG(293).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'SIGNR',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(293).NE.'n') then
      CALL S00099(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(293),
     *  C00011,C00079,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      RETURN
15000 CALL PERET('M00004')
      RETURN
      END
      SUBROUTINE S00100(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00012,C00082,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00004
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL LG1
      LOGICAL ECHO1
      REAL C00012(SSZ(2),SSZ(1),SSZ(1))
      REAL C00082(SSZ(2),SSZ(1),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "SIGNTRR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 3 I00004=1,SSZ(1)
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      RS1=0.0
      LG1=C00012(I00001,I00002,I00004).LT.0
      IF(LG1) THEN
      RS1=1
      END IF
      C00082(I00001,I00002,I00004)=RS1
    1 CONTINUE
    2 CONTINUE
    3 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "SIGNTRR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00100')
      RETURN
      END
      SUBROUTINE S00101(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00013,C00077,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL LG1
      LOGICAL ECHO1
      REAL C00013(SSZ(3),SSZ(1))
      REAL C00077(SSZ(3),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "SIGNMR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(3)
      RS1=0.0
      LG1=C00013(I00001,I00002).LT.0
      IF(LG1) THEN
      RS1=1
      END IF
      C00077(I00001,I00002)=RS1
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "SIGNMR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00101')
      RETURN
      END
      SUBROUTINE S00102(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00024,C00078,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00004
      INTEGER I00006
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL LG1
      LOGICAL ECHO1
      REAL C00024(SSZ(3),SSZ(2),SSZ(1),SSZ(1))
      REAL C00078(SSZ(3),SSZ(2),SSZ(1),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "SIGNMTRR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 4 I00004=1,SSZ(1)
      DO 3 I00002=1,SSZ(1)
      DO 2 I00001=1,SSZ(2)
      DO 1 I00006=1,SSZ(3)
      RS1=0.0
      LG1=C00024(I00006,I00001,I00002,I00004).LT.0
      IF(LG1) THEN
      RS1=1
      END IF
      C00078(I00006,I00001,I00002,I00004)=RS1
    1 CONTINUE
    2 CONTINUE
    3 CONTINUE
    4 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "SIGNMTRR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00102')
      RETURN
      END
      SUBROUTINE S00103(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00014,C00075,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00003
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL LG1
      LOGICAL ECHO1
      REAL C00014(SSZ(6),SSZ(8),SSZ(1))
      REAL C00075(SSZ(6),SSZ(8),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "SIGNEPR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 3 I00002=1,SSZ(1)
      DO 2 I00003=1,SSZ(8)
      DO 1 I00001=1,SSZ(6)
      RS1=0.0
      LG1=C00014(I00001,I00003,I00002).LT.0
      IF(LG1) THEN
      RS1=1
      END IF
      C00075(I00001,I00003,I00002)=RS1
    1 CONTINUE
    2 CONTINUE
    3 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "SIGNEPR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00103')
      RETURN
      END
      SUBROUTINE S00104(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00015,C00080,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00003
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL LG1
      LOGICAL ECHO1
      REAL C00015(SSZ(2),SSZ(8),SSZ(1))
      REAL C00080(SSZ(2),SSZ(8),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "SIGNTPR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 3 I00002=1,SSZ(1)
      DO 2 I00003=1,SSZ(8)
      DO 1 I00001=1,SSZ(2)
      RS1=0.0
      LG1=C00015(I00001,I00003,I00002).LT.0
      IF(LG1) THEN
      RS1=1
      END IF
      C00080(I00001,I00003,I00002)=RS1
    1 CONTINUE
    2 CONTINUE
    3 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "SIGNTPR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00104')
      RETURN
      END
      SUBROUTINE S00105(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00016,C00080,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00003
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL LG1
      LOGICAL ECHO1
      REAL C00016(SSZ(2),SSZ(8),SSZ(1))
      REAL C00080(SSZ(2),SSZ(8),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "SIGNTPR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 3 I00002=1,SSZ(1)
      DO 2 I00003=1,SSZ(8)
      DO 1 I00001=1,SSZ(2)
      RS1=0.0
      LG1=C00016(I00001,I00003,I00002).LT.0
      IF(LG1) THEN
      RS1=1
      END IF
      C00080(I00001,I00003,I00002)=RS1
    1 CONTINUE
    2 CONTINUE
    3 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "SIGNTPR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00105')
      RETURN
      END
      SUBROUTINE S00106(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00017,C00081,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL LG1
      LOGICAL ECHO1
      REAL C00017(SSZ(2),SSZ(1))
      REAL C00081(SSZ(2),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "SIGNTR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      RS1=0.0
      LG1=C00017(I00001,I00002).LT.0
      IF(LG1) THEN
      RS1=1
      END IF
      C00081(I00001,I00002)=RS1
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "SIGNTR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00106')
      RETURN
      END
      SUBROUTINE S00107(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00018,C00081,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL LG1
      LOGICAL ECHO1
      REAL C00018(SSZ(2),SSZ(1))
      REAL C00081(SSZ(2),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "SIGNTR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      RS1=0.0
      LG1=C00018(I00001,I00002).LT.0
      IF(LG1) THEN
      RS1=1
      END IF
      C00081(I00001,I00002)=RS1
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "SIGNTR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00107')
      RETURN
      END
      SUBROUTINE S00108(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00019,C00081,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL LG1
      LOGICAL ECHO1
      REAL C00019(SSZ(2),SSZ(1))
      REAL C00081(SSZ(2),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "SIGNTR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      RS1=0.0
      LG1=C00019(I00001,I00002).LT.0
      IF(LG1) THEN
      RS1=1
      END IF
      C00081(I00001,I00002)=RS1
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "SIGNTR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00108')
      RETURN
      END
      SUBROUTINE S00109(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00020,C00081,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL LG1
      LOGICAL ECHO1
      REAL C00020(SSZ(2),SSZ(1))
      REAL C00081(SSZ(2),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "SIGNTR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      RS1=0.0
      LG1=C00020(I00001,I00002).LT.0
      IF(LG1) THEN
      RS1=1
      END IF
      C00081(I00001,I00002)=RS1
    1 CONTINUE
    2 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "SIGNTR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00109')
      RETURN
      END
      SUBROUTINE S00110(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00021,C00082,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00004
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL LG1
      LOGICAL ECHO1
      REAL C00021(SSZ(2),SSZ(1),SSZ(1))
      REAL C00082(SSZ(2),SSZ(1),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "SIGNTRR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 3 I00004=1,SSZ(1)
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      RS1=0.0
      LG1=C00021(I00001,I00002,I00004).LT.0
      IF(LG1) THEN
      RS1=1
      END IF
      C00082(I00001,I00002,I00004)=RS1
    1 CONTINUE
    2 CONTINUE
    3 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "SIGNTRR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00110')
      RETURN
      END
      SUBROUTINE S00111(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00022,C00082,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00004
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL LG1
      LOGICAL ECHO1
      REAL C00022(SSZ(2),SSZ(1),SSZ(1))
      REAL C00082(SSZ(2),SSZ(1),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "SIGNTRR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 3 I00004=1,SSZ(1)
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      RS1=0.0
      LG1=C00022(I00001,I00002,I00004).LT.0
      IF(LG1) THEN
      RS1=1
      END IF
      C00082(I00001,I00002,I00004)=RS1
    1 CONTINUE
    2 CONTINUE
    3 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "SIGNTRR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00111')
      RETURN
      END
      SUBROUTINE S00112(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOCIG,
     *  C00023,C00082,
     *  ERRMES)
      USE PSIMMOD1
      USE GSINC6
      INTEGER MMNSS,SSIOS(MMNSS),SSMPST(MMNSS+1)
      CHARACTER*(*) DOCIG
      INTEGER I00001
      INTEGER I00002
      INTEGER I00004
      INTEGER MMNST,SSZ(MMNST),STIST(MMNST),IER,KK,TGSSP
      LOGICAL LGX
      INTEGER MMEL,ELAD(MMNST),TGEPOS
      CHARACTER*(*) STELST(MMNST),STNM(MMNST),STEL(MMEL)
      REAL RS1
      LOGICAL LG1
      LOGICAL ECHO1
      REAL C00023(SSZ(2),SSZ(1),SSZ(1))
      REAL C00082(SSZ(2),SSZ(1),SSZ(1))
      CHARACTER*(*) ERRMES
      REAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      EXTERNAL ID01,ID0V,GPRAND,TGFCMN,TGFNOR
      IER=0
      CALL GPAPRW(
     *  ' before calculating formula for coefficient "SIGNTRR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(DOCIG.EQ.'n') RETURN
      DO 3 I00004=1,SSZ(1)
      DO 2 I00002=1,SSZ(1)
      DO 1 I00001=1,SSZ(2)
      RS1=0.0
      LG1=C00023(I00001,I00002,I00004).LT.0
      IF(LG1) THEN
      RS1=1
      END IF
      C00082(I00001,I00002,I00004)=RS1
    1 CONTINUE
    2 CONTINUE
    3 CONTINUE
      IF(IER.NE.0) THEN
        CALL TGIER('fm',IER,ERRMES)
        GOTO 15000
      END IF
      CALL GPAPRW(
     *  ' while calculating formula for coefficient "SIGNTRR"',
     *  ' ',ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('S00112')
      RETURN
      END
      SUBROUTINE M00005(RDUN,MMI,MMR,
     *  LFNORD,LFNOWR,LFFOWR,RDFSNO,WRFSNO,WTMO,
     *  KSINT,NSINT,KSINTA,
     *  RWA,NUMFL,
     *  IWA,OVOK,
     *  KMSTSL,AUTACC,SILEN,MINSIL,MINSFL,
     *  UDRTST,INRTST,CONTSI,
     *  AXSUN,AXTUN,WRUN,CWKUN,MMRDR,DSPUN,DSPPW,DSPPL,DSPDEC,
     *  DODS,DOWR,DOEQ,DSALLS,WTALLS,KSTEPA,NPASSA,SERTAB,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  DSSMAP,SSMAP,
     *  DOUD,
     *  CALC1,FSTPAS,CTRTHR,SUVFI,ERRMES)
      USE GSINC4
      USE GSINC7
      USE GSINC4
      USE gtpvew_c5
      USE TGSMVL
      USE GSINC1
      USE GSINC5
      USE SMVLST0
      USE TGDEBG
      USE PSIMMOD1
      USE SIMRES0
      USE GSINC3
      USE GSINC6
      INTEGER MMI,MMR
      INTEGER RDUN,WRUN,CWKUN,MMRDR
      INTEGER NUMFL,AXSUN,AXTUN
      INTEGER KSINT,NSINT,KSINTA
      REAL RWA(DWA)
      INTEGER DSPUN,DSPPW,DSPPL,DSPDEC
      INTEGER IWA(DIWA),TMPI1
      INTEGER KMSTSL
      LOGICAL AUTACC,CONTSI
      CHARACTER*(*) MINSFL,UDRTST,INRTST
      REAL MINSIL
      DOUBLE PRECISION SILEN
      INTEGER DRCOW
      PARAMETER(DRCOW=1)
      REAL RCOW(DRCOW)
      CHARACTER*(*) LFFOWR,WTMO
      CHARACTER*(*) ERRMES
      LOGICAL DOUD
      LOGICAL SKPSMD,LOWMEM,CALC1,FSTPAS,CTRTHR,SUVFI,TMPLG1
      LOGICAL DSALLS,WTALLS,DODS,DOWR,DOEQ,OVOK,SERTAB
      LOGICAL DSPANP,DSPOIM,D1DROW,NELTX
      INTEGER KSTEPA,NPASSA,DSPCPN,DSPCLN
      INTEGER DSSMAP,SSMAP(DSSMAP)
      INTEGER LFNORD,LFNOWR,RDFSNO,WRFSNO
      INTEGER SSNO,LITSN,SETNO
      CHARACTER SSTP,SETTP
      LOGICAL DOTHIS
      COMMON/DTHIS/DOTHIS
      LOWMEM=.FALSE.
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(ECHO1.AND.DOIG(295).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'SIGNTRR',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(295).NE.'n') then
      CALL S00100(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(295),
     *  C00012,C00082,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(ECHO1.AND.DOIG(297).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'SIGNMR',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(297).NE.'n') then
      CALL S00101(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(297),
     *  C00013,C00077,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(ECHO1.AND.DOIG(299).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'SIGNMTRR',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(299).NE.'n') then
      CALL S00102(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(299),
     *  C00024,C00078,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(ECHO1.AND.DOIG(301).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'SIGNEPR',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(301).NE.'n') then
      CALL S00103(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(301),
     *  C00014,C00075,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(ECHO1.AND.DOIG(303).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'SIGNTPR',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(303).NE.'n') then
      CALL S00104(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(303),
     *  C00015,C00080,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(ECHO1.AND.DOIG(305).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'SIGNTPR',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(305).NE.'n') then
      CALL S00105(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(305),
     *  C00016,C00080,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(ECHO1.AND.DOIG(307).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'SIGNTR',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(307).NE.'n') then
      CALL S00106(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(307),
     *  C00017,C00081,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(ECHO1.AND.DOIG(309).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'SIGNTR',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(309).NE.'n') then
      CALL S00107(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(309),
     *  C00018,C00081,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(ECHO1.AND.DOIG(311).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'SIGNTR',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(311).NE.'n') then
      CALL S00108(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(311),
     *  C00019,C00081,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(ECHO1.AND.DOIG(313).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'SIGNTR',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(313).NE.'n') then
      CALL S00109(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(313),
     *  C00020,C00081,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(ECHO1.AND.DOIG(315).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'SIGNTRR',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(315).NE.'n') then
      CALL S00110(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(315),
     *  C00021,C00082,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(ECHO1.AND.DOIG(317).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'SIGNTRR',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(317).NE.'n') then
      CALL S00111(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(317),
     *  C00022,C00082,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      IF(ECHO1.AND.DOIG(319).EQ.'y') THEN
        CALL GPTO1(' Formula for ''%t''',
     *    'SIGNTRR',0,ERRMES)
        IF(ERRMES(1:1).EQ.'E') GOTO 15000
      END IF
      IF(DOIG(319).NE.'n') then
      CALL S00112(MMNSS,SSIOS,ECHO1,
     *  MMNST,SSZ,STIST,ELAD,STELST,STNM,MMEL,STEL,
     *  SSMPST,
     *  DOIG(319),
     *  C00023,C00082,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      ENDIF
      CALL TGSCRS('tg',1,CALC1,DODS,DOWR,CTRTHR,
     *  AXSUN,RDUN,WRUN,DSPUN,CWKUN,
     *  LFNORD,LFNOWR,LFFOWR,NUMFL,RDFSNO,WRFSNO,
     *  DSPPW,DSPPL,DSPDEC,MMR,MMRDR,
     *  KSTEPA,NPASSA,KSINT,KSINTA,NSINT,
     *  DSALLS,WTALLS,WTMO,.FALSE.,
     *  DSPANP,DSPOIM,D1DROW,DSPCPN,DSPCLN,NELTX,
     *  SUVFI,
     *  TMPLG1,TMPI1,
     *  ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      CALL TGPCUV('tg',KSTEPA,KMSTSL,KSINTA,AXSUN,SIZE(C00013),C00013,
     *  MMNCS,NUMCS,CSNAM,CSNIND,CSPOSTSIM,
     *  MMNST,SSZ,SZUB,ELAD,STELST,STNM,MMEL,STEL,
     *  AUTACC,POSTSIMPASS3,SILEN,MINSIL,MINSFL,UDRTST,INRTST,
     *  MMDEBG,DEBG,OVOK,CONTSI,ERRMES)
      IF(ERRMES(1:1).EQ.'E') GOTO 15000
      RETURN
15000 CALL PERET('M00005')
      RETURN
      END
      SUBROUTINE SSDAUC(ERRMES)
      CHARACTER*(*) ERRMES
      RETURN
      END
      SUBROUTINE SSCTU(MMNST,SSZ,CSNO,
     *  DUCMEM,UCMEM,ERRMES)
      INTEGER CSNO,MMNST,SSZ(MMNST)
      INTEGER DUCMEM
      REAL UCMEM(DUCMEM)
      CHARACTER*(*) ERRMES
      RETURN
      END
      SUBROUTINE GPEQN1(EQNUM,CHAR,LCHAR,ERRMES)
      INTEGER EQNUM,LCHAR
      CHARACTER*(*) CHAR,ERRMES
      return
      END
      SUBROUTINE SSVFTS(FROMTO,NUMVC,VCSTAT,DSMRES,SIMRES,ERRMES)
      INTEGER NUMVC,DSMRES
      CHARACTER*(*) FROMTO,VCSTAT(NUMVC),ERRMES
      REAL SIMRES(DSMRES)
      RETURN
      END
      include 'tgscrs1.for'
      USE gtpvew_c3
      USE gtpvew_c4
      INTEGER SSVSZ
      include 'tgscrs2.for'
      include 'tgst1.for'
      USE gtpvew_c3
      include 'tgst2.for'
      include 'tgwacv1.for'
      USE gtpvew_c3
      include 'tgwacv2.for'
      include 'tgwcvv1.for'
      USE gtpvew_c3
      include 'tgwcvv2.for'
      include 'tgctri1.for'
      USE gtpvew_c3
      include 'tgctri2.for'
      include 'ssrsmv1.for'
      USE gtpvew_c3
      include 'ssrsmv2.for'
      include 'tgpmp1.for'
      USE gtpvew_c4
      include 'tgpmp2.for'
      include 'tbsstp1.for'
      USE gsinc5
      include 'tbsstp2.for'
      include 'tbsssp1.for'
      USE gsinc5
      include 'tbsssp2.for'
      include 'tbscsp1.for'
      USE gsinc1
      include 'tbscsp2.for'
