	SUBROUTINE FBTTOMDSGETCONST(SHOT)
	INTEGER SHOT
        include 'fbtmgams.inc'
	INCLUDE 'mga.inc'
	INCLUDE 'mdslib.inc'
	INTEGER MDSSTATUS MDSLENGTH

	! Reads shvsec(nruns),placur(nruns),eli(nruns),area(nruns),cappab(nruns),
	!       raxt(nruns),zaxt(nruns),raxb(nruns),zaxb(nruns)

	MDSSTATUS = MDSVALUE(
     1	'fix_roprand(f_float(\fbt:shvsec),0.)'//CHAR(0),
     1	DESCR(IDTYPE_LONG,NEQ,0),
     1	DESCR(IDTYPE_FLOAT,shvsec,nruns,0),0,MDSLENGTH)
	IF (MOD(MDSSTATUS,2).EQ.0) THEN
	 PRINT *,'FBTTOMDSGET - error reading shvsec'
	 STOP
	ENDIF

	MDSSTATUS = MDSVALUE(
     1	'fix_roprand(f_float(\fbte:i_p),0.)'//CHAR(0),
     1	DESCR(IDTYPE_LONG,NEQ,0),
     1	DESCR(IDTYPE_FLOAT,placur,nruns,0),0,MDSLENGTH)
	IF (MOD(MDSSTATUS,2).EQ.0) THEN
	 PRINT *,'FBTTOMDSGET - error reading placur'
	 STOP
	ENDIF

	MDSSTATUS = MDSVALUE(
     1	'fix_roprand(f_float(\fbte:l_i),0.)'//CHAR(0),
     1	DESCR(IDTYPE_LONG,NEQ,0),
     1	DESCR(IDTYPE_FLOAT,eli,nruns,0),0,MDSLENGTH)
	IF (MOD(MDSSTATUS,2).EQ.0) THEN
	 PRINT *,'FBTTOMDSGET - error reading eli'
	 STOP
	ENDIF

	MDSSTATUS = MDSVALUE(
     1	'fix_roprand(f_float(\fbte:area),0.)'//CHAR(0),
     1	DESCR(IDTYPE_LONG,NEQ,0),
     1	DESCR(IDTYPE_FLOAT,area,nruns,0),0,MDSLENGTH)
	IF (MOD(MDSSTATUS,2).EQ.0) THEN
	 PRINT *,'FBTTOMDSGET - error reading area'
	 STOP
	ENDIF

	MDSSTATUS = MDSVALUE(
     1	'fix_roprand(f_float(\fbte:kappa_edge),0.)'//CHAR(0),
     1	DESCR(IDTYPE_LONG,NEQ,0),
     1	DESCR(IDTYPE_FLOAT,cappab,nruns,0),0,MDSLENGTH)
	IF (MOD(MDSSTATUS,2).EQ.0) THEN
	 PRINT *,'FBTTOMDSGET - error reading cappab'
	 STOP
	ENDIF

	MDSSTATUS = MDSVALUE(
     1	'fix_roprand(f_float(\fbt:rax),0.)'//CHAR(0),
     1	DESCR(IDTYPE_LONG,NEQ,0),
     1	DESCR(IDTYPE_FLOAT,raxt,nruns,0),0,MDSLENGTH)
	IF (MOD(MDSSTATUS,2).EQ.0) THEN
	 PRINT *,'FBTTOMDSGET - error reading raxt'
	 STOP
	ENDIF

	MDSSTATUS = MDSVALUE(
     1	'fix_roprand(f_float(\fbt:zax),0.)'//CHAR(0),
     1	DESCR(IDTYPE_LONG,NEQ,0),
     1	DESCR(IDTYPE_FLOAT,zaxt,nruns,0),0,MDSLENGTH)
	IF (MOD(MDSSTATUS,2).EQ.0) THEN
	 PRINT *,'FBTTOMDSGET - error reading zaxt'
	 STOP
	ENDIF

	MDSSTATUS = MDSVALUE(
     1	'fix_roprand(f_float(\fbt:rax2),0.)'//CHAR(0),
     1	DESCR(IDTYPE_LONG,NEQ,0),
     1	DESCR(IDTYPE_FLOAT,raxb,nruns,0),0,MDSLENGTH)
	IF (MOD(MDSSTATUS,2).EQ.0) THEN
	 PRINT *,'FBTTOMDSGET - error reading raxb'
	 STOP
	ENDIF

	MDSSTATUS = MDSVALUE(
     1	'fix_roprand(f_float(\fbt:zax2),0.)'//CHAR(0),
     1	DESCR(IDTYPE_LONG,NEQ,0),
     1	DESCR(IDTYPE_FLOAT,zaxb,nruns,0),0,MDSLENGTH)
	IF (MOD(MDSSTATUS,2).EQ.0) THEN
	 PRINT *,'FBTTOMDSGET - error reading zaxb'
	 STOP
	ENDIF

	MDSSTATUS = MDSVALUE(
     1	'fix_roprand(f_float(\fbt:rze),0.)'//CHAR(0),
     1	DESCR(IDTYPE_LONG,NEQ,0),
     1	DESCR(IDTYPE_FLOAT,rze,nruns,0),0,MDSLENGTH)
	IF (MOD(MDSSTATUS,2).EQ.0) THEN
	 PRINT *,'FBTTOMDSGET - error reading rze'
	 STOP
	ENDIF

	END

	SUBROUTINE FBTTOMDSGETVAR(SHOT,NEQ)
	INTEGER SHOT NEQ
        include 'fbtmgams.inc'
	INCLUDE 'mga.inc'
	INCLUDE 'mdslib.inc'
	INTEGER MDSSTATUS MDSLENGTH

	! Reads gcurr_t(ngroup), bee_t(nprob), flux_t(nloop)

	MDSSTATUS = MDSVALUE(
     1	'fix_roprand(f_float(\fbt:gcurr[*,$1-1]),0.)'//CHAR(0),
     1	DESCR(IDTYPE_LONG,NEQ,0),
     1	DESCR(IDTYPE_FLOAT,gcurr_t,ngroup,0),0,MDSLENGTH)
	IF (MOD(MDSSTATUS,2).EQ.0) THEN
	 PRINT *,'FBTGET - error reading gcurr'
	 STOP
	ENDIF

	MDSSTATUS = MDSVALUE(
     1	'fix_roprand(f_float(\fbt:bee[*,$1-1]),0.)'//CHAR(0),
     1	DESCR(IDTYPE_LONG,NEQ,0),
     1	DESCR(IDTYPE_FLOAT,bee_t,nprob,0),0,MDSLENGTH)
	IF (MOD(MDSSTATUS,2).EQ.0) THEN
	 PRINT *,'FBTGET - error reading bee'
	 STOP
	ENDIF

	MDSSTATUS = MDSVALUE(
     1	'fix_roprand(f_float(\fbt:flux[*,$1-1]),0.)'//CHAR(0),
     1	DESCR(IDTYPE_LONG,NEQ,0),
     1	DESCR(IDTYPE_FLOAT,flux_t,nloop,0),0,MDSLENGTH)
	IF (MOD(MDSSTATUS,2).EQ.0) THEN
	 PRINT *,'FBTGET - error reading flux'
	 STOP
	ENDIF

	END
