LCOV - code coverage report
Current view: top level - binary/private - pgbinary_star.f90 (source / functions) Coverage Total Hit
Test: coverage.info Lines: 0.0 % 198 0
Test Date: 2026-08-20 21:51:39 Functions: 0.0 % 6 0

            Line data    Source code
       1              : ! ***********************************************************************
       2              : !
       3              : !   Copyright (C) 2022  The MESA Team & Matthias Fabry
       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 pgbinary_star
      21              : 
      22              :    use const_def, only: dp, msun
      23              :    use binary_def
      24              :    use pgbinary_support
      25              : 
      26              :    implicit none
      27              : 
      28              : contains
      29              : 
      30              : 
      31            0 :    subroutine Star1_plot(id, device_id, ierr)
      32              :       integer, intent(in) :: id, device_id
      33              :       integer, intent(out) :: ierr
      34              :       type (binary_info), pointer :: b
      35              :       ierr = 0
      36            0 :       call get_binary_ptr(id, b, ierr)
      37            0 :       if (ierr /= 0) return
      38            0 :       call pgslct(device_id)
      39            0 :       call pgbbuf()
      40            0 :       call pgeras()
      41              :       call do_Star1_plot(b, id, device_id, &
      42              :          b% pg% Star1_xleft, b% pg% Star1_xright, &
      43              :          b% pg% Star1_ybot, b% pg% Star1_ytop, .false., b% pg% Star1_title, &
      44            0 :          b% pg% Star1_txt_scale_factor, b% pg% Star1_plot_name, ierr)
      45            0 :       call pgebuf()
      46              :    end subroutine Star1_plot
      47              : 
      48            0 :    subroutine do_Star1_plot(b, id, device_id, &
      49              :       vp_xleft, vp_xright, vp_ybot, vp_ytop, &
      50              :       subplot, title, txt_scale, plot_name, ierr)
      51              :       type (binary_info), pointer :: b
      52              :       integer, intent(in) :: id, device_id
      53              :       real, intent(in) :: vp_xleft, vp_xright, vp_ybot, vp_ytop, txt_scale
      54              :       logical, intent(in) :: subplot
      55              :       character (len = *), intent(in) :: title
      56              :       character (len = *), intent(in) :: plot_name
      57              :       integer, intent(out) :: ierr
      58              :       call do_star_plot(b, id, device_id, &
      59              :          vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, &
      60            0 :          plot_name, 1, ierr)
      61            0 :    end subroutine do_Star1_plot
      62              : 
      63            0 :    subroutine Star2_plot(id, device_id, ierr)
      64              :       integer, intent(in) :: id, device_id
      65              :       integer, intent(out) :: ierr
      66              :       type (binary_info), pointer :: b
      67              :       ierr = 0
      68            0 :       call get_binary_ptr(id, b, ierr)
      69            0 :       if (ierr /= 0) return
      70            0 :       call pgslct(device_id)
      71            0 :       call pgbbuf()
      72            0 :       call pgeras()
      73              :       call do_Star2_plot(b, id, device_id, &
      74              :          b% pg% Star2_xleft, b% pg% Star2_xright, &
      75              :          b% pg% Star2_ybot, b% pg% Star2_ytop, .false., b% pg% Star2_title, &
      76            0 :          b% pg% Star2_txt_scale_factor, b% pg% Star2_plot_name, ierr)
      77            0 :       call pgebuf()
      78              :    end subroutine Star2_plot
      79              : 
      80            0 :    subroutine do_Star2_plot(b, id, device_id, &
      81              :       vp_xleft, vp_xright, vp_ybot, vp_ytop, &
      82              :       subplot, title, txt_scale, plot_name, ierr)
      83              :       type (binary_info), pointer :: b
      84              :       integer, intent(in) :: id, device_id
      85              :       real, intent(in) :: vp_xleft, vp_xright, vp_ybot, vp_ytop, txt_scale
      86              :       logical, intent(in) :: subplot
      87              :       character (len = *), intent(in) :: title
      88              :       character (len = *), intent(in) :: plot_name
      89              :       integer, intent(out) :: ierr
      90              :       call do_star_plot(b, id, device_id, &
      91              :          vp_xleft, vp_xright, vp_ybot, vp_ytop, subplot, title, txt_scale, &
      92            0 :          plot_name, 2, ierr)
      93            0 :    end subroutine do_Star2_plot
      94              : 
      95            0 :    subroutine do_star_plot(b, id, device_id, xleft, xright, &
      96              :       ybot, ytop, subplot, title, txt_scale_factor, &
      97              :       star_plot_name, Star_number, ierr)
      98              : 
      99              :       use utils_lib, only : StrLowCase
     100              :       use star_lib, only : read_pgstar_inlist
     101              :       use pgstar, only : update_pgstar_data, update_pgstar_history_file
     102              :       use pgstar_grid, only : do_grid1_plot, do_grid2_plot, do_grid3_plot, &
     103              :          do_grid4_plot, do_grid5_plot, do_grid6_plot, do_grid7_plot, &
     104              :          do_grid8_plot, do_grid9_plot
     105              :       use pgstar_kipp, only : do_Kipp_Plot
     106              :       use pgstar_L_R, only : do_L_R_Plot
     107              :       use pgstar_L_v, only : do_L_v_Plot
     108              :       use pgstar_L_Teff, only : do_L_Teff_Plot
     109              :       use pgstar_logL_R, only : do_logL_R_Plot
     110              :       use pgstar_logL_v, only : do_logL_v_Plot
     111              :       use pgstar_logL_Teff, only : do_logL_Teff_Plot
     112              :       use pgstar_r_L, only : do_R_L_Plot
     113              :       use pgstar_r_Teff, only : do_R_Teff_Plot
     114              :       use pgstar_logg_Teff, only : do_logg_Teff_Plot
     115              :       use pgstar_logg_logT, only : do_logg_logT_Plot
     116              :       use pgstar_dPg_dnu, only : do_dPg_dnu_Plot
     117              :       use pgstar_hr, only : do_HR_Plot
     118              :       use pgstar_trho, only : do_TRho_Plot
     119              :       use pgstar_dynamo, only : do_Dynamo_plot
     120              :       use pgstar_mixing_Ds, only : do_Mixing_plot
     121              :       use pgstar_trho_profile, only : do_TRho_Profile_plot
     122              :       use pgstar_power, only : do_power_plot
     123              :       use pgstar_mode_prop, only : do_mode_propagation_plot
     124              :       use pgstar_abundance, only : do_abundance_plot
     125              :       use pgstar_summary_burn, only : do_summary_burn_plot
     126              :       use pgstar_summary_profile, only : do_summary_profile_plot
     127              :       use pgstar_summary_history, only : do_summary_history_plot
     128              :       use pgstar_network, only : do_network_plot
     129              :       use pgstar_production, only : do_production_plot
     130              :       use pgstar_summary, only : &
     131              :          do_Text_Summary1_plot, do_Text_Summary2_plot, do_Text_Summary3_plot, &
     132              :          do_Text_Summary4_plot, do_Text_Summary5_plot, do_Text_Summary6_plot, &
     133              :          do_Text_Summary7_plot, do_Text_Summary8_plot, do_Text_Summary9_plot
     134              :       use pgstar_profile_panels, only : &
     135              :          do_Profile_Panels1_plot, do_Profile_Panels2_plot, do_Profile_Panels3_plot, &
     136              :          do_Profile_Panels4_plot, do_Profile_Panels5_plot, do_Profile_Panels6_plot, &
     137              :          do_Profile_Panels7_plot, do_Profile_Panels8_plot, do_Profile_Panels9_plot
     138              :       use pgstar_history_panels, only : &
     139              :          do_History_Panels1_plot, do_History_Panels2_plot, do_History_Panels3_plot, &
     140              :          do_History_Panels4_plot, do_History_Panels5_plot, do_History_Panels6_plot, &
     141              :          do_History_Panels7_plot, do_History_Panels8_plot, do_History_Panels9_plot
     142              :       use pgstar_hist_track, only : &
     143              :          do_History_Track1_plot, do_History_Track2_plot, do_History_Track3_plot, &
     144              :          do_History_Track4_plot, do_History_Track5_plot, do_History_Track6_plot, &
     145              :          do_History_Track7_plot, do_History_Track8_plot, do_History_Track9_plot
     146              :       use pgstar_Color_Magnitude, only : &
     147              :          do_Color_Magnitude1_plot, do_Color_Magnitude2_plot, do_Color_Magnitude3_plot, &
     148              :          do_Color_Magnitude4_plot, do_Color_Magnitude5_plot, do_Color_Magnitude6_plot, &
     149              :          do_Color_Magnitude7_plot, do_Color_Magnitude8_plot, do_Color_Magnitude9_plot
     150              : 
     151              :       type (binary_info), pointer :: b
     152              :       logical, intent(in) :: subplot
     153              :       integer, intent(in) :: id, device_id, star_number
     154              :       real, intent(in) :: xleft, xright, ybot, ytop, txt_scale_factor
     155              :       character (len = *), intent(in) :: star_plot_name
     156              :       character (len = *), intent(in) :: title
     157              :       integer, intent(out) :: ierr
     158              : 
     159              :       character (len = strlen) :: plot_title, status, mass
     160              :       real :: current_scale
     161              :       logical, parameter :: star_subplot = .true.
     162              : 
     163              :       include 'formats'
     164              : 
     165            0 :       call pgsave
     166            0 :       call pgsvp(xleft, xright, ybot, ytop)  ! set viewport
     167            0 :       plot_title = trim(title)
     168            0 :       if (.not. subplot) then  ! do title stuff
     169            0 :          call show_model_number_pgbinary(b)
     170            0 :          call show_age_pgbinary(b)
     171              :       end if
     172            0 :       if (b% pg% show_mtrans_status) then
     173            0 :          if (plot_title /= '') plot_title = trim(plot_title) // ":"
     174            0 :          status = ' Detached'
     175            0 :          if (b% mtransfer_rate /= 0d0) then
     176            0 :             if (b% d_i == star_number) then
     177            0 :                status = ' Donor'
     178              :             else
     179            0 :                status = ' Accretor'
     180              :             end if
     181              :          end if
     182            0 :          plot_title = trim(plot_title) // status
     183              :       end if
     184            0 :       call show_grid_title_pgbinary(b, plot_title)
     185            0 :       call pgunsa
     186              : 
     187            0 :       ierr = 0
     188              : 
     189            0 :       select case(star_number)
     190              :       case(1)
     191            0 :          if (b% pg% do_star1_box) then
     192              :             call pgsvp(xleft + b% pg% Star1_box_pad_left, &
     193              :                xright + b% pg% Star1_box_pad_right, &
     194            0 :                ybot + b% pg% Star1_box_pad_bot, ytop + b% pg% Star1_box_pad_top)
     195            0 :             call draw_rect()
     196            0 :             call pgsvp(xleft, xright, ybot, ytop)
     197              :          end if
     198            0 :          if (b% point_mass_i /= 1) then
     199            0 :             call read_pgstar_inlist(b% s1, b% job% inlist_names(1), ierr)
     200            0 :             call update_pgstar_data(b% s1, ierr)
     201            0 :             call plot_case(b% s1, b% star_ids(1))
     202            0 :             call update_pgstar_history_file(b% s1, ierr)
     203              :          else
     204            0 :             call pgqch(current_scale)
     205            0 :             call pgsch(txt_scale_factor * current_scale)
     206            0 :             write(mass, '(f0.2)') b% m(1) / Msun
     207            0 :             call pgmtxt('T', -2.0, 0.5, 0.5, 'Star 1 not simulated')
     208            0 :             call pgmtxt('T', -3.0, 0.5, 0.5, 'point mass of ' // trim(adjustl(mass)) // ' M\d\(2281)')
     209              :          end if
     210              :       case(2)
     211            0 :          if (b% pg% do_star2_box) then
     212              :             call pgsvp(xleft + b% pg% Star2_box_pad_left, &
     213              :                xright + b% pg% Star2_box_pad_right, &
     214            0 :                ybot + b% pg% Star2_box_pad_bot, ytop + b% pg% Star2_box_pad_top)
     215            0 :             call draw_rect()
     216            0 :             call pgsvp(xleft, xright, ybot, ytop)
     217              :          end if
     218            0 :          if (b% point_mass_i /= 2) then
     219            0 :             call read_pgstar_inlist(b% s2, b% job% inlist_names(2), ierr)
     220            0 :             call update_pgstar_data(b% s2, ierr)
     221            0 :             call plot_case(b% s2, b% star_ids(2))
     222            0 :             call update_pgstar_history_file(b% s2, ierr)
     223              :          else
     224            0 :             call pgqch(current_scale)
     225            0 :             call pgsch(txt_scale_factor * current_scale)
     226            0 :             write(mass, '(f0.2)') b% m(2) / Msun
     227            0 :             call pgmtxt('T', -2.0, 0.5, 0.5, 'Star 2 not simulated')
     228            0 :             call pgmtxt('T', -3.0, 0.5, 0.5, 'point mass of ' // trim(adjustl(mass)) // ' M\d\(2281)')
     229              :          end if
     230              :       end select
     231              : 
     232              :    contains
     233              : 
     234            0 :       subroutine plot_case(s, star_id)
     235              :          type (star_info), pointer, intent(in) :: s
     236              :          integer, intent(in) :: star_id
     237              :          type (pgstar_win_file_data), pointer :: p
     238              :          integer :: plot_id, j
     239              :          logical :: found_it
     240              : 
     241            0 :          select case(StrLowCase(star_plot_name))
     242              :          case ('abundance')
     243              :             call do_abundance_plot(&
     244              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, &
     245            0 :                s% pg% Abundance_title, txt_scale_factor * s% pg% Abundance_txt_scale, ierr)
     246              :          case ('power')
     247              :             call do_power_plot(&
     248              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, &
     249            0 :                s% pg% Power_title, txt_scale_factor * s% pg% Power_txt_scale, ierr)
     250              :          case ('mixing')
     251              :             call do_Mixing_plot(&
     252              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, &
     253            0 :                s% pg% Mixing_title, txt_scale_factor * s% pg% Mixing_txt_scale, ierr)
     254              :          case ('dynamo')
     255              :             call do_Dynamo_plot(&
     256              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, &
     257            0 :                s% pg% Dynamo_title, txt_scale_factor * s% pg% Dynamo_txt_scale, ierr)
     258              :          case ('trho')
     259              :             call do_TRho_plot(&
     260              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, &
     261            0 :                s% pg% TRho_title, txt_scale_factor * s% pg% TRho_txt_scale, ierr)
     262              :          case ('mode_prop')
     263              :             call do_mode_propagation_plot(&
     264              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Mode_Prop_title, &
     265            0 :                txt_scale_factor * s% pg% Mode_Prop_txt_scale, ierr)
     266              :          case ('summary_burn')
     267              :             call do_summary_burn_plot(&
     268              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Summary_Burn_title, &
     269            0 :                txt_scale_factor * s% pg% Summary_Burn_txt_scale, ierr)
     270              :          case ('summary_profile')
     271              :             call do_summary_profile_plot(&
     272              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Summary_Profile_title, &
     273            0 :                txt_scale_factor * s% pg% Summary_Profile_txt_scale, ierr)
     274              :          case ('summary_history')
     275              :             call do_summary_history_plot(&
     276              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Summary_History_title, &
     277            0 :                txt_scale_factor * s% pg% Summary_History_txt_scale, ierr)
     278              :          case ('trho_profile')
     279              :             call do_TRho_Profile_plot(&
     280              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% TRho_Profile_title, &
     281            0 :                txt_scale_factor * s% pg% TRho_Profile_txt_scale, ierr)
     282              :          case ('profile_panels1')
     283              :             call do_Profile_Panels1_plot(&
     284              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Profile_Panels1_title, &
     285            0 :                txt_scale_factor * s% pg% Profile_Panels1_txt_scale, ierr)
     286              :          case ('profile_panels2')
     287              :             call do_Profile_Panels2_plot(&
     288              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Profile_Panels2_title, &
     289            0 :                txt_scale_factor * s% pg% Profile_Panels2_txt_scale, ierr)
     290              :          case ('profile_panels3')
     291              :             call do_Profile_Panels3_plot(&
     292              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Profile_Panels3_title, &
     293            0 :                txt_scale_factor * s% pg% Profile_Panels3_txt_scale, ierr)
     294              :          case ('profile_panels4')
     295              :             call do_Profile_Panels4_plot(&
     296              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Profile_Panels4_title, &
     297            0 :                txt_scale_factor * s% pg% Profile_Panels4_txt_scale, ierr)
     298              :          case ('profile_panels5')
     299              :             call do_Profile_Panels5_plot(&
     300              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Profile_Panels5_title, &
     301            0 :                txt_scale_factor * s% pg% Profile_Panels5_txt_scale, ierr)
     302              :          case ('profile_panels6')
     303              :             call do_Profile_Panels6_plot(&
     304              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Profile_Panels6_title, &
     305            0 :                txt_scale_factor * s% pg% Profile_Panels6_txt_scale, ierr)
     306              :          case ('profile_panels7')
     307              :             call do_Profile_Panels7_plot(&
     308              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Profile_Panels7_title, &
     309            0 :                txt_scale_factor * s% pg% Profile_Panels7_txt_scale, ierr)
     310              :          case ('profile_panels8')
     311              :             call do_Profile_Panels8_plot(&
     312              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Profile_Panels8_title, &
     313            0 :                txt_scale_factor * s% pg% Profile_Panels8_txt_scale, ierr)
     314              :          case ('profile_panels9')
     315              :             call do_Profile_Panels9_plot(&
     316              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Profile_Panels9_title, &
     317            0 :                txt_scale_factor * s% pg% Profile_Panels9_txt_scale, ierr)
     318              :          case ('logg_teff')
     319              :             call do_logg_Teff_plot(&
     320              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% logg_Teff_title, &
     321            0 :                txt_scale_factor * s% pg% logg_Teff_txt_scale, ierr)
     322              :          case ('logg_logt')
     323              :             call do_logg_logT_plot(&
     324              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% logg_logT_title, &
     325            0 :                txt_scale_factor * s% pg% logg_logT_txt_scale, ierr)
     326              :          case ('hr')
     327              :             call do_HR_plot(&
     328              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% HR_title, &
     329            0 :                txt_scale_factor * s% pg% HR_txt_scale, ierr)
     330              :          case ('logl_r')
     331              :             call do_logL_R_plot(&
     332              :                s, star_id, device_id, s% pg% show_logL_photosphere_r, xleft, xright, ybot, ytop, &
     333              :                star_subplot, s% pg% logL_R_title, &
     334            0 :                txt_scale_factor * s% pg% logL_R_txt_scale, ierr)
     335              :          case ('logl_v')
     336              :             call do_logL_v_plot(&
     337              :                s, star_id, device_id, s% pg% show_logL_photosphere_v, xleft, xright, ybot, ytop, &
     338              :                star_subplot, s% pg% logL_v_title, &
     339            0 :                txt_scale_factor * s% pg% logL_v_txt_scale, ierr)
     340              :          case ('logl_teff')
     341              :             call do_logL_Teff_plot(&
     342              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% logL_Teff_title, &
     343            0 :                txt_scale_factor * s% pg% logL_Teff_txt_scale, ierr)
     344              :          case ('l_r')
     345              :             call do_L_R_plot(&
     346              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% L_R_title, &
     347            0 :                txt_scale_factor * s% pg% L_R_txt_scale, ierr)
     348              :          case ('l_v')
     349              :             call do_L_v_plot(&
     350              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% L_v_title, &
     351            0 :                txt_scale_factor * s% pg% L_v_txt_scale, ierr)
     352              :          case ('l_teff')
     353              :             call do_L_Teff_plot(&
     354              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% L_Teff_title, &
     355            0 :                txt_scale_factor * s% pg% L_Teff_txt_scale, ierr)
     356              :          case ('r_l')
     357              :             call do_R_L_plot(&
     358              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% R_L_title, &
     359            0 :                txt_scale_factor * s% pg% R_L_txt_scale, ierr)
     360              :          case ('r_teff')
     361              :             call do_R_Teff_plot(&
     362              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% R_Teff_title, &
     363            0 :                txt_scale_factor * s% pg% R_Teff_txt_scale, ierr)
     364              :          case ('dpg_dnu')
     365              :             call do_dPg_dnu_plot(&
     366              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% dPg_dnu_title, &
     367            0 :                txt_scale_factor * s% pg% dPg_dnu_txt_scale, ierr)
     368              :          case ('history_panels1')
     369              :             call do_History_Panels1_plot(&
     370              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% History_Panels1_title, &
     371            0 :                txt_scale_factor * s% pg% History_Panels1_txt_scale, ierr)
     372              :          case ('history_panels2')
     373              :             call do_History_Panels2_plot(&
     374              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% History_Panels2_title, &
     375            0 :                txt_scale_factor * s% pg% History_Panels2_txt_scale, ierr)
     376              :          case ('history_panels3')
     377              :             call do_History_Panels3_plot(&
     378              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% History_Panels3_title, &
     379            0 :                txt_scale_factor * s% pg% History_Panels3_txt_scale, ierr)
     380              :          case ('history_panels4')
     381              :             call do_History_Panels4_plot(&
     382              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% History_Panels4_title, &
     383            0 :                txt_scale_factor * s% pg% History_Panels4_txt_scale, ierr)
     384              :          case ('history_panels5')
     385              :             call do_History_Panels5_plot(&
     386              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% History_Panels5_title, &
     387            0 :                txt_scale_factor * s% pg% History_Panels5_txt_scale, ierr)
     388              :          case ('history_panels6')
     389              :             call do_History_Panels6_plot(&
     390              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% History_Panels6_title, &
     391            0 :                txt_scale_factor * s% pg% History_Panels6_txt_scale, ierr)
     392              :          case ('history_panels7')
     393              :             call do_History_Panels7_plot(&
     394              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% History_Panels7_title, &
     395            0 :                txt_scale_factor * s% pg% History_Panels7_txt_scale, ierr)
     396              :          case ('history_panels8')
     397              :             call do_History_Panels8_plot(&
     398              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% History_Panels8_title, &
     399            0 :                txt_scale_factor * s% pg% History_Panels8_txt_scale, ierr)
     400              :          case ('history_panels9')
     401              :             call do_History_Panels9_plot(&
     402              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% History_Panels9_title, &
     403            0 :                txt_scale_factor * s% pg% History_Panels9_txt_scale, ierr)
     404              :          case ('color_magnitude1')
     405              :             call do_Color_Magnitude1_plot(&
     406              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Color_Magnitude1_title, &
     407            0 :                txt_scale_factor * s% pg% Color_Magnitude1_txt_scale, ierr)
     408              :          case ('color_magnitude2')
     409              :             call do_Color_Magnitude2_plot(&
     410              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Color_Magnitude2_title, &
     411            0 :                txt_scale_factor * s% pg% Color_Magnitude2_txt_scale, ierr)
     412              :          case ('color_magnitude3')
     413              :             call do_Color_Magnitude3_plot(&
     414              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Color_Magnitude3_title, &
     415            0 :                txt_scale_factor * s% pg% Color_Magnitude3_txt_scale, ierr)
     416              :          case ('color_magnitude4')
     417              :             call do_Color_Magnitude4_plot(&
     418              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Color_Magnitude4_title, &
     419            0 :                txt_scale_factor * s% pg% Color_Magnitude4_txt_scale, ierr)
     420              :          case ('color_magnitude5')
     421              :             call do_Color_Magnitude5_plot(&
     422              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Color_Magnitude5_title, &
     423            0 :                txt_scale_factor * s% pg% Color_Magnitude5_txt_scale, ierr)
     424              :          case ('color_magnitude6')
     425              :             call do_Color_Magnitude6_plot(&
     426              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Color_Magnitude6_title, &
     427            0 :                txt_scale_factor * s% pg% Color_Magnitude6_txt_scale, ierr)
     428              :          case ('color_magnitude7')
     429              :             call do_Color_Magnitude7_plot(&
     430              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Color_Magnitude7_title, &
     431            0 :                txt_scale_factor * s% pg% Color_Magnitude7_txt_scale, ierr)
     432              :          case ('color_magnitude8')
     433              :             call do_Color_Magnitude8_plot(&
     434              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Color_Magnitude8_title, &
     435            0 :                txt_scale_factor * s% pg% Color_Magnitude8_txt_scale, ierr)
     436              :          case ('color_magnitude9')
     437              :             call do_Color_Magnitude9_plot(&
     438              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Color_Magnitude9_title, &
     439            0 :                txt_scale_factor * s% pg% Color_Magnitude9_txt_scale, ierr)
     440              :          case ('history_track1')
     441              :             call do_History_Track1_plot(&
     442              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% History_Track1_title, &
     443            0 :                txt_scale_factor * s% pg% History_Track1_txt_scale, ierr)
     444              :          case ('history_track2')
     445              :             call do_History_Track2_plot(&
     446              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% History_Track2_title, &
     447            0 :                txt_scale_factor * s% pg% History_Track2_txt_scale, ierr)
     448              :          case ('history_track3')
     449              :             call do_History_Track3_plot(&
     450              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% History_Track3_title, &
     451            0 :                txt_scale_factor * s% pg% History_Track3_txt_scale, ierr)
     452              :          case ('history_track4')
     453              :             call do_History_Track4_plot(&
     454              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% History_Track4_title, &
     455            0 :                txt_scale_factor * s% pg% History_Track4_txt_scale, ierr)
     456              :          case ('history_track5')
     457              :             call do_History_Track5_plot(&
     458              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% History_Track5_title, &
     459            0 :                txt_scale_factor * s% pg% History_Track5_txt_scale, ierr)
     460              :          case ('history_track6')
     461              :             call do_History_Track6_plot(&
     462              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% History_Track6_title, &
     463            0 :                txt_scale_factor * s% pg% History_Track6_txt_scale, ierr)
     464              :          case ('history_track7')
     465              :             call do_History_Track7_plot(&
     466              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% History_Track7_title, &
     467            0 :                txt_scale_factor * s% pg% History_Track7_txt_scale, ierr)
     468              :          case ('history_track8')
     469              :             call do_History_Track8_plot(&
     470              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% History_Track8_title, &
     471            0 :                txt_scale_factor * s% pg% History_Track8_txt_scale, ierr)
     472              :          case ('history_track9')
     473              :             call do_History_Track9_plot(&
     474              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% History_Track9_title, &
     475            0 :                txt_scale_factor * s% pg% History_Track9_txt_scale, ierr)
     476              :          case ('kipp')
     477              :             call do_Kipp_plot(&
     478              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Kipp_title, &
     479            0 :                txt_scale_factor * s% pg% Kipp_txt_scale, ierr)
     480              :          case ('network')
     481              :             call do_Network_plot(&
     482              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Network_title, &
     483            0 :                txt_scale_factor * s% pg% Network_txt_scale, ierr)
     484              :          case ('production')
     485              :             call do_Production_plot(&
     486              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Production_title, &
     487            0 :                txt_scale_factor * s% pg% Production_txt_scale, ierr)
     488              :          case ('text_summary1')
     489              :             call do_Text_Summary1_plot(&
     490              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Text_Summary1_title, &
     491            0 :                txt_scale_factor * s% pg% Text_Summary1_txt_scale, s% pg% Text_Summary1_dxval, ierr)
     492              :          case ('text_summary2')
     493              :             call do_Text_Summary2_plot(&
     494              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Text_Summary2_title, &
     495            0 :                txt_scale_factor * s% pg% Text_Summary2_txt_scale, s% pg% Text_Summary2_dxval, ierr)
     496              :          case ('text_summary3')
     497              :             call do_Text_Summary3_plot(&
     498              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Text_Summary3_title, &
     499            0 :                txt_scale_factor * s% pg% Text_Summary3_txt_scale, s% pg% Text_Summary3_dxval, ierr)
     500              :          case ('text_summary4')
     501              :             call do_Text_Summary4_plot(&
     502              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Text_Summary4_title, &
     503            0 :                txt_scale_factor * s% pg% Text_Summary4_txt_scale, s% pg% Text_Summary4_dxval, ierr)
     504              :          case ('text_summary5')
     505              :             call do_Text_Summary5_plot(&
     506              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Text_Summary5_title, &
     507            0 :                txt_scale_factor * s% pg% Text_Summary5_txt_scale, s% pg% Text_Summary5_dxval, ierr)
     508              :          case ('text_summary6')
     509              :             call do_Text_Summary6_plot(&
     510              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Text_Summary6_title, &
     511            0 :                txt_scale_factor * s% pg% Text_Summary6_txt_scale, s% pg% Text_Summary6_dxval, ierr)
     512              :          case ('text_summary7')
     513              :             call do_Text_Summary7_plot(&
     514              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Text_Summary7_title, &
     515            0 :                txt_scale_factor * s% pg% Text_Summary7_txt_scale, s% pg% Text_Summary7_dxval, ierr)
     516              :          case ('text_summary8')
     517              :             call do_Text_Summary8_plot(&
     518              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Text_Summary8_title, &
     519            0 :                txt_scale_factor * s% pg% Text_Summary8_txt_scale, s% pg% Text_Summary8_dxval, ierr)
     520              :          case ('text_summary9')
     521              :             call do_Text_Summary9_plot(&
     522              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Text_Summary9_title, &
     523            0 :                txt_scale_factor * s% pg% Text_Summary9_txt_scale, s% pg% Text_Summary9_dxval, ierr)
     524              :          case('grid1')
     525              :             call do_grid1_plot(&
     526              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Grid1_title, &
     527            0 :                txt_scale_factor * s% pg% Grid1_txt_scale_factor, ierr)
     528              :          case('grid2')
     529              :             call do_grid2_plot(&
     530              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Grid2_title, &
     531            0 :                txt_scale_factor * s% pg% Grid2_txt_scale_factor, ierr)
     532              :          case('grid3')
     533              :             call do_grid3_plot(&
     534              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Grid3_title, &
     535            0 :                txt_scale_factor * s% pg% Grid3_txt_scale_factor, ierr)
     536              :          case('grid4')
     537              :             call do_grid4_plot(&
     538              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Grid4_title, &
     539            0 :                txt_scale_factor * s% pg% Grid4_txt_scale_factor, ierr)
     540              :          case('grid5')
     541              :             call do_grid5_plot(&
     542              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Grid5_title, &
     543            0 :                txt_scale_factor * s% pg% Grid5_txt_scale_factor, ierr)
     544              :          case('grid6')
     545              :             call do_grid6_plot(&
     546              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Grid6_title, &
     547            0 :                txt_scale_factor * s% pg% Grid6_txt_scale_factor, ierr)
     548              :          case('grid7')
     549              :             call do_grid7_plot(&
     550              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Grid7_title, &
     551            0 :                txt_scale_factor * s% pg% Grid7_txt_scale_factor, ierr)
     552              :          case('grid8')
     553              :             call do_grid8_plot(&
     554              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Grid8_title, &
     555            0 :                txt_scale_factor * s% pg% Grid8_txt_scale_factor, ierr)
     556              :          case('grid9')
     557              :             call do_grid9_plot(&
     558              :                s, star_id, device_id, xleft, xright, ybot, ytop, star_subplot, s% pg% Grid9_title, &
     559            0 :                txt_scale_factor * s% pg% Grid9_txt_scale_factor, ierr)
     560              :          case default
     561              :             ! check for "other" plot
     562            0 :             found_it = .false.
     563            0 :             do j = 1, max_num_Other_plots
     564            0 :                plot_id = i_Other + j - 1
     565            0 :                p => s% pg% pgstar_win_file_ptr(plot_id)
     566            0 :                if (p% okay_to_call_do_plot_in_grid .and. &
     567            0 :                   StrLowCase(p% name) == StrLowCase(star_plot_name)) then
     568              :                   call p% do_plot_in_grid(&
     569              :                      star_id, device_id, xleft, xright, ybot, ytop, &
     570            0 :                      txt_scale_factor, ierr)
     571            0 :                   found_it = .true.
     572            0 :                   exit
     573              :                end if
     574              :             end do
     575              : 
     576            0 :             if (.not. found_it) then
     577              : 
     578              :                write(*, *) 'FAILED TO RECOGNIZE NAME FOR STAR PLOT: ' &
     579            0 :                   // trim(star_plot_name)
     580              :                write(*, '(a)') &
     581            0 :                   'here are the valid names', &
     582            0 :                   'Kipp', &
     583            0 :                   'HR', &
     584            0 :                   'TRho', &
     585            0 :                   'R_Teff', &
     586            0 :                   'R_L', &
     587            0 :                   'L_Teff', &
     588            0 :                   'L_R', &
     589            0 :                   'L_v', &
     590            0 :                   'logL_Teff', &
     591            0 :                   'logL_R', &
     592            0 :                   'logL_v', &
     593            0 :                   'logg_Teff', &
     594            0 :                   'logg_logT', &
     595            0 :                   'dPg_dnu', &
     596            0 :                   'TRho_Profile', &
     597            0 :                   'Summary_Burn', &
     598            0 :                   'Summary_Profile', &
     599            0 :                   'Summary_History', &
     600            0 :                   'Abundance', &
     601            0 :                   'Network', &
     602            0 :                   'Production', &
     603            0 :                   'Power', &
     604            0 :                   'Dynamo', &
     605            0 :                   'Mixing', &
     606            0 :                   'Mode_Prop', &
     607            0 :                   'Text_Summary1,..,9', &
     608            0 :                   'Profile_Panels1,..,9', &
     609            0 :                   'History_Panels1,..,9', &
     610            0 :                   'History_Tracks1,..,9', &
     611            0 :                   'Color_Magnitude1,..,9', &
     612            0 :                   'Grid1,..,9', &
     613            0 :                   'and if you are using star/astero', &
     614            0 :                   'Echelle', &
     615            0 :                   'Ratios'
     616            0 :                write(*, *)
     617              : 
     618              :             end if
     619              : 
     620              :          end select
     621              : 
     622            0 :       end subroutine plot_case
     623              : 
     624              :    end subroutine do_star_plot
     625              : 
     626              : 
     627              : end module pgbinary_star
        

Generated by: LCOV version 2.0-1