Initialization and memory allocation. Construct the set of primitive
    equilibrium data, given a plasma equilibrium in terms of
    the poloidal flux [Wb/Rad], the pressure [Tesla^2], the covariant
    toroidal field profile g [T*m], the safety factor profile q and a
    set of ns nested flux surfaces (x, z) with nt1 poloidal points.
   
    Under some circumstances, the input data
   
    ier: Error flag (=0 is ok)
character*(*), intent(in) :: label
integer, intent(inout) :: nt1, ns
real(i2mex_r8), intent(inout) :: t(nt1)
real(i2mex_r8), intent(inout) :: psi(ns), p(ns), g(ns), q(ns)
real(i2mex_r8), intent(inout) :: x(nt1, ns), z(nt1, ns)
integer, intent(out) :: ier