15 use deallocate_structures
18 type (type_equilibrium
),
pointer :: euitm_equilibrium_in(:)
19 type (type_equilibrium
),
pointer :: euitm_equilibrium_out(:)
20 type (type_param
),
save :: code_parameters
21 logical,
save :: first = .true.
22 integer,
save :: ncall = 0
23 character*32 :: filename =
'EQ_######'
24 integer(itm_i4) :: i, iargc
27 subroutine chease (euitm_equilibrium_in, euitm_equilibrium_out, code_parameters)
30 type (type_equilibrium
),
pointer :: euitm_equilibrium_in(:)
31 type (type_equilibrium
),
pointer :: euitm_equilibrium_out(:)
32 type (type_param
) :: code_parameters
37 write(*,*)
'filename should be specified'
38 stop
'error: missing filename'
40 call fill_param(code_parameters,
'XML/chease.xml',
'',
'XML/chease.xsd')
42 call getarg(i,filename)
43 write(*,*)
'Processing ',trim(filename)
45 call open_read_file(1, filename)
46 allocate(euitm_equilibrium_in(1))
47 call read_cpo(euitm_equilibrium_in(1),
'equilibrium')
49 CALL chease(euitm_equilibrium_in, euitm_equilibrium_out, code_parameters)
52 write(filename(4:9),
'(I6.6)') i-1
53 call open_write_file(1, trim(filename)//
'.OUT2')
54 call write_cpo(euitm_equilibrium_out(1),
'equilibrium')
57 call deallocate_cpo(euitm_equilibrium_in)
58 call deallocate_cpo(euitm_equilibrium_out)
program run_chease
Run chease based on a CPO stored in ascii format.