Line data Source code
1 : ! ***********************************************************************
2 : !
3 : ! Copyright (C) 2014-2022 Matthias Fabry & The MESA Team
4 : !
5 : ! This program is free software: you can redistribute it and/or modify
6 : ! it under the terms of the GNU Lesser General Public License
7 : ! as published by the Free Software Foundation,
8 : ! either version 3 of the License, or (at your option) any later version.
9 : !
10 : ! This program is distributed in the hope that it will be useful,
11 : ! but WITHOUT ANY WARRANTY; without even the implied warranty of
12 : ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 : ! See the GNU Lesser General Public License for more details.
14 : !
15 : ! You should have received a copy of the GNU Lesser General Public License
16 : ! along with this program. If not, see <https://www.gnu.org/licenses/>.
17 : !
18 : ! ***********************************************************************
19 :
20 : module pgstar_grid
21 :
22 : use star_def
23 : use pgstar_support
24 : use star_pgstar
25 :
26 : implicit none
27 :
28 : contains
29 :
30 0 : subroutine grid1_plot(id, device_id, ierr)
31 : integer, intent(in) :: id, device_id
32 : integer, intent(out) :: ierr
33 : type (star_info), pointer :: s
34 : ierr = 0
35 0 : call get_star_ptr(id, s, ierr)
36 0 : if (ierr /= 0) return
37 :
38 0 : call pgslct(device_id)
39 0 : call pgbbuf()
40 0 : call pgeras()
41 :
42 : call do_grid1_plot(s, id, device_id, &
43 : s% pg% Grid1_xleft, s% pg% Grid1_xright, &
44 : s% pg% Grid1_ybot, s% pg% Grid1_ytop, .false., s% pg% Grid1_title, &
45 0 : s% pg% Grid1_txt_scale_factor, ierr)
46 :
47 0 : call pgebuf()
48 : end subroutine grid1_plot
49 :
50 0 : subroutine do_grid1_plot(s, id, device_id, &
51 : winxmin, winxmax, winymin, winymax, subplot, title, &
52 : txt_scale_factor, ierr)
53 : integer, intent(in) :: id, device_id
54 : real, intent(in) :: winxmin, winxmax, winymin, winymax
55 : real, intent(in), dimension(max_num_pgstar_grid_plots) :: txt_scale_factor
56 : logical, intent(in) :: subplot
57 : character (len = *), intent(in) :: title
58 : integer, intent(out) :: ierr
59 : type (star_info), pointer :: s
60 : ierr = 0
61 0 : call get_star_ptr(id, s, ierr)
62 0 : if (ierr /= 0) return
63 : call Grid_plot(s, id, device_id, &
64 : winxmin, winxmax, winymin, winymax, subplot, title, &
65 : txt_scale_factor, &
66 : s% pg% Grid1_num_cols, &
67 : s% pg% Grid1_num_rows, &
68 : s% pg% Grid1_num_plots, &
69 : s% pg% Grid1_plot_name, &
70 : s% pg% Grid1_plot_row, &
71 : s% pg% Grid1_plot_rowspan, &
72 : s% pg% Grid1_plot_col, &
73 : s% pg% Grid1_plot_colspan, &
74 : s% pg% Grid1_plot_pad_left, &
75 : s% pg% Grid1_plot_pad_right, &
76 : s% pg% Grid1_plot_pad_top, &
77 : s% pg% Grid1_plot_pad_bot, &
78 0 : ierr)
79 : end subroutine do_grid1_plot
80 :
81 0 : subroutine grid2_plot(id, device_id, ierr)
82 : integer, intent(in) :: id, device_id
83 : integer, intent(out) :: ierr
84 : type (star_info), pointer :: s
85 : ierr = 0
86 0 : call get_star_ptr(id, s, ierr)
87 0 : if (ierr /= 0) return
88 :
89 0 : call pgslct(device_id)
90 0 : call pgbbuf()
91 0 : call pgeras()
92 :
93 : call do_grid2_plot(s, id, device_id, &
94 : s% pg% Grid2_xleft, s% pg% Grid2_xright, &
95 : s% pg% Grid2_ybot, s% pg% Grid2_ytop, .false., s% pg% Grid2_title, &
96 0 : s% pg% Grid2_txt_scale_factor, ierr)
97 :
98 0 : call pgebuf()
99 : end subroutine grid2_plot
100 :
101 :
102 0 : subroutine do_grid2_plot(s, id, device_id, &
103 : winxmin, winxmax, winymin, winymax, subplot, title, &
104 : txt_scale_factor, ierr)
105 : integer, intent(in) :: id, device_id
106 : real, intent(in) :: winxmin, winxmax, winymin, winymax
107 : real, intent(in), dimension(max_num_pgstar_grid_plots) :: txt_scale_factor
108 : logical, intent(in) :: subplot
109 : character (len = *), intent(in) :: title
110 : integer, intent(out) :: ierr
111 : type (star_info), pointer :: s
112 : ierr = 0
113 0 : call get_star_ptr(id, s, ierr)
114 0 : if (ierr /= 0) return
115 : call Grid_plot(s, id, device_id, &
116 : winxmin, winxmax, winymin, winymax, subplot, title, &
117 : txt_scale_factor, &
118 : s% pg% Grid2_num_cols, &
119 : s% pg% Grid2_num_rows, &
120 : s% pg% Grid2_num_plots, &
121 : s% pg% Grid2_plot_name, &
122 : s% pg% Grid2_plot_row, &
123 : s% pg% Grid2_plot_rowspan, &
124 : s% pg% Grid2_plot_col, &
125 : s% pg% Grid2_plot_colspan, &
126 : s% pg% Grid2_plot_pad_left, &
127 : s% pg% Grid2_plot_pad_right, &
128 : s% pg% Grid2_plot_pad_top, &
129 : s% pg% Grid2_plot_pad_bot, &
130 0 : ierr)
131 : end subroutine do_grid2_plot
132 :
133 :
134 0 : subroutine grid3_plot(id, device_id, ierr)
135 : integer, intent(in) :: id, device_id
136 : integer, intent(out) :: ierr
137 : type (star_info), pointer :: s
138 : ierr = 0
139 0 : call get_star_ptr(id, s, ierr)
140 0 : if (ierr /= 0) return
141 :
142 0 : call pgslct(device_id)
143 0 : call pgbbuf()
144 0 : call pgeras()
145 :
146 : call do_grid3_plot(s, id, device_id, &
147 : s% pg% Grid3_xleft, s% pg% Grid3_xright, &
148 : s% pg% Grid3_ybot, s% pg% Grid3_ytop, .false., s% pg% Grid3_title, &
149 0 : s% pg% Grid3_txt_scale_factor, ierr)
150 :
151 0 : call pgebuf()
152 : end subroutine grid3_plot
153 :
154 :
155 0 : subroutine do_grid3_plot(s, id, device_id, &
156 : winxmin, winxmax, winymin, winymax, subplot, title, &
157 : txt_scale_factor, ierr)
158 : integer, intent(in) :: id, device_id
159 : real, intent(in) :: winxmin, winxmax, winymin, winymax
160 : real, intent(in), dimension(max_num_pgstar_grid_plots) :: txt_scale_factor
161 : logical, intent(in) :: subplot
162 : character (len = *), intent(in) :: title
163 : integer, intent(out) :: ierr
164 : type (star_info), pointer :: s
165 : ierr = 0
166 0 : call get_star_ptr(id, s, ierr)
167 0 : if (ierr /= 0) return
168 : call Grid_plot(s, id, device_id, &
169 : winxmin, winxmax, winymin, winymax, subplot, title, &
170 : txt_scale_factor, &
171 : s% pg% Grid3_num_cols, &
172 : s% pg% Grid3_num_rows, &
173 : s% pg% Grid3_num_plots, &
174 : s% pg% Grid3_plot_name, &
175 : s% pg% Grid3_plot_row, &
176 : s% pg% Grid3_plot_rowspan, &
177 : s% pg% Grid3_plot_col, &
178 : s% pg% Grid3_plot_colspan, &
179 : s% pg% Grid3_plot_pad_left, &
180 : s% pg% Grid3_plot_pad_right, &
181 : s% pg% Grid3_plot_pad_top, &
182 : s% pg% Grid3_plot_pad_bot, &
183 0 : ierr)
184 : end subroutine do_grid3_plot
185 :
186 :
187 0 : subroutine grid4_plot(id, device_id, ierr)
188 : integer, intent(in) :: id, device_id
189 : integer, intent(out) :: ierr
190 : type (star_info), pointer :: s
191 : ierr = 0
192 0 : call get_star_ptr(id, s, ierr)
193 0 : if (ierr /= 0) return
194 :
195 0 : call pgslct(device_id)
196 0 : call pgbbuf()
197 0 : call pgeras()
198 :
199 : call do_grid4_plot(s, id, device_id, &
200 : s% pg% Grid4_xleft, s% pg% Grid4_xright, &
201 : s% pg% Grid4_ybot, s% pg% Grid4_ytop, .false., s% pg% Grid4_title, &
202 0 : s% pg% Grid4_txt_scale_factor, ierr)
203 :
204 0 : call pgebuf()
205 : end subroutine grid4_plot
206 :
207 :
208 0 : subroutine do_grid4_plot(s, id, device_id, &
209 : winxmin, winxmax, winymin, winymax, subplot, title, &
210 : txt_scale_factor, ierr)
211 : integer, intent(in) :: id, device_id
212 : real, intent(in) :: winxmin, winxmax, winymin, winymax
213 : real, intent(in), dimension(max_num_pgstar_grid_plots) :: txt_scale_factor
214 : logical, intent(in) :: subplot
215 : character (len = *), intent(in) :: title
216 : integer, intent(out) :: ierr
217 : type (star_info), pointer :: s
218 : ierr = 0
219 0 : call get_star_ptr(id, s, ierr)
220 0 : if (ierr /= 0) return
221 : call Grid_plot(s, id, device_id, &
222 : winxmin, winxmax, winymin, winymax, subplot, title, &
223 : txt_scale_factor, &
224 : s% pg% Grid4_num_cols, &
225 : s% pg% Grid4_num_rows, &
226 : s% pg% Grid4_num_plots, &
227 : s% pg% Grid4_plot_name, &
228 : s% pg% Grid4_plot_row, &
229 : s% pg% Grid4_plot_rowspan, &
230 : s% pg% Grid4_plot_col, &
231 : s% pg% Grid4_plot_colspan, &
232 : s% pg% Grid4_plot_pad_left, &
233 : s% pg% Grid4_plot_pad_right, &
234 : s% pg% Grid4_plot_pad_top, &
235 : s% pg% Grid4_plot_pad_bot, &
236 0 : ierr)
237 : end subroutine do_grid4_plot
238 :
239 :
240 0 : subroutine grid5_plot(id, device_id, ierr)
241 : integer, intent(in) :: id, device_id
242 : integer, intent(out) :: ierr
243 : type (star_info), pointer :: s
244 : ierr = 0
245 0 : call get_star_ptr(id, s, ierr)
246 0 : if (ierr /= 0) return
247 :
248 0 : call pgslct(device_id)
249 0 : call pgbbuf()
250 0 : call pgeras()
251 :
252 : call do_grid5_plot(s, id, device_id, &
253 : s% pg% Grid5_xleft, s% pg% Grid5_xright, &
254 : s% pg% Grid5_ybot, s% pg% Grid5_ytop, .false., s% pg% Grid5_title, &
255 0 : s% pg% Grid5_txt_scale_factor, ierr)
256 :
257 0 : call pgebuf()
258 : end subroutine grid5_plot
259 :
260 :
261 0 : subroutine do_grid5_plot(s, id, device_id, &
262 : winxmin, winxmax, winymin, winymax, subplot, title, &
263 : txt_scale_factor, ierr)
264 : integer, intent(in) :: id, device_id
265 : real, intent(in) :: winxmin, winxmax, winymin, winymax
266 : real, intent(in), dimension(max_num_pgstar_grid_plots) :: txt_scale_factor
267 : logical, intent(in) :: subplot
268 : character (len = *), intent(in) :: title
269 : integer, intent(out) :: ierr
270 : type (star_info), pointer :: s
271 : ierr = 0
272 0 : call get_star_ptr(id, s, ierr)
273 0 : if (ierr /= 0) return
274 : call Grid_plot(s, id, device_id, &
275 : winxmin, winxmax, winymin, winymax, subplot, title, &
276 : txt_scale_factor, &
277 : s% pg% Grid5_num_cols, &
278 : s% pg% Grid5_num_rows, &
279 : s% pg% Grid5_num_plots, &
280 : s% pg% Grid5_plot_name, &
281 : s% pg% Grid5_plot_row, &
282 : s% pg% Grid5_plot_rowspan, &
283 : s% pg% Grid5_plot_col, &
284 : s% pg% Grid5_plot_colspan, &
285 : s% pg% Grid5_plot_pad_left, &
286 : s% pg% Grid5_plot_pad_right, &
287 : s% pg% Grid5_plot_pad_top, &
288 : s% pg% Grid5_plot_pad_bot, &
289 0 : ierr)
290 : end subroutine do_grid5_plot
291 :
292 :
293 0 : subroutine grid6_plot(id, device_id, ierr)
294 : integer, intent(in) :: id, device_id
295 : integer, intent(out) :: ierr
296 : type (star_info), pointer :: s
297 : ierr = 0
298 0 : call get_star_ptr(id, s, ierr)
299 0 : if (ierr /= 0) return
300 :
301 0 : call pgslct(device_id)
302 0 : call pgbbuf()
303 0 : call pgeras()
304 :
305 : call do_grid6_plot(s, id, device_id, &
306 : s% pg% Grid6_xleft, s% pg% Grid6_xright, &
307 : s% pg% Grid6_ybot, s% pg% Grid6_ytop, .false., s% pg% Grid6_title, &
308 0 : s% pg% Grid6_txt_scale_factor, ierr)
309 :
310 0 : call pgebuf()
311 : end subroutine grid6_plot
312 :
313 :
314 0 : subroutine do_grid6_plot(s, id, device_id, &
315 : winxmin, winxmax, winymin, winymax, subplot, title, &
316 : txt_scale_factor, ierr)
317 : integer, intent(in) :: id, device_id
318 : real, intent(in) :: winxmin, winxmax, winymin, winymax
319 : real, intent(in), dimension(max_num_pgstar_grid_plots) :: txt_scale_factor
320 : logical, intent(in) :: subplot
321 : character (len = *), intent(in) :: title
322 : integer, intent(out) :: ierr
323 : type (star_info), pointer :: s
324 : ierr = 0
325 0 : call get_star_ptr(id, s, ierr)
326 0 : if (ierr /= 0) return
327 : call Grid_plot(s, id, device_id, &
328 : winxmin, winxmax, winymin, winymax, subplot, title, &
329 : txt_scale_factor, &
330 : s% pg% Grid6_num_cols, &
331 : s% pg% Grid6_num_rows, &
332 : s% pg% Grid6_num_plots, &
333 : s% pg% Grid6_plot_name, &
334 : s% pg% Grid6_plot_row, &
335 : s% pg% Grid6_plot_rowspan, &
336 : s% pg% Grid6_plot_col, &
337 : s% pg% Grid6_plot_colspan, &
338 : s% pg% Grid6_plot_pad_left, &
339 : s% pg% Grid6_plot_pad_right, &
340 : s% pg% Grid6_plot_pad_top, &
341 : s% pg% Grid6_plot_pad_bot, &
342 0 : ierr)
343 : end subroutine do_grid6_plot
344 :
345 :
346 0 : subroutine grid7_plot(id, device_id, ierr)
347 : integer, intent(in) :: id, device_id
348 : integer, intent(out) :: ierr
349 : type (star_info), pointer :: s
350 : ierr = 0
351 0 : call get_star_ptr(id, s, ierr)
352 0 : if (ierr /= 0) return
353 :
354 0 : call pgslct(device_id)
355 0 : call pgbbuf()
356 0 : call pgeras()
357 :
358 : call do_grid7_plot(s, id, device_id, &
359 : s% pg% Grid7_xleft, s% pg% Grid7_xright, &
360 : s% pg% Grid7_ybot, s% pg% Grid7_ytop, .false., s% pg% Grid7_title, &
361 0 : s% pg% Grid7_txt_scale_factor, ierr)
362 :
363 0 : call pgebuf()
364 : end subroutine grid7_plot
365 :
366 :
367 0 : subroutine do_grid7_plot(s, id, device_id, &
368 : winxmin, winxmax, winymin, winymax, subplot, title, &
369 : txt_scale_factor, ierr)
370 : integer, intent(in) :: id, device_id
371 : real, intent(in) :: winxmin, winxmax, winymin, winymax
372 : real, intent(in), dimension(max_num_pgstar_grid_plots) :: txt_scale_factor
373 : logical, intent(in) :: subplot
374 : character (len = *), intent(in) :: title
375 : integer, intent(out) :: ierr
376 : type (star_info), pointer :: s
377 : ierr = 0
378 0 : call get_star_ptr(id, s, ierr)
379 0 : if (ierr /= 0) return
380 : call Grid_plot(s, id, device_id, &
381 : winxmin, winxmax, winymin, winymax, subplot, title, &
382 : txt_scale_factor, &
383 : s% pg% Grid7_num_cols, &
384 : s% pg% Grid7_num_rows, &
385 : s% pg% Grid7_num_plots, &
386 : s% pg% Grid7_plot_name, &
387 : s% pg% Grid7_plot_row, &
388 : s% pg% Grid7_plot_rowspan, &
389 : s% pg% Grid7_plot_col, &
390 : s% pg% Grid7_plot_colspan, &
391 : s% pg% Grid7_plot_pad_left, &
392 : s% pg% Grid7_plot_pad_right, &
393 : s% pg% Grid7_plot_pad_top, &
394 : s% pg% Grid7_plot_pad_bot, &
395 0 : ierr)
396 : end subroutine do_grid7_plot
397 :
398 :
399 0 : subroutine grid8_plot(id, device_id, ierr)
400 : integer, intent(in) :: id, device_id
401 : integer, intent(out) :: ierr
402 : type (star_info), pointer :: s
403 : ierr = 0
404 0 : call get_star_ptr(id, s, ierr)
405 0 : if (ierr /= 0) return
406 :
407 0 : call pgslct(device_id)
408 0 : call pgbbuf()
409 0 : call pgeras()
410 :
411 : call do_grid8_plot(s, id, device_id, &
412 : s% pg% Grid8_xleft, s% pg% Grid8_xright, &
413 : s% pg% Grid8_ybot, s% pg% Grid8_ytop, .false., s% pg% Grid8_title, &
414 0 : s% pg% Grid8_txt_scale_factor, ierr)
415 :
416 0 : call pgebuf()
417 : end subroutine grid8_plot
418 :
419 :
420 0 : subroutine do_grid8_plot(s, id, device_id, &
421 : winxmin, winxmax, winymin, winymax, subplot, title, &
422 : txt_scale_factor, ierr)
423 : integer, intent(in) :: id, device_id
424 : real, intent(in) :: winxmin, winxmax, winymin, winymax
425 : real, intent(in), dimension(max_num_pgstar_grid_plots) :: txt_scale_factor
426 : logical, intent(in) :: subplot
427 : character (len = *), intent(in) :: title
428 : integer, intent(out) :: ierr
429 : type (star_info), pointer :: s
430 : ierr = 0
431 0 : call get_star_ptr(id, s, ierr)
432 0 : if (ierr /= 0) return
433 : call Grid_plot(s, id, device_id, &
434 : winxmin, winxmax, winymin, winymax, subplot, title, &
435 : txt_scale_factor, &
436 : s% pg% Grid8_num_cols, &
437 : s% pg% Grid8_num_rows, &
438 : s% pg% Grid8_num_plots, &
439 : s% pg% Grid8_plot_name, &
440 : s% pg% Grid8_plot_row, &
441 : s% pg% Grid8_plot_rowspan, &
442 : s% pg% Grid8_plot_col, &
443 : s% pg% Grid8_plot_colspan, &
444 : s% pg% Grid8_plot_pad_left, &
445 : s% pg% Grid8_plot_pad_right, &
446 : s% pg% Grid8_plot_pad_top, &
447 : s% pg% Grid8_plot_pad_bot, &
448 0 : ierr)
449 : end subroutine do_grid8_plot
450 :
451 0 : subroutine grid9_plot(id, device_id, ierr)
452 : integer, intent(in) :: id, device_id
453 : integer, intent(out) :: ierr
454 : type (star_info), pointer :: s
455 : ierr = 0
456 0 : call get_star_ptr(id, s, ierr)
457 0 : if (ierr /= 0) return
458 :
459 0 : call pgslct(device_id)
460 0 : call pgbbuf()
461 0 : call pgeras()
462 :
463 : call do_grid9_plot(s, id, device_id, &
464 : s% pg% Grid9_xleft, s% pg% Grid9_xright, &
465 : s% pg% Grid9_ybot, s% pg% Grid9_ytop, .false., s% pg% Grid9_title, &
466 0 : s% pg% Grid9_txt_scale_factor, ierr)
467 :
468 0 : call pgebuf()
469 : end subroutine grid9_plot
470 :
471 :
472 0 : subroutine do_grid9_plot(s, id, device_id, &
473 : winxmin, winxmax, winymin, winymax, subplot, title, &
474 : txt_scale_factor, ierr)
475 : integer, intent(in) :: id, device_id
476 : real, intent(in) :: winxmin, winxmax, winymin, winymax
477 : real, intent(in), dimension(max_num_pgstar_grid_plots) :: txt_scale_factor
478 : logical, intent(in) :: subplot
479 : character (len = *), intent(in) :: title
480 : integer, intent(out) :: ierr
481 : type (star_info), pointer :: s
482 : ierr = 0
483 0 : call get_star_ptr(id, s, ierr)
484 0 : if (ierr /= 0) return
485 : call Grid_plot(s, id, device_id, &
486 : winxmin, winxmax, winymin, winymax, subplot, title, &
487 : txt_scale_factor, &
488 : s% pg% Grid9_num_cols, &
489 : s% pg% Grid9_num_rows, &
490 : s% pg% Grid9_num_plots, &
491 : s% pg% Grid9_plot_name, &
492 : s% pg% Grid9_plot_row, &
493 : s% pg% Grid9_plot_rowspan, &
494 : s% pg% Grid9_plot_col, &
495 : s% pg% Grid9_plot_colspan, &
496 : s% pg% Grid9_plot_pad_left, &
497 : s% pg% Grid9_plot_pad_right, &
498 : s% pg% Grid9_plot_pad_top, &
499 : s% pg% Grid9_plot_pad_bot, &
500 0 : ierr)
501 : end subroutine do_grid9_plot
502 :
503 :
504 0 : subroutine Grid_plot(s, id, device_id, &
505 : Grid_xleft, Grid_xright, &
506 : Grid_ybot, Grid_ytop, subplot, Grid_title, &
507 0 : Grid_txt_scale_factor, &
508 : Grid_num_cols, &
509 : Grid_num_rows, &
510 : Grid_num_plots, &
511 0 : Grid_plot_name, &
512 0 : Grid_plot_row, &
513 0 : Grid_plot_rowspan, &
514 0 : Grid_plot_col, &
515 0 : Grid_plot_colspan, &
516 0 : Grid_plot_pad_left, &
517 0 : Grid_plot_pad_right, &
518 0 : Grid_plot_pad_top, &
519 0 : Grid_plot_pad_bot, &
520 : ierr)
521 :
522 : use utils_lib, only : StrLowCase
523 : use pgstar_kipp, only : do_Kipp_Plot
524 : use pgstar_L_R, only : do_L_R_Plot
525 : use pgstar_L_v, only : do_L_v_Plot
526 : use pgstar_L_Teff, only : do_L_Teff_Plot
527 : use pgstar_logL_R, only : do_logL_R_Plot
528 : use pgstar_logL_v, only : do_logL_v_Plot
529 : use pgstar_logL_Teff, only : do_logL_Teff_Plot
530 : use pgstar_r_L, only : do_R_L_Plot
531 : use pgstar_r_Teff, only : do_R_Teff_Plot
532 : use pgstar_logg_Teff, only : do_logg_Teff_Plot
533 : use pgstar_logg_logT, only : do_logg_logT_Plot
534 : use pgstar_dPg_dnu, only : do_dPg_dnu_Plot
535 : use pgstar_hr, only : do_HR_Plot
536 : use pgstar_trho, only : do_TRho_Plot
537 : use pgstar_tmaxrho, only : do_TmaxRho_Plot
538 : use pgstar_dynamo, only : do_Dynamo_plot
539 : use pgstar_mixing_Ds, only : do_Mixing_plot
540 : use pgstar_trho_profile, only : do_TRho_Profile_plot
541 : use pgstar_power, only : do_power_plot
542 : use pgstar_mode_prop, only : do_mode_propagation_plot
543 : use pgstar_abundance, only : do_abundance_plot
544 : use pgstar_summary_burn, only : do_summary_burn_plot
545 : use pgstar_summary_profile, only : do_summary_profile_plot
546 : use pgstar_summary_history, only : do_summary_history_plot
547 : use pgstar_network, only : do_network_plot
548 : use pgstar_production, only : do_production_plot
549 : use pgstar_summary, only : &
550 : do_Text_Summary1_plot, do_Text_Summary2_plot, do_Text_Summary3_plot, &
551 : do_Text_Summary4_plot, do_Text_Summary5_plot, do_Text_Summary6_plot, &
552 : do_Text_Summary7_plot, do_Text_Summary8_plot, do_Text_Summary9_plot
553 : use pgstar_profile_panels, only : &
554 : do_Profile_Panels1_plot, do_Profile_Panels2_plot, do_Profile_Panels3_plot, &
555 : do_Profile_Panels4_plot, do_Profile_Panels5_plot, do_Profile_Panels6_plot, &
556 : do_Profile_Panels7_plot, do_Profile_Panels8_plot, do_Profile_Panels9_plot
557 : use pgstar_history_panels, only : &
558 : do_History_Panels1_plot, do_History_Panels2_plot, do_History_Panels3_plot, &
559 : do_History_Panels4_plot, do_History_Panels5_plot, do_History_Panels6_plot, &
560 : do_History_Panels7_plot, do_History_Panels8_plot, do_History_Panels9_plot
561 : use pgstar_hist_track, only : &
562 : do_History_Track1_plot, do_History_Track2_plot, do_History_Track3_plot, &
563 : do_History_Track4_plot, do_History_Track5_plot, do_History_Track6_plot, &
564 : do_History_Track7_plot, do_History_Track8_plot, do_History_Track9_plot
565 : use pgstar_Color_Magnitude, only : &
566 : do_Color_Magnitude1_plot, do_Color_Magnitude2_plot, do_Color_Magnitude3_plot, &
567 : do_Color_Magnitude4_plot, do_Color_Magnitude5_plot, do_Color_Magnitude6_plot, &
568 : do_Color_Magnitude7_plot, do_Color_Magnitude8_plot, do_Color_Magnitude9_plot
569 :
570 : type (star_info), pointer :: s
571 : logical, intent(in) :: subplot
572 : integer, intent(in) :: id, device_id, &
573 : Grid_num_cols, &
574 : Grid_num_rows, &
575 : Grid_num_plots, &
576 : Grid_plot_row(:), &
577 : Grid_plot_rowspan(:), &
578 : Grid_plot_col(:), &
579 : Grid_plot_colspan(:)
580 : real, intent(in) :: &
581 : Grid_xleft, Grid_xright, &
582 : Grid_ybot, Grid_ytop, &
583 : Grid_txt_scale_factor(:), &
584 : Grid_plot_pad_left(:), &
585 : Grid_plot_pad_right(:), &
586 : Grid_plot_pad_top(:), &
587 : Grid_plot_pad_bot(:)
588 : character (len = *) :: Grid_title, Grid_plot_name(:)
589 : integer, intent(out) :: ierr
590 :
591 : integer :: i, j, plot_id
592 : logical :: found_it
593 0 : real :: xleft, xright, ybot, ytop
594 0 : real :: row_height, col_width
595 : type (pgstar_win_file_data), pointer :: p
596 : logical, parameter :: grid_subplot = .true.
597 :
598 : include 'formats'
599 :
600 0 : ierr = 0
601 : if (Grid_num_plots <= 0 .or. &
602 0 : Grid_num_cols <= 0 .or. Grid_num_rows <= 0) return
603 :
604 0 : col_width = (Grid_xright - Grid_xleft) / Grid_num_cols
605 0 : row_height = (Grid_ytop - Grid_ybot) / Grid_num_rows
606 :
607 0 : if (col_width <= 0d0 .or. row_height <= 0d0) then
608 0 : ierr = -1
609 0 : write(*, 1) 'Grid: col_width', col_width
610 0 : write(*, 1) 'row_height', row_height
611 0 : write(*, 1) 'Grid_xleft', Grid_xleft
612 0 : write(*, 1) 'Grid_xright', Grid_xright
613 0 : write(*, 1) 'Grid_ybot', Grid_ybot
614 0 : write(*, 1) 'Grid_ytop', Grid_ytop
615 0 : write(*, 2) 'Grid_num_cols', Grid_num_cols
616 0 : write(*, 2) 'Grid_num_rows', Grid_num_rows
617 0 : return
618 : end if
619 :
620 0 : call pgsave
621 0 : call pgsvp(Grid_xleft, Grid_xright, Grid_ybot, Grid_ytop)
622 0 : if (.not. subplot) then
623 0 : call show_model_number_pgstar(s)
624 0 : call show_age_pgstar(s)
625 : end if
626 0 : call show_grid_title_pgstar(s, Grid_title)
627 0 : call pgunsa
628 :
629 0 : do i = 1, Grid_num_plots
630 :
631 0 : if (len_trim(Grid_plot_name(i))==0) exit
632 :
633 0 : xleft = Grid_xleft + col_width * (Grid_plot_col(i) - 1)
634 0 : xright = xleft + col_width * Grid_plot_colspan(i)
635 :
636 0 : ytop = Grid_ytop - row_height * (Grid_plot_row(i) - 1)
637 0 : ybot = ytop - row_height * Grid_plot_rowspan(i)
638 :
639 0 : xleft = xleft + Grid_plot_pad_left(i)
640 0 : xright = xright - Grid_plot_pad_right(i)
641 0 : ybot = ybot + Grid_plot_pad_bot(i)
642 0 : ytop = ytop - Grid_plot_pad_top(i)
643 :
644 0 : if (xright <= xleft .or. ytop <= ybot) then
645 0 : write(*, 2) 'Bad pgstar grid spec', i
646 0 : write(*, *) 'xright <= xleft', xright <= xleft
647 0 : write(*, *) 'ytop <= ybot', ytop <= ybot
648 0 : write(*, 2) 'xleft', i, xleft
649 0 : write(*, 2) 'xright', i, xright
650 0 : write(*, 2) 'ybot', i, ybot
651 0 : write(*, 2) 'ytop', i, ytop
652 0 : write(*, 2) 'Grid_plot_pad_left(i)', i, Grid_plot_pad_left(i)
653 0 : write(*, 2) 'Grid_plot_pad_right(i)', i, Grid_plot_pad_right(i)
654 0 : write(*, 2) 'Grid_plot_pad_top(i)', i, Grid_plot_pad_top(i)
655 0 : write(*, 2) 'Grid_plot_pad_bot(i)', i, Grid_plot_pad_bot(i)
656 0 : write(*, 2) 'col_width', i, col_width
657 0 : write(*, 2) 'row_height', i, row_height
658 0 : exit
659 : end if
660 :
661 0 : call pgsave
662 :
663 0 : select case(StrLowCase(Grid_plot_name(i)))
664 : case ('abundance')
665 : call do_abundance_plot(&
666 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, &
667 0 : s% pg% Abundance_title, Grid_txt_scale_factor(i) * s% pg% Abundance_txt_scale, ierr)
668 : case ('power')
669 : call do_power_plot(&
670 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, &
671 0 : s% pg% Power_title, Grid_txt_scale_factor(i) * s% pg% Power_txt_scale, ierr)
672 : case ('mixing')
673 : call do_Mixing_plot(&
674 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, &
675 0 : s% pg% Mixing_title, Grid_txt_scale_factor(i) * s% pg% Mixing_txt_scale, ierr)
676 : case ('dynamo')
677 : call do_Dynamo_plot(&
678 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, &
679 0 : s% pg% Dynamo_title, Grid_txt_scale_factor(i) * s% pg% Dynamo_txt_scale, ierr)
680 : case ('trho')
681 : call do_TRho_plot(&
682 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, &
683 0 : s% pg% TRho_title, Grid_txt_scale_factor(i) * s% pg% TRho_txt_scale, ierr)
684 : case ('tmaxrho')
685 : call do_TmaxRho_plot(&
686 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, &
687 0 : s% pg% TmaxRho_title, Grid_txt_scale_factor(i) * s% pg% TmaxRho_txt_scale, ierr)
688 : case ('mode_prop')
689 : call do_mode_propagation_plot(&
690 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Mode_Prop_title, &
691 0 : Grid_txt_scale_factor(i) * s% pg% Mode_Prop_txt_scale, ierr)
692 : case ('summary_burn')
693 : call do_summary_burn_plot(&
694 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Summary_Burn_title, &
695 0 : Grid_txt_scale_factor(i) * s% pg% Summary_Burn_txt_scale, ierr)
696 : case ('summary_profile')
697 : call do_summary_profile_plot(&
698 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Summary_Profile_title, &
699 0 : Grid_txt_scale_factor(i) * s% pg% Summary_Profile_txt_scale, ierr)
700 : case ('summary_history')
701 : call do_summary_history_plot(&
702 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Summary_History_title, &
703 0 : Grid_txt_scale_factor(i) * s% pg% Summary_History_txt_scale, ierr)
704 : case ('trho_profile')
705 : call do_TRho_Profile_plot(&
706 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% TRho_Profile_title, &
707 0 : Grid_txt_scale_factor(i) * s% pg% TRho_Profile_txt_scale, ierr)
708 : case ('profile_panels1')
709 : call do_Profile_Panels1_plot(&
710 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Profile_Panels1_title, &
711 0 : Grid_txt_scale_factor(i) * s% pg% Profile_Panels1_txt_scale, ierr)
712 : case ('profile_panels2')
713 : call do_Profile_Panels2_plot(&
714 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Profile_Panels2_title, &
715 0 : Grid_txt_scale_factor(i) * s% pg% Profile_Panels2_txt_scale, ierr)
716 : case ('profile_panels3')
717 : call do_Profile_Panels3_plot(&
718 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Profile_Panels3_title, &
719 0 : Grid_txt_scale_factor(i) * s% pg% Profile_Panels3_txt_scale, ierr)
720 : case ('profile_panels4')
721 : call do_Profile_Panels4_plot(&
722 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Profile_Panels4_title, &
723 0 : Grid_txt_scale_factor(i) * s% pg% Profile_Panels4_txt_scale, ierr)
724 : case ('profile_panels5')
725 : call do_Profile_Panels5_plot(&
726 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Profile_Panels5_title, &
727 0 : Grid_txt_scale_factor(i) * s% pg% Profile_Panels5_txt_scale, ierr)
728 : case ('profile_panels6')
729 : call do_Profile_Panels6_plot(&
730 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Profile_Panels6_title, &
731 0 : Grid_txt_scale_factor(i) * s% pg% Profile_Panels6_txt_scale, ierr)
732 : case ('profile_panels7')
733 : call do_Profile_Panels7_plot(&
734 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Profile_Panels7_title, &
735 0 : Grid_txt_scale_factor(i) * s% pg% Profile_Panels7_txt_scale, ierr)
736 : case ('profile_panels8')
737 : call do_Profile_Panels8_plot(&
738 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Profile_Panels8_title, &
739 0 : Grid_txt_scale_factor(i) * s% pg% Profile_Panels8_txt_scale, ierr)
740 : case ('profile_panels9')
741 : call do_Profile_Panels9_plot(&
742 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Profile_Panels9_title, &
743 0 : Grid_txt_scale_factor(i) * s% pg% Profile_Panels9_txt_scale, ierr)
744 : case ('logg_teff')
745 : call do_logg_Teff_plot(&
746 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% logg_Teff_title, &
747 0 : Grid_txt_scale_factor(i) * s% pg% logg_Teff_txt_scale, ierr)
748 : case ('logg_logt')
749 : call do_logg_logT_plot(&
750 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% logg_logT_title, &
751 0 : Grid_txt_scale_factor(i) * s% pg% logg_logT_txt_scale, ierr)
752 : case ('hr')
753 : call do_HR_plot(&
754 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% HR_title, &
755 0 : Grid_txt_scale_factor(i) * s% pg% HR_txt_scale, ierr)
756 : case ('logl_r')
757 : call do_logL_R_plot(&
758 : s, id, device_id, s% pg% show_logL_photosphere_r, xleft, xright, ybot, ytop, &
759 : grid_subplot, s% pg% logL_R_title, &
760 0 : Grid_txt_scale_factor(i) * s% pg% logL_R_txt_scale, ierr)
761 : case ('logl_v')
762 : call do_logL_v_plot(&
763 : s, id, device_id, s% pg% show_logL_photosphere_v, xleft, xright, ybot, ytop, &
764 : grid_subplot, s% pg% logL_v_title, &
765 0 : Grid_txt_scale_factor(i) * s% pg% logL_v_txt_scale, ierr)
766 : case ('logl_teff')
767 : call do_logL_Teff_plot(&
768 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% logL_Teff_title, &
769 0 : Grid_txt_scale_factor(i) * s% pg% logL_Teff_txt_scale, ierr)
770 : case ('l_r')
771 : call do_L_R_plot(&
772 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% L_R_title, &
773 0 : Grid_txt_scale_factor(i) * s% pg% L_R_txt_scale, ierr)
774 : case ('l_v')
775 : call do_L_v_plot(&
776 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% L_v_title, &
777 0 : Grid_txt_scale_factor(i) * s% pg% L_v_txt_scale, ierr)
778 : case ('l_teff')
779 : call do_L_Teff_plot(&
780 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% L_Teff_title, &
781 0 : Grid_txt_scale_factor(i) * s% pg% L_Teff_txt_scale, ierr)
782 : case ('r_l')
783 : call do_R_L_plot(&
784 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% R_L_title, &
785 0 : Grid_txt_scale_factor(i) * s% pg% R_L_txt_scale, ierr)
786 : case ('r_teff')
787 : call do_R_Teff_plot(&
788 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% R_Teff_title, &
789 0 : Grid_txt_scale_factor(i) * s% pg% R_Teff_txt_scale, ierr)
790 : case ('dpg_dnu')
791 : call do_dPg_dnu_plot(&
792 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% dPg_dnu_title, &
793 0 : Grid_txt_scale_factor(i) * s% pg% dPg_dnu_txt_scale, ierr)
794 : case ('history_panels1')
795 : call do_History_Panels1_plot(&
796 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% History_Panels1_title, &
797 0 : Grid_txt_scale_factor(i) * s% pg% History_Panels1_txt_scale, ierr)
798 : case ('history_panels2')
799 : call do_History_Panels2_plot(&
800 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% History_Panels2_title, &
801 0 : Grid_txt_scale_factor(i) * s% pg% History_Panels2_txt_scale, ierr)
802 : case ('history_panels3')
803 : call do_History_Panels3_plot(&
804 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% History_Panels3_title, &
805 0 : Grid_txt_scale_factor(i) * s% pg% History_Panels3_txt_scale, ierr)
806 : case ('history_panels4')
807 : call do_History_Panels4_plot(&
808 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% History_Panels4_title, &
809 0 : Grid_txt_scale_factor(i) * s% pg% History_Panels4_txt_scale, ierr)
810 : case ('history_panels5')
811 : call do_History_Panels5_plot(&
812 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% History_Panels5_title, &
813 0 : Grid_txt_scale_factor(i) * s% pg% History_Panels5_txt_scale, ierr)
814 : case ('history_panels6')
815 : call do_History_Panels6_plot(&
816 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% History_Panels6_title, &
817 0 : Grid_txt_scale_factor(i) * s% pg% History_Panels6_txt_scale, ierr)
818 : case ('history_panels7')
819 : call do_History_Panels7_plot(&
820 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% History_Panels7_title, &
821 0 : Grid_txt_scale_factor(i) * s% pg% History_Panels7_txt_scale, ierr)
822 : case ('history_panels8')
823 : call do_History_Panels8_plot(&
824 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% History_Panels8_title, &
825 0 : Grid_txt_scale_factor(i) * s% pg% History_Panels8_txt_scale, ierr)
826 : case ('history_panels9')
827 : call do_History_Panels9_plot(&
828 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% History_Panels9_title, &
829 0 : Grid_txt_scale_factor(i) * s% pg% History_Panels9_txt_scale, ierr)
830 : case ('color_magnitude1')
831 : call do_Color_Magnitude1_plot(&
832 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Color_Magnitude1_title, &
833 0 : Grid_txt_scale_factor(i) * s% pg% Color_Magnitude1_txt_scale, ierr)
834 : case ('color_magnitude2')
835 : call do_Color_Magnitude2_plot(&
836 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Color_Magnitude2_title, &
837 0 : Grid_txt_scale_factor(i) * s% pg% Color_Magnitude2_txt_scale, ierr)
838 : case ('color_magnitude3')
839 : call do_Color_Magnitude3_plot(&
840 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Color_Magnitude3_title, &
841 0 : Grid_txt_scale_factor(i) * s% pg% Color_Magnitude3_txt_scale, ierr)
842 : case ('color_magnitude4')
843 : call do_Color_Magnitude4_plot(&
844 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Color_Magnitude4_title, &
845 0 : Grid_txt_scale_factor(i) * s% pg% Color_Magnitude4_txt_scale, ierr)
846 : case ('color_magnitude5')
847 : call do_Color_Magnitude5_plot(&
848 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Color_Magnitude5_title, &
849 0 : Grid_txt_scale_factor(i) * s% pg% Color_Magnitude5_txt_scale, ierr)
850 : case ('color_magnitude6')
851 : call do_Color_Magnitude6_plot(&
852 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Color_Magnitude6_title, &
853 0 : Grid_txt_scale_factor(i) * s% pg% Color_Magnitude6_txt_scale, ierr)
854 : case ('color_magnitude7')
855 : call do_Color_Magnitude7_plot(&
856 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Color_Magnitude7_title, &
857 0 : Grid_txt_scale_factor(i) * s% pg% Color_Magnitude7_txt_scale, ierr)
858 : case ('color_magnitude8')
859 : call do_Color_Magnitude8_plot(&
860 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Color_Magnitude8_title, &
861 0 : Grid_txt_scale_factor(i) * s% pg% Color_Magnitude8_txt_scale, ierr)
862 : case ('color_magnitude9')
863 : call do_Color_Magnitude9_plot(&
864 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Color_Magnitude9_title, &
865 0 : Grid_txt_scale_factor(i) * s% pg% Color_Magnitude9_txt_scale, ierr)
866 : case ('history_track1')
867 : call do_History_Track1_plot(&
868 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% History_Track1_title, &
869 0 : Grid_txt_scale_factor(i) * s% pg% History_Track1_txt_scale, ierr)
870 : case ('history_track2')
871 : call do_History_Track2_plot(&
872 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% History_Track2_title, &
873 0 : Grid_txt_scale_factor(i) * s% pg% History_Track2_txt_scale, ierr)
874 : case ('history_track3')
875 : call do_History_Track3_plot(&
876 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% History_Track3_title, &
877 0 : Grid_txt_scale_factor(i) * s% pg% History_Track3_txt_scale, ierr)
878 : case ('history_track4')
879 : call do_History_Track4_plot(&
880 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% History_Track4_title, &
881 0 : Grid_txt_scale_factor(i) * s% pg% History_Track4_txt_scale, ierr)
882 : case ('history_track5')
883 : call do_History_Track5_plot(&
884 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% History_Track5_title, &
885 0 : Grid_txt_scale_factor(i) * s% pg% History_Track5_txt_scale, ierr)
886 : case ('history_track6')
887 : call do_History_Track6_plot(&
888 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% History_Track6_title, &
889 0 : Grid_txt_scale_factor(i) * s% pg% History_Track6_txt_scale, ierr)
890 : case ('history_track7')
891 : call do_History_Track7_plot(&
892 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% History_Track7_title, &
893 0 : Grid_txt_scale_factor(i) * s% pg% History_Track7_txt_scale, ierr)
894 : case ('history_track8')
895 : call do_History_Track8_plot(&
896 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% History_Track8_title, &
897 0 : Grid_txt_scale_factor(i) * s% pg% History_Track8_txt_scale, ierr)
898 : case ('history_track9')
899 : call do_History_Track9_plot(&
900 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% History_Track9_title, &
901 0 : Grid_txt_scale_factor(i) * s% pg% History_Track9_txt_scale, ierr)
902 : case ('kipp')
903 : call do_Kipp_plot(&
904 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Kipp_title, &
905 0 : Grid_txt_scale_factor(i) * s% pg% Kipp_txt_scale, ierr)
906 : case ('network')
907 : call do_Network_plot(&
908 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Network_title, &
909 0 : Grid_txt_scale_factor(i) * s% pg% Network_txt_scale, ierr)
910 : case ('production')
911 : call do_Production_plot(&
912 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Production_title, &
913 0 : Grid_txt_scale_factor(i) * s% pg% Production_txt_scale, ierr)
914 : case ('text_summary1')
915 : call do_Text_Summary1_plot(&
916 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Text_Summary1_title, &
917 0 : Grid_txt_scale_factor(i) * s% pg% Text_Summary1_txt_scale, s% pg% Text_Summary1_dxval, ierr)
918 : case ('text_summary2')
919 : call do_Text_Summary2_plot(&
920 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Text_Summary2_title, &
921 0 : Grid_txt_scale_factor(i) * s% pg% Text_Summary2_txt_scale, s% pg% Text_Summary2_dxval, ierr)
922 : case ('text_summary3')
923 : call do_Text_Summary3_plot(&
924 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Text_Summary3_title, &
925 0 : Grid_txt_scale_factor(i) * s% pg% Text_Summary3_txt_scale, s% pg% Text_Summary3_dxval, ierr)
926 : case ('text_summary4')
927 : call do_Text_Summary4_plot(&
928 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Text_Summary4_title, &
929 0 : Grid_txt_scale_factor(i) * s% pg% Text_Summary4_txt_scale, s% pg% Text_Summary4_dxval, ierr)
930 : case ('text_summary5')
931 : call do_Text_Summary5_plot(&
932 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Text_Summary5_title, &
933 0 : Grid_txt_scale_factor(i) * s% pg% Text_Summary5_txt_scale, s% pg% Text_Summary5_dxval, ierr)
934 : case ('text_summary6')
935 : call do_Text_Summary6_plot(&
936 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Text_Summary6_title, &
937 0 : Grid_txt_scale_factor(i) * s% pg% Text_Summary6_txt_scale, s% pg% Text_Summary6_dxval, ierr)
938 : case ('text_summary7')
939 : call do_Text_Summary7_plot(&
940 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Text_Summary7_title, &
941 0 : Grid_txt_scale_factor(i) * s% pg% Text_Summary7_txt_scale, s% pg% Text_Summary7_dxval, ierr)
942 : case ('text_summary8')
943 : call do_Text_Summary8_plot(&
944 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Text_Summary8_title, &
945 0 : Grid_txt_scale_factor(i) * s% pg% Text_Summary8_txt_scale, s% pg% Text_Summary8_dxval, ierr)
946 : case ('text_summary9')
947 : call do_Text_Summary9_plot(&
948 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Text_Summary9_title, &
949 0 : Grid_txt_scale_factor(i) * s% pg% Text_Summary9_txt_scale, s% pg% Text_Summary9_dxval, ierr)
950 : case default
951 : ! check for "other" plot
952 0 : found_it = .false.
953 0 : do j = 1, max_num_Other_plots
954 0 : plot_id = i_Other + j - 1
955 0 : p => s% pg% pgstar_win_file_ptr(plot_id)
956 0 : if (p% okay_to_call_do_plot_in_grid .and. &
957 0 : StrLowCase(p% name) == StrLowCase(Grid_plot_name(i))) then
958 : call p% do_plot_in_grid(&
959 : id, device_id, xleft, xright, ybot, ytop, &
960 0 : Grid_txt_scale_factor(i), ierr)
961 0 : found_it = .true.
962 0 : exit
963 : end if
964 : end do
965 :
966 0 : if (.not. found_it) then
967 :
968 0 : write(*, *) 'FAILED TO RECOGNIZE NAME FOR GRID PLOT: ' // trim(Grid_plot_name(i))
969 : write(*, '(a)') &
970 0 : 'here are the valid names', &
971 0 : 'Kipp', &
972 0 : 'HR', &
973 0 : 'TRho', &
974 0 : 'R_Teff', &
975 0 : 'R_L', &
976 0 : 'L_Teff', &
977 0 : 'L_R', &
978 0 : 'L_v', &
979 0 : 'logL_Teff', &
980 0 : 'logL_R', &
981 0 : 'logL_v', &
982 0 : 'logg_Teff', &
983 0 : 'logg_logT', &
984 0 : 'dPg_dnu', &
985 0 : 'TRho_Profile', &
986 0 : 'Summary_Burn', &
987 0 : 'Summary_Profile', &
988 0 : 'Summary_History', &
989 0 : 'Abundance', &
990 0 : 'Network', &
991 0 : 'Production', &
992 0 : 'Power', &
993 0 : 'Dynamo', &
994 0 : 'Mixing', &
995 0 : 'Mode_Prop', &
996 0 : 'Text_Summary1,..,9', &
997 0 : 'Profile_Panels1,..,9', &
998 0 : 'History_Panels1,..,9', &
999 0 : 'History_Tracks1,..,9', &
1000 0 : 'Color_Magnitude1,..,9', &
1001 0 : 'and if you are using star/astero', &
1002 0 : 'Echelle', &
1003 0 : 'Ratios'
1004 0 : write(*, '(A)')
1005 :
1006 : end if
1007 :
1008 : end select
1009 :
1010 0 : call pgunsa
1011 :
1012 0 : if (ierr /= 0) exit
1013 :
1014 : end do
1015 :
1016 0 : end subroutine Grid_plot
1017 :
1018 : end module pgstar_grid
|