! inlist_zams

&star_job
      show_log_description_at_start = .false.

      ! load saved model
      load_saved_model = .true.
      saved_model_name = 'Ms2_zams.mod'

      ! save a model at the end of the run
      save_model_when_terminate = .true.
      save_model_filename = 'Ms2_tams.mod'

      !pgstar_flag = .true.

      ! For switching reaction networks.
      change_net = .true.
      new_net_name = 'mesa_49.net'

      set_rates_preference = .true.
      new_rates_preference = 2 ! jina

      !has to be the same as in kap
      initial_zfracs = 6 ! AGSS09

/ ! end of star_job namelist

&eos


/ ! end of eos namelist

&kap
      !e.g. from AGSS09 (same as initial_zfracs)
      Zbase = 0.0142d0
      kap_file_prefix = 'a09' !for higher T
      kap_lowT_prefix = 'lowT_fa05_a09p' !for lower T
      kap_CO_prefix = 'a09_co' !beyond H burning

/ ! end of kap namelist


&controls
         num_trace_history_values = 2
         trace_history_value_name(1) = 'rel_E_err'
         trace_history_value_name(2) = 'log_rel_run_E_err'


         ! starting specifications
         initial_mass = 2.0d0 ! in Msun units
         initial_Y = 0.2703d0 ! solar metalicity
         initial_Z = 0.0142d0 ! solar metalicity

         !overshoot for M > 1.2 Msun
         overshoot_scheme(1) = 'exponential'
         overshoot_zone_type(1) = 'any'
         overshoot_zone_loc(1) = 'any'
         overshoot_bdy_loc(1) = 'any'
         overshoot_f(1) = 0.014
         overshoot_f0(1) = 0.004

         !from Jamie 2019 STARRS
         delta_lg_XH_cntr_hard_limit = 0.05d0
         mixing_length_alpha = 2
         do_element_diffusion = .true.
         diffusion_min_dq_at_surface = 1d-4

         ! stop when the center mass fraction of h1 drops below this limit
         xa_central_lower_limit_species(1) = 'h1'
         xa_central_lower_limit(1) = 0.001d0
         max_age = 10e9

         !how often it saves
         max_num_profile_models = 2000
         photo_interval = 50
         profile_interval = 2
         history_interval = 10
         terminal_interval = 10
         write_header_frequency = 10
         !name of profile files
         profile_data_prefix = 'tams'



/ ! end of controls namelist



&pgstar


!pause = .true.
         pgstar_grid_title_scale = 1.2
         pgstar_grid_title_disp = 2


         ! show HR diagram
         ! this plots the history of L,Teff over many timesteps
           HR_win_flag = .true.

         ! set static plot bounds
           HR_logT_min = 3.5
           HR_logT_max = 4.9
           HR_logL_min = -1.0
           HR_logL_max = 5.0

         ! set window size (aspect_ratio = height/width)
           HR_win_width = 6
           HR_win_aspect_ratio = 1.0


      Grid3_win_flag = .true.


         Grid3_win_width = 12
         Grid3_win_aspect_ratio = 0.7 ! aspect_ratio = height/width

         Grid3_xleft = 0.10 ! fraction of full window width for margin on left
         Grid3_xright = 0.89 ! fraction of full window width for margin on right
         Grid3_ybot = 0.08 ! fraction of full window width for margin on bottom
         Grid3_ytop = 0.92 ! fraction of full window width for margin on top
         Grid3_title = 'Mixing'

         Grid3_num_cols = 2 ! divide plotting region into this many equal width cols
         Grid3_num_rows = 4 ! divide plotting region into this many equal height rows
         Grid3_num_plots = 4 ! <= 10

         Grid3_plot_name(1) = 'Mixing'

         Mixing_xmin = 0.22 ! only used if /= -101d0
         Mixing_xmax = 0.28 ! only used if /= -101d0

         Mixing_ymin = -101d0 ! only used if /= -101d0
         Mixing_ymax = -101d0 ! only used if /= -101d0
         Mixing_dymin = -101d0 ! only used if /= -101d0


         Grid3_plot_row(1) = 3 ! number from 1 at top
         Grid3_plot_rowspan(1) = 2 ! plot spans this number of rows
         Grid3_plot_col(1) =  2 ! number from 1 at left
         Grid3_plot_colspan(1) = 1 ! plot spans this number of columns
         Grid3_plot_pad_left(1) = 0.08 ! fraction of full window width for padding on left
         Grid3_plot_pad_right(1) = 0.00 ! fraction of full window width for padding on right
         Grid3_plot_pad_top(1) = 0.08 ! fraction of full window height for padding at top
         Grid3_plot_pad_bot(1) = 0.00 ! fraction of full window height for padding at bottom
         Grid3_txt_scale_factor(1) = 0.7 ! multiply txt_scale for subplot by this



         Grid3_plot_name(3) = 'TRho_Profile'
         Grid3_plot_row(3) = 1 ! number from 1 at top
         Grid3_plot_rowspan(3) = 2 ! plot spans this number of rows
         Grid3_plot_col(3) =  2 ! number from 1 at left
         Grid3_plot_colspan(3) = 1 ! plot spans this number of columns
         Grid3_plot_pad_left(3) = 0.08 ! fraction of full window width for padding on left
         Grid3_plot_pad_right(3) = 0.00 ! fraction of full window width for padding on right
         Grid3_plot_pad_top(3) = 0.00 ! fraction of full window height for padding at top
         Grid3_plot_pad_bot(3) = 0.08 ! fraction of full window height for padding at bottom
         Grid3_txt_scale_factor(3) = 0.7 ! multiply txt_scale for subplot by this




         Grid3_plot_name(2) = 'History_Panels1'

         History_Panels1_title = 'History'

         History_Panels1_num_panels = 2
         History_Panels1_yaxis_name(1) = 'log_center_T'
         History_Panels1_other_yaxis_name(1) = 'log_L'
         History_Panels1_yaxis_name(2) = 'log_center_Rho'
         History_Panels1_other_yaxis_name(2) = 'log_Teff'

         Grid3_plot_row(2) = 3 ! number from 1 at top
         Grid3_plot_rowspan(2) = 2 ! plot spans this number of rows
         Grid3_plot_col(2) =  1 ! number from 1 at left
         Grid3_plot_colspan(2) = 1 ! plot spans this number of columns
         Grid3_plot_pad_left(2) = 0.00 ! fraction of full window width for padding on left
         Grid3_plot_pad_right(2) = 0.08 ! fraction of full window width for padding on right
         Grid3_plot_pad_top(2) = 0.08 ! fraction of full window height for padding at top
         Grid3_plot_pad_bot(2) = 0.00 ! fraction of full window height for padding at bottom
         Grid3_txt_scale_factor(2) = 0.7 ! multiply txt_scale for subplot by this



         ! file output
         Grid3_file_flag = .false.
         Grid3_file_dir = 'png'
         Grid3_file_prefix = 'grid3_'
         Grid3_file_interval = 5 ! output when mod(model_number,Grid3_file_interval)==0
         Grid3_file_width = -1 ! (inches) negative means use same value as for window
         Grid3_file_aspect_ratio = -1 ! negative means use same value as for window


         ! file output
         !Grid3_file_flag = .true.
         Grid3_file_dir = 'png'
         Grid3_file_prefix = 'Mixing_'
         Grid3_file_interval = 2 ! output when mod(model_number,Grid3_file_interval)==0


/ ! end of pgstar namelist
