!
! *** Grid resolution.
!
&topology
  nr = 332
  nt = 81
  np = 92
/
&data
 legacy_output_filenames=.true.
!
! *** Use the new style output text files.
! *** This may be needed when new mas version is
! *** inserted into CORHEL.
!
!  legacy_output_filenames = .false.
!
! *** Radial domain.
!
  r0 = 1.0
  r1 = 30.0000000
!
! *** Time domain.
!
  tmax = 120.0
!
! *** Grid specifications.
!
  rfrac    = 0.000000E+00,
  4.876739E-05,
  2.293103E-04,
  3.224138E-04,
  4.155172E-04,
  1.034483E-01,
  1.000000E+00
  drratio  = 1.000000E+00,
  7.500000E-01,
  1.000000E+00,
  1.177353E+00,
  1.402583E+02,
  7.998675E+00
  nfrmesh  = 5
  tfrac    = 0.000000E+00,
  1.944444E-01,
  8.055556E-01,
  1.000000E+00
  dtratio  = 1.000000E+00,
  1.000000E+00,
  1.000000E+00
  nftmesh  = 5
  pfrac    = 0.000000E+00
  dpratio  = 1.000000E+00
  nfpmesh  = 5
  phishift = 0.000000E+00
!
! *** Time step specifications.
!
  dtmax = 0.005
  dtmin = 0.0001
  dt_init = 0.005
  dt_max_wave_cfl = 200.0
!
! *** Output options.
!
  plotlist = 'br','bt','bp','em','ep','zp','zm','heat','jr','jt',
  'jp','p','rho','t','vr','vt','vp'
  tpltxint = 120.0
  slice_plotlist = 'br','bt','bp','em','ep','zp','zm','heat','jr','jt',
  'jp','p','rho','t','vr','vt','vp'
  slice_tp_radii = 28.0
  slice_txint = 120.0
  trace_txint = 0.0
  hdf32 = .true.
  rs_final = .false.
  trsdump = 0.0
!
! *** Model specification.
!
  calculation_frame='COROTATING'
  advance_a    = .true.
  advance_v    = .true.
  advance_t    = .true.
  advance_rho  = .true.
  advance_zw   = .true.
  advance_fcs  = .false.
  trace_particles = .false.
  slund = 5.00e3
  eta_profile = 'UNIFORM'
  visc = 0.002
  visc_profile='UNIFORM'
  gamma = 1.666666666666667
  g0 = 0.823
  br00 = 0.0
  rho0 = 40000.0
  tbc0 = 17500.0
  tchromo = 17500.0
  iftfloor = .true.
  tfloor = 10000.0
  ifcheck0temp=.true.
  char_bc0 = .true.
  char_bc1 = .true.
  rhobc_maxfac_r1 = 0.1
  ifrholimit = .true.
  rho_limit_factor = 0.007
  rho_limit_file = 'rho3d_initial_1au_rho40k.h5'
  max_alfven_speed_rho_mod = 100.0
  ubzero = .false.
  filter_poles = .true.
! *** Thermal conduction:
  advance_tc = .true.
  tcond = 1.0
  t_cutoff1 = 400000.0
  nfilt_kappa = 0
  alpha_nocoll = 1.0
  tc_r = 10.0
  tc_dr = 1.0
  tc_fac0 = 1.0
  tc_fac1 = 0.0
  tc_nocoll_r = 10.0
  tc_nocoll_dr = 1.0
! *** Radiative loss:
  radloss = 1.0
  rad_law = 'CHIANTI_v713_HYBRID'
! *** Heating:
  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.
!
  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.
!
  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 = ' '
  heat_file=' '
  add_ohmic_heating = .false.
!
! WKB pressure parameters
!
  advance_pw = .true.
  pw0=0.187
  rho_aw=10.0
  awthprof_th=10.0
  awthprof2_th=-10.0
  awthprof_dth=-4.0
!
! WTD heating/pressure parameters
!
  advance_zw = .true.
  wtd_z0 = 0.023664319132398463
  wtd_lambda0 = 0.02
  wtd_b0 = 3.86834
  wtd_use_zw_flux_mask = .true.
  z0_flux_mask_tp_file = 'cor_mas_heat_3_bc_mask_file.h5'
  zw_dissp = .true.
  zw_reflection = .true.
  wtd_add_zw_heating = .true.
  wtd_add_zw_pressure = .false.
  zw_uwc_s = 0.0
  zw_uwc_z = 1.0
  wtd_use_flux_limiter_gradzw = .true.
  wtd_use_flux_limiter_gradsrc = .false.
  zw_flux_limiter_type = 'ospre'
  zw_cfl = 0.9
  wtd_use_zw_limit = .true.
  zw_limit_amplitude = 1.6
  zw_limit_radial_file = 'wtd_zw_limit_r1d.dat'
  zw_rho_aw = 3.0
  wtd_bc_extrap_fac_r1 = 0.1
  wtd_use_zw_effective_rho_limit = .true.
  zw_effective_rho_limit_lr = 2.20412
  zw_effective_rho_limit_lw = 0.3
  wtd_use_zw_horho_limit = .true.
  zw_horho_limit_rlim = 8.0
  zw_horho_limit_value = 5.e-2
  wtd_use_open_field_cutoff=.true.
  wtd_open_cutoff_maxflux=8.e5
  wtd_open_cutoff_dt_eq_s=120.0
!
  use_chromo_heat = .true.
  chromo_heat_t_zqc_0 = 10000.0
  chromo_heat_t_zqc_1 = 40000.0
  tprofile(1)%t=0.00,0.50,1.00
  tprofile(1)%f=0.00,0.00,1.00
  tprofile(1)%vars='pw0_factor'
  tprofile(2)%t=0.0,
  20.0,
  25.0
  tprofile(2)%f=0.0,
  0.0 ,
   1.0
  tprofile(2)%vars='zw_heat_factor'
  tprofile(3)%t=0.0,
  1.0
  tprofile(3)%f=0.0,
  0.0
  tprofile(3)%vars='zw_pressure_factor'
!
! *** Initial condition.
!
  initial_field = 'POTENTIAL_FIELD'
  potential_field_bc = 'CLOSED_WALL'
  bnfile = '../../../cor_bc/br_r0.h5'
  b_in_gauss = .true.
  initial_plasma = '1dfile'
  onedfile = 'initial_plasma_thermo_rho40k_r1d.dat'
  rsifile = ' '
  restart_calculation_frame = 'COROTATING'
!
! *** Numerical algorithm options.
!
  ntmax = 1000000
  cfl = 0.40
  use_sts_visc = .false.
  use_sts_tc   = .false.
  ifimplrad = 0
  ifprec_t     = 3
  ifprec_v     = 3
  ifprec_pot2d = 3
  ifprec_divb  = 3
  epscg_a       = 1.00e-9
  epscg_v       = 1.00e-9
  epscg_t       = 1.00e-9
  epscg_potfld  = 1.00e-9
  epscg_newflux = 1.00e-9
  epscg_divb    = 1.00e-9
  ncgmax = 1000000
  upwind_a = 1.0
  upwind_v = 1.0
  betapc_a = 0.5
  betapc_v_flow = 0.0
  betapc_v_wave = 0.5
  betapc_t_flow = 0.0
  betapc_t_wave = 0.5
  betapc_rho_flow = 0.0
  betapc_rho_wave = 0.5
  use_old_jxb = .false.
  use_old_vdgv = .true.
/
