PartMC  2.3.0
Data Types | Public Member Functions | List of all members
pmc_env_state Module Reference

The env_state_t structure and associated subroutines. More...

Data Types

type  env_state_t
 Current environment state. More...
 

Public Member Functions

subroutine env_state_allocate (env_state)
 Allocate an empty environment. More...
 
subroutine env_state_deallocate (env_state)
 Free all storage. More...
 
subroutine env_state_add (env_state, env_state_delta)
 env_state += env_state_delta More...
 
subroutine env_state_scale (env_state, alpha)
 env_state *= alpha More...
 
subroutine env_state_copy (env_from, env_to)
 env_to = env_from More...
 
subroutine env_state_change_water_volume (env_state, dv)
 Adds the given water volume to the water vapor and updates all environment quantities. More...
 
real(kind=dp) function env_state_sat_vapor_pressure (env_state)
 Computes the current saturation vapor pressure (Pa). More...
 
real(kind=dp) function env_state_air_den (env_state)
 Air density (kg m^{-3}). More...
 
real(kind=dp) function env_state_air_molar_den (env_state)
 Air molar density (mol m^{-3}). More...
 
real(kind=dp) function env_state_a (env_state)
 Condensation $A$ parameter. More...
 
real(kind=dp) function env_state_ppb_to_conc (env_state, ppb)
 Convert (ppb) to (molecules m^{-3}). More...
 
real(kind=dp) function env_state_conc_to_ppb (env_state, conc)
 Convert (molecules m^{-3}) to (ppb). More...
 
subroutine env_state_mix (val)
 Average val over all processes. More...
 
subroutine env_state_reduce_avg (val)
 Average val over all processes, with the result only on the root process. More...
 
integer function pmc_mpi_pack_size_env_state (val)
 Determines the number of bytes required to pack the given value. More...
 
subroutine pmc_mpi_pack_env_state (buffer, position, val)
 Packs the given value into the buffer, advancing position. More...
 
subroutine pmc_mpi_unpack_env_state (buffer, position, val)
 Unpacks the given value from the buffer, advancing position. More...
 
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. More...
 
subroutine env_state_input_netcdf (env_state, ncid)
 Read full state. More...
 

Detailed Description

The env_state_t structure and associated subroutines.

Definition at line 9 of file env_state.F90.

Member Function/Subroutine Documentation

real(kind=dp) function pmc_env_state::env_state_a ( type(env_state_t), intent(in)  env_state)

Condensation $A$ parameter.

Parameters
[in]env_stateEnvironment state.

Definition at line 232 of file env_state.F90.

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

Parameters
[in,out]env_stateEnvironment.
[in]env_state_deltaIncrement.

Definition at line 88 of file env_state.F90.

real(kind=dp) function pmc_env_state::env_state_air_den ( type(env_state_t), intent(in)  env_state)

Air density (kg m^{-3}).

Parameters
[in]env_stateEnvironment state.

Definition at line 206 of file env_state.F90.

real(kind=dp) function pmc_env_state::env_state_air_molar_den ( type(env_state_t), intent(in)  env_state)

Air molar density (mol m^{-3}).

Parameters
[in]env_stateEnvironment state.

Definition at line 219 of file env_state.F90.

subroutine pmc_env_state::env_state_allocate ( type(env_state_t), intent(out)  env_state)

Allocate an empty environment.

Parameters
[out]env_stateEnvironment.

Definition at line 56 of file env_state.F90.

subroutine pmc_env_state::env_state_change_water_volume ( type(env_state_t), intent(inout)  env_state,
real(kind=dp), intent(in)  dv 
)

Adds the given water volume to the water vapor and updates all environment quantities.

Parameters
[in,out]env_stateEnvironment state to update.
[in]dvVolume concentration of water added (m^3/m^3).

Definition at line 163 of file env_state.F90.

real(kind=dp) function 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).

Parameters
[in]env_stateEnvironment state.
[in]concConcentration (molecules m^{-3}).

Definition at line 260 of file env_state.F90.

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

Parameters
[in]env_fromOriginal.
[in,out]env_toDestination.

Definition at line 138 of file env_state.F90.

subroutine pmc_env_state::env_state_deallocate ( type(env_state_t), intent(inout)  env_state)

Free all storage.

Parameters
[in,out]env_stateEnvironment.

Definition at line 78 of file env_state.F90.

subroutine pmc_env_state::env_state_input_netcdf ( type(env_state_t), intent(inout)  env_state,
integer, intent(in)  ncid 
)

Read full state.

Parameters
[in,out]env_stateEnvironment state to read.
[in]ncidNetCDF file ID, in data mode.

Definition at line 542 of file env_state.F90.

subroutine pmc_env_state::env_state_mix ( type(env_state_t), intent(inout)  val)

Average val over all processes.

Parameters
[in,out]valValue to average.

Definition at line 324 of file env_state.F90.

real(kind=dp) function 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}).

Parameters
[in]env_stateEnvironment state.
[in]ppbMixing ratio (ppb).

Definition at line 245 of file env_state.F90.

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.

Parameters
[in,out]valValue to average.

Definition at line 348 of file env_state.F90.

real(kind=dp) function pmc_env_state::env_state_sat_vapor_pressure ( type(env_state_t), intent(in)  env_state)

Computes the current saturation vapor pressure (Pa).

Parameters
[in]env_stateEnvironment state.

Definition at line 192 of file env_state.F90.

subroutine pmc_env_state::env_state_scale ( type(env_state_t), intent(inout)  env_state,
real(kind=dp), intent(in)  alpha 
)

env_state *= alpha

Parameters
[in,out]env_stateEnvironment.
[in]alphaScale factor.

Definition at line 114 of file env_state.F90.

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.

Parameters
[in,out]bufferMemory buffer.
[in,out]positionCurrent buffer position.
[in]valValue to pack.

Definition at line 396 of file env_state.F90.

integer function 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.

Parameters
[in]valValue to pack.

Definition at line 373 of file env_state.F90.

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.

Parameters
[in]valValue to average.
[in,out]val_avgResult.

Definition at line 463 of file env_state.F90.

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.

Parameters
[in,out]bufferMemory buffer.
[in,out]positionCurrent buffer position.
[in,out]valValue to pack.

Definition at line 429 of file env_state.F90.


The documentation for this module was generated from the following file: