PLUME-MoM-TSM  1.0
VolcanicPlumeModel
Functions/Subroutines | Variables
inpout Module Reference

Input/Output module. More...

Functions/Subroutines

subroutine initialize
 Initialize variables. More...
 
subroutine read_inp
 Read Input data. More...
 
subroutine open_file_units
 Initialize output units. More...
 
subroutine close_file_units
 Close output units. More...
 
subroutine write_column
 Write outputs. More...
 
subroutine write_dakota (description, value)
 Dakota outputs. More...
 
subroutine write_inversion (r0, w_opt, opt_mfr, opt_height, search_flag, opt_regime)
 Write inversion file. More...
 
subroutine write_zero_hysplit
 Hysplit output initialization. More...
 
subroutine check_hysplit
 Hysplit outputs. More...
 
real(wp) function, dimension(3) cross (a, b)
 Cross product. More...
 
real(wp) function normpdf (phi, mu, sigma)
 Normal probability density function. More...
 
character(len=len(string)) function lower (string)
 Convert from capital to small. More...
 
real(wp) function, dimension(size(mass)) numberfrommass (MassL, MassR, Mass)
 Particle number from mass in each bin. More...
 
character *2 function lettera (k)
 Numeric to String conversion. More...
 

Variables

real(wp) notset
 
integer n_unit
 Counter for unit files. More...
 
character(len=30) inp_file
 Name of input file. More...
 
character(len=30) bak_file
 Name of output file for backup of input parameters. More...
 
character(len=30) run_name
 Name of the run (used for the output and backup files) More...
 
character(len=30) sed_file
 Name of output file for particle loss rate. More...
 
character(len=30) col_file
 Name of output file for values along the profile. More...
 
character(len=30) hy_file
 Name of output file for hysplit. More...
 
character(len=30) hy_file_volcgas
 Name of output file for hysplit volcanic gas. More...
 
character(len=30) mom_file
 Name of output file for backup of input parameters. More...
 
character(len=30) dak_file
 Name of output file for the variables used by dakota. More...
 
character(len=30) inversion_file
 Name of output file for the inversion variables. More...
 
character(len=50) atm_file
 Name of file for the parameters of the atmosphere. More...
 
integer atm_unit
 Atmosphere input unit. More...
 
integer bak_unit
 Backup input unit. More...
 
integer inp_unit
 Input data unit. More...
 
integer col_unit
 Output values along the column data unit. More...
 
integer sed_unit
 Particle loss values along the column data unit. More...
 
integer hy_unit
 hysplit data unit More...
 
integer hy_lines
 
integer col_lines
 
integer hy_unit_volcgas
 hysplit volcanic gas data unit More...
 
integer temp_unit
 hysplit scratch unit More...
 
integer mom_unit
 Moments values along the column data unit. More...
 
integer dak_unit
 Dakota variables data unit. More...
 
integer inversion_unit
 Inversion variables data unit. More...
 
real(wp) mfr0
 
real(wp), dimension(:), allocatable mu_lognormal
 
real(wp), dimension(:), allocatable sigma_lognormal
 
real(wp) month
 
real(wp) lat
 
real(wp) phi_min
 
real(wp) delta_phi
 
real(wp) hy_deltaz
 
real(wp) hy_z
 
real(wp) hy_z_old
 
real(wp) hy_x
 
real(wp) hy_y
 
real(wp) hy_x_old
 
real(wp) hy_y_old
 
real(wp), dimension(:), allocatable solid_mfr
 
real(wp), dimension(:), allocatable solid_mfr_old
 
real(wp), dimension(:), allocatable solid_mfr_init
 
real(wp), dimension(:), allocatable solid_mfr_oldold
 
real(wp) p_atm0
 
real(wp) t_atm0
 

Detailed Description

Input/Output module.

This module contains all the input/output subroutine and the realted variables.

Date
28/10/2013
Author
Mattia de' Michieli Vitturi

Function/Subroutine Documentation

subroutine inpout::check_hysplit ( )

Hysplit outputs.

This subroutine writes the output values used for the coupled PlumeMoM/ Hysplit procedure.

Date
11/06/2018
Authors
Mattia de' Michieli Vitturi, Federica Pardini

Definition at line 2908 of file inpout.f90.

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine inpout::close_file_units ( )

Close output units.

This subroutine close the output units

Date
28/10/2013
Author
Mattia de' Michieli Vitturi

Definition at line 2581 of file inpout.f90.

Here is the caller graph for this function:

real(wp) function, dimension(3) inpout::cross ( real(wp), dimension(3), intent(in)  a,
real(wp), dimension(3), intent(in)  b 
)

Cross product.

Author
Mattia de' Michieli Vitturi This function compute the cross product of two vector of size 3.
Date
08/05/2019
Parameters
afirst vector (input)
bfirst vector (input)

Definition at line 3464 of file inpout.f90.

subroutine inpout::initialize ( )

Initialize variables.

This subroutine check if the input file exists and if it does not then it it initializes the input variables with default values and creates an input file.

Date
28/10/2013
Author
Mattia de' Michieli Vitturi

Definition at line 211 of file inpout.f90.

Here is the call graph for this function:

Here is the caller graph for this function:

character*2 function inpout::lettera ( integer  k)

Numeric to String conversion.

Author
Mattia de' Michieli Vitturi This function convert the integer in input into a numeric string for the subfix of the output files.
Date
27/20/2009
Parameters
kinteger to convert (input)
Returns
string of length two

Definition at line 3611 of file inpout.f90.

Here is the caller graph for this function:

character(len=len(string)) function inpout::lower ( character(len=*)  string)

Convert from capital to small.

Author
Mattia de' Michieli Vitturi This function conver a string from capital letters to small.
Date
08/05/2019
Parameters
stringinput string (input)

Definition at line 3506 of file inpout.f90.

Here is the caller graph for this function:

real(wp) function inpout::normpdf ( real(wp), intent(in)  phi,
real(wp), intent(in)  mu,
real(wp), intent(in)  sigma 
)

Normal probability density function.

Author
Mattia de' Michieli Vitturi This function compute the normal probability density function at phi, given the mean and standard deviation.
Date
08/05/2019
Parameters
phivalue at which the density is computed (input)
mumean value of the probability density (input)
sigmastandard deviation of the density (input)

Definition at line 3487 of file inpout.f90.

Here is the caller graph for this function:

real(wp) function, dimension(size(mass)) inpout::numberfrommass ( real(wp), dimension(:), intent(in)  MassL,
real(wp), dimension(:), intent(in)  MassR,
real(wp), dimension(:), intent(in)  Mass 
)

Particle number from mass in each bin.

Author
Mattia de' Michieli Vitturi Given the mass in each bin, this function compute the number of particles. A piecewise linear distribution is assumed for the particle mass distribution (particle number density as function of the mass of the particles). It is also assumed that the distribution is null at the right boundary of the last bin.
Date
08/05/2019
Parameters
MassLleft boundaries of the bins (input)
MassRright boundaries of the bins (input)
Massmass of the bins (input) number of particles in the bin

Definition at line 3543 of file inpout.f90.

Here is the caller graph for this function:

subroutine inpout::open_file_units ( )

Initialize output units.

This subroutine set the names of the output files and open the output units

Date
28/10/2013
Author
Mattia de' Michieli Vitturi

Definition at line 2504 of file inpout.f90.

Here is the caller graph for this function:

subroutine inpout::read_inp ( )

Read Input data.

This subroutine reads input data from the file plume_model.inp and writes a backup file of the input data.

Date
28/10/2013
Author
Mattia de' Michieli Vitturi

Definition at line 428 of file inpout.f90.

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine inpout::write_column ( )

Write outputs.

This subroutine writes the output values on the output files. The values are saved along the column.

Date
28/10/2013
Author
Mattia de' Michieli Vitturi

Definition at line 2611 of file inpout.f90.

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine inpout::write_dakota ( character(20), intent(in)  description,
real(wp), intent(in)  value 
)

Dakota outputs.

This subroutine writes the output values used for the sensitivity analysis by dakota.

Parameters
[in]descriptiondescriptor of the output variable
[in]valuevalue of the output variable
Date
28/10/2013
Author
Mattia de' Michieli Vitturi

Definition at line 2779 of file inpout.f90.

Here is the caller graph for this function:

subroutine inpout::write_inversion ( real(wp), intent(in)  r0,
real(wp), intent(in)  w_opt,
real(wp), intent(in)  opt_mfr,
real(wp), intent(in)  opt_height,
logical, intent(in)  search_flag,
integer, intent(in)  opt_regime 
)

Write inversion file.

This subroutine writes the inversion results on a file. Each line correspond to a different radius for which the optimal velocity is searched.

Parameters
[in]r0radius
[in]w_optvelocity
[in]opt_mfrmass flow rate
[in]opt_heightheight
[in]search_flagflag for successfull search
[in]opt_regimeplume regime
Date
20/05/2019
Author
Mattia de' Michieli Vitturi

Definition at line 2819 of file inpout.f90.

Here is the caller graph for this function:

subroutine inpout::write_zero_hysplit ( )

Hysplit output initialization.

This subroutine initializes the output file used for the coupled PlumeMoM/ Hysplit procedure.

Date
11/06/2018
Authors
Mattia de' Michieli Vitturi, Federica Pardini

Definition at line 2843 of file inpout.f90.

Here is the caller graph for this function:

Variable Documentation

character(len=50) inpout::atm_file

Name of file for the parameters of the atmosphere.

Definition at line 93 of file inpout.f90.

integer inpout::atm_unit

Atmosphere input unit.

Definition at line 96 of file inpout.f90.

character(len=30) inpout::bak_file

Name of output file for backup of input parameters.

Definition at line 66 of file inpout.f90.

integer inpout::bak_unit

Backup input unit.

Definition at line 100 of file inpout.f90.

character(len=30) inpout::col_file

Name of output file for values along the profile.

Definition at line 75 of file inpout.f90.

integer inpout::col_lines

Definition at line 116 of file inpout.f90.

integer inpout::col_unit

Output values along the column data unit.

Definition at line 106 of file inpout.f90.

character(len=30) inpout::dak_file

Name of output file for the variables used by dakota.

Definition at line 87 of file inpout.f90.

integer inpout::dak_unit

Dakota variables data unit.

Definition at line 129 of file inpout.f90.

real(wp) inpout::delta_phi

Definition at line 141 of file inpout.f90.

real(wp) inpout::hy_deltaz

Definition at line 143 of file inpout.f90.

character(len=30) inpout::hy_file

Name of output file for hysplit.

Definition at line 78 of file inpout.f90.

character(len=30) inpout::hy_file_volcgas

Name of output file for hysplit volcanic gas.

Definition at line 81 of file inpout.f90.

integer inpout::hy_lines

Definition at line 114 of file inpout.f90.

integer inpout::hy_unit

hysplit data unit

Definition at line 112 of file inpout.f90.

integer inpout::hy_unit_volcgas

hysplit volcanic gas data unit

Definition at line 120 of file inpout.f90.

real(wp) inpout::hy_x

Definition at line 143 of file inpout.f90.

real(wp) inpout::hy_x_old

Definition at line 143 of file inpout.f90.

real(wp) inpout::hy_y

Definition at line 143 of file inpout.f90.

real(wp) inpout::hy_y_old

Definition at line 143 of file inpout.f90.

real(wp) inpout::hy_z

Definition at line 143 of file inpout.f90.

real(wp) inpout::hy_z_old

Definition at line 143 of file inpout.f90.

character(len=30) inpout::inp_file

Name of input file.

Definition at line 63 of file inpout.f90.

integer inpout::inp_unit

Input data unit.

Definition at line 103 of file inpout.f90.

character(len=30) inpout::inversion_file

Name of output file for the inversion variables.

Definition at line 90 of file inpout.f90.

integer inpout::inversion_unit

Inversion variables data unit.

Definition at line 132 of file inpout.f90.

real(wp) inpout::lat

Definition at line 139 of file inpout.f90.

real(wp) inpout::mfr0

Definition at line 134 of file inpout.f90.

character(len=30) inpout::mom_file

Name of output file for backup of input parameters.

Definition at line 84 of file inpout.f90.

integer inpout::mom_unit

Moments values along the column data unit.

Definition at line 126 of file inpout.f90.

real(wp) inpout::month

Definition at line 138 of file inpout.f90.

real(wp), dimension(:), allocatable inpout::mu_lognormal

Definition at line 136 of file inpout.f90.

integer inpout::n_unit

Counter for unit files.

Definition at line 60 of file inpout.f90.

real(wp) inpout::notset

Definition at line 56 of file inpout.f90.

real(wp) inpout::p_atm0

Definition at line 148 of file inpout.f90.

real(wp) inpout::phi_min

Definition at line 141 of file inpout.f90.

character(len=30) inpout::run_name

Name of the run (used for the output and backup files)

Definition at line 69 of file inpout.f90.

character(len=30) inpout::sed_file

Name of output file for particle loss rate.

Definition at line 72 of file inpout.f90.

integer inpout::sed_unit

Particle loss values along the column data unit.

Definition at line 109 of file inpout.f90.

real(wp), dimension(:), allocatable inpout::sigma_lognormal

Definition at line 136 of file inpout.f90.

real(wp), dimension(:), allocatable inpout::solid_mfr

Definition at line 145 of file inpout.f90.

real(wp), dimension(:), allocatable inpout::solid_mfr_init

Definition at line 145 of file inpout.f90.

real(wp), dimension(:), allocatable inpout::solid_mfr_old

Definition at line 145 of file inpout.f90.

real(wp), dimension(:), allocatable inpout::solid_mfr_oldold

Definition at line 145 of file inpout.f90.

real(wp) inpout::t_atm0

Definition at line 148 of file inpout.f90.

integer inpout::temp_unit

hysplit scratch unit

Definition at line 123 of file inpout.f90.