 &topology
  nr=296
  nt=230
  np=503
 /
 &data
  r0=1.00
  r1=30.00
  rfrac=      0.000000E+00, 3.103429E-04, 1.286535E-02, 9.934256E-02,
    1.034483E-01, 1.000000E+00
  drratio=    6.597761E-01, 3.472222E+01, 4.972940E+00, 1.000000E+00,
    1.347953E+01
  nfrmesh=5
  tfrac=      0.000000E+00, 1.388889E-01, 8.611111E-01, 1.000000E+00
  dtratio=    4.919341E-01, 1.000000E+00, 2.032793E+00
  nftmesh=5
  pfrac=      0.000000E+00
  dpratio=    1.000000E+00
  nfpmesh=5
  phishift=0.000000E+00
!
! RESTART INFORMATION
!
  rsh5out=.true.
!  rsifile='../ec19_prelim_02/rsec19_prelim_02002.h5'
!
! PLOT INFORMATION
!
  tpltxint=20.0
  trsdump=20.0
  plotlist='vr','vt','vp','br','bt','bp','jr','jt','jp','rho','t','heat','zp','zm','ep','em'
  tmax=200.0
!
! USE THESE IF you want the run to go
!
  ntmax=100000000
  dtmax=0.002
  dtmin=1e-7
  dt_init=1e-5
  dt_max_wave_cfl=200.
  ifprec_t = 3
  ifprec_v = 3
!
! USE THESE IF you want the run to stop immediately
!
!  ntmax=0
!  dtmax=1e-16
!  dtmin=1e-17
!  rs_final=.false.
!  ifprec_t = 1
!  ifprec_v = 1
!  ncghist = 100
!
  slund=3.e5
  eta_profile='UNIFORM'
!
  visc=.0015
  visc_profile='UNIFORM'
!
  epscg_a=1.e-11
  epscg_v=1.e-9
  epscg_potfld=1.e-11
!
! CALCULATION FRAME (PUT IT HERE TO BE UNAMBIGUOUS)
!
  calculation_frame='COROTATING'
  restart_calculation_frame='COROTATING'
!
! MAGNETIC FIELD SETUP
!
  initial_field='POTENTIAL_FIELD'
  bnfile='br_thermo_high_zmNrt20181023_1.4x_fb_diffused_tp.hdf'
  potential_field_bc = 'CLOSED_WALL'
  b_in_gauss=.true.
!
! INITIAL PLASMA CONDITIONS
!
  initial_plasma='1dfile'
  onedfile='initial_1au_rho40k.dat'
!
! SOLVER SETTINGS
!
  upwind_a=1.
  upwind_v=1.
  use_old_vdgv=.true.
  ncgmax=20000
!
! BOUNDARY CONDITIONS
!
  tchromo=17500.00
  tbc0   =17500.00
  rho0=40000.00
  char_bc=.true.
  ubzero=.false.
  cfl=.5
!
! THERMODYNAMIC MHD PARAMETERS
!
  advance_tc=.true.
  tcond=1.00
  t_cutoff1=4.00e5
  p_cutoff1=0.00
  nfilt_kappa=0
!
  radloss=1.00
  ifimplrad=0
  rad_law='CHIANTI_v713_HYBRID'
!
  tc_r=10.00
  tc_dr=1.00
  tc_fac0=1.00
  tc_fac1=0.00
  print_matrix_t=.false.
  alpha_nocoll=1.00
  tc_nocoll_r=10.00
  tc_nocoll_dr=1.00
!
  iftfloor=.true.
  tfloor=10000.
  ifcheck0temp=.true.
!
  ifrholimit=.true.
  rho_limit_factor = 0.007
  rho_limit_file = 'rho3d_initial_1au_rho40k.hdf'
!
  max_alfven_speed_rho_mod = 100.0
!
! HEATING. First 5 sources are empirical heating, turned off after WTD transition.
!
  heatsource(1)%active=.true.
  heatsource(1)%name='NL'
  heatsource(1)%use_mask=.false.
  heatsource(1)%type='exponential-b-photo-dependent'
  heatsource(1)%nl_mask=.true.
  heatsource(1)%h0=0.10
  heatsource(1)%lambda=0.03
  heatsource(1)%power=1.00
  heatsource(1)%b_profile%active=.false.
  heatsource(1)%b_attenuation=.false.
  heatsource(1)%r_profile%active=.false.
  heatsource(1)%t_profile%active=.false.
!
  heatsource(2)%active=.true.
  heatsource(2)%name='Quiet Sun Heating'
  heatsource(2)%type='br-dependent'
  heatsource(2)%h0=.044
  heatsource(2)%lambda=.2
  heatsource(2)%brmax=.25
  heatsource(2)%r_profile%active=.false.
  heatsource(2)%t_profile%active=.false.
  heatsource(2)%b_profile%active=.false.
  heatsource(2)%b_attenuation=.false.
!
  heatsource(3)%active=.true.
  heatsource(3)%name='FW'
  heatsource(3)%use_mask=.false.
  heatsource(3)%type='exponential'
  heatsource(3)%h0=0.000435
  heatsource(3)%lambda=1.00
  heatsource(3)%b_profile%active=.false.
  heatsource(3)%b_attenuation=.false.
  heatsource(3)%r_profile%active=.false.
  heatsource(3)%t_profile%active=.false.
!
  heatsource(4)%active=.true.
  heatsource(4)%name='SS'
  heatsource(4)%use_mask=.false.
  heatsource(4)%type='exponential'
  heatsource(4)%h0=0.10
  heatsource(4)%lambda=0.03
  heatsource(4)%b_profile%active=.false.
  heatsource(4)%b_attenuation=.false.
  heatsource(4)%r_profile%active=.false.
  heatsource(4)%t_profile%active=.false.
!
  heatsource(5)%active=.true.
  heatsource(5)%name='Active Region Heating'
  heatsource(5)%type='b-dependent'
  heatsource(5)%h0=.06
  heatsource(5)%power=1.0
  heatsource(5)%r_profile%active=.true.
  heatsource(5)%r_profile%f=1.,0.
  heatsource(5)%r_profile%x=2.
  heatsource(5)%r_profile%w=0.5
  heatsource(5)%t_profile%active=.false.
  heatsource(5)%b_profile%active=.true.
  heatsource(5)%b_profile%f=0.,1.
  heatsource(5)%b_profile%x=11.3
  heatsource(5)%b_profile%w=9.07
  heatsource(5)%b_attenuation=.false.
!
! HEAT 6: Keep SS heating with the WTD model
!
  heatsource(6)%active=.true.
  heatsource(6)%name='SS'
  heatsource(6)%use_mask=.false.
  heatsource(6)%type='zw-exponential'
  heatsource(6)%h0=0.10
  heatsource(6)%lambda=0.03
  heatsource(6)%b_profile%active=.false.
  heatsource(6)%b_attenuation=.false.
  heatsource(6)%r_profile%active=.false.
  heatsource(6)%t_profile%active=.false.
!
! HEAT 7: Keep a bit of FW heating with the WTD model
!
  heatsource(7)%active=.true.
  heatsource(7)%name='FW'
  heatsource(7)%use_mask=.false.
  heatsource(7)%type='zw-exponential'
  heatsource(7)%h0=.000054375
  heatsource(7)%lambda=1.00
  heatsource(7)%b_profile%active=.false.
  heatsource(7)%b_attenuation=.false.
  heatsource(7)%r_profile%active=.false.
  heatsource(7)%t_profile%active=.false.
!
  heating_flat_topped=.false.
  heat_mask_file=' '
!
  add_ohmic_heating = .false.
!
! WKB WAVE PRESSURE OPTIONS
!
  advance_pw=.true.
  pw0=0.187
  rho_aw=10.00
  awthprof_th=10
  awthprof2_th=-10
  awthprof_dth=-4.00
!
! WTD HEATING/PRESSURE PARAMETERS
!
  advance_zw = .true.
!
  wtd_z0 = 0.02
  wtd_b0 = 3.86834
  wtd_lambda0 = 0.02
!
! Optional WTD z0 Flux Mask (not needed here)
!
  zw_use_flux_mask=.false.
  z0_flux_mask_tp_file=''
!
  zw_dissp = .true.
  zw_reflection = .true.
  zw_add_heat = .true.
  zw_add_pw = .false.
  zw_add_reynolds = .false.
!
  zw_uwc_s = 0.0
  zw_uwc_z = 1.0
!
  fluxlim_gradzw = .true.
  fluxlim_gradsrc = .false.
  wtd_flux_limiter='ospre'
  zw_cfl=0.9
!
  zw_amplitude_limit = .true.
  zw_amplitude_value = 1.6
  zw_radial_limit = .true.
  zw_radial_limit_file = 'zw_limit_test01.dat'
!
  zw_keep_exponential_heat = .true.
!
  zw_field_aligned_reynolds = .true.
  zw_field_aligned_pressure = .false.
!
  zw_use_radial_rhoaw=.false.
  zw_rho_aw = 3.0
!
  zw_use_effective_rho=.true.
  zw_effrho_lr=2.20412
  zw_effrho_lw=0.3
!
  zw_limit_horho=.true.
  zw_limit_horho_rlim=8.0
  zw_limit_horho_value=5.e-2
!
  use_chromo_heat=.true.
  chromo_heat_t_zqc_0=10000.0
  chromo_heat_t_zqc_1=40000.0
  debug_chromo_heat=.false.
!
  rhobc_maxfac_r1 = 0.1
!
! Experimental Pole "Supercell" Option
!
  expert_user_override%pole_filter_rho=.true.
  expert_user_override%pole_filter_t=.true.
  expert_user_override%pole_filter_pw=.true.
  expert_user_override%pole_filter_z=.true.
!
! TIME PROFILE FOR WKB WAVE PRESSURES AT INNER BOUNDARY
!
  tprofile(1)%t=0.0, 0.5, 1.0
  tprofile(1)%f=0.0, 0.0, 1.0
  tprofile(1)%vars='pw0_factor'
!
! TIME PROFILE FOR WTD HEATING TRANSITION (transition from t=20-25).
!
  tprofile(2)%t=0.0, 20.0, 25.0
  tprofile(2)%f=0.0, 0.0 ,  1.0
  tprofile(2)%vars='zw_heat_factor'
!
! TIME PROFILE FOR WTD WAVE PRESSURE TRANSITION (turned off here).
!
  tprofile(3)%t=0.0, 1.0
  tprofile(3)%f=0.0, 0.0
  tprofile(3)%vars='zw_pressure_factor'
 /
!
! psp1_redux_example (svn mas_wtd r237)
! ----------------------
! - Example ifile for re-doing the PSP1 prediction simulation with
!   the heating setup that we used for the July 2 2019 total solar eclipse.
!
! - Compare this ifile with the following runs to see the differences
!   - ec19_final_01: final prediction thermo (before energization)
!   - psp1th02aR: Original PSP1 prediction simulation.
!
! - This run has the following differences compared to PSP1:
!   - WTD heating model updated (4 slightly diff params, more heating).
!   - The tcond cut goes from 3.5e5 to 4.0e5 (broader TR).
!   - Visc goes down from 0.002 to 0.0015 (i think it should still run).
!   - Resistivity goes up (slund 5e5 to slund 3e5) which should better resolve the current sheets.
!   - Polar supercell option is on (to prefent code crashing at the poles).
!   - hdf5 restarts are used (MUCH simpler to deal with, one file only).
!
! - NOTE: the eclipse run used mas_wtd branch from SVN revision 237
!   - The updated SVN versions (251 right now) should still work.
!   - If not you can revert it to rev 237.
! 
