PartMC 2.1.0
|
The env_state_t structure and associated subroutines. More...
Data Types | |
type | env_state_t |
Current environment state. More... | |
Functions/Subroutines | |
subroutine | env_state_allocate (env_state) |
Allocate an empty environment. | |
subroutine | env_state_deallocate (env_state) |
Free all storage. | |
subroutine | env_state_add (env_state, env_state_delta) |
env_state += env_state_delta | |
subroutine | env_state_scale (env_state, alpha) |
env_state *= alpha | |
subroutine | env_state_copy (env_from, env_to) |
env_to = env_from | |
subroutine | env_state_change_water_volume (env_state, aero_data, dv) |
Adds the given water volume to the water vapor and updates all environment quantities. | |
real(kind=dp) | env_state_sat_vapor_pressure (env_state) |
Computes the current saturation vapor pressure (Pa). | |
real(kind=dp) | aero_particle_kappa_rh (aero_particle, aero_data, env_state) |
Returns the critical relative humidity from the kappa value (1). | |
real(kind=dp) | env_state_air_den (env_state) |
Air density (kg m^{-3}). | |
real(kind=dp) | env_state_air_molar_den (env_state) |
Air molar density (mol m^{-3}). | |
subroutine | gas_state_mole_dens_to_ppb (gas_state, env_state) |
Convert (mol m^{-3}) to (ppb). | |
real(kind=dp) | env_state_ppb_to_conc (env_state, ppb) |
Convert (ppb) to (molecules m^{-3}). | |
real(kind=dp) | env_state_conc_to_ppb (env_state, conc) |
Convert (molecules m^{-3}) to (ppb). | |
subroutine | env_state_update_gas_state (env_state, delta_t, old_env_state, gas_data, gas_state) |
Do emissions and background dilution from the environment. | |
subroutine | env_state_update_aero_state (env_state, delta_t, old_env_state, bin_grid, aero_data, aero_weight, aero_state, n_emit, n_dil_in, n_dil_out) |
Do emissions and background dilution from the environment for a particle aerosol distribution. | |
subroutine | env_state_update_aero_binned (env_state, delta_t, old_env_state, bin_grid, aero_data, aero_binned) |
Do emissions and background dilution from the environment for a binned aerosol distribution. | |
subroutine | spec_file_read_env_state (file, env_state) |
Read environment specification from a spec file. | |
subroutine | env_state_mix (val) |
Average val over all processes. | |
subroutine | env_state_reduce_avg (val) |
Average val over all processes, with the result only on the root process. | |
integer | pmc_mpi_pack_size_env_state (val) |
Determines the number of bytes required to pack the given value. | |
subroutine | pmc_mpi_pack_env_state (buffer, position, val) |
Packs the given value into the buffer, advancing position. | |
subroutine | pmc_mpi_unpack_env_state (buffer, position, val) |
Unpacks the given value from the buffer, advancing position. | |
subroutine | pmc_mpi_reduce_avg_env_state (val, val_avg) |
Computes the average of val across all processes, storing the result in val_avg on the root process. | |
subroutine | env_state_output_netcdf (env_state, ncid) |
Write full state. | |
subroutine | env_state_input_netcdf (env_state, ncid) |
Read full state. |
The env_state_t structure and associated subroutines.
real(kind=dp) pmc_env_state::aero_particle_kappa_rh | ( | type(aero_particle_t),intent(in) | aero_particle, |
type(aero_data_t),intent(in) | aero_data, | ||
type(env_state_t),intent(in) | env_state | ||
) |
Returns the critical relative humidity from the kappa value (1).
aero_particle | Aerosol particle. |
aero_data | Aerosol data. |
env_state | Environment state. |
subroutine pmc_env_state::env_state_add | ( | type(env_state_t),intent(inout) | env_state, |
type(env_state_t),intent(in) | env_state_delta | ||
) |
env_state += env_state_delta
env_state | Environment. |
env_state_delta | Increment. |
real(kind=dp) pmc_env_state::env_state_air_den | ( | type(env_state_t),intent(in) | env_state | ) |
Air density (kg m^{-3}).
env_state | Environment state. |
real(kind=dp) pmc_env_state::env_state_air_molar_den | ( | type(env_state_t),intent(in) | env_state | ) |
Air molar density (mol m^{-3}).
env_state | Environment state. |
subroutine pmc_env_state::env_state_allocate | ( | type(env_state_t),intent(out) | env_state | ) |
Allocate an empty environment.
env_state | Environment. |
subroutine pmc_env_state::env_state_change_water_volume | ( | type(env_state_t),intent(inout) | env_state, |
type(aero_data_t),intent(in) | aero_data, | ||
real(kind=dp),intent(in) | dv | ||
) |
Adds the given water volume to the water vapor and updates all environment quantities.
env_state | Environment state to update. |
aero_data | Aero_data constants. |
dv | Volume concentration of water added (m^3/m^3). |
real(kind=dp) pmc_env_state::env_state_conc_to_ppb | ( | type(env_state_t),intent(in) | env_state, |
real(kind=dp),intent(in) | conc | ||
) |
Convert (molecules m^{-3}) to (ppb).
env_state | Environment state. |
conc | Concentration (molecules m^{-3}). |
subroutine pmc_env_state::env_state_copy | ( | type(env_state_t),intent(in) | env_from, |
type(env_state_t),intent(inout) | env_to | ||
) |
env_to = env_from
env_from | Original. |
env_to | Destination. |
subroutine pmc_env_state::env_state_deallocate | ( | type(env_state_t),intent(inout) | env_state | ) |
Free all storage.
env_state | Environment. |
subroutine pmc_env_state::env_state_input_netcdf | ( | type(env_state_t),intent(inout) | env_state, |
integer,intent(in) | ncid | ||
) |
Read full state.
env_state | Environment state to read. |
ncid | NetCDF file ID, in data mode. |
subroutine pmc_env_state::env_state_mix | ( | type(env_state_t),intent(inout) | val | ) |
Average val over all processes.
val | Value to average. |
subroutine pmc_env_state::env_state_output_netcdf | ( | type(env_state_t),intent(in) | env_state, |
integer,intent(in) | ncid | ||
) |
Write full state.
env_state | Environment state to write. |
ncid | NetCDF file ID, in data mode. |
real(kind=dp) pmc_env_state::env_state_ppb_to_conc | ( | type(env_state_t),intent(in) | env_state, |
real(kind=dp),intent(in) | ppb | ||
) |
Convert (ppb) to (molecules m^{-3}).
env_state | Environment state. |
ppb | Mixing ratio (ppb). |
subroutine pmc_env_state::env_state_reduce_avg | ( | type(env_state_t),intent(inout) | val | ) |
Average val over all processes, with the result only on the root process.
val | Value to average. |
real(kind=dp) pmc_env_state::env_state_sat_vapor_pressure | ( | type(env_state_t),intent(in) | env_state | ) |
Computes the current saturation vapor pressure (Pa).
env_state | Environment state. |
subroutine pmc_env_state::env_state_scale | ( | type(env_state_t),intent(inout) | env_state, |
real(kind=dp),intent(in) | alpha | ||
) |
env_state *= alpha
env_state | Environment. |
alpha | Scale factor. |
subroutine pmc_env_state::env_state_update_aero_binned | ( | type(env_state_t),intent(in) | env_state, |
real(kind=dp),intent(in) | delta_t, | ||
type(env_state_t),intent(in) | old_env_state, | ||
type(bin_grid_t),intent(in) | bin_grid, | ||
type(aero_data_t),intent(in) | aero_data, | ||
type(aero_binned_t),intent(inout) | aero_binned | ||
) |
Do emissions and background dilution from the environment for a binned aerosol distribution.
env_state | Current environment. |
delta_t | Time increment to update over. |
old_env_state | Previous environment. |
bin_grid | Bin grid. |
aero_data | Aero data values. |
aero_binned | Aero binned to update. |
subroutine pmc_env_state::env_state_update_aero_state | ( | type(env_state_t),intent(in) | env_state, |
real(kind=dp),intent(in) | delta_t, | ||
type(env_state_t),intent(in) | old_env_state, | ||
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(inout) | aero_state, | ||
integer,intent(out) | n_emit, | ||
integer,intent(out) | n_dil_in, | ||
integer,intent(out) | n_dil_out | ||
) |
Do emissions and background dilution from the environment for a particle aerosol distribution.
env_state | Current environment. |
delta_t | Time increment to update over. |
old_env_state | Previous environment. |
bin_grid | Bin grid. |
aero_data | Aero data values. |
aero_weight | Aero weight. |
aero_state | Aero state to update. |
n_emit | Number of emitted particles. |
n_dil_in | Number of diluted-in particles. |
n_dil_out | Number of diluted-out particles. |
subroutine pmc_env_state::env_state_update_gas_state | ( | type(env_state_t),intent(in) | env_state, |
real(kind=dp),intent(in) | delta_t, | ||
type(env_state_t),intent(in) | old_env_state, | ||
type(gas_data_t),intent(in) | gas_data, | ||
type(gas_state_t),intent(inout) | gas_state | ||
) |
Do emissions and background dilution from the environment.
env_state | Current environment. |
delta_t | Time increment to update over. |
old_env_state | Previous environment. |
gas_data | Gas data values. |
gas_state | Gas state to update. |
subroutine pmc_env_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).
gas_state | Gas state. |
env_state | Environment state. |
subroutine pmc_env_state::pmc_mpi_pack_env_state | ( | character,dimension(:),intent(inout) | buffer, |
integer,intent(inout) | position, | ||
type(env_state_t),intent(in) | val | ||
) |
Packs the given value into the buffer, advancing position.
buffer | Memory buffer. |
position | Current buffer position. |
val | Value to pack. |
integer pmc_env_state::pmc_mpi_pack_size_env_state | ( | type(env_state_t),intent(in) | val | ) |
Determines the number of bytes required to pack the given value.
val | Value to pack. |
subroutine pmc_env_state::pmc_mpi_reduce_avg_env_state | ( | type(env_state_t),intent(in) | val, |
type(env_state_t),intent(inout) | val_avg | ||
) |
Computes the average of val across all processes, storing the result in val_avg on the root process.
val | Value to average. |
val_avg | Result. |
subroutine pmc_env_state::pmc_mpi_unpack_env_state | ( | character,dimension(:),intent(inout) | buffer, |
integer,intent(inout) | position, | ||
type(env_state_t),intent(inout) | val | ||
) |
Unpacks the given value from the buffer, advancing position.
buffer | Memory buffer. |
position | Current buffer position. |
val | Value to pack. |
subroutine pmc_env_state::spec_file_read_env_state | ( | type(spec_file_t),intent(inout) | file, |
type(env_state_t),intent(inout) | env_state | ||
) |
Read environment specification from a spec file.
file | Spec file. |
env_state | Environment data. |