[mesa-users] Creating extra plots
Josiah Schwab
jwschwab at berkeley.edu
Thu Aug 9 02:34:00 EDT 2012
I'm headed to bed in a few min, so I just have time for a few quick thoughts. Also, in general please cc mesa-users on follow up messages, if only so we can all learn together.
I'm still a little fuzzy on exactly what it is you want to do. You clearly know about the existing pgstar abundance window, given the inlist you showed. Is it that you want multiple abundances windows?
Reading your message, I got the feeling that you don't quite understand what the code does (which is ok; MESA is complex.) The other_pgstar_plots.f and sample_pgstar_plot.f routines sketch out the plotting interface and illustrate how one generally makes a pgstar plot. But they're just examples and have very minimal functionality. Those files are the place to start if you need to make a plot that doesn't exist, but you're going to have to write the code to do it.
Of course, it kind of sounds like you *don't* want an entirely new kind of plot that no one has ever made, in which case I think most of that should be unnecessary. For example, if you want duplicate the functionality of the existing abundance window, the place to start is going to be the code that draws the current abundance window, not the simple example code.
Others can chime in or I can follow up some more in (my) morning.
Best,
Josiah
On Aug 8, 2012, at 10:18 PM, Thomas Stephen wrote:
> Okay, so I did the following:
>
> i)
> I opened "star/public/other_pgstar_plots.f" and copied:
>
> subroutine null_other_pgstar_plots_info(id, ierr)
> integer, intent(in) :: id
> integer, intent(out) :: ierr
> ierr = 0
> end subroutine null_other_pgstar_plots_info
>
> into "src/run_star_extras.f"
>
> ii)
> Next I copied the contents of "star/public/sample_pgstar_plot.f" and put it into into "src/run_star_extras.f"
>
> iii)
> After that I had made added in to the inlist file that contained all the information on the star, a new plot down at the very bottom, but before the "/". I did so by copying:
>
> ! you can add your own plots for pgstar. see other_pgstar_plots.f
> ! this is a sample inlist for it
>
> &abunVmass
>
> abunVmass_win_flag = .true.
>
> abunVmass_win_width = 12.0
> abunVmass_win_aspect_ratio = 0.618 ! aspect_ratio = height/width
>
> abunVmass_num_isos_to_show = 5 ! up to 20; < 0 means show as many as will fit
> abunVmass_which_isos_to_show(1) = 'h1'
> abunVmass_which_isos_to_show(2) = 'he3'
> abunVmass_which_isos_to_show(3) = 'he4'
> abunVmass_which_isos_to_show(4) = 'c13'
> abunVmass_which_isos_to_show(5) = 'li7'
> abunVmass_which_isos_to_show(6) = ''
> abunVmass_which_isos_to_show(7) = ''
> abunVmass_which_isos_to_show(8) = ''
> abunVmass_which_isos_to_show(9) = ''
> abunVmass_which_isos_to_show(10) = ''
> abunVmass_which_isos_to_show(11) = ''
> abunVmass_which_isos_to_show(12) = ''
> abunVmass_which_isos_to_show(13) = ''
> abunVmass_which_isos_to_show(14) = ''
> abunVmass_which_isos_to_show(15) = ''
> abunVmass_which_isos_to_show(16) = ''
> abunVmass_which_isos_to_show(17) = ''
> abunVmass_which_isos_to_show(18) = ''
> abunVmass_which_isos_to_show(19) = ''
> abunVmass_which_isos_to_show(20) = ''
> ! .... up to 20 isos to show
>
> abunVmass_xaxis_by = 'by_mass'
>
> ! power xaxis limits -- to override system default selections
> abunVmass_xmin = 0 ! only used if > -100
> abunVmass_xmax = 1 ! only used if > -100
>
> ! power yaxis limits -- to override system default selections
> abunVmass_log_mass_frac_min = -15 ! only used if < 0
> abunVmass_log_mass_frac_max = 1 ! only used if < 0
>
> show_abunVmass_cross_hair = .false.
>
> ! file output
> !abunVmass_file_flag = .true.
> abunVmass_file_dir = 'pgstar_out'
> abunVmass_file_prefix = 'abund'
> abunVmass_file_cnt = 5 ! output when mod(model_number,abunVmass_file_cnt)==0
> abunVmass_file_width = -1 ! negative means use same value as for window
> abunVmass_file_aspect_ratio = -1 ! negative means use same value as for window
>
>
> / ! end of pgstar_other namelist
>
> which is a new file based off "star/public/inlist_pgstar_other" and you can see I plan to call the new plot abunVmass.
>
> iv)
> I also added into the "inlist" file an extra few lines of:
>
> &abunVmass
>
> read_abunVmass_inlist1 = .true.
> extra_abunVmass_inlist1_name = 'inlist_sol (pp_c13_t)'
>
> / ! end of abunVmass namelist
>
> After all that I still receive no errors, but the new plot doesn't show up. I have a feeling I went terribly wrong somewhere, but also think I'm quite close to having it working properly.
>
> Sorry for all the text, but thanks for any help.
>
> Tom
>
> On 9 August 2012 14:03, Josiah Schwab <jwschwab at berkeley.edu> wrote:
> > I was having some trouble creating extra plots, I think I followed the instructions correctly, however when running MESA no new plot windows come up, and there aren't any errors. I copied what was said to be copied I think to the correct locations but still no luck.
>
> I predict that you will receive much more useful advice if you actually describe what you're doing!
>
> For example,
> - which instructions are you following?
> - do *any* plot windows appear correctly?
> - what did you copy?
> - what do you think these "correct locations" are?
>
> Most of us are pretty lousy mind readers :)
>
> Best,
> Josiah
>
More information about the Mesa-users
mailing list