

&star_job
      show_log_description_at_start = .false.
      
      !create_pre_main_sequence_model = .true.
      !pre_ms_T_c = 3d5
      show_log_description_at_start = .false. 

      !save_model_number = 701
      save_model_filename = 'thermohaline.mod'

      !load_saved_model = .true.
      saved_model_name = 'eject_envelope.mod'

      !change_net = .true.      
      !new_net_name = 'pp_extras.net'
      new_net_name = 'approx21.net'

      log_columns_file = 'log_columns.list' 
      profile_columns_file = 'profile_columns.list' 


      eos_file_prefix = 'mesa'
      kappa_file_prefix = 'gs98'

               
      change_v_flag = .true.
      new_v_flag = .true.
      !new_v_flag = .false.
               
      change_rotation_flag = .true.
      new_rotation_flag = .true.
      !new_rotation_flag = .false.
      
      !set_initial_omega_div_omega_crit = .true. ! only applies at start of run, not for restarts.
      !new_omega_div_omega_crit = 0.05 ! omega as fraction of current omega_crit at surface
      
      set_initial_surface_rotation_v = .true.
      new_surface_rotation_v = 10 ! km/sec    for 1.0 M

      !set_surface_rotation_v = .true.
      
      !new_surface_rotation_v = 10 ! km/sec    for 1.0 M
      !new_surface_rotation_v = 110 !  45 ! km/sec    for 1.5 M
         ! Cantiello & Langer, 2010, use 45 km/sec for 1.5 M
         ! Charbonnel & Lagarde, 2010, use 110 km/sec for 1.5 M
      !new_surface_rotation_v = 140 ! km/sec    for 2.0 M
      !new_surface_rotation_v = 250 ! km/sec    for 3.0 M
      !new_surface_rotation_v = 200 ! km/sec    for massive
      
      !profile_starting_model = .true.


      !change_lnPgas_flag = .true.
      !new_lnPgas_flag = .false.
      !new_lnPgas_flag = .true.

      !pgstar_flag = .true.
      
      change_lnPgas_flag = .true.
      new_lnPgas_flag = .true.


/ ! end of star_job namelist


&controls

         D_norm_kappa = 0 ! <= 0 disables use of D_norm
      
         use_lnE_for_eps_grav = .true.

         initial_mass = 1.0
         initial_z = 2d-2

         ! check for retries and backups as part of test_suite
         max_number_backups = 50
         max_number_retries = 100
         
         ! for 1 Msun
         !dq_smooth_DSI = 0.001 ! for D_DSI
         !dq_smooth_SH = 0.001 ! for D_SH
         !dq_smooth_SSI = 0.100 ! for D_SSI
         !dq_smooth_ES = 0.100 ! for D_ES
         !dq_smooth_GSF = 0.100 ! for D_GSF
         !dq_smooth_ST = 0.005 ! for D_ST and nu_ST


         ! to match Cantiello & Langer
         RGB_wind_scheme = ''
         AGB_wind_scheme = 'de Jager'
         RGB_to_AGB_wind_switch = 1d-4
         de_Jager_wind_eta = 1
         
         !mesh_delta_coeff = 1.5   ! for massive stars
         !mesh_delta_coeff = 0.7  
         
         !varcontrol_target = 4d-4 

         mixing_D_limit_for_log = 1d4
         
         
         ! for Figure 4 of Cantiello & Langer
         h1_boundary_mass_limit = 0.238 

         ! for comparison with Figure 9 of Cantiello & Langer
         !xa_central_lower_limit_species(1) = 'he4' ! isotope name as defined in chem_def
         !xa_central_lower_limit(1) = 0.032
         
         !stop_at_TP = .true.
         max_model_number = 2001
      
         !use_Ledoux_criterion = .false.
         use_Ledoux_criterion = .true.
         nsmooth_gradL_composition_term = 1
         !use_gradmu_alt_for_mlt = .true.
         !use_gradmu_X_for_mlt = .false.
         use_gradmu_alt_for_mlt = .false.
         use_gradmu_X_for_mlt = .true.

         gradL_comp_term_logRho_switch = 3
         

         alpha_semiconvection = 4d-2
         thermo_haline_coeff = 2  

         dX_mix_dist_limit = 1d-4 

         rate_factor_for_fe56ec_to_cr56 = 1d-4
         
         omega_function_weight = 20
         
         max_iter_for_resid_tol1 = 4
         max_iter_for_resid_tol2 = 7 
         max_iter_for_resid_tol3 = 10


         mdot_omega_power = 0.43

         clip_D_limit = 10 ! zero mixing diffusion coeffs that are smaller than this
         
         xa_scale = 1d-5
         newton_itermin = 2

         tol_correction_norm_alt = 1d-3
         tol_max_correction_alt = 1d0

         mass_change_full_on_dt = 1d7 ! (seconds)
         mass_change_full_off_dt = 1d6 ! (seconds)

         mixing_length_alpha = 1.6  ! 1.0 for M > 30
         
         !min_timestep_limit = 1d-12 ! (seconds)

         photostep = 100
         profile_interval = 100
         log_cnt = 10
         terminal_cnt = 10
         write_header_frequency = 10
         

         !report_hydro_solver_progress = .true. ! set true to see info about newton iterations
         !report_ierr = .true. ! if true, produce terminal output when have some internal error
         
         !max_years_for_timestep = 1d6

         !report_why_dt_limits = .true.
         !report_all_dt_limits = .true.

         !max_model_number = 13


         !show_mesh_changes = .true.
         !mesh_dump_call_number = 648
         !okay_to_remesh = .false.
         
         !trace_evolve = .true.
         
      ! hydro debugging
      !hydro_check_everything = .true.
      !hydro_inspectB_flag = .true.
      
      !hydro_numerical_jacobian = .true.
      !hydro_save_numjac_plot_data = .true.
      !small_mtx_decsol = 'lapack'
      !large_mtx_decsol = 'lapack'
      !hydro_dump_call_number = 195
         

         T_mix_limit = 1d4

         use_CO_enhanced_opacities = .false.
         !base_fC = 0.17123643187d0 ! base value of XC/Z
         !base_fO = 0.4812175d0 ! base value of XO/Z


/ ! end of controls namelist



&pgstar
         
      ! top level controls

         !pause = .true. 
            ! if true, the code waits for user to enter a RETURN on the command line
      
      ! main window
      
         MAIN_win_flag = .true.
         !MAIN_win_flag = .false.
         
         show_TRho_Profile_with_main = .true.
      
         show_HR_TRho_with_main = .true. ! if false, use aspect ratio > 1
         MAIN_win_width = 7
         MAIN_win_aspect_ratio = 1.2 ! aspect_ratio = height/width
      
         xaxis_by = 'by_mass' !'by_radius' 
            
         show_main_win_text_info = .true.
         
         ! xaxis limits -- to override system default selections
         !main_xmin = -12 !0.4
         main_xmax = 4.5
         
         logxq_cutoff = -12.1 ! min value when using logxm for xaxis
         !main_logL_max = 7
         !main_logL_min = 0
         
         ! control for plot showing abundances
         log_mass_frac_ymax = 0.7 ! making this > 0 helps readability
         log_mass_frac_ymin = -7.5
         num_abundance_line_labels = 5
      
         log_abund_vary = 0.1 ! don't show species if it would vary by < this in plot
      
         ! file output
         !MAIN_file_flag = .true.
         MAIN_file_dir = 'png'
         MAIN_file_prefix = 'main'
         MAIN_file_cnt = 2 ! output when mod(model_number,main_file_cnt)==0
               
               
      
      ! Abund_Pwr_Dmix window -- Abundance, Power, and Mixing Ds
      
         !Abund_Pwr_Dmix_win_flag = .true.
      
         Abund_Pwr_Dmix_win_width = 8.5
         Abund_Pwr_Dmix_win_aspect_ratio = 1.2 ! aspect_ratio = height/width
                  
         Abund_Pwr_Dmix_xaxis_by = '' ! select xaxis (same options as for main window)
            ! not used if == ''
         Abund_Pwr_Dmix_xmin = -101 ! only used if > -100
         Abund_Pwr_Dmix_xmax = -101 ! only used if > -100

         ! file output
         Abund_Pwr_Dmix_file_flag = .false.
         Abund_Pwr_Dmix_file_dir = 'pgstar_out'
         Abund_Pwr_Dmix_file_prefix = 'hr_trho'
         Abund_Pwr_Dmix_file_cnt = 5 ! output when mod(model_number,Abund_Pwr_Dmix_file_cnt)==0
         Abund_Pwr_Dmix_file_width = -1 ! negative means use same value as for window
         Abund_Pwr_Dmix_file_aspect_ratio = -1 ! negative means use same value as for window
      
      
      ! Abund_Pwr_Dmix_Dyn window -- Abundance, Power, Mixing Ds, and Dynamo
      
         Abund_Pwr_Dmix_Dyn_win_flag = .true.
      
         Abund_Pwr_Dmix_Dyn_win_width = 8.5
         Abund_Pwr_Dmix_Dyn_win_aspect_ratio = 1.2 ! aspect_ratio = height/width
                  
         Abund_Pwr_Dmix_Dyn_xaxis_by = '' ! select xaxis (same options as for main window)
            ! not used if == ''
         Abund_Pwr_Dmix_Dyn_xmin = -101 ! only used if > -100
         Abund_Pwr_Dmix_Dyn_xmax = -101 ! only used if > -100

         ! file output
         Abund_Pwr_Dmix_Dyn_file_flag = .false.
         Abund_Pwr_Dmix_Dyn_file_dir = 'pgstar_out'
         Abund_Pwr_Dmix_Dyn_file_prefix = 'hr_trho'
         Abund_Pwr_Dmix_Dyn_file_cnt = 5 ! output when mod(model_number,Abund_Pwr_Dmix_Dyn_file_cnt)==0
         Abund_Pwr_Dmix_Dyn_file_width = -1 ! negative means use same value as for window
         Abund_Pwr_Dmix_Dyn_file_aspect_ratio = -1 ! negative means use same value as for window
         
      
      
      ! Abund_Power window -- Abundance and Power together
      
         !Abund_Power_win_flag = .true.
      
         Abund_Power_win_width = 7
         Abund_Power_win_aspect_ratio = 1.2 ! aspect_ratio = height/width
                  
         Abund_Power_xaxis_by = '' ! select xaxis (same options as for main window)
            ! not used if == ''
         Abund_Power_xmin = -101 ! only used if > -100
         Abund_Power_xmax = -101 ! only used if > -100
                  
         ! file output
         Abund_Power_file_flag = .false.
         Abund_Power_file_dir = 'pgstar_out'
         Abund_Power_file_prefix = 'hr_trho'
         Abund_Power_file_cnt = 5 ! output when mod(model_number,Abund_Power_file_cnt)==0
         Abund_Power_file_width = -1 ! negative means use same value as for window
         Abund_Power_file_aspect_ratio = -1 ! negative means use same value as for window
         
      
      ! Mixing_Dynamo window -- Mixing_Ds and Dynamo together
      
         !Mixing_Dynamo_win_flag = .true.
      
         Mixing_Dynamo_win_width = 7
         Mixing_Dynamo_win_aspect_ratio = 1.2 ! aspect_ratio = height/width

         Mixing_Dynamo_xaxis_by = '' ! select xaxis (same options as for main window)
            ! not used if == ''
         Mixing_Dynamo_xmin = 0.55 !-101 ! only used if > -100
         Mixing_Dynamo_xmax = 0.58 !-101 ! only used if > -100
                  
         ! file output
         Mixing_Dynamo_file_flag = .false.
         Mixing_Dynamo_file_dir = 'pgstar_out'
         Mixing_Dynamo_file_prefix = 'hr_trho'
         Mixing_Dynamo_file_cnt = 5 ! output when mod(model_number,Mixing_Dynamo_file_cnt)==0
         Mixing_Dynamo_file_width = -1 ! negative means use same value as for window
         Mixing_Dynamo_file_aspect_ratio = -1 ! negative means use same value as for window
         
               
      ! TRho Profile window -- current model in T-Rho plane
      
         TRho_Profile_win_flag = .false.

         TRho_Profile_win_width = 7.5
         TRho_Profile_win_aspect_ratio = 0.618 ! aspect_ratio = height/width
            
         show_TRho_Profile_text_info = .false.
         show_TRho_Profile_legend = .true.
         show_HR_TRho_with_TRho_Profile = .false.
         show_TRho_Profile_burn_labels = .true.
         TRho_Profile_show_logQ_limit = .true.
         !show_TRho_Profile_cross_hair = .true.
         show_TRho_Profile_mass_locs = .false.

         show_TRho_Profile_kap_regions = .false.
         show_TRho_Profile_eos_regions = .true.
         show_TRho_Profile_degeneracy_line = .true.
         show_TRho_Profile_Pgas_Prad_line = .true.
         show_TRho_Profile_burn_lines = .true.

         !show_TRho_Profile_annotation1 = .true.
         !show_TRho_Profile_annotation2 = .true.
         !show_TRho_Profile_annotation3 = .true.
      
         ! axis limits
         TRho_Profile_xmin = -10
         TRho_Profile_xmax = 10
         TRho_Profile_ymin = 3.0
         TRho_Profile_ymax = 10
         
         ! file output
         !TRho_Profile_file_flag = .true.
         TRho_Profile_file_dir = 'png'
         TRho_Profile_file_prefix = 'trho_profile'
         TRho_Profile_file_cnt = 2 ! output when mod(model_number,TRho_Profile_file_cnt)==0
      
      
      ! Profile window
      
         !Profile_win_flag = .true.

         Profile_win_width = 7
         Profile_win_aspect_ratio = 0.618 ! aspect_ratio = height/width
            
         show_Profile_legend = .false.
         Profile_legend_coord = 0.65
         Profile_legend_fjust = 0.0
         Profile_legend_disp1 = -7.5
         Profile_legend_del_disp = -1.5
         Profile_show_mass_locs = .false.
         Profile_show_decorated_line = .false.
         
         show_HR_TRho_with_Profile = .false.
         show_Profile_text_info = .false.
         Profile_text_info_xfac = 0.78 ! controls x location
         Profile_text_info_dxfac = 0.02 ! controls x spacing to value from text
         Profile_text_info_yfac = 0.95 ! controls y location of 1st line
         Profile_text_info_dyfac = -0.04 ! controls line spacing
         show_Profile_cross_hair = .false.

         show_Profile_annotation1 = .false.
         show_Profile_annotation2 = .false.
         show_Profile_annotation3 = .false.
         
         ! axis choices
            ! to get a list of axis identifiers, edit your star_job controls
               ! to set show_profile_column_numbers = .true.
            ! you can use any identifier for x or y
         Profile_xaxis_name = 'logxm'
         !Profile_xaxis_reversed = .true.
         !Profile_xmin = -12 ! only used if > -100
         !Profile_xmax = 1.2 !-101 ! only used if > -100
         
         Profile_yaxis_name = 'log_omega' !'grada'
         Profile_yaxis_reversed = .false.
         Profile_ymin = -111 !5.4 ! only used if > -100
         Profile_ymax = -111 !8.6 ! only used if > -100    
         Profile_dymin = 0.5    
         
         Profile_other_yaxis_name = 'logR'
         Profile_other_yaxis_reversed = .false.
         Profile_other_ymin = -111 ! only used if > -100
         Profile_other_ymax = -111 ! only used if > -100        
         !Profile_other_dymin = 0.05    
         
         ! file output
         !Profile_file_flag = .true.
         Profile_file_dir = 'png'
         Profile_file_prefix = 'profile'
         Profile_file_cnt = 5 ! output when mod(model_number,Profile_file_cnt)==0
      
         
         
      ! Dynamo window
      
         !Dynamo_win_flag = .true.

         Dynamo_win_width = 6
         Dynamo_win_aspect_ratio = 0.62 ! aspect_ratio = height/width
            
         show_Dynamo_cross_hair = .false.

         show_Dynamo_annotation1 = .false.
         show_Dynamo_annotation2 = .false.
         show_Dynamo_annotation3 = .false.
         
         Dynamo_xaxis_by = 'by_mass' ! same choices as for main window xaxis_by
         Dynamo_xmin = -101 ! only used if > -100
         Dynamo_xmax = -101 ! only used if > -100
         
         Dynamo_ymin_left = -101 ! only used if > -100
         Dynamo_ymax_left = -101 ! only used if > -100        
         Dynamo_dymin_left = -101 ! only used if > -100 
         
         Dynamo_ymin_right = -101 ! only used if > -100
         Dynamo_ymax_right = -101 ! only used if > -100        
         Dynamo_dymin_right = -101 ! only used if > -100 
         
         ! file output
         Dynamo_file_flag = .false.
         Dynamo_file_dir = 'png'
         Dynamo_file_prefix = 'profile'
         Dynamo_file_cnt = 5 ! output when mod(model_number,Dynamo_file_cnt)==0
         Dynamo_file_width = -1 ! negative means use same value as for window
         Dynamo_file_aspect_ratio = -1 ! negative means use same value as for window
      
         
         
      ! Mixing_Ds window
      
         !Mixing_Ds_win_flag = .true.

         Mixing_Ds_win_width = 6
         Mixing_Ds_win_aspect_ratio = 0.62 ! aspect_ratio = height/width
            
         show_Mixing_Ds_cross_hair = .false.

         show_Mixing_Ds_annotation1 = .false.
         show_Mixing_Ds_annotation2 = .false.
         show_Mixing_Ds_annotation3 = .false.
         
         Mixing_Ds_xaxis_by = 'by_mass' ! same choices as for main window xaxis_by
         Mixing_Ds_xmin = -101 ! only used if > -100
         Mixing_Ds_xmax = -101 ! only used if > -100
         
         Mixing_Ds_ymin = -101 ! only used if > -100
         Mixing_Ds_ymax = -101 ! only used if > -100        
         Mixing_Ds_dymin = -101 ! only used if > -100
         
         ! file output
         !Mixing_Ds_file_flag = .true.
         Mixing_Ds_file_dir = 'png'
         Mixing_Ds_file_prefix = 'mixing_Ds'
         Mixing_Ds_file_cnt = 2 ! output when mod(model_number,Mixing_Ds_file_cnt)==0
         Mixing_Ds_file_width = -1 ! negative means use same value as for window
         Mixing_Ds_file_aspect_ratio = -1 ! negative means use same value as for window
      
      
      ! Power window
      
         Power_win_flag = .false.
      
         Power_win_width = 8.5
         Power_win_aspect_ratio = 0.618 ! aspect_ratio = height/width
      
         Power_xaxis_by = 'by_mass'
         
         ! power xaxis limits -- to override system default selections
         Power_xmin = -101 ! only used if > -100
         Power_xmax = -101 ! only used if > -100
         
         ! power yaxis limits -- to override system default selections
         Power_ymin = -101 ! only used if > -100
         Power_ymax = -101 ! only used if > -100

         show_Power_cross_hair = .false.
         
         ! file output
         Power_file_flag = .false.
         Power_file_dir = 'png'
         Power_file_prefix = 'power'
         Power_file_cnt = 5 ! output when mod(model_number,Power_file_cnt)==0
         Power_file_width = -1 ! negative means use same value as for window
         Power_file_aspect_ratio = -1 ! negative means use same value as for window
         
         
      ! Abundance window
      
         Abundance_win_flag = .false.
      
         Abundance_win_width = 8.5
         Abundance_win_aspect_ratio = 0.618 ! aspect_ratio = height/width
      
         Abundance_xaxis_by = 'by_mass' ! select xaxis
         
         ! power xaxis limits -- to override system default selections
         Abundance_xmin = -101 ! only used if > -100
         Abundance_xmax = -101 ! only used if > -100
         
         ! power yaxis limits -- to override system default selections
         Abundance_log_mass_frac_min = 1 ! only used if < 0
         Abundance_log_mass_frac_max = 1 ! only used if < 0

         show_Abundance_cross_hair = .false.
         
         ! file output
         Abundance_file_flag = .false.
         Abundance_file_dir = 'png'
         Abundance_file_prefix = 'abund'
         Abundance_file_cnt = 5 ! output when mod(model_number,Abundance_file_cnt)==0
         Abundance_file_width = -1 ! negative means use same value as for window
         Abundance_file_aspect_ratio = -1 ! negative means use same value as for window
         
         
         

         
      
      ! Convection window -- history of convection and more.
      
         !CONV_win_flag = .true.
      
         CONV_win_width = 7
         CONV_win_aspect_ratio = 0.62 ! aspect_ratio = height/width
      
         ! axis limits
         CONV_xmax = -1 ! step number.  negative means use default.
         CONV_xmin = -1 ! step number.  negative means use default.
         CONV_max_width = 0 ! only used if > 0.  causes xmin to move with xmax.
         CONV_mmax = -1 ! (Msun units) negative means use start initial mass
         CONV_mmin = 0.0 ! (Msun units)
         CONV_lgLmax = -101 ! only used if > -100; (L in Lsun units)
         CONV_lgLmin = -101 ! only used if > -100; (L in Lsun units)

         CONV_show_burn = .true.
         CONV_show_mixing = .true.
         CONV_show_log_radius = .true.
         CONV_show_luminosities = .true.
         CONV_show_mass_boundaries = .true.

         show_CONV_annotation1 = .false.
         show_CONV_annotation2 = .false.
         show_CONV_annotation3 = .false.
         
         ! file output
         CONV_file_flag = .false.
         CONV_file_dir = 'png'
         CONV_file_prefix = 'conv'
         CONV_file_cnt = 5 ! output when mod(model_number,CONV_file_cnt)==0
         CONV_file_width = -1 ! negative means use same value as for window
         CONV_file_aspect_ratio = -1 ! negative means use same value as for window
      
      
         
         
      ! Surface History window
      
         !Surf_Hist_win_flag = .true.
      
         Surf_Hist_win_width = 6.5
         Surf_Hist_win_aspect_ratio = 1.2 ! aspect_ratio = height/width
      
         ! axis limits
         Surf_Hist_xmax = -1 ! step number.  negative means use default.
         Surf_Hist_xmin = -1 ! step number.  negative means use default.
         Surf_Hist_max_width = 0 ! only used if > 0.  causes xmin to move with xmax.
         
         ! abundance limits
         Surf_Hist_mass_frac_min = 0
         Surf_Hist_mass_frac_max = 1.1 ! > 0 helps legibility

         show_Surf_Hist_annotation1 = .false.
         show_Surf_Hist_annotation2 = .false.
         show_Surf_Hist_annotation3 = .false.
         
         ! file output
         Surf_Hist_file_flag = .false.
         Surf_Hist_file_dir = 'png'
         Surf_Hist_file_prefix = 'conv'
         Surf_Hist_file_cnt = 5 ! output when mod(model_number,Surf_Hist_file_cnt)==0
         Surf_Hist_file_width = -1 ! negative means use same value as for window
         Surf_Hist_file_aspect_ratio = -1 ! negative means use same value as for window
      
         

/ ! end of pgstar namelist
