2 SUBROUTINE gfile_allocate(nw,nh,mbdry,limitr,g1)
5 INTEGER :: nw, nh, mbdry, limitr, istat
7 IF(
ALLOCATED(g1%fpol))
DEALLOCATE(
8 . g1%fpol, g1%pres, g1%ffprim, g1%pprime,
9 . g1%psirz, g1%qpsi, g1%rbdry, g1%zbdry, g1%xlim,
10 . g1%ylim, g1%R, g1%Z, g1%rhovn, g1%epoten)
11 ALLOCATE(g1%fpol(nw), g1%pres(nw), g1%ffprim(nw),
12 . g1%pprime(nw), g1%qpsi(nw), g1%R(nw), g1%Z(nw),
13 . g1%rhovn(nw), g1%epoten(nw),stat=istat)
14 if(istat.ne.0)print*,
"STAT=",istat
15 ALLOCATE(g1%psirz(nw,nh),stat=istat)
16 if(istat.ne.0)print*,
"STAT=",istat
17 ALLOCATE(g1%rbdry(mbdry), g1%zbdry(mbdry),
18 . stat=istat);
if(istat.ne.0)print*,
"STAT=",istat
19 ALLOCATE(g1%xlim(limitr), g1%ylim(limitr),
20 . stat=istat);
if(istat.ne.0)print*,
"STAT=",istat
21 END SUBROUTINE gfile_allocate