IMEX_SfloW2D
0.9
Shallowwatergranularflowmodel
|
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_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) | 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 | dem_esri_unit = 14 |
Computational grid Esri fmt unit. More... | |
integer, parameter | runout_unit = 15 |
integer, parameter | dakota_unit = 16 |
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(bc) | hb_bcw |
type(bc) | u_bcw |
type(bc) | v_bcw |
type(bc) | hu_bcw |
type(bc) | hv_bcw |
type(bc) | xs_bcw |
type(bc) | t_bcw |
type(bc) | hb_bce |
type(bc) | u_bce |
type(bc) | v_bce |
type(bc) | hu_bce |
type(bc) | hv_bce |
type(bc) | xs_bce |
type(bc) | t_bce |
type(bc) | hb_bcs |
type(bc) | u_bcs |
type(bc) | v_bcs |
type(bc) | hu_bcs |
type(bc) | hv_bcs |
type(bc) | xs_bcs |
type(bc) | t_bcs |
type(bc) | hb_bcn |
type(bc) | u_bcn |
type(bc) | v_bcn |
type(bc) | hu_bcn |
type(bc) | hv_bcn |
type(bc) | xs_bcn |
type(bc) | t_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 | runout_mom_stop |
Input/Output module.
This module contains all the input/output subroutine and the realted variables.
subroutine inpout_2d::close_units | ( | ) |
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.
Definition at line 213 of file inpout_2d.f90.
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.
[in] | k | integer to convert |
Definition at line 2873 of file inpout_2d.f90.
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.
[in] | output_idx | output index |
Definition at line 2748 of file inpout_2d.f90.
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.
[in] | output_idx | output index |
Definition at line 2906 of file inpout_2d.f90.
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.
[in] | time | actual time |
[in,out] | stop_flag | logical to check if flow has stopped |
Definition at line 2956 of file inpout_2d.f90.
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.
[in] | t | output time |
Definition at line 2573 of file inpout_2d.f90.
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.
Definition at line 529 of file inpout_2d.f90.
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.
Definition at line 2266 of file inpout_2d.f90.
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.
Definition at line 2160 of file inpout_2d.f90.
integer, parameter inpout_2d::backup_unit = 8 |
Backup input data unit.
Definition at line 77 of file inpout_2d.f90.
character(len=40) inpout_2d::bak_name |
Backup file for the parameters.
Definition at line 67 of file inpout_2d.f90.
real*8 inpout_2d::cellsize |
Definition at line 136 of file inpout_2d.f90.
integer, parameter inpout_2d::dakota_unit = 16 |
Definition at line 85 of file inpout_2d.f90.
integer, parameter inpout_2d::dem_esri_unit = 14 |
Computational grid Esri fmt unit.
Definition at line 83 of file inpout_2d.f90.
real*8 inpout_2d::dt_runout |
Definition at line 144 of file inpout_2d.f90.
real*8, dimension(:,:), allocatable inpout_2d::h_old |
Definition at line 146 of file inpout_2d.f90.
type(bc) inpout_2d::hb_bce |
Definition at line 124 of file inpout_2d.f90.
type(bc) inpout_2d::hb_bcn |
Definition at line 130 of file inpout_2d.f90.
type(bc) inpout_2d::hb_bcs |
Definition at line 127 of file inpout_2d.f90.
type(bc) inpout_2d::hb_bcw |
Definition at line 121 of file inpout_2d.f90.
type(bc) inpout_2d::hu_bce |
Definition at line 124 of file inpout_2d.f90.
type(bc) inpout_2d::hu_bcn |
Definition at line 130 of file inpout_2d.f90.
type(bc) inpout_2d::hu_bcs |
Definition at line 127 of file inpout_2d.f90.
type(bc) inpout_2d::hu_bcw |
Definition at line 121 of file inpout_2d.f90.
type(bc) inpout_2d::hv_bce |
Definition at line 124 of file inpout_2d.f90.
type(bc) inpout_2d::hv_bcn |
Definition at line 130 of file inpout_2d.f90.
type(bc) inpout_2d::hv_bcs |
Definition at line 127 of file inpout_2d.f90.
type(bc) inpout_2d::hv_bcw |
Definition at line 121 of file inpout_2d.f90.
real*8 inpout_2d::init_runout |
Definition at line 148 of file inpout_2d.f90.
character(len=40) inpout_2d::input_file |
File with the run parameters.
Definition at line 68 of file inpout_2d.f90.
integer, parameter inpout_2d::input_unit = 7 |
Input data unit.
Definition at line 76 of file inpout_2d.f90.
integer inpout_2d::n_probes |
Definition at line 140 of file inpout_2d.f90.
integer inpout_2d::ncols |
Definition at line 134 of file inpout_2d.f90.
integer inpout_2d::nodata_value |
Definition at line 134 of file inpout_2d.f90.
integer inpout_2d::nrows |
Definition at line 134 of file inpout_2d.f90.
logical inpout_2d::output_cons_flag |
Flag to save the conservative variables on file *.q_2d.
Definition at line 112 of file inpout_2d.f90.
character(len=40) inpout_2d::output_esri_file |
Name of the esri output files.
Definition at line 73 of file inpout_2d.f90.
logical inpout_2d::output_esri_flag |
Flag to save the output in esri ascii format *.asc.
Definition at line 100 of file inpout_2d.f90.
integer, parameter inpout_2d::output_esri_unit = 13 |
Esri Output unit.
Definition at line 82 of file inpout_2d.f90.
character(len=40) inpout_2d::output_file |
Name of the output files.
Definition at line 69 of file inpout_2d.f90.
character(len=40) inpout_2d::output_file_2d |
Name of the output files.
Definition at line 72 of file inpout_2d.f90.
integer inpout_2d::output_idx |
Counter for the output files.
Definition at line 88 of file inpout_2d.f90.
logical inpout_2d::output_phys_flag |
Flag to save the physical variables on file *.p_2d.
Definition at line 106 of file inpout_2d.f90.
logical inpout_2d::output_runout_flag |
Flag to save the max runout at ouput times.
Definition at line 118 of file inpout_2d.f90.
integer, parameter inpout_2d::output_unit = 9 |
Output data unit.
Definition at line 78 of file inpout_2d.f90.
integer, parameter inpout_2d::output_unit_2d = 12 |
Output data 2D unit.
Definition at line 81 of file inpout_2d.f90.
real*8, dimension(:,:), allocatable inpout_2d::probes_coords |
Definition at line 142 of file inpout_2d.f90.
character(len=40) inpout_2d::probes_file |
Name of the probes file.
Definition at line 71 of file inpout_2d.f90.
integer, parameter inpout_2d::probes_unit = 11 |
Probes data unit.
Definition at line 80 of file inpout_2d.f90.
logical inpout_2d::restart |
Flag to start a run from a previous output:
.
Definition at line 94 of file inpout_2d.f90.
character(len=40) inpout_2d::restart_file |
Name of the restart file.
Definition at line 70 of file inpout_2d.f90.
integer, parameter inpout_2d::restart_unit = 10 |
Restart data unit.
Definition at line 79 of file inpout_2d.f90.
character(len=40) inpout_2d::run_name |
Name of the run.
Definition at line 66 of file inpout_2d.f90.
character(len=40) inpout_2d::runout_file |
Name of the runout file.
Definition at line 74 of file inpout_2d.f90.
real*8 inpout_2d::runout_mom_stop |
Definition at line 148 of file inpout_2d.f90.
integer, parameter inpout_2d::runout_unit = 15 |
Definition at line 84 of file inpout_2d.f90.
type(bc) inpout_2d::t_bce |
Definition at line 124 of file inpout_2d.f90.
type(bc) inpout_2d::t_bcn |
Definition at line 130 of file inpout_2d.f90.
type(bc) inpout_2d::t_bcs |
Definition at line 127 of file inpout_2d.f90.
type(bc) inpout_2d::t_bcw |
Definition at line 121 of file inpout_2d.f90.
type(bc) inpout_2d::u_bce |
Definition at line 124 of file inpout_2d.f90.
type(bc) inpout_2d::u_bcn |
Definition at line 130 of file inpout_2d.f90.
type(bc) inpout_2d::u_bcs |
Definition at line 127 of file inpout_2d.f90.
type(bc) inpout_2d::u_bcw |
Definition at line 121 of file inpout_2d.f90.
type(bc) inpout_2d::v_bce |
Definition at line 124 of file inpout_2d.f90.
type(bc) inpout_2d::v_bcn |
Definition at line 130 of file inpout_2d.f90.
type(bc) inpout_2d::v_bcs |
Definition at line 127 of file inpout_2d.f90.
type(bc) inpout_2d::v_bcw |
Definition at line 121 of file inpout_2d.f90.
logical inpout_2d::write_first_q |
Definition at line 138 of file inpout_2d.f90.
real*8 inpout_2d::x0_runout |
Definition at line 148 of file inpout_2d.f90.
real*8 inpout_2d::xllcorner |
Definition at line 136 of file inpout_2d.f90.
type(bc) inpout_2d::xs_bce |
Definition at line 124 of file inpout_2d.f90.
type(bc) inpout_2d::xs_bcn |
Definition at line 130 of file inpout_2d.f90.
type(bc) inpout_2d::xs_bcs |
Definition at line 127 of file inpout_2d.f90.
type(bc) inpout_2d::xs_bcw |
Definition at line 121 of file inpout_2d.f90.
real*8 inpout_2d::y0_runout |
Definition at line 148 of file inpout_2d.f90.
real*8 inpout_2d::yllcorner |
Definition at line 136 of file inpout_2d.f90.