6 use deallocate_structures
10 type(type_coreprof
),
pointer :: coreprof(:) => null()
11 type(type_equilibrium
),
pointer :: equilibrium(:) => null()
12 type(type_coretransp
),
pointer :: coretransp(:) => null()
13 type(type_coresource
),
pointer :: coresource(:) => null()
14 integer idx,nslice,islice
15 integer (ITM_I8) total_size(3)
21 write(*,*)
'Need to specify shot and run no'
29 write(*,*)
'Processing shot/run = ',shot,
' / ',run
30 call euitm_open(
'euitm',shot,run,idx)
38 call set_size_of_maxlevel(0)
41 call euitm_get(idx,
'coresource',coresource)
42 if(
associated(coresource))
then
43 nslice=
size(coresource)
46 call size_of_cpo(coresource(islice),total_size(3),.false.,
'coresource')
47 total_size(2)=total_size(2)+total_size(3)
49 call deallocate_cpo(coresource)
51 write(*,*)
' coresource ',total_size(2),nslice
52 total_size(1)=total_size(1)+total_size(2)
55 call euitm_get(idx,
'coretransp',coretransp)
56 if(
associated(coretransp))
then
57 nslice=
size(coretransp)
60 call size_of_cpo(coretransp(islice),total_size(3),.false.,
'coretransp')
61 total_size(2)=total_size(2)+total_size(3)
63 call deallocate_cpo(coretransp)
65 write(*,*)
' coretransp ',total_size(2),nslice
66 total_size(1)=total_size(1)+total_size(2)
69 call euitm_get(idx,
'coreprof',coreprof)
70 if(
associated(coreprof))
then
74 call size_of_cpo(coreprof(islice),total_size(3),.false.,
'coreprof')
75 total_size(2)=total_size(2)+total_size(3)
77 call deallocate_cpo(coreprof)
79 write(*,*)
' coreprof ',total_size(2),nslice
80 total_size(1)=total_size(1)+total_size(2)
83 call euitm_get(idx,
'equilibrium',equilibrium)
84 if(
associated(equilibrium))
then
85 nslice=
size(equilibrium)
88 call size_of_cpo(equilibrium(islice),total_size(3),.false.,
'equilibrium')
89 total_size(2)=total_size(2)+total_size(3)
91 call deallocate_cpo(equilibrium)
93 write(*,*)
'equilibrium ',total_size(2),nslice
94 total_size(1)=total_size(1)+total_size(2)
97 write(*,*)
' Total ',total_size(1)
subroutine euitm_close(idx)