7 character(len = 132) :: path
33 character (len=*),
intent(in) :: type_plot
34 real(r8),
dimension(:),
intent(in) :: x, y
35 integer(itm_i4),
intent(in) :: np
36 character (len=*),
intent(in) :: printname
37 real(r8),
dimension(:),
intent(in),
optional :: z
39 character (len=20) :: type_pl
40 character (len=100) :: filename
41 integer(itm_i4) :: i, j, n, n_y_dim, i_error
42 integer(itm_i4),
parameter :: out_ppc = 95
47 type_pl = adjustl(trim(type_plot))
49 filename = trim(printname) //
'.' // adjustl(
'dat')
50 open (unit = out_ppc, file = trim(adjustl(path)) //
'plots/' &
51 // filename, status =
'replace', form =
'formatted', action =
'write', &
54 if (type_pl ==
"line")
then
57 write(out_ppc, 1) x(i), y(i)
62 write(out_ppc, 1) x(j), y((j - 1) * n + i)
69 if (type_pl ==
"2d" .or. type_pl ==
"grid")
then
72 write(out_ppc, 1) x((i - 1) * np + j), y((i - 1) * np + j)
74 write(out_ppc, 1) x((i - 1) * np + 1), y((i - 1) * np + 1)
78 if (type_pl ==
"2d_t" .or. type_pl ==
"grid")
then
81 write(out_ppc, 1) x((i - 1) * np + j), y((i - 1) * np + j)
86 if (type_pl ==
"3d")
then
87 write(out_ppc, 4) n, np
89 write(out_ppc, 5) x(i), y(i), z(i)
98 1
format(1x, e16.8, 3x, e16.8)
101 4
format(1x, i4.4, 1x, i4.4)
102 5
format(1x, e16.8, 3x, e16.8, 3x, e16.8)
125 character (len = *),
intent(in) :: type_plot
126 real(r8),
dimension(:, :),
intent(in) :: x, y
127 character (len = *),
intent(in) :: printname
128 real(r8),
dimension(:, :),
intent(in),
optional :: z
130 character (len = 20) :: type_pl
131 character (len = 100) :: filename
132 integer(itm_i4) :: i, j, i_error
133 integer(itm_i4) :: n_chi, n_r
134 integer(itm_i4),
parameter :: out_ppc = 95
139 type_pl = adjustl(trim(type_plot))
141 filename = trim(printname) //
'.' // adjustl(
'dat')
142 open (unit = out_ppc, file = trim(adjustl(path)) //
'plots/' &
143 // filename, status =
'replace', form =
'formatted', action =
'write', &
146 if (type_pl ==
"line")
then
149 write(out_ppc, 1) x(i, 1), y(i, j)
155 if (type_pl ==
"2d" .or. type_pl ==
"grid")
then
158 write(out_ppc, 1) x(i, j), y(i, j)
160 write(out_ppc, 1) x(i, 1), y(i, 1)
164 if (type_pl ==
"2d_t" .or. type_pl ==
"grid")
then
167 write(out_ppc, 1) x(i, j), y(i, j)
172 if (type_pl ==
"3d")
then
173 write(out_ppc, 4) n_chi, n_r
176 write(out_ppc, 5) x(i, j), y(i, j), z(i, j)
186 1
format(1x, e16.8, 3x, e16.8)
189 4
format(1x, i4.4, 1x, i4.4)
190 5
format(1x, e16.8, 3x, e16.8, 3x, e16.8)
subroutine plot_data_2d(type_plot, x, y, printname, z)
subroutine plot_data_1d(type_plot, x, y, np, printname, z)