SW_VAR_DENS_MODEL  0.9
Dept-averagedgas-particlemodel
Functions/Subroutines | Variables
inpout_2d Module Reference

Input/Output module. More...

Functions/Subroutines

subroutine init_param
 Initialization of the variables read from the input file. More...
 
subroutine read_param
 Read the input file. More...
 
subroutine update_param
 Read the input file. More...
 
subroutine read_solution
 Read the solution from the restart unit. More...
 
subroutine output_solution (time)
 Write the solution on the output unit. More...
 
subroutine output_max
 Write the maximum thickness in ESRI format. More...
 
subroutine output_esri (output_idx)
 Write the thickness in ESRI format. More...
 
subroutine close_units
 
character *4 function lettera (k)
 Numeric to String conversion. More...
 
subroutine output_probes (output_idx)
 Write solution at selected points on file. More...
 
subroutine output_runout (time, stop_flag)
 Write runout on file. More...
 

Variables

character(len=40) run_name
 Name of the run. More...
 
character(len=40) bak_name
 Backup file for the parameters. More...
 
character(len=40) input_file
 File with the run parameters. More...
 
character(len=40) output_file
 Name of the output files. More...
 
character(len=40) restart_file
 Name of the restart file. More...
 
character(len=40) probes_file
 Name of the probes file. More...
 
character(len=40) output_file_2d
 Name of the output files. More...
 
character(len=40) output_esri_file
 Name of the esri output files. More...
 
character(len=40) output_max_file
 Name of the esri max. thick. file. More...
 
character(len=40) runout_file
 Name of the runout file. More...
 
integer, parameter input_unit = 7
 Input data unit. More...
 
integer, parameter backup_unit = 8
 Backup input data unit. More...
 
integer, parameter output_unit = 9
 Output data unit. More...
 
integer, parameter restart_unit = 10
 Restart data unit. More...
 
integer, parameter probes_unit = 11
 Probes data unit. More...
 
integer, parameter output_unit_2d = 12
 Output data 2D unit. More...
 
integer, parameter output_esri_unit = 13
 Esri Output unit. More...
 
integer, parameter output_max_unit = 14
 Esri max thick. output unit. More...
 
integer, parameter dem_esri_unit = 15
 Computational grid Esri fmt unit. More...
 
integer, parameter runout_unit = 16
 
integer, parameter dakota_unit = 17
 
integer output_idx
 Counter for the output files. More...
 
logical restart
 Flag to start a run from a previous output:
. More...
 
logical output_esri_flag
 Flag to save the output in esri ascii format *.asc. More...
 
logical output_phys_flag
 Flag to save the physical variables on file *.p_2d. More...
 
logical output_cons_flag
 Flag to save the conservative variables on file *.q_2d. More...
 
logical output_runout_flag
 Flag to save the max runout at ouput times. More...
 
type(bch_bcw
 
type(bchu_bcw
 
type(bchv_bcw
 
type(bct_bcw
 
type(bc), dimension(:), allocatable alphas_bcw
 
type(bch_bce
 
type(bchu_bce
 
type(bchv_bce
 
type(bct_bce
 
type(bc), dimension(:), allocatable alphas_bce
 
type(bch_bcs
 
type(bchu_bcs
 
type(bchv_bcs
 
type(bct_bcs
 
type(bc), dimension(:), allocatable alphas_bcs
 
type(bch_bcn
 
type(bchu_bcn
 
type(bchv_bcn
 
type(bct_bcn
 
type(bc), dimension(:), allocatable alphas_bcn
 
integer ncols
 
integer nrows
 
integer nodata_value
 
real *8 xllcorner
 
real *8 yllcorner
 
real *8 cellsize
 
logical write_first_q
 
integer n_probes
 
real *8, dimension(:,:), allocatable probes_coords
 
real *8 dt_runout
 
real *8, dimension(:,:), allocatable h_old
 
real *8 x0_runout
 
real *8 y0_runout
 
real *8 init_runout
 
real *8 eps_stop
 
real *8, dimension(1000) rho0_s
 
real *8, dimension(1000) diam0_s
 
real *8, dimension(1000) sp_heat0_s
 
real *8, dimension(1000) erosion_coeff0
 
real *8 alpha1_ref
 

Detailed Description

Input/Output module.

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

Date
07/10/2016
Author
Mattia de' Michieli Vitturi

Function/Subroutine Documentation

subroutine inpout_2d::close_units ( )

Definition at line 3184 of file inpout_2d.f90.

Here is the caller graph for this function:

subroutine inpout_2d::init_param ( )

Initialization of the variables read from the input file.

This subroutine initialize the input variables with default values that solve for a Riemann problem. If the input file does not exist one is created with the default values.

Author
Mattia de' Michieli Vitturi
Date
07/10/2016

Definition at line 254 of file inpout_2d.f90.

Here is the caller graph for this function:

character*4 function inpout_2d::lettera ( integer  k)

Numeric to String conversion.

This function convert the integer in input into a numeric string for the subfix of the output files.

Parameters
[in]kinteger to convert
Date
07/10/2016
Author
Mattia de' Michieli Vitturi

Definition at line 3206 of file inpout_2d.f90.

Here is the caller graph for this function:

subroutine inpout_2d::output_esri ( integer, intent(in)  output_idx)

Write the thickness in ESRI format.

This subroutine write the thickness in the ascii ESRI format. A masking is applied to the region with thickness less than 1D-5.

Parameters
[in]output_idxoutput index
Author
Mattia de' Michieli Vitturi
Date
15/12/2016

Definition at line 3046 of file inpout_2d.f90.

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine inpout_2d::output_max ( )

Write the maximum thickness in ESRI format.

This subroutine write the maximum thickness in the ascii ESRI format. A masking is applied to the region with thickness less than 1D-5.

Author
Mattia de' Michieli Vitturi
Date
08/12/2018

Definition at line 2990 of file inpout_2d.f90.

Here is the caller graph for this function:

subroutine inpout_2d::output_probes ( integer, intent(in)  output_idx)

Write solution at selected points on file.

This subroutine writes on a file the thickness at selected points, defined by an appropriate card in the input file. in the initial solution.

Parameters
[in]output_idxoutput index
Author
Mattia de' Michieli Vitturi
Date
12/02/2018

Definition at line 3239 of file inpout_2d.f90.

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine inpout_2d::output_runout ( real*8, intent(in)  time,
logical, intent(inout)  stop_flag 
)

Write runout on file.

This subroutine writes on a file the flow runout. It is calculated as the linear horizontal distance from the point with the highest topography value in the initial solution.

Parameters
[in]timeactual time
[in,out]stop_flaglogical to check if flow has stopped
Author
Mattia de' Michieli Vitturi
Date
12/02/2018

Definition at line 3289 of file inpout_2d.f90.

Here is the caller graph for this function:

subroutine inpout_2d::output_solution ( real*8, intent(in)  time)

Write the solution on the output unit.

This subroutine write the parameters of the grid, the output time and the solution to a file with the name "run_name.q****", where run_name is the name of the run read from the input file and **** is the counter of the output.

Parameters
[in]toutput time
Author
Mattia de' Michieli Vitturi
Date
07/10/2016

Definition at line 2819 of file inpout_2d.f90.

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine inpout_2d::read_param ( )

Read the input file.

This subroutine read the input parameters from the file "two_phases.inp" and write a backup file of the input parameters with name "run_name.bak", where run_name is read from the input file.

Date
07/10/2016
Author
Mattia de' Michieli Vitturi

Definition at line 584 of file inpout_2d.f90.

Here is the caller graph for this function:

subroutine inpout_2d::read_solution ( )

Read the solution from the restart unit.

This subroutine is called when the parameter "restart" in the input file is TRUE. Then the initial solution is read from a file.

Date
07/10/2016
Author
Mattia de' Michieli Vitturi

Definition at line 2428 of file inpout_2d.f90.

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine inpout_2d::update_param ( )

Read the input file.

This subroutine read the input parameters from the file "two_phases.inp" and write a backup file of the input parameters with name "run_name.bak", where run_name is read from the input file.

Date
07/10/2016
Author
Mattia de' Michieli Vitturi

Definition at line 2325 of file inpout_2d.f90.

Here is the caller graph for this function:

Variable Documentation

real*8 inpout_2d::alpha1_ref

Definition at line 177 of file inpout_2d.f90.

type(bc), dimension(:), allocatable inpout_2d::alphas_bce

Definition at line 147 of file inpout_2d.f90.

type(bc), dimension(:), allocatable inpout_2d::alphas_bcn

Definition at line 155 of file inpout_2d.f90.

type(bc), dimension(:), allocatable inpout_2d::alphas_bcs

Definition at line 151 of file inpout_2d.f90.

type(bc), dimension(:), allocatable inpout_2d::alphas_bcw

Definition at line 143 of file inpout_2d.f90.

integer, parameter inpout_2d::backup_unit = 8

Backup input data unit.

Definition at line 97 of file inpout_2d.f90.

character(len=40) inpout_2d::bak_name

Backup file for the parameters.

Definition at line 86 of file inpout_2d.f90.

real*8 inpout_2d::cellsize

Definition at line 161 of file inpout_2d.f90.

integer, parameter inpout_2d::dakota_unit = 17

Definition at line 106 of file inpout_2d.f90.

integer, parameter inpout_2d::dem_esri_unit = 15

Computational grid Esri fmt unit.

Definition at line 104 of file inpout_2d.f90.

real*8, dimension(1000) inpout_2d::diam0_s

Definition at line 175 of file inpout_2d.f90.

real*8 inpout_2d::dt_runout

Definition at line 169 of file inpout_2d.f90.

real*8 inpout_2d::eps_stop

Definition at line 173 of file inpout_2d.f90.

real*8, dimension(1000) inpout_2d::erosion_coeff0

Definition at line 175 of file inpout_2d.f90.

type(bc) inpout_2d::h_bce

Definition at line 146 of file inpout_2d.f90.

type(bc) inpout_2d::h_bcn

Definition at line 154 of file inpout_2d.f90.

type(bc) inpout_2d::h_bcs

Definition at line 150 of file inpout_2d.f90.

type(bc) inpout_2d::h_bcw

Definition at line 142 of file inpout_2d.f90.

real*8, dimension(:,:), allocatable inpout_2d::h_old

Definition at line 171 of file inpout_2d.f90.

type(bc) inpout_2d::hu_bce

Definition at line 146 of file inpout_2d.f90.

type(bc) inpout_2d::hu_bcn

Definition at line 154 of file inpout_2d.f90.

type(bc) inpout_2d::hu_bcs

Definition at line 150 of file inpout_2d.f90.

type(bc) inpout_2d::hu_bcw

Definition at line 142 of file inpout_2d.f90.

type(bc) inpout_2d::hv_bce

Definition at line 146 of file inpout_2d.f90.

type(bc) inpout_2d::hv_bcn

Definition at line 154 of file inpout_2d.f90.

type(bc) inpout_2d::hv_bcs

Definition at line 150 of file inpout_2d.f90.

type(bc) inpout_2d::hv_bcw

Definition at line 142 of file inpout_2d.f90.

real*8 inpout_2d::init_runout

Definition at line 173 of file inpout_2d.f90.

character(len=40) inpout_2d::input_file

File with the run parameters.

Definition at line 87 of file inpout_2d.f90.

integer, parameter inpout_2d::input_unit = 7

Input data unit.

Definition at line 96 of file inpout_2d.f90.

integer inpout_2d::n_probes

Definition at line 165 of file inpout_2d.f90.

integer inpout_2d::ncols

Definition at line 159 of file inpout_2d.f90.

integer inpout_2d::nodata_value

Definition at line 159 of file inpout_2d.f90.

integer inpout_2d::nrows

Definition at line 159 of file inpout_2d.f90.

logical inpout_2d::output_cons_flag

Flag to save the conservative variables on file *.q_2d.

  • T => write conservative variables on file
  • F => do not write the conservative variables

Definition at line 133 of file inpout_2d.f90.

character(len=40) inpout_2d::output_esri_file

Name of the esri output files.

Definition at line 92 of file inpout_2d.f90.

logical inpout_2d::output_esri_flag

Flag to save the output in esri ascii format *.asc.

  • T => write esri file
  • F => do not write esri file

Definition at line 121 of file inpout_2d.f90.

integer, parameter inpout_2d::output_esri_unit = 13

Esri Output unit.

Definition at line 102 of file inpout_2d.f90.

character(len=40) inpout_2d::output_file

Name of the output files.

Definition at line 88 of file inpout_2d.f90.

character(len=40) inpout_2d::output_file_2d

Name of the output files.

Definition at line 91 of file inpout_2d.f90.

integer inpout_2d::output_idx

Counter for the output files.

Definition at line 109 of file inpout_2d.f90.

character(len=40) inpout_2d::output_max_file

Name of the esri max. thick. file.

Definition at line 93 of file inpout_2d.f90.

integer, parameter inpout_2d::output_max_unit = 14

Esri max thick. output unit.

Definition at line 103 of file inpout_2d.f90.

logical inpout_2d::output_phys_flag

Flag to save the physical variables on file *.p_2d.

  • T => write physical variables on file
  • F => do not write the physical variables

Definition at line 127 of file inpout_2d.f90.

logical inpout_2d::output_runout_flag

Flag to save the max runout at ouput times.

  • T => write max runout on file
  • F => do not write max runout

Definition at line 139 of file inpout_2d.f90.

integer, parameter inpout_2d::output_unit = 9

Output data unit.

Definition at line 98 of file inpout_2d.f90.

integer, parameter inpout_2d::output_unit_2d = 12

Output data 2D unit.

Definition at line 101 of file inpout_2d.f90.

real*8, dimension(:,:), allocatable inpout_2d::probes_coords

Definition at line 167 of file inpout_2d.f90.

character(len=40) inpout_2d::probes_file

Name of the probes file.

Definition at line 90 of file inpout_2d.f90.

integer, parameter inpout_2d::probes_unit = 11

Probes data unit.

Definition at line 100 of file inpout_2d.f90.

logical inpout_2d::restart

Flag to start a run from a previous output:
.

  • T => Restart from a previous output (.asc or .q_2d)
  • F => Restart from initial condition read from two_phases.inp

Definition at line 115 of file inpout_2d.f90.

character(len=40) inpout_2d::restart_file

Name of the restart file.

Definition at line 89 of file inpout_2d.f90.

integer, parameter inpout_2d::restart_unit = 10

Restart data unit.

Definition at line 99 of file inpout_2d.f90.

real*8, dimension(1000) inpout_2d::rho0_s

Definition at line 175 of file inpout_2d.f90.

character(len=40) inpout_2d::run_name

Name of the run.

Definition at line 85 of file inpout_2d.f90.

character(len=40) inpout_2d::runout_file

Name of the runout file.

Definition at line 94 of file inpout_2d.f90.

integer, parameter inpout_2d::runout_unit = 16

Definition at line 105 of file inpout_2d.f90.

real*8, dimension(1000) inpout_2d::sp_heat0_s

Definition at line 175 of file inpout_2d.f90.

type(bc) inpout_2d::t_bce

Definition at line 146 of file inpout_2d.f90.

type(bc) inpout_2d::t_bcn

Definition at line 154 of file inpout_2d.f90.

type(bc) inpout_2d::t_bcs

Definition at line 150 of file inpout_2d.f90.

type(bc) inpout_2d::t_bcw

Definition at line 142 of file inpout_2d.f90.

logical inpout_2d::write_first_q

Definition at line 163 of file inpout_2d.f90.

real*8 inpout_2d::x0_runout

Definition at line 173 of file inpout_2d.f90.

real*8 inpout_2d::xllcorner

Definition at line 161 of file inpout_2d.f90.

real*8 inpout_2d::y0_runout

Definition at line 173 of file inpout_2d.f90.

real*8 inpout_2d::yllcorner

Definition at line 161 of file inpout_2d.f90.