16 use deallocate_structures
19 type (type_equilibrium
),
pointer :: euitm_equilibrium_in(:)
20 type (type_equilibrium
),
pointer :: euitm_equilibrium_out(:)
21 type (type_param
),
save :: code_parameters
22 logical,
save :: first = .true.
23 integer,
save :: ncall = 0
24 character*32 :: filename =
'EQ_######'
25 integer(itm_i4) :: i, iargc
28 integer :: shot, run_in, run_out
32 subroutine chease (euitm_equilibrium_in, euitm_equilibrium_out, code_parameters)
35 type (type_equilibrium
),
pointer :: euitm_equilibrium_in(:)
36 type (type_equilibrium
),
pointer :: euitm_equilibrium_out(:)
37 type (type_param
) :: code_parameters
42 write(*,*)
'shot, run_in, run_out and time missing'
43 stop
'error: missing filename'
47 call fill_param(code_parameters,
'XML/chease.xml',
'',
'XML/chease.xsd')
58 write(*,*)
'Processing ',shot,run_in,run_out,time
60 allocate(euitm_equilibrium_in(1))
63 CALL euitm_open(
'euitm', shot, run_in, idx)
64 CALL euitm_get_slice(idx,
'equilibrium', euitm_equilibrium_in(1), time, 1)
69 CALL chease(euitm_equilibrium_in, euitm_equilibrium_out, code_parameters=code_parameters)
72 CALL euitm_create(
'euitm', shot, run_out, shot, run_in, idx)
73 euitm_equilibrium_out(1)%time = time
74 write(*,*)
'euitm_put_non_timed: equilibrium', euitm_equilibrium_out(1)%time
75 call euitm_put_non_timed(idx,
"equilibrium",euitm_equilibrium_out(1))
76 write(*,*)
'euitm_put_slice: equilibrium', euitm_equilibrium_out(1)%time
77 call euitm_put_slice(idx,
"equilibrium",euitm_equilibrium_out(1))
83 write(filename(4:9),
'(I6.6)') 1
84 call open_write_file(1, trim(filename)//
'.OUT2')
85 call write_cpo(euitm_equilibrium_out(1),
'equilibrium')
88 call deallocate_cpo(euitm_equilibrium_in)
89 call deallocate_cpo(euitm_equilibrium_out)
program run_chease_cpo
Run chease based on a CPO stored in ascii format.