c   mrmp   = max # of radial mesh points
c   mamp   = max # of axial mesh points
c   mcoi   = max # of wires
c   mcog   = max # of coil groups with unknown currents
c   melli  = max # of entries in tables of elliptic integrals
c   mcos   = max # of elements in polygonal representation of coils
c   mebp   = max # of exact boundary points
c   mbro   = max # of points with prescribed zero radial field
c   mbzo   = max # of points with prescribed zero axial field
c   mabp   = max # of approximate boundary points
c   mfour  = max # of fourier terms in analytic plasma boundary
c   mbeep  = max # of b-probes
c   mflup  = max # of flux loops
c   mpsis  = max # of psi surfaces
c   mequi  = max # of equilibria per evolution
c   minsi  = max # of coils inside the computational grid
c   mxpts  = max # of x-points
c
      parameter(mrmp=31,mamp=65)
      parameter(mcoi=310,minsi=1)
      parameter(melli=4000,mcos=400)
      parameter(mfour=10)
      parameter(mbeep=50,mflup=50)
      parameter(mpsis=50)
c       Increased mequi from 21 to 40 (SC, 30/01/03)
c       Increased mequi from 40 to 101 (SC, 22/03/10)
      parameter(mequi=101)
      parameter(mxpts=20)
c
      parameter(max1=2*mcog+2,max2=2*mcog+3)
      parameter(mhx1=mcog+1,mhx2=mcog+2)
      parameter(mfou2=2*mfour)
      parameter(mbou=2*mrmp+2*mamp)
      parameter(mcoi1=mcoi+1)
      parameter(mtmp=mrmp*mamp)
      parameter(mpsea=mbou+mebp+mabp+1)
c
      common/com1/
     1 aaa,ax(max1,max2),aks(melli),acpsi(mrmp),aspsi(mrmp),
     2 ajpest2(mpsis),alzero,albou(mfou2),area,
     3 bebou(mfou2),bzeru,
     4 bbb,berx(mbro,mebp),bezx(mbzo,mebp),berp(mbro),bezp(mbzo),
     5 bere(mbro),beze(mbzo),bcpsi(mrmp),bsips(mrmp),bsops(mrmp),
     6 bee(mbeep),betat,betai,cosma(mfour,mbou),
     7 cstrk(mcoi),cvf(mcoi),cns,ce(mrmp),
     8 cw(mrmp),chm,cx(max1),cy(max1),cvx(mcoi,mcog),
     9 coei(mcos),curr(mcoi),cvx1(mcoi),cvx2(mcoi)
      common/com2/
     1 cvx3(mcoi),cvx4(mcoi),cvx5(mcoi),
     2 cvx6(mcoi),cvx7(mcoi),cvx8(mcoi),cvx9(mcoi),
     3 cvx10(mcoi),cvx11(mcoi),cvx12(mcoi),cvx13(mcoi),
     4 cvx14(mcoi),cvx15(mcoi),cvx16(mcoi),
     5 cappa95,cappab,
     6 cappa,dr,dz,dsh(mrmp,mamp),dsm,daks,diamag,
     7 diss(mcoi),delpsi,delta95,deltab,delt95u,delt95l,
     8 delta,deltbu,deltbl,ddd(mcog),eee(mcog),ell,
     9 emm,ei(melli),ellp1,ellp2,emmp3,ellipt,eli
      common/com3/
     1 emmp1,emmp2,eig(melli),eih(melli),flux(mflup),
     2 filfac,gg(mtmp),gcurr(mcog),hvf(mcoi),
     3 hx(mhx1,mhx2),hlamd,iplot,
     4 ipps,ilim,icur,ides,itcvpl,ipp1,ipp2,
     5 inside(mcoi),
     6 icvx,icvy,ishot,
     7 isone,istwo,iacx,icon,ilro,ismax,icvz,jze,jc,
     8 iallf,isvf(mcog),isvl(mcog),itype(mcog),
     9 jmax,jl(mbou),jsad(mcoi),ksad(mcoi),kmax,km,kc
      common/com4/
     1 kgroup(mcoi),kl(mbou),lee,lmax,lilia,ngroup,
     2 nrun,nprob,
     3 nfilae,nfilaf,ninsid,nloop,oell,oellp1,oellp2,oemm,
     4 oemmp1,oemmp2,prpest0(mpsis),pppest0(mpsis),pi,
     5 psint(minsi,mrmp,mamp),psp(mpsea),psisa(mcoi),
     6 pst(mbou),pse(mpsea),psi(mrmp,mamp),psn(mrmp,mamp),
     7 psisad,psea(mpsea,mebp),psax,placur,
     8 pmax,ppbe1,ppbe2,psss(mpsis),
     9 qq(mpsis)
      common/com5/
     1 rvf(mcoi),r(mrmp),rl(mpsea),rze,rsi(mpsis),
     2 rhocu,rhovv,rliaa(mabp),
     3 rso(mpsis),rvfsq(mcoi),rjsq(mrmp),ratio,rss(mbou),
     4 rlsq(mpsea),rbee(mbeep),rflu(mflup),rbou(mbou),rxp(mcoi),
     5 rmajo,rmino,rfit(mbou),
     7 rlim(mebp),rlia(mabp),rax,rax2,
     8 rboug(mbou),zboug(mbou),zliaa(mabp),
     9 sinma(mfour,mbou),size,shvsec,strk(mcoi),two(mamp),
     a tvf(mcoi)
      common/com6/
     1 ttfac,ttbe,thbee(mbeep),torflu,volum,
     2 um,ux(mcoi),weit(mabp),
     3 wvf(mcoi),xor,xsv2(mpsis),xpass(mbou),yor,
     4 zvf(mcoi),z(mamp),zl(mpsea),zax,zax2,zlim(mebp),zss(mbou),
     5 zze,zmajo,zpass(mbou),zbou(mbou),zxp(mcoi),
     6 zlia(mabp),zbee(mbeep),zflu(mflup)
      common/comliu/
     1 area_mg(mequi),beta_pol(mequi),beta_tor(mequi),delta_95(mequi),
     1 delta_95_bot(mequi),delta_95_top(mequi),delta_edge(mequi),
     1 delta_ed_bot(mequi),delta_ed_top(mequi),diamag_mg(mequi),
     1 indx_act_xp(mequi),indx_sec_xp(mequi),i_p(mequi),
     1 j_tor(mrmp,mamp,mequi),kappa_95(mequi),kappa_edge(mequi),
     1 kappa_zero(mequi),lambda(mequi),l_i(mequi),
     1 npts_contour(mequi),n_act_xpts(mequi),
     1 n_xpts(mequi),pressure(mrmp,mamp,mequi),psi_axis(mequi),
     1 pprime_psi(mpsis,mequi),ttprime_psi(mpsis,mequi),
     1 psi_mg(mrmp,mamp,mequi),psi_values(mpsis,mequi),
     1 psi_xpts(mxpts,mequi),p_axis(mequi),q_95(mequi),q_edge(mequi),
     1 q_psi(mpsis,mequi),q_zero(mequi),r_axis(mequi),
     1 r_contour(mbou,mequi),r_max_psi(mpsis,mequi),
     1 r_min_psi(mpsis,mequi),r_psi(mrmp),r_xpts(mxpts,mequi),
     1 tor_flux(mequi),volume(mequi),z_axis(mequi),
     1 z_contour(mbou,mequi),z_psi(mamp),z_xpts(mxpts,mequi),
c      FBT branch extra
     1 placamp_t(mequi),rze_t(mequi),zze_t(mequi),rax_t(mequi),
     1 zax_t(mequi),rax2_t(mequi),zax2_t(mequi),shvsec_t(mequi),
     1 gcurr_t(mcog*mequi),bee_t(mbeep*mequi),flux_t(mflup*mequi)
      real
     1 i_p,j_tor,kappa_95,kappa_edge,kappa_zero,lambda,l_i
