1 SUBROUTINE free_mem_ns_par(lreset)
13 LOGICAL,
INTENT(in) :: lreset
16 IF (
ALLOCATED(pshalf))
DEALLOCATE(pshalf)
17 IF (
ALLOCATED(psqrts))
DEALLOCATE(psqrts)
18 IF (
ALLOCATED(pwint))
DEALLOCATE(pwint)
19 IF (
ALLOCATED(pfaclam))
DEALLOCATE(pfaclam)
20 IF (
ALLOCATED(pchip))
DEALLOCATE(pchip)
21 IF (
ALLOCATED(pphip))
DEALLOCATE(pphip)
22 IF (
ALLOCATED(pfaclam))
DEALLOCATE(pfaclam)
24 IF (
ALLOCATED(pxc) .and. lreset)
DEALLOCATE(pxc)
25 IF (
ALLOCATED(pscalxc) .and. lreset)
DEALLOCATE (pscalxc)
27 IF (
ALLOCATED(pxstore))
DEALLOCATE (pxstore)
28 IF (
ALLOCATED(pxcdot))
DEALLOCATE (pxcdot)
29 IF (
ALLOCATED(pxsave))
DEALLOCATE (pxsave)
30 IF (
ALLOCATED(pgc))
DEALLOCATE (pgc)
31 IF (
ALLOCATED(pcol_scale))
DEALLOCATE(pcol_scale)
33 END SUBROUTINE free_mem_ns_par
35 SUBROUTINE free_mem_ns(lreset)
47 LOGICAL,
INTENT(in) :: lreset
51 INTEGER :: istat1 = 0, istat2 = 0, istat3 = 0, istat4 = 0,
52 1 istat5 = 0, istat6 = 0, istat7 = 0, istat8 = 0,
53 2 istat9 = 0, istat10 = 0
56 IF (
ALLOCATED(phip))
THEN
57 DEALLOCATE(phip, chip, shalf, sqrts, wint, stat=istat1)
60 IF (
ALLOCATED(ireflect))
THEN
61 DEALLOCATE(ireflect, stat=istat2)
64 IF (
ALLOCATED(ard))
THEN
65 DEALLOCATE(ard, arm, brd, brm, crd, azd, azm, bzd, bzm, sm,
66 & sp, bmin, bmax, stat=istat5)
69 IF (
ALLOCATED(iotaf))
THEN
70 DEALLOCATE(iotaf, mass, phi, presf, jcuru, jcurv, jdotb, buco,
71 & bvco, bucof, bvcof, chi,
73 & phot, pmap, pppr, papr, tpotb, pd,
75 & bdotgradv, equif, specw, tcon, psi, yellip, yinden,
76 & ytrian, yshift, ygeo, overr, faclam, iotas, phips,
77 & chips, pres, vp, beta_vol, jperp2, jpar2, bdotb,
78 & clam, blam, dlam, phipf, chipf, rru_fac, rzu_fac,
79 & frcc_fac, fzsc_fac, icurv, vpphi, presgrad, r01,
80 & z01, bdamp, stat=istat6)
83 IF (
ALLOCATED(rmidx))
THEN
84 DEALLOCATE(rmidx, hmidx, wmidx, qmidx, tenmidx, ymidx, y2midx,
88 IF (
ALLOCATED(gc))
THEN
89 DEALLOCATE(gc, xsave, xstore, xcdot, col_scale, stat=istat8)
91 IF (
ALLOCATED(xc) .AND. lreset)
THEN
92 DEALLOCATE(xc, scalxc)
95 IF ((istat1 + istat2 + istat3 + istat4 + istat5 + istat6 +
96 & istat7 + istat8) .ne. 0)
THEN
97 print *,
' deallocation problem in free_mem_ns'
98 print *,
' istat1 = ',istat1,
' istat2 = ',istat2
99 print *,
' istat3 = ',istat3,
' istat4 = ',istat4
100 print *,
' istat5 = ',istat5,
' istat6 = ',istat6
101 print *,
' istat7 = ',istat7,
' istat8 = ',istat8
104 END SUBROUTINE free_mem_ns