
&star_job

      show_log_description_at_start = .false.

      load_saved_model = .true.
      load_model_filename = 'ZAMS_model_16.mod'
      create_pre_main_sequence_model = .false.

      set_initial_model_number = .true.
      initial_model_number = 0

      ! we do not model rotation
    new_rotation_flag = .false.
    change_rotation_flag = .false.
    set_initial_surface_rotation_v = .false.

    ! turn on hydro to help ease convergence
    change_initial_v_flag = .true.
    change_v_flag = .true.
    new_v_flag = .true.
    
      pgstar_flag = .true.


/ ! end of star_job namelist

&eos
  ! eos options
  ! see eos/defaults/eos.defaults

/ ! end of eos namelist


&kap
  ! kap options
  ! see kap/defaults/kap.defaults
  use_Type2_opacities = .true.
  Zbase = 0.0034

/ ! end of kap namelist

&controls

  ! Where to put the output files for the star
    log_directory = 'LOGS2'
    !photo_directory = 'photos2'

  ! Store the screenlong from the star
    extra_terminal_output_file = 'log2'
 
  ! Settings for saving output and for screenlog
    profile_interval = 100000
    photo_interval = 100000
    history_interval = 1
    terminal_interval = 10
    write_header_frequency = 10

  ! Metallicity
    initial_z = 0.0034

  ! Central abundance limit
    xa_central_lower_limit_species(1) = 'he4'
    xa_central_lower_limit(1) = 0.01d0


  ! MIXING
  ! 1) Semiconvection
    use_ledoux_criterion = .true.
    alpha_semiconvection = 0.01

  ! 2) Thermohaline mixing
    thermohaline_coeff = 1.0

  ! 3) Convection
    mixing_length_alpha = 1.8
    do_conv_premix = .false.

  ! 4) Overshooting
      overshoot_scheme(1) = 'step'
      overshoot_zone_type(1) = 'burn_H'
      overshoot_zone_loc(1) = 'core'
      overshoot_bdy_loc(1) = 'top'
      overshoot_f(1) = 0.18d0   
      overshoot_f0(1) = 0.02d0

      overshoot_scheme(2) = 'step'
      overshoot_zone_type(2) = 'burn_He'
      overshoot_zone_loc(2) = 'core'
      overshoot_bdy_loc(2) = 'top'
      overshoot_f(2) = 0.18d0   
      overshoot_f0(2) = 0.02d0

  ! WIND MASS LOSS
  ! 1) Cool stars
    cool_wind_RGB_scheme = 'Dutch'
    cool_wind_AGB_scheme = 'Dutch'
    Reimers_scaling_factor = 1d0

  ! 2) Hot stars
    hot_wind_scheme = 'Dutch'
    Dutch_scaling_factor = 1d0


  max_logT_for_k_below_const_q = 100 ! default 5
  max_q_for_k_below_const_q = 0.995  ! default 1.0
  min_q_for_k_below_const_q = 0.995! default 0.999d0
  max_logT_for_k_const_mass = 100 ! default 6
  max_q_for_k_const_mass = 0.99 ! default 1.0
  min_q_for_k_const_mass = 0.99 ! default 0.995
  
  ! resolution
  mesh_delta_coeff = 2.0d0
  ! delta_XH_cntr_limit = 0.05d0

  ! varcontrol_target = 2d-3
  ! always_use_dedt_form_of_energy_eqn = .false.
!  fix_eps_grav_transition_to_grid = .true.
/ ! end of controls namelist


&pgstar
    ! pause = .true.
    pgstar_show_age_in_years = .true. 
    pgstar_show_title = .false.

    ! *********************************
    ! ***** general grid controls *****
    ! *********************************
             
    !file_white_on_black_flag = .false.
    !win_white_on_black_flag = .false.
    Grid2_win_flag = .true.
    Grid2_num_cols = 16 ! divide plotting region into this many equal width cols
    Grid2_num_plots = 8
    Grid2_num_rows = 9 
    Grid2_win_width = 15!26
    ! Grid2_win_width = 19
    Grid2_win_aspect_ratio = 0.55 ! aspect_ratio = height/width
    Grid2_xleft = 0.04 ! fraction of full window width for margin on left
    Grid2_xright = 0.96 ! fraction of full window width for margin on right
    Grid2_ybot = 0.02 ! fraction of full window width for margin on bottom
    Grid2_ytop = 0.95 ! fraction of full window width for margin on top
    Grid2_file_flag = .true.
    Grid2_file_dir = 'png'
    Grid2_file_prefix = 'Grid2'
    Grid2_file_interval = 30 
    Grid2_file_width = 21
    Grid2_file_aspect_ratio = 0.6


    ! ***********************************
    ! ***** central conditions plot *****
    ! ***********************************
    Grid2_plot_name(1) = 'TRho_Profile'
    Grid2_plot_row(1) = 7
    Grid2_plot_rowspan(1) = 3
    Grid2_plot_col(1) = 9 
    Grid2_plot_colspan(1) = 3 
    Grid2_plot_pad_left(1) = 0.0
    Grid2_plot_pad_right(1) = 0.0
    Grid2_plot_pad_top(1) = 0.06
    Grid2_plot_pad_bot(1) = 0.03
    Grid2_txt_scale_factor(1) = 0.5 
    show_TRho_Profile_legend = .true.      
    show_TRho_Profile_eos_regions = .true.=.false.
    show_TRho_annotation1 = .true.
    show_TRho_annotation2 = .true.
    show_TRho_annotation3 = .true.
    show_TRho_degeneracy_line = .true.    

 
    ! **********************
    ! ***** HR diagram *****
    ! **********************
    Grid2_plot_name(2) = 'HR'
    Grid2_plot_row(2) = 5
    Grid2_plot_rowspan(2) = 5
    Grid2_plot_col(2) = 1
    Grid2_plot_colspan(2) = 5
    Grid2_plot_pad_left(2) = 0.0
    Grid2_plot_pad_right(2) = 0.03
    Grid2_plot_pad_top(2) = 0.05
    Grid2_plot_pad_bot(2) = 0.05
    Grid2_txt_scale_factor(2) = 0.5



    ! ******************************
    ! ***** Kippenhahn diagram *****
    ! ******************************

    Grid2_plot_name(3) = 'Kipp'
    Grid2_plot_row(3) = 0
    Grid2_plot_rowspan(3) = 5
    Grid2_plot_col(3) = 1 
    Grid2_plot_colspan(3) = 5
    Grid2_plot_pad_left(3) = 0.00
    Grid2_plot_pad_right(3) = 0.02
    Grid2_plot_pad_top(3) = 0.06
    Grid2_plot_pad_bot(3) = 0.05
    Grid2_txt_scale_factor(3) = 0.5



    ! **************************
    ! ***** Text summaries *****
    ! **************************

    Grid2_plot_name(4) = 'Text_Summary1'
    Grid2_plot_row(4) =0 
    Grid2_plot_rowspan(4) = 3
    Grid2_plot_col(4) = 6
    Grid2_plot_colspan(4) = 2
    Grid2_plot_pad_left(4) = 0.0
    Grid2_plot_pad_right(4) =0.0
    Grid2_plot_pad_top(4) = 0.05
    Grid2_plot_pad_bot(4) = 0.0
    Grid2_txt_scale_factor(4) = 0.14 
    Text_Summary1_num_rows = 12
    Text_Summary1_num_cols = 1
    Text_Summary1_name(:,:) = ''

    Text_Summary1_name(1,1) = 'model_number'
    Text_Summary1_name(2,1) = 'log_star_age'
    Text_Summary1_name(3,1) = 'log_dt'
    Text_Summary1_name(4,1) = 'num_zones'
    Text_Summary1_name(5,1) = 'num_retries'
    ! Text_Summary1_name(6,1) = 'num_backups'
    Text_Summary1_name(7,1) = 'star_mass'
    Text_Summary1_name(8,1) = 'log_abs_mdot'
    Text_Summary1_name(9,1) = 'log_L'
    Text_Summary1_name(10,1) = 'log_Teff'
    Text_Summary1_name(11,1) = 'log_R'
    Text_Summary1_name(12,1) = 'log_g'

    Grid2_plot_name(5) = 'Text_Summary2'
    Grid2_plot_row(5) =3 
    Grid2_plot_rowspan(5) = 3
    Grid2_plot_col(5) = 6
    Grid2_plot_colspan(5) = 2
    Grid2_plot_pad_left(5) = 0.0
    Grid2_plot_pad_right(5) =0.0
    Grid2_plot_pad_top(5) = 0.05
    Grid2_plot_pad_bot(5) = 0.0
    Grid2_txt_scale_factor(5) = 0.14 
    Text_Summary2_num_rows = 12
    Text_Summary2_num_cols = 1
    Text_Summary2_name(:,:) = ''

    Text_Summary2_name(1,1) = 'log_Lnuc'
    Text_Summary2_name(2,1) = 'log_Lneu'
    Text_Summary2_name(3,1) = 'log_LHe'
    Text_Summary2_name(4,1) = 'log_LZ'
    Text_Summary2_name(5,1) = 'log_cntr_T'
    Text_Summary2_name(6,1) = 'center_h1'
    Text_Summary2_name(7,1) = 'center_he4'
    Text_Summary2_name(8,1) = 'surf_avg_omega_div_omega_crit'
    Text_Summary2_name(9,1) = 'surf_avg_Lrad_div_Ledd'
    Text_Summary2_name(10,1) = 'center_c12'
    Text_Summary2_name(11,1) = 'center_o16'
    Text_Summary2_name(12,1) = ''

    Grid2_plot_name(6) = 'Text_Summary3'
    Grid2_plot_row(6) =6 
    Grid2_plot_rowspan(6) = 3
    Grid2_plot_col(6) = 6
    Grid2_plot_colspan(6) = 2
    Grid2_plot_pad_left(6) = 0.0
    Grid2_plot_pad_right(6) =0.0
    Grid2_plot_pad_top(6) = 0.05
    Grid2_plot_pad_bot(6) = 0.0
    Grid2_txt_scale_factor(6) = 0.14 
    Text_Summary3_num_rows = 12
    Text_Summary3_num_cols = 1
    Text_Summary3_name(:,:) = ''

    Text_Summary3_name(1,1) = 'surf_avg_omega'
    Text_Summary3_name(2,1) = 'v_surf'
    Text_Summary3_name(3,1) = 'log_L_div_Ledd'
    Text_Summary3_name(4,1) = ''
    Text_Summary3_name(5,1) = ''
    Text_Summary3_name(6,1) = ''
    Text_Summary3_name(7,1) = 'surface_he4'
    Text_Summary3_name(8,1) = 'surface_n14'
    Text_Summary3_name(9,1) = 'surface_c12'
    Text_Summary3_name(10,1) = ''
    Text_Summary3_name(11,1) = ''
    Text_Summary3_name(12,1) = ''
        

        

    ! ****************************
    ! ***** Internal profiles ****
    ! ****************************


    Grid2_plot_name(7) = 'Profile_Panels3'
    Grid2_plot_row(7) = 0
    Grid2_plot_rowspan(7) = 7 
    Grid2_plot_col(7) =8 
    Grid2_plot_colspan(7) = 4
    Grid2_plot_pad_left(7) = 0.05
    Grid2_plot_pad_right(7) = 0.02
    Grid2_plot_pad_top(7) = 0.07
    Grid2_plot_pad_bot(7) = 0.0
    Grid2_txt_scale_factor(7) = 0.5
    Abundance_legend_txt_scale_factor = 1.0 
    Power_legend_txt_scale_factor = 1.0 

    Abundance_use_decorator = .false.
    Abundance_legend_max_cnt = 0
    !Abundance_xmin = -6
    Abundance_log_mass_frac_min = -4 ! only used if < 0

    Profile_Panels3_title = 'Abundance-Power-Mixing'
    Profile_Panels3_xaxis_name = "zone"
    Profile_Panels3_num_panels = 4
    Profile_Panels3_txt_scale = 1.0
    Profile_Panels3_yaxis_name(1) = 'Abundance'
    Profile_Panels3_yaxis_name(2) = 'Power'
    Profile_Panels3_yaxis_name(3) = 'Mixing'
    Profile_Panels3_yaxis_name(4) = 'v_rot'
    Profile_Panels3_other_yaxis_name(4) = 'omega_div_omega_crit'

    Profile_Panels3_xaxis_reversed = .false.
    Profile_Panels3_xmin = 0.0 ! only used if /= -101d0
    ! Profile_Panels3_xmax = 300
    Power_use_decorator = .true.

    ! ******************************
    ! ***** History panels *********
    ! ******************************
    Grid2_plot_name(8) = 'History_Panels1'
    History_Panels1_num_panels = 5
    History_Panels1_yaxis_name(1) = 'lg_wind_mdot_1'
    History_Panels1_other_yaxis_name(1) = 'lg_mtransfer_rate'
    History_Panels1_yaxis_name(2) = 'star_mass'
    History_Panels1_other_yaxis_name(2) = 'envelope_mass'
    History_Panels1_yaxis_name(3) = 'radius'
    History_Panels1_other_yaxis_name(3) = 'rl_2'
    History_Panels1_yaxis_name(4) = 'v_orb_2'
    History_Panels1_other_yaxis_name(4) = 'period_days'
    History_Panels1_yaxis_name(5) = 'surface_he4'
    History_Panels1_other_yaxis_name(5) = 'surface_n14'
    History_Panels1_xaxis_name = 'model_number'
    History_Panels1_yaxis_reversed(:) = .false.
    History_Panels1_yaxis_log(:) = .false.
     
    !History_Panels1_ymin(:) = -15d0
    !History_Panels1_ymax(:) = 0d0
    History_Panels1_ymargin(:) = 0.5
    History_Panels1_dymin(:) = -1

    Grid2_plot_row(8) =0
    Grid2_plot_rowspan(8) =10 
    Grid2_plot_col(8) = 13 
    Grid2_plot_colspan(8) = 4 
    Grid2_plot_pad_left(8) = 0.02
    Grid2_plot_pad_right(8) = 0.03
    Grid2_plot_pad_top(8) = 0.07
    Grid2_plot_pad_bot(8) = 0.05
    Grid2_txt_scale_factor(8) = 0.5

      
/ ! end of pgstar namelist

