Go to the documentation of this file.
26 real(kind=
dp) :: t_max
28 real(kind=
dp) :: t_output
30 character(len=300) :: prefix
32 logical :: do_coagulation
34 integer :: coag_kernel_type
36 character(len=PMC_UUID_LEN) :: uuid
44 subroutine run_exact(bin_grid, scenario, env_state, aero_data, &
45 aero_dist_init, gas_data, run_exact_opt)
62 integer :: i_time, n_time, ncid
68 "t_output", run_exact_opt%t_output)
72 n_time = nint(run_exact_opt%t_max / run_exact_opt%t_output)
74 time = real(i_time, kind=
dp) / real(n_time, kind=
dp) &
77 call exact_soln(bin_grid, aero_data, run_exact_opt%do_coagulation, &
78 run_exact_opt%coag_kernel_type, aero_dist_init, scenario, &
79 env_state, time, aero_binned)
81 aero_binned, gas_data, gas_state, env_state, i_time + 1, &
82 time, run_exact_opt%t_output, run_exact_opt%uuid)
91 bin_grid, gas_data, env_state, aero_dist_init, scenario)
110 character(len=PMC_MAX_FILENAME_LEN) :: sub_filename
118 call spec_file_read_radius_bin_grid(file, bin_grid)
122 call spec_file_read_gas_data(sub_file, gas_data)
127 call spec_file_read_aero_data(sub_file, aero_data)
130 call spec_file_read_fractal(file, aero_data%fractal)
134 call spec_file_read_aero_dist(sub_file, aero_data, .false., aero_dist_init)
137 call spec_file_read_scenario(file, gas_data, aero_data, .false., scenario)
138 call spec_file_read_env_state(file, env_state)
141 run_exact_opt%do_coagulation)
142 if (run_exact_opt%do_coagulation)
then
143 call spec_file_read_coag_kernel_type(file, &
144 run_exact_opt%coag_kernel_type)
145 if (run_exact_opt%coag_kernel_type == coag_kernel_type_additive)
then
147 env_state%additive_kernel_coefficient)
150 run_exact_opt%coag_kernel_type = coag_kernel_type_invalid
subroutine exact_soln(bin_grid, aero_data, do_coagulation, coag_kernel_type, aero_dist_init, scenario, env_state, time, aero_binned)
Exact solutions for various simulations.
subroutine spec_file_close(file)
Close a spec file.
subroutine gas_state_set_size(gas_state, n_spec)
Sets the sizes of the gas state.
The scenario_t structure and associated subroutines.
The gas_data_t structure and associated subroutines.
subroutine output_sectional(prefix, bin_grid, aero_data, aero_binned, gas_data, gas_state, env_state, index, time, del_t, uuid)
Write the current sectional data.
integer, parameter dp
Kind of a double precision real number.
subroutine spec_file_read_logical(file, name, var)
Read a logical from a spec file that must have a given name.
Current environment state.
The aero_state_t structure and assocated subroutines.
subroutine scenario_update_env_state(scenario, env_state, time)
Update time-dependent contents of the environment. scenario_init_env_state() should have been called ...
An input file with extra data for printing messages.
subroutine pmc_srand(seed, offset)
Initializes the random number generator to the state defined by the given seed plus offset....
The gas_state_t structure and associated subroutines.
subroutine spec_file_read_real(file, name, var)
Read a real number from a spec file that must have the given name.
subroutine check_time_multiple(first_name, first_time, second_name, second_time)
Check that the first time interval is close to an integer multiple of the second, and warn if it is n...
The aero_dist_t structure and associated subroutines.
subroutine spec_file_open(filename, file)
Open a spec file for reading.
The env_state_t structure and associated subroutines.
subroutine run_exact(bin_grid, scenario, env_state, aero_data, aero_dist_init, gas_data, run_exact_opt)
Run an exact simulation.
Current state of the gas mixing ratios in the system.
subroutine uuid4_str(uuid)
Generate a version 4 UUID as a string.
Aerosol material properties and associated data.
Write data in NetCDF format.
Options controlling the execution of run_exact().
A complete aerosol distribution, consisting of several modes.
subroutine spec_file_read_run_exact(file, run_exact_opt, aero_data, bin_grid, gas_data, env_state, aero_dist_init, scenario)
Read the specification for a run_exact simulation from a spec file.
elemental integer function gas_data_n_spec(gas_data)
Return the number of gas species.
subroutine scenario_init_env_state(scenario, env_state, time)
Initialize the time-dependent contents of the environment. Thereafter scenario_update_env_state() sho...
The aero_binned_t structure and associated subroutines.
subroutine spec_file_read_string(file, name, var)
Read a string from a spec file that must have a given name.
Aerosol number and volume distributions stored per bin.
The bin_grid_t structure and associated subroutines.
The aero_data_t structure and associated subroutines.
1D grid, either logarithmic or linear.
Exact solution simulation.