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_rti, only : do_rti_Plot
525 : use pgstar_L_R, only : do_L_R_Plot
526 : use pgstar_L_v, only : do_L_v_Plot
527 : use pgstar_L_Teff, only : do_L_Teff_Plot
528 : use pgstar_logL_R, only : do_logL_R_Plot
529 : use pgstar_logL_v, only : do_logL_v_Plot
530 : use pgstar_logL_Teff, only : do_logL_Teff_Plot
531 : use pgstar_r_L, only : do_R_L_Plot
532 : use pgstar_r_Teff, only : do_R_Teff_Plot
533 : use pgstar_logg_Teff, only : do_logg_Teff_Plot
534 : use pgstar_logg_logT, only : do_logg_logT_Plot
535 : use pgstar_dPg_dnu, only : do_dPg_dnu_Plot
536 : use pgstar_hr, only : do_HR_Plot
537 : use pgstar_trho, only : do_TRho_Plot
538 : use pgstar_tmaxrho, only : do_TmaxRho_Plot
539 : use pgstar_dynamo, only : do_Dynamo_plot
540 : use pgstar_mixing_Ds, only : do_Mixing_plot
541 : use pgstar_trho_profile, only : do_TRho_Profile_plot
542 : use pgstar_power, only : do_power_plot
543 : use pgstar_mode_prop, only : do_mode_propagation_plot
544 : use pgstar_abundance, only : do_abundance_plot
545 : use pgstar_summary_burn, only : do_summary_burn_plot
546 : use pgstar_summary_profile, only : do_summary_profile_plot
547 : use pgstar_summary_history, only : do_summary_history_plot
548 : use pgstar_network, only : do_network_plot
549 : use pgstar_production, only : do_production_plot
550 : use pgstar_summary, only : &
551 : do_Text_Summary1_plot, do_Text_Summary2_plot, do_Text_Summary3_plot, &
552 : do_Text_Summary4_plot, do_Text_Summary5_plot, do_Text_Summary6_plot, &
553 : do_Text_Summary7_plot, do_Text_Summary8_plot, do_Text_Summary9_plot
554 : use pgstar_profile_panels, only : &
555 : do_Profile_Panels1_plot, do_Profile_Panels2_plot, do_Profile_Panels3_plot, &
556 : do_Profile_Panels4_plot, do_Profile_Panels5_plot, do_Profile_Panels6_plot, &
557 : do_Profile_Panels7_plot, do_Profile_Panels8_plot, do_Profile_Panels9_plot
558 : use pgstar_history_panels, only : &
559 : do_History_Panels1_plot, do_History_Panels2_plot, do_History_Panels3_plot, &
560 : do_History_Panels4_plot, do_History_Panels5_plot, do_History_Panels6_plot, &
561 : do_History_Panels7_plot, do_History_Panels8_plot, do_History_Panels9_plot
562 : use pgstar_hist_track, only : &
563 : do_History_Track1_plot, do_History_Track2_plot, do_History_Track3_plot, &
564 : do_History_Track4_plot, do_History_Track5_plot, do_History_Track6_plot, &
565 : do_History_Track7_plot, do_History_Track8_plot, do_History_Track9_plot
566 : use pgstar_Color_Magnitude, only : &
567 : do_Color_Magnitude1_plot, do_Color_Magnitude2_plot, do_Color_Magnitude3_plot, &
568 : do_Color_Magnitude4_plot, do_Color_Magnitude5_plot, do_Color_Magnitude6_plot, &
569 : do_Color_Magnitude7_plot, do_Color_Magnitude8_plot, do_Color_Magnitude9_plot
570 : use pgstar_equation_residuals, only: &
571 : do_Max_eq_resid_plot
572 : use pgstar_kipp_residuals, only: &
573 : do_Kipp_residuals_plot
574 :
575 : type (star_info), pointer :: s
576 : logical, intent(in) :: subplot
577 : integer, intent(in) :: id, device_id, &
578 : Grid_num_cols, &
579 : Grid_num_rows, &
580 : Grid_num_plots, &
581 : Grid_plot_row(:), &
582 : Grid_plot_rowspan(:), &
583 : Grid_plot_col(:), &
584 : Grid_plot_colspan(:)
585 : real, intent(in) :: &
586 : Grid_xleft, Grid_xright, &
587 : Grid_ybot, Grid_ytop, &
588 : Grid_txt_scale_factor(:), &
589 : Grid_plot_pad_left(:), &
590 : Grid_plot_pad_right(:), &
591 : Grid_plot_pad_top(:), &
592 : Grid_plot_pad_bot(:)
593 : character (len = *) :: Grid_title, Grid_plot_name(:)
594 : integer, intent(out) :: ierr
595 :
596 : integer :: i, j, plot_id
597 : logical :: found_it
598 : real :: xleft, xright, ybot, ytop
599 : real :: row_height, col_width
600 : type (pgstar_win_file_data), pointer :: p
601 : logical, parameter :: grid_subplot = .true.
602 :
603 : include 'formats'
604 :
605 0 : ierr = 0
606 : if (Grid_num_plots <= 0 .or. &
607 0 : Grid_num_cols <= 0 .or. Grid_num_rows <= 0) return
608 :
609 0 : col_width = (Grid_xright - Grid_xleft) / Grid_num_cols
610 0 : row_height = (Grid_ytop - Grid_ybot) / Grid_num_rows
611 :
612 0 : if (col_width <= 0d0 .or. row_height <= 0d0) then
613 0 : ierr = -1
614 0 : write(*, 1) 'Grid: col_width', col_width
615 0 : write(*, 1) 'row_height', row_height
616 0 : write(*, 1) 'Grid_xleft', Grid_xleft
617 0 : write(*, 1) 'Grid_xright', Grid_xright
618 0 : write(*, 1) 'Grid_ybot', Grid_ybot
619 0 : write(*, 1) 'Grid_ytop', Grid_ytop
620 0 : write(*, 2) 'Grid_num_cols', Grid_num_cols
621 0 : write(*, 2) 'Grid_num_rows', Grid_num_rows
622 0 : return
623 : end if
624 :
625 0 : call pgsave
626 0 : call pgsvp(Grid_xleft, Grid_xright, Grid_ybot, Grid_ytop)
627 0 : if (.not. subplot) then
628 0 : call show_model_number_pgstar(s)
629 0 : call show_age_pgstar(s)
630 : end if
631 0 : call show_grid_title_pgstar(s, Grid_title)
632 0 : call pgunsa
633 :
634 0 : do i = 1, Grid_num_plots
635 :
636 0 : if (len_trim(Grid_plot_name(i))==0) exit
637 :
638 0 : xleft = Grid_xleft + col_width * (Grid_plot_col(i) - 1)
639 0 : xright = xleft + col_width * Grid_plot_colspan(i)
640 :
641 0 : ytop = Grid_ytop - row_height * (Grid_plot_row(i) - 1)
642 0 : ybot = ytop - row_height * Grid_plot_rowspan(i)
643 :
644 0 : xleft = xleft + Grid_plot_pad_left(i)
645 0 : xright = xright - Grid_plot_pad_right(i)
646 0 : ybot = ybot + Grid_plot_pad_bot(i)
647 0 : ytop = ytop - Grid_plot_pad_top(i)
648 :
649 0 : if (xright <= xleft .or. ytop <= ybot) then
650 0 : write(*, 2) 'Bad pgstar grid spec', i
651 0 : write(*, *) 'xright <= xleft', xright <= xleft
652 0 : write(*, *) 'ytop <= ybot', ytop <= ybot
653 0 : write(*, 2) 'xleft', i, xleft
654 0 : write(*, 2) 'xright', i, xright
655 0 : write(*, 2) 'ybot', i, ybot
656 0 : write(*, 2) 'ytop', i, ytop
657 0 : write(*, 2) 'Grid_plot_pad_left(i)', i, Grid_plot_pad_left(i)
658 0 : write(*, 2) 'Grid_plot_pad_right(i)', i, Grid_plot_pad_right(i)
659 0 : write(*, 2) 'Grid_plot_pad_top(i)', i, Grid_plot_pad_top(i)
660 0 : write(*, 2) 'Grid_plot_pad_bot(i)', i, Grid_plot_pad_bot(i)
661 0 : write(*, 2) 'col_width', i, col_width
662 0 : write(*, 2) 'row_height', i, row_height
663 0 : exit
664 : end if
665 :
666 0 : call pgsave
667 :
668 0 : select case(StrLowCase(Grid_plot_name(i)))
669 : case ('abundance')
670 : call do_abundance_plot(&
671 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, &
672 0 : s% pg% Abundance_title, Grid_txt_scale_factor(i) * s% pg% Abundance_txt_scale, ierr)
673 : case ('power')
674 : call do_power_plot(&
675 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, &
676 0 : s% pg% Power_title, Grid_txt_scale_factor(i) * s% pg% Power_txt_scale, ierr)
677 : case ('mixing')
678 : call do_Mixing_plot(&
679 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, &
680 0 : s% pg% Mixing_title, Grid_txt_scale_factor(i) * s% pg% Mixing_txt_scale, ierr)
681 : case ('dynamo')
682 : call do_Dynamo_plot(&
683 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, &
684 0 : s% pg% Dynamo_title, Grid_txt_scale_factor(i) * s% pg% Dynamo_txt_scale, ierr)
685 : case ('trho')
686 : call do_TRho_plot(&
687 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, &
688 0 : s% pg% TRho_title, Grid_txt_scale_factor(i) * s% pg% TRho_txt_scale, ierr)
689 : case ('tmaxrho')
690 : call do_TmaxRho_plot(&
691 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, &
692 0 : s% pg% TmaxRho_title, Grid_txt_scale_factor(i) * s% pg% TmaxRho_txt_scale, ierr)
693 : case ('mode_prop')
694 : call do_mode_propagation_plot(&
695 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Mode_Prop_title, &
696 0 : Grid_txt_scale_factor(i) * s% pg% Mode_Prop_txt_scale, ierr)
697 : case ('summary_burn')
698 : call do_summary_burn_plot(&
699 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Summary_Burn_title, &
700 0 : Grid_txt_scale_factor(i) * s% pg% Summary_Burn_txt_scale, ierr)
701 : case ('summary_profile')
702 : call do_summary_profile_plot(&
703 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Summary_Profile_title, &
704 0 : Grid_txt_scale_factor(i) * s% pg% Summary_Profile_txt_scale, ierr)
705 : case ('summary_history')
706 : call do_summary_history_plot(&
707 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Summary_History_title, &
708 0 : Grid_txt_scale_factor(i) * s% pg% Summary_History_txt_scale, ierr)
709 : case ('trho_profile')
710 : call do_TRho_Profile_plot(&
711 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% TRho_Profile_title, &
712 0 : Grid_txt_scale_factor(i) * s% pg% TRho_Profile_txt_scale, ierr)
713 : case ('profile_panels1')
714 : call do_Profile_Panels1_plot(&
715 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Profile_Panels1_title, &
716 0 : Grid_txt_scale_factor(i) * s% pg% Profile_Panels1_txt_scale, ierr)
717 : case ('profile_panels2')
718 : call do_Profile_Panels2_plot(&
719 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Profile_Panels2_title, &
720 0 : Grid_txt_scale_factor(i) * s% pg% Profile_Panels2_txt_scale, ierr)
721 : case ('profile_panels3')
722 : call do_Profile_Panels3_plot(&
723 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Profile_Panels3_title, &
724 0 : Grid_txt_scale_factor(i) * s% pg% Profile_Panels3_txt_scale, ierr)
725 : case ('profile_panels4')
726 : call do_Profile_Panels4_plot(&
727 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Profile_Panels4_title, &
728 0 : Grid_txt_scale_factor(i) * s% pg% Profile_Panels4_txt_scale, ierr)
729 : case ('profile_panels5')
730 : call do_Profile_Panels5_plot(&
731 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Profile_Panels5_title, &
732 0 : Grid_txt_scale_factor(i) * s% pg% Profile_Panels5_txt_scale, ierr)
733 : case ('profile_panels6')
734 : call do_Profile_Panels6_plot(&
735 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Profile_Panels6_title, &
736 0 : Grid_txt_scale_factor(i) * s% pg% Profile_Panels6_txt_scale, ierr)
737 : case ('profile_panels7')
738 : call do_Profile_Panels7_plot(&
739 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Profile_Panels7_title, &
740 0 : Grid_txt_scale_factor(i) * s% pg% Profile_Panels7_txt_scale, ierr)
741 : case ('profile_panels8')
742 : call do_Profile_Panels8_plot(&
743 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Profile_Panels8_title, &
744 0 : Grid_txt_scale_factor(i) * s% pg% Profile_Panels8_txt_scale, ierr)
745 : case ('profile_panels9')
746 : call do_Profile_Panels9_plot(&
747 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Profile_Panels9_title, &
748 0 : Grid_txt_scale_factor(i) * s% pg% Profile_Panels9_txt_scale, ierr)
749 : case ('logg_teff')
750 : call do_logg_Teff_plot(&
751 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% logg_Teff_title, &
752 0 : Grid_txt_scale_factor(i) * s% pg% logg_Teff_txt_scale, ierr)
753 : case ('logg_logt')
754 : call do_logg_logT_plot(&
755 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% logg_logT_title, &
756 0 : Grid_txt_scale_factor(i) * s% pg% logg_logT_txt_scale, ierr)
757 : case ('hr')
758 : call do_HR_plot(&
759 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% HR_title, &
760 0 : Grid_txt_scale_factor(i) * s% pg% HR_txt_scale, ierr)
761 : case ('logl_r')
762 : call do_logL_R_plot(&
763 : s, id, device_id, s% pg% show_logL_photosphere_r, xleft, xright, ybot, ytop, &
764 : grid_subplot, s% pg% logL_R_title, &
765 0 : Grid_txt_scale_factor(i) * s% pg% logL_R_txt_scale, ierr)
766 : case ('logl_v')
767 : call do_logL_v_plot(&
768 : s, id, device_id, s% pg% show_logL_photosphere_v, xleft, xright, ybot, ytop, &
769 : grid_subplot, s% pg% logL_v_title, &
770 0 : Grid_txt_scale_factor(i) * s% pg% logL_v_txt_scale, ierr)
771 : case ('logl_teff')
772 : call do_logL_Teff_plot(&
773 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% logL_Teff_title, &
774 0 : Grid_txt_scale_factor(i) * s% pg% logL_Teff_txt_scale, ierr)
775 : case ('l_r')
776 : call do_L_R_plot(&
777 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% L_R_title, &
778 0 : Grid_txt_scale_factor(i) * s% pg% L_R_txt_scale, ierr)
779 : case ('l_v')
780 : call do_L_v_plot(&
781 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% L_v_title, &
782 0 : Grid_txt_scale_factor(i) * s% pg% L_v_txt_scale, ierr)
783 : case ('l_teff')
784 : call do_L_Teff_plot(&
785 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% L_Teff_title, &
786 0 : Grid_txt_scale_factor(i) * s% pg% L_Teff_txt_scale, ierr)
787 : case ('r_l')
788 : call do_R_L_plot(&
789 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% R_L_title, &
790 0 : Grid_txt_scale_factor(i) * s% pg% R_L_txt_scale, ierr)
791 : case ('r_teff')
792 : call do_R_Teff_plot(&
793 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% R_Teff_title, &
794 0 : Grid_txt_scale_factor(i) * s% pg% R_Teff_txt_scale, ierr)
795 : case ('dpg_dnu')
796 : call do_dPg_dnu_plot(&
797 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% dPg_dnu_title, &
798 0 : Grid_txt_scale_factor(i) * s% pg% dPg_dnu_txt_scale, ierr)
799 : case ('history_panels1')
800 : call do_History_Panels1_plot(&
801 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% History_Panels1_title, &
802 0 : Grid_txt_scale_factor(i) * s% pg% History_Panels1_txt_scale, ierr)
803 : case ('history_panels2')
804 : call do_History_Panels2_plot(&
805 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% History_Panels2_title, &
806 0 : Grid_txt_scale_factor(i) * s% pg% History_Panels2_txt_scale, ierr)
807 : case ('history_panels3')
808 : call do_History_Panels3_plot(&
809 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% History_Panels3_title, &
810 0 : Grid_txt_scale_factor(i) * s% pg% History_Panels3_txt_scale, ierr)
811 : case ('history_panels4')
812 : call do_History_Panels4_plot(&
813 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% History_Panels4_title, &
814 0 : Grid_txt_scale_factor(i) * s% pg% History_Panels4_txt_scale, ierr)
815 : case ('history_panels5')
816 : call do_History_Panels5_plot(&
817 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% History_Panels5_title, &
818 0 : Grid_txt_scale_factor(i) * s% pg% History_Panels5_txt_scale, ierr)
819 : case ('history_panels6')
820 : call do_History_Panels6_plot(&
821 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% History_Panels6_title, &
822 0 : Grid_txt_scale_factor(i) * s% pg% History_Panels6_txt_scale, ierr)
823 : case ('history_panels7')
824 : call do_History_Panels7_plot(&
825 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% History_Panels7_title, &
826 0 : Grid_txt_scale_factor(i) * s% pg% History_Panels7_txt_scale, ierr)
827 : case ('history_panels8')
828 : call do_History_Panels8_plot(&
829 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% History_Panels8_title, &
830 0 : Grid_txt_scale_factor(i) * s% pg% History_Panels8_txt_scale, ierr)
831 : case ('history_panels9')
832 : call do_History_Panels9_plot(&
833 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% History_Panels9_title, &
834 0 : Grid_txt_scale_factor(i) * s% pg% History_Panels9_txt_scale, ierr)
835 : case ('color_magnitude1')
836 : call do_Color_Magnitude1_plot(&
837 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Color_Magnitude1_title, &
838 0 : Grid_txt_scale_factor(i) * s% pg% Color_Magnitude1_txt_scale, ierr)
839 : case ('color_magnitude2')
840 : call do_Color_Magnitude2_plot(&
841 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Color_Magnitude2_title, &
842 0 : Grid_txt_scale_factor(i) * s% pg% Color_Magnitude2_txt_scale, ierr)
843 : case ('color_magnitude3')
844 : call do_Color_Magnitude3_plot(&
845 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Color_Magnitude3_title, &
846 0 : Grid_txt_scale_factor(i) * s% pg% Color_Magnitude3_txt_scale, ierr)
847 : case ('color_magnitude4')
848 : call do_Color_Magnitude4_plot(&
849 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Color_Magnitude4_title, &
850 0 : Grid_txt_scale_factor(i) * s% pg% Color_Magnitude4_txt_scale, ierr)
851 : case ('color_magnitude5')
852 : call do_Color_Magnitude5_plot(&
853 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Color_Magnitude5_title, &
854 0 : Grid_txt_scale_factor(i) * s% pg% Color_Magnitude5_txt_scale, ierr)
855 : case ('color_magnitude6')
856 : call do_Color_Magnitude6_plot(&
857 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Color_Magnitude6_title, &
858 0 : Grid_txt_scale_factor(i) * s% pg% Color_Magnitude6_txt_scale, ierr)
859 : case ('color_magnitude7')
860 : call do_Color_Magnitude7_plot(&
861 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Color_Magnitude7_title, &
862 0 : Grid_txt_scale_factor(i) * s% pg% Color_Magnitude7_txt_scale, ierr)
863 : case ('color_magnitude8')
864 : call do_Color_Magnitude8_plot(&
865 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Color_Magnitude8_title, &
866 0 : Grid_txt_scale_factor(i) * s% pg% Color_Magnitude8_txt_scale, ierr)
867 : case ('color_magnitude9')
868 : call do_Color_Magnitude9_plot(&
869 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Color_Magnitude9_title, &
870 0 : Grid_txt_scale_factor(i) * s% pg% Color_Magnitude9_txt_scale, ierr)
871 : case ('history_track1')
872 : call do_History_Track1_plot(&
873 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% History_Track1_title, &
874 0 : Grid_txt_scale_factor(i) * s% pg% History_Track1_txt_scale, ierr)
875 : case ('history_track2')
876 : call do_History_Track2_plot(&
877 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% History_Track2_title, &
878 0 : Grid_txt_scale_factor(i) * s% pg% History_Track2_txt_scale, ierr)
879 : case ('history_track3')
880 : call do_History_Track3_plot(&
881 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% History_Track3_title, &
882 0 : Grid_txt_scale_factor(i) * s% pg% History_Track3_txt_scale, ierr)
883 : case ('history_track4')
884 : call do_History_Track4_plot(&
885 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% History_Track4_title, &
886 0 : Grid_txt_scale_factor(i) * s% pg% History_Track4_txt_scale, ierr)
887 : case ('history_track5')
888 : call do_History_Track5_plot(&
889 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% History_Track5_title, &
890 0 : Grid_txt_scale_factor(i) * s% pg% History_Track5_txt_scale, ierr)
891 : case ('history_track6')
892 : call do_History_Track6_plot(&
893 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% History_Track6_title, &
894 0 : Grid_txt_scale_factor(i) * s% pg% History_Track6_txt_scale, ierr)
895 : case ('history_track7')
896 : call do_History_Track7_plot(&
897 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% History_Track7_title, &
898 0 : Grid_txt_scale_factor(i) * s% pg% History_Track7_txt_scale, ierr)
899 : case ('history_track8')
900 : call do_History_Track8_plot(&
901 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% History_Track8_title, &
902 0 : Grid_txt_scale_factor(i) * s% pg% History_Track8_txt_scale, ierr)
903 : case ('history_track9')
904 : call do_History_Track9_plot(&
905 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% History_Track9_title, &
906 0 : Grid_txt_scale_factor(i) * s% pg% History_Track9_txt_scale, ierr)
907 : case ('kipp')
908 : call do_Kipp_plot(&
909 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Kipp_title, &
910 0 : Grid_txt_scale_factor(i) * s% pg% Kipp_txt_scale, ierr)
911 : case ('rti')
912 : call do_rti_Plot(&
913 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% rti_title, &
914 0 : Grid_txt_scale_factor(i) * s% pg% rti_txt_scale, ierr)
915 : case ('network')
916 : call do_Network_plot(&
917 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Network_title, &
918 0 : Grid_txt_scale_factor(i) * s% pg% Network_txt_scale, ierr)
919 : case ('production')
920 : call do_Production_plot(&
921 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Production_title, &
922 0 : Grid_txt_scale_factor(i) * s% pg% Production_txt_scale, ierr)
923 : case ('text_summary1')
924 : call do_Text_Summary1_plot(&
925 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Text_Summary1_title, &
926 0 : Grid_txt_scale_factor(i) * s% pg% Text_Summary1_txt_scale, s% pg% Text_Summary1_dxval, ierr)
927 : case ('text_summary2')
928 : call do_Text_Summary2_plot(&
929 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Text_Summary2_title, &
930 0 : Grid_txt_scale_factor(i) * s% pg% Text_Summary2_txt_scale, s% pg% Text_Summary2_dxval, ierr)
931 : case ('text_summary3')
932 : call do_Text_Summary3_plot(&
933 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Text_Summary3_title, &
934 0 : Grid_txt_scale_factor(i) * s% pg% Text_Summary3_txt_scale, s% pg% Text_Summary3_dxval, ierr)
935 : case ('text_summary4')
936 : call do_Text_Summary4_plot(&
937 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Text_Summary4_title, &
938 0 : Grid_txt_scale_factor(i) * s% pg% Text_Summary4_txt_scale, s% pg% Text_Summary4_dxval, ierr)
939 : case ('text_summary5')
940 : call do_Text_Summary5_plot(&
941 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Text_Summary5_title, &
942 0 : Grid_txt_scale_factor(i) * s% pg% Text_Summary5_txt_scale, s% pg% Text_Summary5_dxval, ierr)
943 : case ('text_summary6')
944 : call do_Text_Summary6_plot(&
945 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Text_Summary6_title, &
946 0 : Grid_txt_scale_factor(i) * s% pg% Text_Summary6_txt_scale, s% pg% Text_Summary6_dxval, ierr)
947 : case ('text_summary7')
948 : call do_Text_Summary7_plot(&
949 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Text_Summary7_title, &
950 0 : Grid_txt_scale_factor(i) * s% pg% Text_Summary7_txt_scale, s% pg% Text_Summary7_dxval, ierr)
951 : case ('text_summary8')
952 : call do_Text_Summary8_plot(&
953 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Text_Summary8_title, &
954 0 : Grid_txt_scale_factor(i) * s% pg% Text_Summary8_txt_scale, s% pg% Text_Summary8_dxval, ierr)
955 : case ('text_summary9')
956 : call do_Text_Summary9_plot(&
957 : s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Text_Summary9_title, &
958 0 : Grid_txt_scale_factor(i) * s% pg% Text_Summary9_txt_scale, s% pg% Text_Summary9_dxval, ierr)
959 : case ('max_eq_resid')
960 : call do_Max_eq_resid_plot(&
961 : s, id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Max_eq_resid_title, &
962 0 : Grid_txt_scale_factor(i) * s% pg% Max_eq_resid_txt_scale, s% pg% Max_eq_resid_max_width, ierr)
963 : case ('kipp_residuals')
964 : call do_Kipp_residuals_plot(&
965 : s, id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Kipp_residuals_title, &
966 : Grid_txt_scale_factor(i) * s% pg% Kipp_residuals_txt_scale, &
967 0 : s% pg% Kipp_residuals_max_width, s% pg% Kipp_residuals_yaxis_name, ierr)
968 : case default
969 : ! check for "other" plot
970 0 : found_it = .false.
971 0 : do j = 1, max_num_Other_plots
972 0 : plot_id = i_Other + j - 1
973 0 : p => s% pg% pgstar_win_file_ptr(plot_id)
974 0 : if (p% okay_to_call_do_plot_in_grid .and. &
975 0 : StrLowCase(p% name) == StrLowCase(Grid_plot_name(i))) then
976 : call p% do_plot_in_grid(&
977 : id, device_id, xleft, xright, ybot, ytop, &
978 0 : Grid_txt_scale_factor(i), ierr)
979 0 : found_it = .true.
980 0 : exit
981 : end if
982 : end do
983 :
984 0 : if (.not. found_it) then
985 :
986 0 : write(*, *) 'FAILED TO RECOGNIZE NAME FOR GRID PLOT: ' // trim(Grid_plot_name(i))
987 : write(*, '(a)') &
988 0 : 'here are the valid names', &
989 0 : 'Kipp', &
990 0 : 'rti', &
991 0 : 'HR', &
992 0 : 'TRho', &
993 0 : 'R_Teff', &
994 0 : 'R_L', &
995 0 : 'L_Teff', &
996 0 : 'L_R', &
997 0 : 'L_v', &
998 0 : 'logL_Teff', &
999 0 : 'logL_R', &
1000 0 : 'logL_v', &
1001 0 : 'logg_Teff', &
1002 0 : 'logg_logT', &
1003 0 : 'dPg_dnu', &
1004 0 : 'TRho_Profile', &
1005 0 : 'Summary_Burn', &
1006 0 : 'Summary_Profile', &
1007 0 : 'Summary_History', &
1008 0 : 'Abundance', &
1009 0 : 'Network', &
1010 0 : 'Production', &
1011 0 : 'Power', &
1012 0 : 'Dynamo', &
1013 0 : 'Mixing', &
1014 0 : 'Mode_Prop', &
1015 0 : 'Text_Summary1,..,9', &
1016 0 : 'Profile_Panels1,..,9', &
1017 0 : 'History_Panels1,..,9', &
1018 0 : 'History_Tracks1,..,9', &
1019 0 : 'Color_Magnitude1,..,9', &
1020 0 : 'Kipp_residuals', &
1021 0 : 'Max_eq_resid', &
1022 0 : 'and if you are using star/astero', &
1023 0 : 'Echelle', &
1024 0 : 'Ratios'
1025 0 : write(*, '(A)')
1026 :
1027 : end if
1028 :
1029 : end select
1030 :
1031 0 : call pgunsa
1032 :
1033 0 : if (ierr /= 0) exit
1034 :
1035 : end do
1036 :
1037 : end subroutine Grid_plot
1038 :
1039 : end module pgstar_grid
|