subroutine save_params_ss(params)
TYPE(KORC_PARAMS), INTENT(IN) :: params
CHARACTER(MAX_STRING_LENGTH) :: filename
CHARACTER(MAX_STRING_LENGTH) :: gname
CHARACTER(MAX_STRING_LENGTH) :: subgname
CHARACTER(MAX_STRING_LENGTH), DIMENSION(:), ALLOCATABLE :: attr_array
CHARACTER(MAX_STRING_LENGTH) :: dset
CHARACTER(MAX_STRING_LENGTH) :: attr
INTEGER(HID_T) :: h5file_id
INTEGER(HID_T) :: group_id
INTEGER(HID_T) :: subgroup_id
INTEGER :: h5error
REAL(rp) :: units
if (params%mpi_params%rank .EQ. 0) then
filename = TRIM(params%path_to_outputs) // "simulation_parameters.h5"
call h5fopen_f(TRIM(filename), H5F_ACC_RDWR_F, h5file_id, h5error)
gname = "collisions_ss"
call h5gcreate_f(h5file_id, TRIM(gname), group_id, h5error)
ALLOCATE(attr_array(cparams_ms%num_impurity_species))
dset = TRIM(gname) // "/collisions_model"
call save_string_parameter(h5file_id,dset,(/params%collisions_model/))
dset = TRIM(gname) // "/Te"
attr = "Background electron temperature in eV"
units = params%cpp%temperature/C_E
call save_to_hdf5(h5file_id,dset,units*cparams_ss%Te,attr)
dset = TRIM(gname) // "/Ti"
attr = "Background ion temperature in eV"
units = params%cpp%temperature/C_E
call save_to_hdf5(h5file_id,dset,units*cparams_ss%Ti,attr)
dset = TRIM(gname) // "/ne"
attr = "Background electron density in m^-3"
units = params%cpp%density
call save_to_hdf5(h5file_id,dset,units*cparams_ss%ne,attr)
dset = TRIM(gname) // "/Zeff"
attr = "Effective nuclear charge of impurities"
call save_to_hdf5(h5file_id,dset,cparams_ss%Zeff,attr)
dset = TRIM(gname) // "/rD"
attr = "Debye length in m"
units = params%cpp%length
call save_to_hdf5(h5file_id,dset,units*cparams_ss%rD,attr)
dset = TRIM(gname) // "/re"
attr = "Classical electron radius in m"
units = params%cpp%length
call save_to_hdf5(h5file_id,dset,units*cparams_ss%re,attr)
dset = TRIM(gname) // "/Clogee"
attr = "Coulomb logarithm"
call save_to_hdf5(h5file_id,dset,cparams_ss%CoulombLogee,attr)
dset = TRIM(gname) // "/Clogei"
attr = "Coulomb logarithm"
call save_to_hdf5(h5file_id,dset,cparams_ss%CoulombLogei,attr)
dset = TRIM(gname) // "/VTe"
attr = "Background electron temperature"
units = params%cpp%velocity
call save_to_hdf5(h5file_id,dset,units*cparams_ss%VTe,attr)
dset = TRIM(gname) // "/delta"
attr = "Delta parameter VTe/C"
call save_to_hdf5(h5file_id,dset,cparams_ss%delta,attr)
dset = TRIM(gname) // "/Gamma"
attr = "Gamma coefficient"
units = (params%cpp%mass**2*params%cpp%velocity**3)/params%cpp%time
call save_to_hdf5(h5file_id,dset,units*cparams_ss%Gammac,attr)
dset = TRIM(gname) // "/Tau_rad"
attr = "Synchroton damping time in s"
units = params%cpp%time
call save_to_hdf5(h5file_id,dset,units*cparams_ss%taur,attr)
dset = TRIM(gname) // "/Tau"
attr = "Relativistic collisional time in s"
units = params%cpp%time
call save_to_hdf5(h5file_id,dset,units*cparams_ss%Tau,attr)
dset = TRIM(gname) // "/Tauc"
attr = "Thermal collisional time in s"
units = params%cpp%time
call save_to_hdf5(h5file_id,dset,units*cparams_ss%Tauc,attr)
dset = TRIM(gname) // "/dTau"
attr = "Subcycling time step in s"
units = params%cpp%time
call save_to_hdf5(h5file_id,dset,units*cparams_ss%dTau* &
cparams_ss%Tau,attr)
dset = TRIM(gname) // "/subcycling_iterations"
attr = "KORC iterations per collision"
call save_to_hdf5(h5file_id,dset,cparams_ss%subcycling_iterations,attr)
dset = TRIM(gname) // "/Ec"
attr = "Critical electric field"
units = params%cpp%Eo
call save_to_hdf5(h5file_id,dset,units*cparams_ss%Ec,attr)
dset = TRIM(gname) // "/ED"
attr = "Dreicer electric field"
units = params%cpp%Eo
call save_to_hdf5(h5file_id,dset,units*cparams_ss%ED,attr)
call h5gclose_f(group_id, h5error)
call h5fclose_f(h5file_id, h5error)
end if
end subroutine save_params_ss