PartMC 2.1.4
|
The bin_grid_t structure and associated subroutines. More...
Data Types | |
type | bin_grid_t |
1D grid of size bins. More... | |
Functions/Subroutines | |
subroutine | bin_grid_allocate (bin_grid) |
Allocates a bin_grid. | |
subroutine | bin_grid_allocate_size (bin_grid, n_bin) |
Allocates a bin_grid of the given size. | |
subroutine | bin_grid_deallocate (bin_grid) |
Frees all memory. | |
subroutine | vol_to_lnr (r, f_vol, f_lnr) |
Convert a concentration f(vol)d(vol) to f(ln(r))d(ln(r)) where vol = 4/3 pi r^3. | |
subroutine | bin_grid_make (bin_grid, n_bin, r_min, r_max) |
Generates the bin grid given the range and number of bins. | |
integer | bin_grid_particle_in_bin (bin_grid, radius) |
Find the bin number that contains a given particle. | |
subroutine | spec_file_read_bin_grid (file, bin_grid) |
Read the specification for a bin_grid from a spec file and generate it. | |
integer | pmc_mpi_pack_size_bin_grid (val) |
Determines the number of bytes required to pack the given value. | |
subroutine | pmc_mpi_pack_bin_grid (buffer, position, val) |
Packs the given value into the buffer, advancing position. | |
subroutine | pmc_mpi_unpack_bin_grid (buffer, position, val) |
Unpacks the given value from the buffer, advancing position. | |
subroutine | bin_grid_netcdf_dim_aero_diam (bin_grid, ncid, dimid_aero_diam) |
Write the aero_diam dimension to the given NetCDF file if it is not already present and in any case return the associated dimid. | |
subroutine | bin_grid_output_netcdf (bin_grid, ncid) |
Write full state. | |
subroutine | bin_grid_input_netcdf (bin_grid, ncid) |
Read full state. |
The bin_grid_t structure and associated subroutines.
subroutine pmc_bin_grid::bin_grid_allocate | ( | type(bin_grid_t),intent(out) | bin_grid | ) |
subroutine pmc_bin_grid::bin_grid_allocate_size | ( | type(bin_grid_t),intent(out) | bin_grid, |
integer,intent(in) | n_bin | ||
) |
Allocates a bin_grid of the given size.
bin_grid | Bin grid. |
n_bin | Number of bins. |
Definition at line 57 of file bin_grid.F90.
subroutine pmc_bin_grid::bin_grid_deallocate | ( | type(bin_grid_t),intent(inout) | bin_grid | ) |
subroutine pmc_bin_grid::bin_grid_input_netcdf | ( | type(bin_grid_t),intent(inout) | bin_grid, |
integer,intent(in) | ncid | ||
) |
Read full state.
bin_grid | bin_grid to read. |
ncid | NetCDF file ID, in data mode. |
Definition at line 374 of file bin_grid.F90.
subroutine pmc_bin_grid::bin_grid_make | ( | type(bin_grid_t),intent(inout) | bin_grid, |
integer,intent(in) | n_bin, | ||
real(kind=dp),intent(in) | r_min, | ||
real(kind=dp),intent(in) | r_max | ||
) |
Generates the bin grid given the range and number of bins.
bin_grid | New bin grid. |
n_bin | Number of bins. |
r_min | Minimum radius (m^3). |
r_max | Minimum radius (m^3). |
Definition at line 103 of file bin_grid.F90.
subroutine pmc_bin_grid::bin_grid_netcdf_dim_aero_diam | ( | type(bin_grid_t),intent(in) | bin_grid, |
integer,intent(in) | ncid, | ||
integer,intent(out) | dimid_aero_diam | ||
) |
Write the aero_diam dimension to the given NetCDF file if it is not already present and in any case return the associated dimid.
bin_grid | Bin_grid structure. |
ncid | NetCDF file ID, in data mode. |
dimid_aero_diam | Dimid of the aero_diam dimension. |
Definition at line 273 of file bin_grid.F90.
subroutine pmc_bin_grid::bin_grid_output_netcdf | ( | type(bin_grid_t),intent(in) | bin_grid, |
integer,intent(in) | ncid | ||
) |
Write full state.
bin_grid | bin_grid to write. |
ncid | NetCDF file ID, in data mode. |
Definition at line 332 of file bin_grid.F90.
integer pmc_bin_grid::bin_grid_particle_in_bin | ( | type(bin_grid_t),intent(in) | bin_grid, |
real(kind=dp),intent(in) | radius | ||
) |
Find the bin number that contains a given particle.
This assumes logarithmically spaced bins. If a particle is below the smallest bin or above the largest bin, then it is returned as being in the smallest or largest bin, respectively.
bin_grid | Bin_grid. |
radius | Radius of particle. |
Definition at line 145 of file bin_grid.F90.
subroutine pmc_bin_grid::pmc_mpi_pack_bin_grid | ( | character,dimension(:),intent(inout) | buffer, |
integer,intent(inout) | position, | ||
type(bin_grid_t),intent(in) | val | ||
) |
Packs the given value into the buffer, advancing position.
buffer | Memory buffer. |
position | Current buffer position. |
val | Value to pack. |
Definition at line 220 of file bin_grid.F90.
integer pmc_bin_grid::pmc_mpi_pack_size_bin_grid | ( | type(bin_grid_t),intent(in) | val | ) |
Determines the number of bytes required to pack the given value.
val | Value to pack. |
Definition at line 204 of file bin_grid.F90.
subroutine pmc_bin_grid::pmc_mpi_unpack_bin_grid | ( | character,dimension(:),intent(inout) | buffer, |
integer,intent(inout) | position, | ||
type(bin_grid_t),intent(inout) | val | ||
) |
Unpacks the given value from the buffer, advancing position.
buffer | Memory buffer. |
position | Current buffer position. |
val | Value to pack. |
Definition at line 246 of file bin_grid.F90.
subroutine pmc_bin_grid::spec_file_read_bin_grid | ( | type(spec_file_t),intent(inout) | file, |
type(bin_grid_t),intent(inout) | bin_grid | ||
) |
Read the specification for a bin_grid from a spec file and generate it.
file | Spec file. |
bin_grid | Bin grid. |
Definition at line 163 of file bin_grid.F90.
subroutine pmc_bin_grid::vol_to_lnr | ( | real(kind=dp),intent(in) | r, |
real(kind=dp),intent(in) | f_vol, | ||
real(kind=dp),intent(out) | f_lnr | ||
) |
Convert a concentration f(vol)d(vol) to f(ln(r))d(ln(r)) where vol = 4/3 pi r^3.
r | Radius (m). |
f_vol | Concentration as a function of volume. |
f_lnr | Concentration as a function of ln(r). |
Definition at line 87 of file bin_grid.F90.