JSOLVER V1.35dynamic
====================

JSOLVER is a fixed-boundary, toroidal MHD equilibrium code, which
solves the Grad-Shafranov equation for the poloidal flux using
a finite difference scheme. JSOLVER applies an iterative metric 
method to simultaneously solve for the plasma equilibrium and the
magnetic in flux in equal-arc coordinates.

JSOLVER requires as input the plasma-vacuum boundary plus 
two radial profiles (the pressure or its derivative and the flux 
averaged parallel current density). The code can be run 
in two ways; the plasma-vacuum boundary and the profiles
are supplied a set of data points or can be specified 
in the "inequ" file. The latter option corresponds to the 
'old' way of running the code. JSOLVER can also read the output
file "eqdsa.cdf" by setting ifunc2=4 in "inequ". 
The "eqdsa.cdf" file can be produced from the binary output file
"eqdska" of the TSC code using the tsc2cdf tool (also supplied in this 
distribution). 

The ouput profiles and metric can be saved in the NetCDF file
eqdsk.cdf. This file contains all (as well as some redundant)
information about the equilibrium for postprecessing. Global 
variables can also be accessed through GET calls, a perhaps 
more convenient way to extract data from the code. Output data 
include the pressure, the safety factor, the covariant toroidal 
B function, the mesh coordinates (R,Z) as function of the flux 
and poloidal angle, and the Jacobian at the mesh nodes and 
in between. 


Date: September 24 1999

o KEYWORDS

Equilibrium, MHD, toroidal geometry, flux, parallel current.

o INSTALLATION

See INSTALL file provided with the distribution. 

o LANGUAGE

f90 and some C

o PRECISION

8-byte reals and default (4 or 8 byte) integers.

o PREREQUISITE

blas, lapack, netcdf, ezcdf (an interface to netcdf routines) and pspline 
libraries are required.

o PLATFORM/OS

alpha/OSF1, Solaris 2, Linux (f90/f95 by NAG), IRIX 6.x, Cray/Unicos

o AUTHORS

Steve Jardin, Jon Menard, Chuck Kessel and Don Monticello.
This portable and dynamically allocatable version by Alex Pletzer.

o CONTACT

A. Pletzer (pletzer@pppl.gov)

o USAGE

  As described above, There are two ways of calling JSOLVER.

  a) Input from "inequ" file


      CALL jsoInequ(ierror)
      IF(ierror.NE.0) STOP 'JSOLVER FAILED'


  b) Array specification of geometry and profiles

  A call follows several steps:

 * initialization and memory allocation

       CALL jsoinit(mn,ndoub,isym)


 * set input parameters (optional)

       CALL jsosetX(X) ! X can vary.
                       ! Check set.f file for a complete list

 * run JSOLVER

       CALL jsoexec(
     & facimp, 
     & gzeros,
     & kmax, npsit,
     & pprime_s, ajb,  
     & xbnd, zbnd,
     & psibar0,
     & x, z,
     & ierror)

 * extract data (optional)

       CALL jsogetX(X) ! X can vary. 
		       ! Check get.f for a list.
                       ! You may want to write your
                       ! additional access routines.

 * free memory

       CALL jsofree


o INPUT PARAMATERS

 * ndoub (>=0) = # of times the mesh is doubled
 *
 * mn (>0)     Determines the grid resolution. The number
 *             of theta and psi points is 2^mn + 1.
 *
 * isym        = 0 if up-down asymmetric, 1 otherwise
 *
 * facimp      = tolerance (if negative then facimp is 
 *               divided by 5 after each mesh doubling).
 *
 * kmax        Size of plasma-vacuum boundary point
 *             arrays.
 *
 * npsit       Size of radial profile arrays.
 *
 * gzeros      B toroidal on axis times major radius
 *
 * pprime_s    Pressure derivative  p'*psimin/mu0
 *             (psimin is the total enclosed poloidal
 *             flux/(2 pi). Note the mu0=4*pi*1e-7
 *             factor.
 *
 * ajb         = <J . B>/<B . grad Phi>
 *
 * (xbnd,zbnd) Plasma boundary points. Points must be
 *             ordered but can go either clock or 
 *             counter-clockwise. They must cover the
 *             entire 2*pi range, even when isym=1.
 *             That is xbnd(1) = xbnd(kmax+1) and 
 *             zbnd(1) = zbnd(kmax+1). Although jsolver 
 *             also runs for up-down asymmetric cases it
 *             is best to start the (xbnd,zbnd) on the
 *             mid-plane.
 *


o INPUT/OUTPUT PARAMETERS

 * These are normally output data but can also be used in
 * conjuction with ndoub < 0 to provide a warm start 
 * capability to improve convergence.
 *
 * (x,z)       Grid points stored as 1-d arrays, 
 *             iterating over theta and then psi. If
 *             nthep represents the number of theta
 *             points and npsi the number of psi 
 *             surfaces, then
 *             x( (i-1)*nthep+1:i*nthep ) 
 *             gives the i-th flux surface with 
 *             x((i-1)*nthep+1)=x(i*nthep)
 *             as a periodic condition. Note that (x,z)
 *             cover the 2*pi range even when isym=1.
 *             Thus the input and output data for the
 *             symmetric and asymmetric case are the
 *             identical except for the isym parameter.
 *
 * psibar0     = abs(total poloidal flux/(2 pi))
 *


o INPUT FILE

 * inequ

	This is the old input file. Only useful when calling
        jsoInequ.

o OUPUT FILES

 * eqdsk.cdf 

	This file is similar to the old fort.17 except that it is in
	NetCDF format. It contains additional character strings
	(comment, user, pwd, arch, code, date) to keep track of 
        architecture and user information. Use the command ncdump 
        to check eqdsk.cdf's content

 * jso.scalars

 * jso.profiles

 * jso.outequ or standard output if iverbose = 1

 * dbequs and dbequp. Database files: can be turned off using
   dbwrt = 0.0
       
       
o BUGS/PROBLEMS/LIMITATIONS

 * Multiple runs. In some cases involving multiple calls of jsoInequ 
   and jsoExec, the results appeared to be dependent on the order
   of the calls. In particular, the convergence of warm-starts were 
   negatively affected by calling jsoInequ first. Thus there may 
   still be some initialization bugs.

 * mn < 4. Symptom: crash. Reason: unknown. 

 * large mn ~ 6-7. Symptom:
    i,j,ajb,aj(i,j) =   17  4 -0.3684E-01 -0.6657E-01. This
   problem seems to often occur near the magnetic axis. Try
   ipsi = 1 (mesh in psi).

 * residual zmag for symmetric equilibria when isym=0. The problem 
   is resolved by increasing kmax to ~2^mn, but is excarbated
   at higher kmax >> 2^mn. 

 * large beta. JSOLVER seems to be pretty robust. Difficult cases can be
   overcome by using the warm-start capability of JSOLVER and gradually
   increasing the pressure. Resolution also helps. But when all this fails
   then jsolver crashes.

 * Warning: Floating underflow occurred on linux. Reason unknown. It
   does not appear to affect the proper execution.

o ADDITIONAL DOCUMENTATION

"Brief Description of the J-Solver Equilibrium Code" by J. Menard (1996).

o REFERENCES

DeLucia, J., Jardin, S. C., Todd, A. M. M., J. Comput. Phys. 37 183 (1980)


o GRAPHICS

  Routines calling NCAR libraries have been turned off. To re-activate NCAR
  calls type (in Bourne shell)

  for f in `ls *.f`; do
	echo $f
	./add_graphics.pl $f > foo; mv foo $f
  done

o TEST PROGRAM AND REFERENCE OUTPUT

 *
 * JSOLVER test drive
 * ==================
 *
 * A. Pletzer March 99 (pletzer@pppl.gov)
 *
 * INPUT:
 *
 * ndoub (>=0) = # of times the mesh is doubled
 *
 * mn (>0)     Determines the grid resolution. The number
 *             of theta and psi points is 2^mn + 1.
 *
 * isym        = 0 if up-down asymmetric, 1 otherwise
 *
 * facimp      = tolerance (if negative then facimp is 
 *               divided by 5 after each mesh doubling).
 *
 * kmax        Size of plasma-vacuum boundary point
 *             arrays.
 *
 * npsit       Size of radial profile arrays.
 *
 * gzeros      B toroidal on axis times major radius
 *
 * pprime_s    Pressure derivative  p'*psimin/mu0
 *             (psimin is the total enclosed poloidal
 *             flux/(2 pi). Note the mu0=4*pi*1e-7
 *             factor.
 *
 * ajb         = <J . B>/<B . grad Phi>
 *
 * (xbnd,zbnd) Plasma boundary points. Points must be
 *             ordered but can go either clock or 
 *             counter-clockwise. They must cover the
 *             entire 2*pi range, even when isym=1.
 *             That is xbnd(1) = xbnd(kmax+1) and 
 *             zbnd(1) = zbnd(kmax+1). Although jsolver 
 *             also runs for up-down asymmetric cases it
 *             is best to start the (xbnd,zbnd) on the
 *             mid-plane.
 *
 * IN/OUT:
 *
 * These are normally output data but can also be used in
 * conjuction with ndoub < 0 to provide a warm start 
 * capability to improve convergence.
 *
 * (x,z)       Grid points stored as 1-d arrays, 
 *             iterating over theta and then psi. If
 *             nthep represents the number of theta
 *             points and npsi the number of psi 
 *             surfaces, then
 *             x( (i-1)*nthep+1:i*nthep ) 
 *             gives the i-th flux surface with 
 *             x((i-1)*nthep+1)=x(i*nthep)
 *             as a periodic condition. Note that (x,z)
 *             cover the 2*pi range even when isym=1.
 *             Thus the input and output data for the
 *             symmetric and asymmetric case are the
 *             identical except for the isym parameter.
 *
 * psibar0     = abs(total poloidal flux/(2 pi))
 *
 *
 *
 * 1: INPUT PROFILES AND GEOMETRY SPECIFIED BY ARRAYS
 * --------------------------------------------------
 *
 * 1.1 GEOMETRY AND MAGNETIC FIELD STRENGTH
 *
  
 Plasma-vacuum boundary points
  
        xbnd           zbnd
     1.50000000     0.00000000
     1.33712813     0.64999998
     0.96457090     1.12583298
     0.59687811     1.29999995
     0.35318248     1.12583298
     0.23373685     0.64999998
     0.20000005     0.00000000
     0.23373685    -0.64999998
     0.35318248    -1.12583298
     0.59687811    -1.29999995
     0.96457090    -1.12583298
     1.33712813    -0.64999998
     1.50000000     0.00000000
 *
 * 1.2 INPUT PROFILES pprime_s AND ajb
 *
  
 Input profiles
  
 p-prime*psimin   <j.B>/(g<1/R^2>)
     0.00000000     0.45454544
    -0.00100000     0.53517137
    -0.00200000     0.62307690
    -0.00300000     0.71090906
    -0.00400000     0.78545452
    -0.00500000     0.82923830
    -0.00600000     0.82727271
    -0.00700000     0.77616707
    -0.00800000     0.68727273
    -0.00900000     0.58000002
    -0.01000000     0.47202799
    -0.01100000     0.37421760
    -0.01200000     0.29090911
    -0.01300000     0.22235296
    -0.01400000     0.16690910
    -0.01500000     0.12237763
    -0.01600000     0.08663102
    -0.01700000     0.05784598
    -0.01800000     0.03454546
    -0.01900000     0.01556541
    -0.02000000     0.00000000
 *
 * 1.3 PRECISON CONTROL
 *
 
 Mesh will doubled  1 times
 Starting with 2^5 (+ 1) =  10 (+ 1) radial and poloidal nodes
 Initial max error       -0.10E-05
 
 *
 * 1.4 UP-DOWN (A-)SYMMETRY
 *
 
 Symmetry is                       0
 
 *
 * 1.5 INITIALIZATION AND MEMORY ALLOCATION
 *
 *
 *
 * 1.7 SET PARAMETERS (OPTIONAL)
 *
 *
 * 1.8 ALLOCATE GRID SPACE
 *
 Number of theta points           65
 Number of psi surfaces           65
 *
 * 1.9 EXECUTE jsolver
 *

 CPU time used so far:      0.0 secs. Since last checkpoint:      0.0 secs

        J-Solver - Version 1.35dynamic              11:49:17     03/17/99
 pressure and its derivative scaled by  1.00000E+00
        ni     error     xmag          psimin        g(1)-g0    aasaw      zmag
    0   11  0.15E-03    0.8499 -0.5349094E+00  0.6012565E-01  0.00E+00 -0.11E-01
   10   11  0.62E-04    1.0058 -0.7273242E-01  0.6131947E-01  0.00E+00  0.17E-01
   20   11  0.15E-04    0.9670 -0.7533353E-01  0.6437378E-01  0.00E+00  0.20E-01
   30   11  0.42E-05    0.9628 -0.7574428E-01  0.6461869E-01  0.00E+00  0.17E-01
   40   11  0.15E-05    0.9626 -0.7578672E-01  0.6464858E-01  0.00E+00  0.17E-01
 *** zones doubled, new nthe,npsi=  64  65 ***
                  facimp,nimax =  -2.0000E-07   11
   50   11  0.13E-05    0.9612 -0.7545541E-01  0.6435818E-01  0.00E+00  0.98E-02
   60   11  0.26E-06    0.9607 -0.7546707E-01  0.6437384E-01  0.00E+00  0.82E-02


   J-Solver Fixed Boundary - Flux Coordinate Equilibrium - V1.35dynamic         


   Ip(MA) =   0.7629   Bt(T) =   0.5001
   R(m)   =   0.8499   a(m)  =   0.6499   k =   2.0002   d =   0.3950
   ku     =   2.0154   kl    =   1.9849  du =   0.3951  dl =   0.3948
   b =   0.0000   dz =   0.0000   vol(m**3) =   12.8345   Raxis(m) =   0.9607
 
   q(0)   =   2.6588   q(a) =  23.2552   q* =   4.0726   q*/q(0) =   1.5317
   q*(dl) =  14.1053          q*(dl)/q(0)   =   5.3051   qmin    =   1.9146
 
   betap(1)  =   0.5495   betap(2) =   0.3980   beta(tv) =   3.2197
   beta(v)   =   3.0353   beta     =   4.8436   beta*    =   5.5243
   C(Troyon) =   1.2930   betan    =   2.0634   betan*   =   2.3534
 
   li(1)  =   0.9858   li(3) =   0.7512   Itf/Ip =   2.7855
 
   Ip(tot)  =   0.7665   Ip(<j.B>)   =   0.7508   Ip(Jperp)   =   0.0241
   Ip(bs)   =   0.0989   Ip(bs-over) =   0.0056   Ip(bs-seed) =   0.6576
   Ip(lhcd) =   0.0000   f(bs)       =   0.1290   f(grad-p)   =   0.1495
 
   p(0)/p(ave)     =   1.6286   t(0)/t(ave) =   2.1565  n(0)/n(ave) =   0.6509
   T0(keV)         =   3.0000   zeff        =   2.0000  zave        =   1.2500
   n0(10**20/m**3) =   0.1658                   n(bar)/n(Greenwald) =   0.2245
 
   vloop(axial)  =   0.0000   vloop(Poynting) =   0.0000
   vloop(global) =   0.0000   j(0)/jave       =   0.0000
 
   alpha loss(prompt)       =   0.0000   alpha loss(jsoripple) =   0.0000
   outboard midplane jsoripple =   0.0000

 CPU time used so far:     13.5 secs. Since last checkpoint:     13.5 secs

 Return status            0  (0 is ok)
 
 Global quantities are saved in jso.scalars
 Profiles are saved in jso.profiles
 
 *
 * 1.10 ACCESS INTERNAL DATA THROUGH get CALLS
 *
 
 Input vs Ouput p-prime profiles

   #     input      ouput      error
   1   0.000000   0.000000  0.000E+00
   2  -0.001000  -0.001000 -0.539E-07
   3  -0.002000  -0.002000 -0.204E-07
   4  -0.003000  -0.003000  0.289E-07
   5  -0.004000  -0.004000  0.849E-07
   6  -0.005000  -0.005000  0.143E-06
   7  -0.006000  -0.006000  0.200E-06
   8  -0.007000  -0.007000  0.252E-06
   9  -0.008000  -0.008000  0.297E-06
  10  -0.009000  -0.009000  0.334E-06
  11  -0.010000  -0.010000  0.362E-06
  12  -0.011000  -0.011000  0.383E-06
  13  -0.012000  -0.012000  0.397E-06
  14  -0.013000  -0.013000  0.405E-06
  15  -0.014000  -0.014000  0.409E-06
  16  -0.015000  -0.015000  0.409E-06
  17  -0.016000  -0.016000  0.406E-06
  18  -0.017000  -0.017000  0.402E-06
  19  -0.018000  -0.018000  0.396E-06
  20  -0.019000  -0.019000  0.391E-06
  21  -0.020000  -0.020000  0.410E-06
 *
 * 1.11 INTERPOLATION OF 2-d ARRAYS USING SPLINES
 *
 New mesh is dumped into an ASCII file mesh.mtv
 To plot new mesh type "plotmtv mesh.mtv" (if 
 you have plotmtv installed).
 *
 * 1.11 INTERPOLATION OF 2-d ARRAYS USING SPLINES
 *
 *
 * 1.12 FREE MEMORY
 *
 *
 *
 * 2: WARM START TEST
 *
 * JSOLVER has a warm-start capability. The output of
 * a previous calculation can be used as initial guess
 * to accelerate convergence by setting ndoub = -1.
 *
 *
 * 2.1 WITH SAME INPUT
 *
 * JSOLVER bails out after providing an accurate solution
 * as initial guess.
 *

 CPU time used so far:     14.2 secs. Since last checkpoint:      0.7 secs

        J-Solver - Version 1.35dynamic              11:49:31     03/17/99
 pressure and its derivative scaled by  1.00000E+00
        ni     error     xmag          psimin        g(1)-g0    aasaw      zmag
   J-Solver Fixed Boundary - Flux Coordinate Equilibrium - V1.35dynamic         


   Ip(MA) =   0.7629   Bt(T) =   0.5002
   R(m)   =   0.8496   a(m)  =   0.6496   k =   1.9992   d =   0.3852
   ku     =   1.9658   kl    =   2.0326  du =   0.3910  dl =   0.3795
   b =   0.0000   dz =   0.0000   vol(m**3) =   12.8345   Raxis(m) =   0.9607
 
   q(0)   =   2.6584   q(a) =  22.8959   q* =   4.0684   q*/q(0) =   1.5304
   q*(dl) =  14.1045          q*(dl)/q(0)   =   5.3056   qmin    =   1.9148
 
   betap(1)  =   0.5485   betap(2) =   0.3981   beta(tv) =   3.2198
   beta(v)   =   3.0354   beta     =   4.8407   beta*    =   5.5208
   C(Troyon) =   1.2929   betan    =   2.0618   betan*   =   2.3515
 
   li(1)  =   0.9857   li(3) =   0.7514   Itf/Ip =   2.7853
 
   Ip(tot)  =   0.7666   Ip(<j.B>)   =   0.7509   Ip(Jperp)   =   0.0241
   Ip(bs)   =   0.0989   Ip(bs-over) =   0.0056   Ip(bs-seed) =   0.6576
   Ip(lhcd) =   0.0000   f(bs)       =   0.1290   f(grad-p)   =   0.1495
 
   p(0)/p(ave)     =   1.6285   t(0)/t(ave) =   2.1565  n(0)/n(ave) =   0.6509
   T0(keV)         =   3.0000   zeff        =   2.0000  zave        =   1.2500
   n0(10**20/m**3) =   0.1658                   n(bar)/n(Greenwald) =   0.2243
 
   vloop(axial)  =   0.0000   vloop(Poynting) =   0.0000
   vloop(global) =   0.0000   j(0)/jave       =   0.0000
 
   alpha loss(prompt)       =   0.0000   alpha loss(jsoripple) =   0.0000
   outboard midplane jsoripple =   0.0000

 CPU time used so far:     20.3 secs. Since last checkpoint:      6.1 secs

 *
 * 2.2 PROGRESSIVELY INCREASE THE PRESSURE AND RUN AGAIN
 *

 CPU time used so far:     20.5 secs. Since last checkpoint:      0.3 secs

        J-Solver - Version 1.35dynamic              11:49:37     03/17/99
 pressure and its derivative scaled by  1.00000E+00
        ni     error     xmag          psimin        g(1)-g0    aasaw      zmag


   J-Solver Fixed Boundary - Flux Coordinate Equilibrium - V1.35dynamic         


   Ip(MA) =   0.7642   Bt(T) =   0.5002
   R(m)   =   0.8496   a(m)  =   0.6496   k =   1.9992   d =   0.3852
   ku     =   1.9658   kl    =   2.0326  du =   0.3910  dl =   0.3795
   b =   0.0000   dz =   0.0000   vol(m**3) =   12.8345   Raxis(m) =   0.9616
 
   q(0)   =   2.6409   q(a) =  22.9004   q* =   4.0618   q*/q(0) =   1.5380
   q*(dl) =  14.0815          q*(dl)/q(0)   =   5.3320   qmin    =   1.9102
 
   betap(1)  =   0.5879   betap(2) =   0.4267   beta(tv) =   3.4676
   beta(v)   =   3.2683   beta     =   5.2051   beta*    =   5.9584
   C(Troyon) =   1.3898   betan    =   2.2134   betan*   =   2.5338
 
   li(1)  =   0.9845   li(3) =   0.7504   Itf/Ip =   2.7808
 
   Ip(tot)  =   0.7677   Ip(<j.B>)   =   0.7502   Ip(Jperp)   =   0.0265
   Ip(bs)   =   0.1084   Ip(bs-over) =   0.0069   Ip(bs-seed) =   0.6488
   Ip(lhcd) =   0.0000   f(bs)       =   0.1412   f(grad-p)   =   0.1640
 
   p(0)/p(ave)     =   1.6656   t(0)/t(ave) =   2.1562  n(0)/n(ave) =   0.6723
   T0(keV)         =   3.0000   zeff        =   2.0000  zave        =   1.2500
   n0(10**20/m**3) =   0.1824                   n(bar)/n(Greenwald) =   0.2400
 
   vloop(axial)  =   0.0000   vloop(Poynting) =   0.0000
   vloop(global) =   0.0000   j(0)/jave       =   0.0000
 
   alpha loss(prompt)       =   0.0000   alpha loss(jsoripple) =   0.0000
   outboard midplane jsoripple =   0.0000

 CPU time used so far:     26.6 secs. Since last checkpoint:      6.1 secs

 *
 * 3: JSOLVER ALSO ACCEPTS inequ FILE AS INPUT
 *
 * JSOLVER is backward compatible with the old inequ file.
 * To read TSC's output in NetCDF format set ifunc2=4 in 
 * inequ. This reads a file eqdsa.cdf which has been
 * produced using the tsc2cdf, a program to convert
 * the binary eqdska file to netcdf format. Be informed
 * that there are currently two formats for eqdska, one 
 * using INTEGER*8 and the other default INTEGER's.
 * The tsc2cdf program was written assuming INTEGER*8.
 *
 * A single routine call performing the memory
 * allocation, the equilibrium computation and freeing
 * the memory suffices in this case.
 *

 CPU time used so far:     26.9 secs. Since last checkpoint:      0.2 secs

        J-Solver - Version 1.35dynamic              11:49:43     03/17/99
example1  J-Solver equilibrium code - Version 1.35                              
ctype00   .irst1    .irst2    .ndoub    .ipsi     .ifunc2   .ifile    .numit    
  0  0.000E+00  0.000E+00  0.000E+00  0.100E+01  0.400E+01  0.000E+00  0.200E+04
ctype01   .nthe     .npsi     .isym     .ishp     .iplot    .iboot    .iczero   
  1  0.600E+01  0.600E+01  0.100E+01  0.000E+00  0.000E+00  0.100E+01  0.000E+00
ctype02   .p0       .ap1      .bp1      .ap2      .bp2      .pet1     .pet2     
  2  0.615E-01  0.225E+01  0.100E+01  0.100E+01  0.100E+01  0.100E+01  0.000E+00
ctype03   .czero    .ac1      .bc1      .ac2      .bc2      .cet1     .cet2     
  3  0.110E+01  0.900E+00  0.300E+01  0.100E+01  0.100E+01  0.100E+01  0.000E+00
ctype04   .epsu     .epsl     .duguess  .dlguess  .bguess   .dzguess  .zzero    
  4  0.160E+01  0.160E+01  0.350E+00  0.350E+00  0.000E+00  0.000E+00  0.000E+00
ctype05   .xzero    .aguess   .btor0    .qsaw     .cedge    .zave     .zeff     
  5  0.800E+00  0.550E+00  0.500E+00  0.000E+00  0.000E+00  0.125E+01  0.200E+01
ctype06   .ilhcd    .a1cd     .alh      .dlh      .a1lh     .a2lh               
  6  0.000E+00  0.400E+01  0.250E+00  0.200E+00  0.100E+01  0.100E+01  0.000E+00
ctype07   .facimp   .nimax    .itooff   .jorgn    .tsaw     .esaw     .rsaw     
  7  0.500E-05  0.500E+02  0.400E+02  0.100E+02  0.500E-01  0.250E-01  0.250E-01
ctype08   .tsf      .phi2     .sf       .nspec    .scalep   .dbwrt              
  8  0.500E+00  0.250E+00  0.100E+00  0.100E+01  0.100E+01  0.100E+01  0.000E+00
ctype09   .tzero    .at1      .bt1      .at2      .bt2      .tet1     .tet2     
  9  0.300E+01  0.100E+01  0.100E+01  0.200E+01  0.200E+01  0.100E+01  0.000E+00
ctype10   .dzero    .ad1      .bd1      .ad2      .bd2      .det1     .det2     
 10  0.500E+00  0.500E+00  0.100E+02  0.100E+01  0.100E+01  0.100E+01  0.000E+00
ctype11   .irip     .ntfcoil  .rtfcoil  .fdt      .npitch                       
 11  0.000E+00  0.160E+02  0.125E+02  0.100E+01  0.100E+03  0.000E+00  0.000E+00
ctype12   .xmass1   .xmass2   .xmass3   .xmass4   .xmass5   .xmass6   .xmass7   
 12  0.310E-30  0.334E-26  0.200E-25  0.000E+00  0.000E+00  0.000E+00  0.000E+00
ctype13   .xchg1    .xchg2    .xchg3    .xchg4    .xchg5    .xchg6    .xchg7    
 13 -0.160E-18  0.160E-18  0.960E-18  0.000E+00  0.000E+00  0.000E+00  0.000E+00
ctype14   .tzer1    .tzer2    .tzer3    .tzer4    .tzer5    .tzer6    .tzer7    
 14  0.300E+01  0.000E+00  0.000E+00  0.000E+00  0.000E+00  0.000E+00  0.000E+00
ctype15   .dzer1    .dzer2    .dzer3    .dzer4    .dzer5    .dzer6    .dzer7    
 15  0.500E+00  0.000E+00  0.000E+00  0.000E+00  0.000E+00  0.000E+00  0.000E+00
ctype16   .ppnaa    .ppnsa    .ppnac    .ppnsc    .ppnae    .ppnse    .pppsnc   
 16  0.100E+01 -0.154E+01  0.233E+00 -0.890E+00  0.000E+00 -0.350E+00  0.669E+00
ctype17   .cpnaa    .cpnsa    .cpnac    .cpnsc    .cpnae    .cpnse    .cppsnc   
 17  0.100E+01 -0.100E+00  0.850E+00 -0.720E+00  0.000E+00 -0.285E+01  0.500E+00
ctype18   .tpnaa    .tpnsa    .tpnac    .tpnsc    .tpnae    .tpnse    .tppsnc   
 18  0.100E+01 -0.100E+01  0.500E+00 -0.100E+01  0.000E+00 -0.100E+01  0.500E+00
ctype19   .dpnaa    .dpnsa    .dpnac    .dpnsc    .dpnae    .dpnse    .dppsnc   
 19  0.100E+01  0.000E+00  0.920E+00 -0.550E+00  0.000E+00 -0.100E+01  0.320E+00
 ***Read from TSC file...ncycle,isyms,ipest,npsit,kmax=    1    1    1   21   66  ***
    times=  0.0000E+00    xaxes=  0.2914E+01    zmags=  0.0000E+00
   gzeros=  0.1199E+02     apls=  0.2500E+08    betas=  0.2800E-01
   betaps=  0.1000E+01    ali2s=  0.1000E+01    qsaws=  0.0000E+00
  psimins=  0.7762E-03  psilims=  0.6446E+00
 pressure and its derivative scaled by  1.00000E+00
        ni     error     xmag          psimin        g(1)-g0    aasaw      zmag
    0    0  0.28E-05    2.6028 -0.6569573E+00 -0.5546939E-01  0.19E-10  0.00E+00
   10    0  0.57E-06    2.8814 -0.6760527E+00 -0.4964288E-01  0.19E-10  0.00E+00
   20    0  0.14E-06    2.8978 -0.6764488E+00 -0.5114667E-01  0.19E-10  0.00E+00
   30    0  0.94E-07    2.9061 -0.6766183E+00 -0.5090337E-01  0.19E-10  0.00E+00
   40    0  0.68E-07    2.9106 -0.6771565E+00 -0.5071381E-01  0.19E-10  0.00E+00


   J-Solver Fixed Boundary - Flux Coordinate Equilibrium - V1.35dynamic         
   Problem ID example1


   Ip(MA) =   1.4778   Bt(T) =   4.6083
   R(m)   =   2.6028   a(m)  =   0.9406   k =   1.0204   d =   0.0192
   ku     =   1.0204   kl    =   1.0204  du =   0.0192  dl =   0.0192
   b =   0.0000   dz =   0.0000   vol(m**3) =   46.5578   Raxis(m) =   2.9113
 
   q(0)   =   2.6439   q(a) =   6.9903   q* =   5.4098   q*/q(0) =   2.0462
   q*(dl) =   6.3058          q*(dl)/q(0)   =   2.3851   qmin    =   1.7536
 
   betap(1)  =   0.9160   betap(2) =   0.9193   beta(tv) =   0.4007
    beta(v)   =   0.3988   beta     =   0.4173   beta*    =   0.9053
   C(Troyon) =   1.1696   betan    =   1.2239   betan*   =   2.6554
 
   li(1)  =   1.1333   li(3) =   1.1303   Itf/Ip =  40.5826
 
   Ip(tot)  =   0.3725   Ip(<j.B>)   =   1.4706   Ip(Jperp)   =  -1.0974
   Ip(bs)   =   1.1501   Ip(bs-over) =   0.4763   Ip(bs-seed) =   0.7967
   Ip(lhcd) =   0.0000   f(bs)       =   3.0879   f(grad-p)   =   0.1397
 
   p(0)/p(ave)     =  10.1945   t(0)/t(ave) =   2.3660  n(0)/n(ave) =   6.2861
   T0(keV)         =   3.0000   zeff        =   2.0000  zave        =   1.2500
   n0(10**20/m**3) =   7.9803                   n(bar)/n(Greenwald) =   2.5262
 
   vloop(axial)  =   0.0000   vloop(Poynting) =   0.0000
   vloop(global) =   0.0000   j(0)/jave       =   0.0000
 
   alpha loss(prompt)       =   0.0000   alpha loss(jsoripple) =   0.0000
   outboard midplane jsoripple =   0.0000

 CPU time used so far:     75.9 secs. Since last checkpoint:     49.1 secs

 *
 * 4: RUN DIFF WITH REFERENCE OUTPUT
 *
 
 jso.profiles comparison--the next line should be empty
                                                                          
  
 
 
 jso.scalars comparison--the next line should be empty
                                                                          
  
 
 *
 * 5: READ NETCDF FILE eqdsk.cdf
 *
 vartype for nxx is INT 
 vartype for axx is R8  
 vartype for nxy is INT 
 Equilibrium_ID 
 no eqid                                                                        
  
 comment        
 no comment                                                                     
  
 user           
 pletzer
                                                                       
  
 directory      
 /tmp_mnt/scratch3/pletzer/project/ceo/jsolver
                                 
  
 architecture   
 OSF1 jupiter.pppl.gov V4.0
                                                    
  
 date           
 Wed Mar 17 11:49:15 EST 1999
                                                  
  
 code           
 JSOLVER                                                                        
  
 js_version     
 1.35dynamic                                                                    
  
 nxx =           65          65          21          40           0
SUCCESSFUL TEST OF JSOLVER
 





 









