PartMC 2.1.0
|
Write data in NetCDF format. More...
Functions/Subroutines | |
subroutine | output_state (prefix, output_type, bin_grid, aero_data, aero_weight, aero_state, gas_data, gas_state, env_state, index, time, del_t, i_repeat, record_removals, record_optical, uuid) |
Write the current state. | |
subroutine | write_header_and_time (ncid, time, del_t, index, uuid) |
Helper routine to write various global attributes. Do not call directly. | |
subroutine | output_state_to_file (prefix, bin_grid, aero_data, aero_weight, aero_state, gas_data, gas_state, env_state, index, time, del_t, i_repeat, record_removals, record_optical, write_rank, write_n_proc, uuid) |
Write the current state for a single process. Do not call this subroutine directly, but rather call output_state(). | |
subroutine | send_output_state_central (aero_state, gas_state, env_state) |
Send the state for the "central" output method to the root process. | |
subroutine | recv_output_state_central (prefix, bin_grid, aero_data, aero_weight, gas_data, index, time, del_t, i_repeat, record_removals, record_optical, uuid, remote_proc) |
Receive the state for the "central" output method on the root process. | |
subroutine | input_state (filename, bin_grid, aero_data, aero_weight, aero_state, gas_data, gas_state, env_state, index, time, del_t, i_repeat, uuid) |
Read the current state. | |
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. | |
subroutine | spec_file_read_output_type (file, output_type) |
Read the specification for an output type from a spec file and generate it. | |
Variables | |
integer, parameter | OUTPUT_TYPE_INVALID = 0 |
Type code for undefined or invalid output. | |
integer, parameter | OUTPUT_TYPE_CENTRAL = 1 |
Type code for centralized output (one file per process, all written by process 0). | |
integer, parameter | OUTPUT_TYPE_DIST = 2 |
Type code for distributed output (one file per process, written by each process). | |
integer, parameter | OUTPUT_TYPE_SINGLE = 3 |
Type code for single output (one file for all processes, written by process 0). | |
integer, parameter | TAG_OUTPUT_STATE_CENTRAL = 4341 |
Internal-use variable only. | |
integer, parameter | TAG_OUTPUT_STATE_SINGLE = 4342 |
Internal-use variable only. |
Write data in NetCDF format.
subroutine pmc_output::input_state | ( | character(len=*),intent(in) | filename, |
type(bin_grid_t),intent(in) | bin_grid, | ||
type(aero_data_t),intent(inout) | aero_data, | ||
type(aero_weight_t),intent(inout) | aero_weight, | ||
type(aero_state_t),intent(inout) | aero_state, | ||
type(gas_data_t),intent(inout) | gas_data, | ||
type(gas_state_t),intent(inout) | gas_state, | ||
type(env_state_t),intent(inout) | env_state, | ||
integer,intent(out) | index, | ||
real(kind=dp),intent(out) | time, | ||
real(kind=dp),intent(out) | del_t, | ||
integer,intent(out) | i_repeat, | ||
character(len=PMC_UUID_LEN),intent(out) | uuid | ||
) |
Read the current state.
filename | Prefix of state file. |
bin_grid | Bin grid. |
aero_data | Aerosol data. |
aero_weight | Aerosol weight. |
aero_state | Aerosol state. |
gas_data | Gas data. |
gas_state | Gas state. |
env_state | Environment state. |
index | Filename index. |
time | Current time (s). |
del_t | Current timestep (s). |
i_repeat | Current repeat number. |
uuid | UUID of the simulation. |
subroutine pmc_output::output_sectional | ( | character(len=*),intent(in) | prefix, |
type(bin_grid_t),intent(in) | bin_grid, | ||
type(aero_data_t),intent(in) | aero_data, | ||
type(aero_binned_t),intent(in) | aero_binned, | ||
type(gas_data_t),intent(in) | gas_data, | ||
type(gas_state_t),intent(in) | gas_state, | ||
type(env_state_t),intent(in) | env_state, | ||
integer,intent(in) | index, | ||
real(kind=dp),intent(in) | time, | ||
real(kind=dp),intent(in) | del_t, | ||
character(len=PMC_UUID_LEN),intent(in) | uuid | ||
) |
Write the current sectional data.
prefix | Prefix of filename to write |
bin_grid | Bin grid. |
aero_data | Aerosol data. |
aero_binned | Binned aerosol data. |
gas_data | Gas data. |
gas_state | Gas state. |
env_state | Environment state. |
index | Filename index. |
time | Current time (s). |
del_t | Current output time-step (s). |
uuid | UUID of the simulation. |
subroutine pmc_output::output_state | ( | character(len=*),intent(in) | prefix, |
integer,intent(in) | output_type, | ||
type(bin_grid_t),intent(in) | bin_grid, | ||
type(aero_data_t),intent(in) | aero_data, | ||
type(aero_weight_t),intent(in) | aero_weight, | ||
type(aero_state_t),intent(in) | aero_state, | ||
type(gas_data_t),intent(in) | gas_data, | ||
type(gas_state_t),intent(in) | gas_state, | ||
type(env_state_t),intent(in) | env_state, | ||
integer,intent(in) | index, | ||
real(kind=dp),intent(in) | time, | ||
real(kind=dp),intent(in) | del_t, | ||
integer,intent(in) | i_repeat, | ||
logical,intent(in) | record_removals, | ||
logical,intent(in) | record_optical, | ||
character(len=PMC_UUID_LEN),intent(in) | uuid | ||
) |
Write the current state.
prefix | Prefix of state file. |
output_type | Output type for parallel runs (see module constants). |
bin_grid | Bin grid. |
aero_data | Aerosol data. |
aero_weight | Aerosol weight. |
aero_state | Aerosol state. |
gas_data | Gas data. |
gas_state | Gas state. |
env_state | Environment state. |
index | Filename index. |
time | Current time (s). |
del_t | Current timestep (s). |
i_repeat | Current repeat number. |
record_removals | Whether to output particle removal info. |
record_optical | Whether to output aerosol optical properties. |
uuid | UUID of the simulation. |
subroutine pmc_output::output_state_to_file | ( | character(len=*),intent(in) | prefix, |
type(bin_grid_t),intent(in) | bin_grid, | ||
type(aero_data_t),intent(in) | aero_data, | ||
type(aero_weight_t),intent(in) | aero_weight, | ||
type(aero_state_t),intent(in) | aero_state, | ||
type(gas_data_t),intent(in) | gas_data, | ||
type(gas_state_t),intent(in) | gas_state, | ||
type(env_state_t),intent(in) | env_state, | ||
integer,intent(in) | index, | ||
real(kind=dp),intent(in) | time, | ||
real(kind=dp),intent(in) | del_t, | ||
integer,intent(in) | i_repeat, | ||
logical,intent(in) | record_removals, | ||
logical,intent(in) | record_optical, | ||
integer,intent(in) | write_rank, | ||
integer,intent(in) | write_n_proc, | ||
character(len=PMC_UUID_LEN),intent(in) | uuid | ||
) |
Write the current state for a single process. Do not call this subroutine directly, but rather call output_state().
prefix | Prefix of state file. |
bin_grid | Bin grid. |
aero_data | Aerosol data. |
aero_weight | Aerosol weight. |
aero_state | Aerosol state. |
gas_data | Gas data. |
gas_state | Gas state. |
env_state | Environment state. |
index | Filename index. |
time | Current time (s). |
del_t | Current timestep (s). |
i_repeat | Current repeat number. |
record_removals | Whether to output particle removal info. |
record_optical | Whether to output aerosol optical properties. |
write_rank | Rank to write into file. |
write_n_proc | Number of processes to write into file. |
uuid | UUID of the simulation. |
subroutine pmc_output::recv_output_state_central | ( | character(len=*),intent(in) | prefix, |
type(bin_grid_t),intent(in) | bin_grid, | ||
type(aero_data_t),intent(in) | aero_data, | ||
type(aero_weight_t),intent(in) | aero_weight, | ||
type(gas_data_t),intent(in) | gas_data, | ||
integer,intent(in) | index, | ||
real(kind=dp),intent(in) | time, | ||
real(kind=dp),intent(in) | del_t, | ||
integer,intent(in) | i_repeat, | ||
logical,intent(in) | record_removals, | ||
logical,intent(in) | record_optical, | ||
character(len=PMC_UUID_LEN),intent(in) | uuid, | ||
integer,intent(in) | remote_proc | ||
) |
Receive the state for the "central" output method on the root process.
prefix | Prefix of state file. |
bin_grid | Bin grid. |
aero_data | Aerosol data. |
aero_weight | Aerosol weight. |
gas_data | Gas data. |
index | Filename index. |
time | Current time (s). |
del_t | Current timestep (s). |
i_repeat | Current repeat number. |
record_removals | Whether to output particle removal info. |
record_optical | Whether to output aerosol_optical_properties. |
uuid | UUID of the simulation. |
remote_proc | Process number to receive from. |
subroutine pmc_output::send_output_state_central | ( | type(aero_state_t),intent(in) | aero_state, |
type(gas_state_t),intent(in) | gas_state, | ||
type(env_state_t),intent(in) | env_state | ||
) |
Send the state for the "central" output method to the root process.
aero_state | Aerosol state. |
gas_state | Gas state. |
env_state | Environment state. |
subroutine pmc_output::spec_file_read_output_type | ( | type(spec_file_t),intent(inout) | file, |
integer,intent(out) | output_type | ||
) |
Read the specification for an output type from a spec file and generate it.
file | Spec file. |
output_type | Kernel type. |
subroutine pmc_output::write_header_and_time | ( | integer,intent(in) | ncid, |
real(kind=dp),intent(in) | time, | ||
real(kind=dp),intent(in) | del_t, | ||
integer,intent(in) | index, | ||
character(len=PMC_UUID_LEN),intent(in) | uuid | ||
) |
Helper routine to write various global attributes. Do not call directly.
ncid | NetCDF file ID, in data mode. |
time | Current time (s). |
del_t | Current timestep (s). |
index | Filename index. |
uuid | UUID of the simulation. |
integer,parameter pmc_output::OUTPUT_TYPE_CENTRAL = 1 |
Type code for centralized output (one file per process, all written by process 0).
integer,parameter pmc_output::OUTPUT_TYPE_DIST = 2 |
Type code for distributed output (one file per process, written by each process).
integer,parameter pmc_output::OUTPUT_TYPE_INVALID = 0 |
Type code for undefined or invalid output.
integer,parameter pmc_output::OUTPUT_TYPE_SINGLE = 3 |
Type code for single output (one file for all processes, written by process 0).
integer,parameter pmc_output::TAG_OUTPUT_STATE_CENTRAL = 4341 |
Internal-use variable only.
integer,parameter pmc_output::TAG_OUTPUT_STATE_SINGLE = 4342 |
Internal-use variable only.