14 INTEGER :: istat1 = 0, istat2 = 0, istat3 = 0, istat4 = 0, &
15 istat5 = 0, istat6 = 0, istat7 = 0, istat8 = 0, &
16 istat9 = 0, istat10 = 0
18 IF (
ALLOCATED(
phip)) &
25 DEALLOCATE (
ard,
arm,
brd,
brm,
crd,
azd,
azm,
bzd,
bzm,
sm,
sp,
bmin,
bmax,stat=istat7)
27 IF (
ALLOCATED(
iotaf)) &
31 ytrian,
yshift,
ygeo,
overr,
faclam,
iotas,
phips,
chips,
pres,
vp, &
35 IF (
ALLOCATED(
gc))
then
39 IF (
ALLOCATED(
xc))
then
43 IF (istat1.ne.0 .or. istat2.ne.0 .or. istat3.ne.0 .or. &
44 istat4.ne.0 .or. istat5.ne.0 .or. istat6.ne.0 .or. &
45 istat7.ne.0 .or. istat8.ne.0 .or. istat9.ne.0 .or. istat10.ne.0)
THEN
47 print *,
' deallocation problem in free_mem_ns'
48 print *,
' istat1 = ',istat1,
' istat2 = ',istat2
49 print *,
' istat3 = ',istat3,
' istat4 = ',istat4
50 print *,
' istat5 = ',istat5,
' istat6 = ',istat6
51 print *,
' istat7 = ',istat7,
' istat8 = ',istat8
52 print *,
' istat9 = ',istat9,
' istat10= ',istat10
subroutine free_mem_ns
Free memory depending on the number of flux surfaces ns.
real(rprec), dimension(:), allocatable wint
two-dimensional array for normalizing angle integrations
real(rprec), dimension(:), allocatable sqrts
sqrt(s), two-dimensional array on full-grid
real(rprec), dimension(:), allocatable chip
radial derivative of chi/(2*pi) on half-grid
real(rprec), dimension(:), allocatable shalf
sqrt(s) ,two-dimensional array on half-grid
real(rprec), dimension(:), allocatable phip
radial derivative of phi/(2*pi) on half-grid
real(rprec), dimension(:), allocatable dlam
real(rprec), dimension(:), allocatable equif
radial force balance error: grad(p) - <j x B>
real(rprec), dimension(:,:), allocatable ygeo
real(rprec), dimension(:), allocatable vp
radial derivative of enclosed volume
real(rprec), dimension(:), allocatable bvco
enclosed poloidal current profile
real(rprec), dimension(:), allocatable buco
enclosed toroidal current profile
real(rprec), dimension(:), allocatable crd
real(rprec), dimension(:), allocatable sp
shalf(i+1)/sfull(i)
real(rprec), dimension(:,:), allocatable brd
real(rprec), dimension(:), allocatable jcuru
poloidal current density
real(rprec), dimension(:,:), allocatable azd
real(rprec), dimension(:,:), allocatable ytrian
real(rprec), dimension(:,:,:,:), allocatable faclam
real(rprec), dimension(:,:), allocatable bmax
real(rprec), dimension(:), allocatable chips
poloidal flux (same as chip), one-dimensional array
real(rprec), dimension(:), allocatable presf
pressure profile on full-grid, mass/phip**gamma
real(rprec), dimension(:), allocatable bdamp
radial mesh-blending factor
real(rprec), dimension(:), allocatable phi
toroidal magnetic flux
real(rprec), dimension(:), allocatable overr
real(rprec), dimension(:), allocatable sm
shalf(i)/sfull(i)
real(rprec), dimension(:,:), allocatable bmin
real(rprec), dimension(:,:), allocatable brm
real(rprec), dimension(:), allocatable jdotb
real(rprec), dimension(:,:), allocatable bzd
real(rprec), dimension(:,:), allocatable bzm
real(rprec), dimension(:,:), allocatable yinden
real(rprec), dimension(:), allocatable bdotgradv
real(rprec), dimension(:), allocatable clam
real(rprec), dimension(:), allocatable specw
spectral width (diagnostic)
real(rprec), dimension(:), allocatable iotaf
rotational transform (full grid)
real(rprec), dimension(:,:), allocatable yshift
real(rprec), dimension(:), allocatable psi
real(rprec), dimension(:,:), allocatable ard
real(rprec), dimension(:), allocatable pres
pressure profile
real(rprec), dimension(:), allocatable chipf
radial derivative of poloidal magnetic flux (full grid)
real(rprec), dimension(:), allocatable jpar2
real(rprec), dimension(:), allocatable presgrad
pressure gradient: dp/ds
integer, dimension(:), allocatable ireflect
two-dimensional array for computing 2pi-v angle
real(rprec), dimension(:,:), allocatable arm
real(rprec), dimension(:), allocatable bvcof
real(rprec), dimension(:), allocatable blam
real(rprec), dimension(:), allocatable chi
poloidal magnetic flux
real(rprec), dimension(:), allocatable phips
toroidal flux (same as phip), one-dimensional array
real(rprec), dimension(:), allocatable mass
mass profile on half-grid
real(rprec), dimension(:), allocatable bdotb
real(rprec), dimension(:), allocatable bucof
real(rprec), dimension(:), allocatable beta_vol
real(rprec), dimension(:), allocatable iotas
rotational transform , on half radial mesh
real(rprec), dimension(:,:), allocatable azm
real(rprec), dimension(:), allocatable jperp2
real(rprec), dimension(:), allocatable phipf
radial derivative of toroidal magnetic flux (full grid)
real(rprec), dimension(:), allocatable tcon
constraint-force multiplier
real(rprec), dimension(:,:), allocatable yellip
real(rprec), dimension(:), allocatable icurv
(-)toroidal current inside flux surface (vanishes like s)
real(rprec), dimension(:), allocatable vpphi
real(rprec), dimension(:), allocatable jcurv
toroidal current density
real(rprec), dimension(:), allocatable gc_mhd
real(rprec), dimension(:), allocatable gc_con
real(rprec), dimension(:), allocatable gc
stacked array of R, Z, Lambda Spectral force coefficients (see above for stack order)
real(rprec), dimension(:), allocatable, target xc
stacked array of scaled R, Z, Lambda Fourier coefficients (see above for stack order)
real(rprec), dimension(:), allocatable xsave
real(rprec), dimension(:), allocatable scalxc
real(rprec), dimension(:), allocatable xcdot
"velocity": change of Fourier coefficients per time step
real(rprec), dimension(:), allocatable xstore
backup copy of last-known-good xc