|
PartMC
2.4.0
|
The gas_state_t structure and associated subroutines. More...
Data Types | |
| type | gas_state_t |
| Current state of the gas mixing ratios in the system. More... | |
Functions/Subroutines | |
| logical function | gas_state_is_allocated (gas_state) |
Determine whether the gas_state is correctly allocated. More... | |
| subroutine | gas_state_set_size (gas_state, n_spec) |
| Sets the sizes of the gas state. More... | |
| subroutine | gas_state_zero (gas_state) |
| Zeros the state. More... | |
| subroutine | gas_state_scale (gas_state, alpha) |
| Scale a gas state. More... | |
| subroutine | gas_state_add (gas_state, gas_state_delta) |
| Adds the given gas_state_delta. More... | |
| subroutine | gas_state_add_scaled (gas_state, gas_state_delta, alpha) |
Adds the given gas_state_delta scaled by alpha. More... | |
| subroutine | gas_state_sub (gas_state, gas_state_delta) |
| Subtracts the given gas_state_delta. More... | |
| subroutine | gas_state_ensure_nonnegative (gas_state) |
| Set any negative values to zero. More... | |
| subroutine | gas_state_mole_dens_to_ppb (gas_state, env_state) |
| Convert (mol m^{-3}) to (ppb). More... | |
| subroutine | gas_state_interp_1d (gas_state_list, time_list, rate_list, time, gas_state, rate) |
| Determine the current gas_state and rate by interpolating at the current time with the lists of gas_states and rates. More... | |
| subroutine | gas_state_mix (val) |
| Average val over all processes. More... | |
| subroutine | gas_state_reduce_avg (val) |
| Average val over all processes, with the result only on the root process. More... | |
| integer function | pmc_mpi_pack_size_gas_state (val) |
| Determines the number of bytes required to pack the given value. More... | |
| subroutine | pmc_mpi_pack_gas_state (buffer, position, val) |
| Packs the given value into the buffer, advancing position. More... | |
| subroutine | pmc_mpi_unpack_gas_state (buffer, position, val) |
| Unpacks the given value from the buffer, advancing position. More... | |
| subroutine | pmc_mpi_reduce_avg_gas_state (val, val_avg) |
| Computes the average of val across all processes, storing the result in val_avg on the root process. More... | |
| subroutine | gas_state_input_netcdf (gas_state, ncid, gas_data) |
| Read full state. More... | |
The gas_state_t structure and associated subroutines.
| subroutine pmc_gas_state::gas_state_add | ( | type(gas_state_t), intent(inout) | gas_state, |
| type(gas_state_t), intent(in) | gas_state_delta | ||
| ) |
Adds the given gas_state_delta.
| [in,out] | gas_state | Existing gas state. |
| [in] | gas_state_delta | Incremental state. |
Definition at line 99 of file gas_state.F90.
| subroutine pmc_gas_state::gas_state_add_scaled | ( | type(gas_state_t), intent(inout) | gas_state, |
| type(gas_state_t), intent(in) | gas_state_delta, | ||
| real(kind=dp), intent(in) | alpha | ||
| ) |
Adds the given gas_state_delta scaled by alpha.
Does gas_state += alpha * gas_state_delta.
| [in,out] | gas_state | Existing gas state. |
| [in] | gas_state_delta | Incremental state. |
| [in] | alpha | Scale factor. |
Definition at line 121 of file gas_state.F90.
| subroutine pmc_gas_state::gas_state_ensure_nonnegative | ( | type(gas_state_t) | gas_state | ) |
Set any negative values to zero.
| gas_state | Gas state. |
Definition at line 164 of file gas_state.F90.
| subroutine pmc_gas_state::gas_state_input_netcdf | ( | type(gas_state_t), intent(inout) | gas_state, |
| integer, intent(in) | ncid, | ||
| type(gas_data_t), intent(in) | gas_data | ||
| ) |
Read full state.
| [in,out] | gas_state | Gas state to read. |
| [in] | ncid | NetCDF file ID, in data mode. |
| [in] | gas_data | Gas data. |
Definition at line 577 of file gas_state.F90.
| subroutine pmc_gas_state::gas_state_interp_1d | ( | type(gas_state_t), dimension(:), intent(in) | gas_state_list, |
| real(kind=dp), dimension(size(gas_state_list)), intent(in) | time_list, | ||
| real(kind=dp), dimension(size(gas_state_list)), intent(in) | rate_list, | ||
| real(kind=dp), intent(in) | time, | ||
| type(gas_state_t), intent(inout) | gas_state, | ||
| real(kind=dp), intent(out) | rate | ||
| ) |
Determine the current gas_state and rate by interpolating at the current time with the lists of gas_states and rates.
| [in] | gas_state_list | Gas states. |
| [in] | time_list | Times (s). |
| [in] | rate_list | Rates (s^{-1}). |
| [in] | time | Current time (s). |
| [in,out] | gas_state | Current gas state. |
| [out] | rate | Current rate (s^{-1}). |
Definition at line 194 of file gas_state.F90.
| logical function pmc_gas_state::gas_state_is_allocated | ( | type(gas_state_t), intent(in) | gas_state | ) |
Determine whether the gas_state is correctly allocated.
| [in] | gas_state | Gas state to check. |
Definition at line 41 of file gas_state.F90.
| subroutine pmc_gas_state::gas_state_mix | ( | type(gas_state_t), intent(inout) | val | ) |
Average val over all processes.
| [in,out] | val | Value to average. |
Definition at line 427 of file gas_state.F90.
| subroutine pmc_gas_state::gas_state_mole_dens_to_ppb | ( | type(gas_state_t), intent(inout) | gas_state, |
| type(env_state_t), intent(in) | env_state | ||
| ) |
Convert (mol m^{-3}) to (ppb).
| [in,out] | gas_state | Gas state. |
| [in] | env_state | Environment state. |
Definition at line 178 of file gas_state.F90.
| subroutine pmc_gas_state::gas_state_reduce_avg | ( | type(gas_state_t), intent(inout) | val | ) |
Average val over all processes, with the result only on the root process.
| [in,out] | val | Value to average. |
Definition at line 446 of file gas_state.F90.
| subroutine pmc_gas_state::gas_state_scale | ( | type(gas_state_t), intent(inout) | gas_state, |
| real(kind=dp), intent(in) | alpha | ||
| ) |
Scale a gas state.
| [in,out] | gas_state | Existing gas state. |
| [in] | alpha | Scale factor. |
Definition at line 83 of file gas_state.F90.
| subroutine pmc_gas_state::gas_state_set_size | ( | type(gas_state_t), intent(inout) | gas_state, |
| integer, intent(in) | n_spec | ||
| ) |
Sets the sizes of the gas state.
| [in,out] | gas_state | Gas state to be allocated. |
| [in] | n_spec | Number of species. |
Definition at line 53 of file gas_state.F90.
| subroutine pmc_gas_state::gas_state_sub | ( | type(gas_state_t), intent(inout) | gas_state, |
| type(gas_state_t), intent(in) | gas_state_delta | ||
| ) |
Subtracts the given gas_state_delta.
| [in,out] | gas_state | Existing gas state. |
| [in] | gas_state_delta | Incremental state. |
Definition at line 144 of file gas_state.F90.
| subroutine pmc_gas_state::gas_state_zero | ( | type(gas_state_t), intent(inout) | gas_state | ) |
Zeros the state.
| [in,out] | gas_state | Gas state. |
Definition at line 69 of file gas_state.F90.
| subroutine pmc_gas_state::pmc_mpi_pack_gas_state | ( | character, dimension(:), intent(inout) | buffer, |
| integer, intent(inout) | position, | ||
| type(gas_state_t), intent(in) | val | ||
| ) |
Packs the given value into the buffer, advancing position.
| [in,out] | buffer | Memory buffer. |
| [in,out] | position | Current buffer position. |
| [in] | val | Value to pack. |
Definition at line 479 of file gas_state.F90.
| integer function pmc_gas_state::pmc_mpi_pack_size_gas_state | ( | type(gas_state_t), intent(in) | val | ) |
Determines the number of bytes required to pack the given value.
| [in] | val | Value to pack. |
Definition at line 466 of file gas_state.F90.
| subroutine pmc_gas_state::pmc_mpi_reduce_avg_gas_state | ( | type(gas_state_t), intent(in) | val, |
| type(gas_state_t), intent(inout) | val_avg | ||
| ) |
Computes the average of val across all processes, storing the result in val_avg on the root process.
| [in] | val | Value to average. |
| [in,out] | val_avg | Result. |
Definition at line 526 of file gas_state.F90.
| subroutine pmc_gas_state::pmc_mpi_unpack_gas_state | ( | character, dimension(:), intent(inout) | buffer, |
| integer, intent(inout) | position, | ||
| type(gas_state_t), intent(inout) | val | ||
| ) |
Unpacks the given value from the buffer, advancing position.
| [in,out] | buffer | Memory buffer. |
| [in,out] | position | Current buffer position. |
| [in,out] | val | Value to pack. |
Definition at line 502 of file gas_state.F90.