150 namelist / run_parameters /
run_name ,
restart , topography_demfile , &
154 namelist / restart_parameters /
restart_file , xs_init , xs_ambient , t_init ,&
155 t_ambient , sed_vol_perc
157 namelist / newrun_parameters / x0 , y0 , comp_cells_x , comp_cells_y , &
158 cell_size , temperature_flag , source_flag , solid_transport_flag , &
159 rheology_flag , riemann_flag
161 namelist / initial_conditions / released_volume , x_release , y_release , &
162 velocity_mod_release , velocity_ang_release , t_init , t_ambient
164 namelist / left_state / riemann_interface , hb_w , u_w , v_w , xs_w , t_w
180 namelist / numeric_parameters / solver_scheme, dt0 , max_dt , cfl, limiter , &
181 theta , reconstr_variables , reconstr_coeff , interfaces_relaxation , n_rk
183 namelist / expl_terms_parameters / grav , x_source , y_source , r_source , &
184 vfr_source , t_source
186 namelist / temperature_parameters / emissivity , atm_heat_transf_coeff , &
187 thermal_conductivity , exp_area_fract , c_p , enne , emme , t_env , &
190 namelist / rheology_parameters /
rheology_model , mu , xi , tau , nu_ref , &
225 topography_function_flag=.false.
226 topography_demfile=.false.
250 temperature_flag = .false.
251 source_flag = .false.
252 rheology_flag = .false.
254 solid_transport_flag = .false.
257 riemann_interface = 0.5d0
331 reconstr_variables =
'phys' 343 exp_area_fract = 0.5d0
345 atm_heat_transf_coeff = 0.0d0
346 thermal_conductivity = 0.0d0
374 IF (lexist .EQV. .false.)
THEN 423 108
FORMAT(3(1x,e14.7))
431 WRITE(*,*)
'Input file IMEX_SfloW2D.inp not found' 432 WRITE(*,*)
'A new one with default values has been created' 495 exp_area_fract = -1.d0
497 atm_heat_transf_coeff = -1.d0
498 thermal_conductivity = -1.d0
539 CHARACTER(LEN=80) :: card
545 CHARACTER(LEN=3) :: check_file
549 CHARACTER(LEN=15) :: chara
559 IF ( ios .NE. 0 )
THEN 561 WRITE(*,*)
'IOSTAT=',ios
562 WRITE(*,*)
'ERROR: problem with namelist RUN_PARAMETERS' 563 WRITE(*,*)
'Please check the input file' 575 IF ( ios .NE. 0 )
THEN 577 WRITE(*,*)
'IOSTAT=',ios
578 WRITE(*,*)
'ERROR: problem with namelist NEWRUN_PARAMETERS' 579 WRITE(*,*)
'Please check the input file' 588 IF ( ( comp_cells_x .EQ. 1 ) .OR. ( comp_cells_y .EQ. 1 ) )
THEN 590 WRITE(*,*)
'----- 1D SIMULATION -----' 594 WRITE(*,*)
'----- 2D SIMULATION -----' 598 IF ( solid_transport_flag )
THEN 600 IF ( temperature_flag )
THEN 614 IF ( temperature_flag )
THEN 628 ALLOCATE(
bcw(n_vars) ,
bce(n_vars) ,
bcs(n_vars) ,
bcn(n_vars) )
632 READ(
input_unit,restart_parameters,iostat=ios)
634 IF ( ios .NE. 0 )
THEN 636 WRITE(*,*)
'IOSTAT=',ios
637 WRITE(*,*)
'ERROR: problem with namelist RESTART_PARAMETERS' 638 WRITE(*,*)
'Please check the input file' 643 IF ( ( sed_vol_perc .LT. -1.d0 ) .OR. ( sed_vol_perc .GT. 100.d0 ) ) &
646 WRITE(*,*)
'ERROR: problem with namelist RESTART_PARAMETERS' 647 WRITE(*,*)
'SED_VOL_PERC =' , sed_vol_perc
652 xs_init = 1.d-2 * sed_vol_perc
653 xs_ambient = 1.d-2 * sed_vol_perc
659 IF ( temperature_flag .AND.
restart )
THEN 665 IF ( ( check_file .EQ.
'asc' ) .AND. &
666 ( t_init*t_ambient .EQ. 0.d0 ) )
THEN 668 WRITE(*,*)
'T_init=',t_init
669 WRITE(*,*)
'T_ambient=',t_ambient
670 WRITE(*,*)
'Add the variables to the namelist RESTART_PARAMETERS' 679 IF ( riemann_flag )
THEN 683 IF ( ios .NE. 0 )
THEN 685 WRITE(*,*)
'IOSTAT=',ios
686 WRITE(*,*)
'ERROR: problem with namelist LEFT_PARAMETERS' 687 WRITE(*,*)
'Please check the input file' 694 IF ( ( temperature_flag ) .AND. ( t_w .EQ. -1.d0 ) )
THEN 696 WRITE(*,*)
'ERROR: problem with namelist LEFT_PARAMETERS' 697 WRITE(*,*)
'Initial temperature T_W not defined' 706 IF ( ios .NE. 0 )
THEN 708 WRITE(*,*)
'IOSTAT=',ios
709 WRITE(*,*)
'ERROR: problem with namelist RIGHT_PARAMETERS' 710 WRITE(*,*)
'Please check the input file' 717 IF ( ( temperature_flag ) .AND. (
t_e .EQ. -1.d0 ) )
THEN 719 WRITE(*,*)
'ERROR: problem with namelist RIGHT_PARAMETERS' 720 WRITE(*,*)
'Initial temperature T_E not defined' 730 READ(
input_unit,initial_conditions,iostat=ios)
732 IF ( ios .NE. 0 )
THEN 734 WRITE(*,*)
'IOSTAT=',ios
735 WRITE(*,*)
'ERROR: problem with namelist INITIAL_CONDITIONS' 736 WRITE(*,*)
'Please check the input file' 745 IF ( ( temperature_flag ) .AND. ( t_init*t_ambient .EQ. 0.d0 ) )
THEN 747 WRITE(*,*)
'T_init=',t_init
748 WRITE(*,*)
'T_ambient=',t_ambient
749 WRITE(*,*)
'Add the two variables to namelist INITIAL_CONDITIONS' 762 IF ( ios .NE. 0 )
THEN 764 WRITE(*,*)
'IOSTAT=',ios
765 WRITE(*,*)
'ERROR: problem with namelist NUMERIC_PARAMETERS' 766 WRITE(*,*)
'Please check the input file' 775 IF ( ( solver_scheme .NE.
'LxF' ) .AND. ( solver_scheme .NE.
'KT' ) .AND. &
776 ( solver_scheme .NE.
'GFORCE' ) )
THEN 778 WRITE(*,*)
'WARNING: no correct solver scheme selected',solver_scheme
779 WRITE(*,*)
'Chose between: LxF, GFORCE or KT' 784 IF ( ( solver_scheme.EQ.
'LxF' ) .OR. ( solver_scheme.EQ.
'GFORCE' ) )
THEN 788 ELSEIF ( solver_scheme .EQ.
'KT' )
THEN 790 IF ( ( comp_cells_x .EQ. 1 ) .OR. ( comp_cells_y .EQ. 1 ) )
THEN 803 IF ( ( cfl .GT. max_cfl ) .OR. ( cfl .LT. 0.d0 ) )
THEN 805 WRITE(*,*)
'WARNING: wrong value of cfl ',cfl
806 WRITE(*,*)
'Choose a value between 0.0 and ',max_cfl
811 IF ( verbose_level .GE. 1 )
WRITE(*,*)
'Limiters',limiter(1:n_vars)
813 IF ( ( maxval(limiter(1:n_vars)) .GT. 3 ) .OR. &
814 ( minval(limiter(1:n_vars)) .LT. 0 ) )
THEN 816 WRITE(*,*)
'WARNING: wrong limiter ',limiter(1:n_vars)
817 WRITE(*,*)
'Choose among: none, minmod,superbee,van_leer' 822 IF ( reconstr_variables .EQ.
'phys' )
THEN 824 IF ( solid_transport_flag )
THEN 826 IF ( temperature_flag )
THEN 828 WRITE(*,*)
'Linear reconstruction and b. c. applied to variables:' 829 WRITE(*,*)
'h+B,u,v,xs,T' 833 WRITE(*,*)
'Linear reconstruction and b. c. applied to variables:' 834 WRITE(*,*)
'h+B,u,v,xs' 840 IF ( temperature_flag )
THEN 842 WRITE(*,*)
'Linear reconstruction and b. c. applied to variables:' 843 WRITE(*,*)
'h+B,u,v,T' 847 WRITE(*,*)
'Linear reconstruction and b. c. applied to variables:' 854 ELSEIF ( reconstr_variables .EQ.
'cons' )
THEN 856 IF ( solid_transport_flag )
THEN 858 IF ( temperature_flag )
THEN 860 WRITE(*,*)
'Linear reconstruction and b. c. applied to variables:' 861 WRITE(*,*)
'h+B,hu,hv,xs,T' 865 WRITE(*,*)
'Linear reconstruction and b. c. applied to variables:' 866 WRITE(*,*)
'h+B,hu,hv,xs' 872 IF ( solid_transport_flag )
THEN 874 WRITE(*,*)
'Linear reconstruction and b. c. applied to variables:' 875 WRITE(*,*)
'h+B,hu,hv,T' 879 WRITE(*,*)
'Linear reconstruction and b. c. applied to variables:' 880 WRITE(*,*)
'h+B,hu,hv' 889 IF ( ( reconstr_coeff .GT. 1.0d0 ) .OR. ( reconstr_coeff .LT. 0.d0 ) )
THEN 891 WRITE(*,*)
'WARNING: wrong value of reconstr_coeff ',reconstr_coeff
892 WRITE(*,*)
'Change the value between 0.0 and 1.0 in the input file' 899 IF ( comp_cells_x .GT. 1 )
THEN 903 READ(
input_unit,west_boundary_conditions,iostat=ios)
905 IF ( ios .NE. 0 )
THEN 907 WRITE(*,*)
'IOSTAT=',ios
908 WRITE(*,*)
'ERROR: problem with namelist WEST_BOUNDARY_CONDITIONS' 909 WRITE(*,*)
'Please check the input file' 918 IF ( (
hb_bcw%flag .EQ. -1 ) )
THEN 920 WRITE(*,*)
'ERROR: problem with namelist WEST_BOUNDARY_CONDITIONS' 921 WRITE(*,*)
'B.C. for h+B not set properly' 922 WRITE(*,*)
'Please check the input file' 927 IF ( reconstr_variables .EQ.
'phys' )
THEN 929 IF (
u_bcw%flag .EQ. -1 )
THEN 931 WRITE(*,*)
'ERROR: problem with namelist WEST_BOUNDARY_CONDITIONS' 932 WRITE(*,*)
'B.C. for velocities not set properly' 933 WRITE(*,*)
'Please check the input file' 939 IF ( ( comp_cells_y .GT. 1 ) .AND. (
v_bcw%flag .EQ. -1 ) )
THEN 941 WRITE(*,*)
'ERROR: problem with namelist WEST_BOUNDARY_CONDITIONS' 942 WRITE(*,*)
'B.C. for velocities not set properly' 943 WRITE(*,*)
'Please check the input file' 948 ELSEIF ( reconstr_variables .EQ.
'cons' )
THEN 950 IF (
hu_bcw%flag .EQ. -1 )
THEN 952 WRITE(*,*)
'ERROR: problem with namelist WEST_BOUNDARY_CONDITIONS' 953 WRITE(*,*)
'B.C. for velocities not set properly' 954 WRITE(*,*)
'Please check the input file' 959 IF ( ( comp_cells_y .GT. 1 ) .AND. (
hv_bcw%flag .EQ. -1 ) )
THEN 961 WRITE(*,*)
'ERROR: problem with namelist WEST_BOUNDARY_CONDITIONS' 962 WRITE(*,*)
'B.C. for velocities not set properly' 963 WRITE(*,*)
'Please check the input file' 970 IF ( ( solid_transport_flag ) .AND. (
xs_bcw%flag .EQ. -1 ) )
THEN 972 WRITE(*,*)
'ERROR: problem with namelist WEST_BOUNDARY_CONDITIONS' 973 WRITE(*,*)
'B.C. for sediment conentration not set properly' 974 WRITE(*,*)
'Please check the input file' 979 IF ( ( temperature_flag ) .AND. (
t_bcw%flag .EQ. -1 ) )
THEN 981 WRITE(*,*)
'ERROR: problem with namelist WEST_BOUNDARY_CONDITIONS' 982 WRITE(*,*)
'B.C. for temperature not set properly' 983 WRITE(*,*)
'Please check the input file' 991 IF ( reconstr_variables .EQ.
'phys' )
THEN 996 ELSEIF ( reconstr_variables .EQ.
'cons' )
THEN 1005 READ(
input_unit,east_boundary_conditions,iostat=ios)
1007 IF ( ios .NE. 0 )
THEN 1009 WRITE(*,*)
'IOSTAT=',ios
1010 WRITE(*,*)
'ERROR: problem with namelist EAST_BOUNDARY_CONDITIONS' 1011 WRITE(*,*)
'Please check the input file' 1021 IF ( (
hb_bce%flag .EQ. -1 ) )
THEN 1023 WRITE(*,*)
'ERROR: problem with namelist EAST_BOUNDARY_CONDITIONS' 1024 WRITE(*,*)
'B.C. for h+B not set properly' 1025 WRITE(*,*)
'Please check the input file' 1030 IF ( reconstr_variables .EQ.
'phys' )
THEN 1032 IF (
u_bce%flag .EQ. -1 )
THEN 1034 WRITE(*,*)
'ERROR: problem with namelist EAST_BOUNDARY_CONDITIONS' 1035 WRITE(*,*)
'B.C. for velocities not set properly' 1036 WRITE(*,*)
'Please check the input file' 1041 IF ( ( comp_cells_y .GT. 1 ) .AND. (
v_bce%flag .EQ. -1 ) )
THEN 1043 WRITE(*,*)
'ERROR: problem with namelist EAST_BOUNDARY_CONDITIONS' 1044 WRITE(*,*)
'B.C. for velocities not set properly' 1045 WRITE(*,*)
'Please check the input file' 1050 ELSEIF ( reconstr_variables .EQ.
'cons' )
THEN 1052 IF (
hu_bce%flag .EQ. -1 )
THEN 1054 WRITE(*,*)
'ERROR: problem with namelist EAST_BOUNDARY_CONDITIONS' 1055 WRITE(*,*)
'B.C. for velocities not set properly' 1056 WRITE(*,*)
'Please check the input file' 1061 IF ( ( comp_cells_y .GT. 1 ) .AND. (
hv_bce%flag .EQ. -1 ) )
THEN 1063 WRITE(*,*)
'ERROR: problem with namelist EAST_BOUNDARY_CONDITIONS' 1064 WRITE(*,*)
'B.C. for velocities not set properly' 1065 WRITE(*,*)
'Please check the input file' 1072 IF ( ( solid_transport_flag ) .AND. (
xs_bce%flag .EQ. -1 ) )
THEN 1074 WRITE(*,*)
'ERROR: problem with namelist EAST_BOUNDARY_CONDITIONS' 1075 WRITE(*,*)
'B.C. for sediment concentration not set properly' 1076 WRITE(*,*)
'Please check the input file' 1081 IF ( ( temperature_flag ) .AND. (
t_bce%flag .EQ. -1 ) )
THEN 1083 WRITE(*,*)
'ERROR: problem with namelist EAST_BOUNDARY_CONDITIONS' 1084 WRITE(*,*)
'B.C. for temperature not set properly' 1085 WRITE(*,*)
'Please check the input file' 1092 IF ( reconstr_variables .EQ.
'phys' )
THEN 1097 ELSEIF ( reconstr_variables .EQ.
'cons' )
THEN 1106 IF ( comp_cells_y .GT. 1 )
THEN 1110 READ(
input_unit,south_boundary_conditions,iostat=ios)
1112 IF ( ios .NE. 0 )
THEN 1114 WRITE(*,*)
'IOSTAT=',ios
1115 WRITE(*,*)
'ERROR: problem with namelist SOUTH_BOUNDARY_CONDITIONS' 1116 WRITE(*,*)
'Please check the input file' 1126 IF ( (
hb_bcs%flag .EQ. -1 ) )
THEN 1128 WRITE(*,*)
'ERROR: problem with namelist SOUTH_BOUNDARY_CONDITIONS' 1129 WRITE(*,*)
'B.C. for h+B not set properly' 1130 WRITE(*,*)
'Please check the input file' 1135 IF ( reconstr_variables .EQ.
'phys' )
THEN 1137 IF ( ( comp_cells_x .GT. 1 ) .AND. (
u_bcs%flag .EQ. -1 ) )
THEN 1139 WRITE(*,*)
'ERROR: problem with namelist SOUTH_BOUNDARY_CONDITIONS' 1140 WRITE(*,*)
'B.C. for velocities not set properly' 1141 WRITE(*,*)
'Please check the input file' 1146 IF (
v_bcs%flag .EQ. -1 )
THEN 1148 WRITE(*,*)
'ERROR: problem with namelist SOUTH_BOUNDARY_CONDITIONS' 1149 WRITE(*,*)
'B.C. for velocities not set properly' 1150 WRITE(*,*)
'Please check the input file' 1155 ELSEIF ( reconstr_variables .EQ.
'cons' )
THEN 1157 IF ( ( comp_cells_x .GT. 1 ) .AND. (
hu_bcs%flag .EQ. -1 ) )
THEN 1159 WRITE(*,*)
'ERROR: problem with namelist SOUTH_BOUNDARY_CONDITIONS' 1160 WRITE(*,*)
'B.C. for velocities not set properly' 1161 WRITE(*,*)
'Please check the input file' 1166 IF (
hv_bcs%flag .EQ. -1 )
THEN 1168 WRITE(*,*)
'ERROR: problem with namelist SOUTH_BOUNDARY_CONDITIONS' 1169 WRITE(*,*)
'B.C. for velocities not set properly' 1170 WRITE(*,*)
'Please check the input file' 1177 IF ( ( solid_transport_flag ) .AND. (
xs_bcs%flag .EQ. -1 ) )
THEN 1179 WRITE(*,*)
'ERROR: problem with namelist SOUTH_BOUNDARY_CONDITIONS' 1180 WRITE(*,*)
'B.C. for sediment concentrations not set properly' 1181 WRITE(*,*)
'Please check the input file' 1186 IF ( ( temperature_flag ) .AND. (
t_bcs%flag .EQ. -1 ) )
THEN 1188 WRITE(*,*)
'ERROR: problem with namelist SOUTH_BOUNDARY_CONDITIONS' 1189 WRITE(*,*)
'B.C. for temperature not set properly' 1190 WRITE(*,*)
'Please check the input file' 1198 IF ( reconstr_variables .EQ.
'phys' )
THEN 1203 ELSEIF ( reconstr_variables .EQ.
'cons' )
THEN 1212 READ(
input_unit,north_boundary_conditions,iostat=ios)
1214 IF ( ios .NE. 0 )
THEN 1216 WRITE(*,*)
'IOSTAT=',ios
1217 WRITE(*,*)
'ERROR: problem with namelist NORTH_BOUNDARY_CONDITIONS' 1218 WRITE(*,*)
'Please check the input file' 1227 IF ( (
hb_bcn%flag .EQ. -1 ) )
THEN 1229 WRITE(*,*)
'ERROR: problem with namelist NORTH_BOUNDARY_CONDITIONS' 1230 WRITE(*,*)
'B.C. for h+B not set properly' 1231 WRITE(*,*)
'Please check the input file' 1236 IF ( reconstr_variables .EQ.
'phys' )
THEN 1238 IF ( ( comp_cells_x .GT. 1 ) .AND. (
u_bcn%flag .EQ. -1 ) )
THEN 1240 WRITE(*,*)
'ERROR: problem with namelist NORTH_BOUNDARY_CONDITIONS' 1241 WRITE(*,*)
'B.C. for velocities not set properly' 1242 WRITE(*,*)
'Please check the input file' 1247 IF (
v_bcn%flag .EQ. -1 )
THEN 1249 WRITE(*,*)
'ERROR: problem with namelist NORTH_BOUNDARY_CONDITIONS' 1250 WRITE(*,*)
'B.C. for velocities not set properly' 1251 WRITE(*,*)
'Please check the input file' 1256 ELSEIF ( reconstr_variables .EQ.
'cons' )
THEN 1258 IF ( ( comp_cells_x .GT. 1 ) .AND. (
hu_bcn%flag .EQ. -1 ) )
THEN 1260 WRITE(*,*)
'ERROR: problem with namelist NORTH_BOUNDARY_CONDITIONS' 1261 WRITE(*,*)
'B.C. for velocities not set properly' 1262 WRITE(*,*)
'Please check the input file' 1267 IF (
hv_bcn%flag .EQ. -1 )
THEN 1269 WRITE(*,*)
'ERROR: problem with namelist NORTH_BOUNDARY_CONDITIONS' 1270 WRITE(*,*)
'B.C. for velocities not set properly' 1271 WRITE(*,*)
'Please check the input file' 1278 IF (( solid_transport_flag ) .AND. (
xs_bcn%flag .EQ. -1 ) )
THEN 1280 WRITE(*,*)
'ERROR: problem with namelist NORTH_BOUNDARY_CONDITIONS' 1281 WRITE(*,*)
'B.C. for sediment concentrations not set properly' 1282 WRITE(*,*)
'Please check the input file' 1287 IF ( ( temperature_flag ) .AND. (
t_bcn%flag .EQ. -1 ) )
THEN 1289 WRITE(*,*)
'ERROR: problem with namelist NORTH_BOUNDARY_CONDITIONS' 1290 WRITE(*,*)
'B.C. for temperature not set properly' 1291 WRITE(*,*)
'Please check the input file' 1299 IF ( reconstr_variables .EQ.
'phys' )
THEN 1304 ELSEIF ( reconstr_variables .EQ.
'cons' )
THEN 1313 IF ( solid_transport_flag )
THEN 1320 IF ( temperature_flag )
THEN 1331 IF ( temperature_flag )
THEN 1345 READ(
input_unit, expl_terms_parameters,iostat=ios)
1347 IF ( ios .NE. 0 )
THEN 1349 WRITE(*,*)
'IOSTAT=',ios
1350 WRITE(*,*)
'ERROR: problem with namelist EXPL_TERMS_PARAMETERS' 1351 WRITE(*,*)
'Please check the input file' 1360 IF ( grav .EQ. -1.d0 )
THEN 1362 WRITE(*,*)
'ERROR: problem with namelist EXPL_TERMS_PARAMETERS' 1363 WRITE(*,*)
'R_SOURCE not set properly' 1364 WRITE(*,*)
'Please check the input file' 1369 IF ( source_flag )
THEN 1371 IF ( r_source .EQ. 0.d0 )
THEN 1373 WRITE(*,*)
'ERROR: problem with namelist EXPL_TERMS_PARAMETERS' 1374 WRITE(*,*)
'R_SOURCE =',r_source
1375 WRITE(*,*)
'Please check the input file' 1380 IF ( vfr_source .EQ. 0.d0 )
THEN 1382 WRITE(*,*)
'ERROR: problem with namelist EXPL_TERMS_PARAMETERS' 1383 WRITE(*,*)
'VFR_SOURCE not set properly' 1384 WRITE(*,*)
'Please check the input file' 1389 IF ( temperature_flag .AND. ( r_source .EQ. 0.d0 ) )
THEN 1391 WRITE(*,*)
'ERROR: problem with namelist EXPL_TERMS_PARAMETERS' 1392 WRITE(*,*)
'TEMPERATURE_FLAG =',temperature_flag,
' R_SOURCE =',r_source
1393 WRITE(*,*)
'Please check the input file' 1402 IF ( temperature_flag )
THEN 1404 READ(
input_unit, temperature_parameters,iostat=ios)
1406 IF ( ios .NE. 0 )
THEN 1408 WRITE(*,*)
'IOSTAT=',ios
1409 WRITE(*,*)
'ERROR: problem with namelist TEMPERATURE_PARAMETERS' 1410 WRITE(*,*)
'Please check the input file' 1419 IF ( exp_area_fract .EQ. -1.d0 )
THEN 1421 WRITE(*,*)
'ERROR: problem with namelist TEMPERATURE_PARAMETERS' 1422 WRITE(*,*)
'EXP_AREA_FRACT value not properly set' 1423 WRITE(*,*)
'Please check the input file' 1428 IF ( emissivity .EQ. -1.d0 )
THEN 1430 WRITE(*,*)
'ERROR: problem with namelist TEMPERATURE_PARAMETERS' 1431 WRITE(*,*)
'EMISSIVITY value not properly set' 1432 WRITE(*,*)
'Please check the input file' 1437 IF ( atm_heat_transf_coeff .EQ. -1.d0 )
THEN 1439 WRITE(*,*)
'ERROR: problem with namelist TEMPERATURE_PARAMETERS' 1440 WRITE(*,*)
'ATM_HEAT_TRANSF_COEFF value not properly set' 1441 WRITE(*,*)
'Please check the input file' 1446 IF ( thermal_conductivity .EQ. -1.d0 )
THEN 1448 WRITE(*,*)
'ERROR: problem with namelist TEMPERATURE_PARAMETERS' 1449 WRITE(*,*)
'THERMAL CONDUCTIVITY value not properly set' 1450 WRITE(*,*)
'Please check the input file' 1455 IF ( enne .EQ. -1.d0 )
THEN 1457 WRITE(*,*)
'ERROR: problem with namelist TEMPERATURE_PARAMETERS' 1458 WRITE(*,*)
'ENNE value not properly set' 1459 WRITE(*,*)
'Please check the input file' 1464 IF ( emme .EQ. -1.d0 )
THEN 1466 WRITE(*,*)
'ERROR: problem with namelist TEMPERATURE_PARAMETERS' 1467 WRITE(*,*)
'EMME value not properly set' 1468 WRITE(*,*)
'Please check the input file' 1473 IF ( t_env .EQ. -1.d0 )
THEN 1475 WRITE(*,*)
'ERROR: problem with namelist TEMPERATURE_PARAMETERS' 1476 WRITE(*,*)
'T_ENV value not properly set' 1477 WRITE(*,*)
'Please check the input file' 1482 IF ( t_ground .EQ. -1.d0 )
THEN 1484 WRITE(*,*)
'ERROR: problem with namelist TEMPERATURE_PARAMETERS' 1485 WRITE(*,*)
'T_GROUND value not properly set' 1486 WRITE(*,*)
'Please check the input file' 1491 IF ( c_p .EQ. -1.d0 )
THEN 1493 WRITE(*,*)
'ERROR: problem with namelist TEMPERATURE_PARAMETERS' 1494 WRITE(*,*)
'C_P value not properly set' 1495 WRITE(*,*)
'Please check the input file' 1500 IF ( rho .EQ. -1.d0 )
THEN 1502 WRITE(*,*)
'ERROR: problem with namelist TEMPERATURE_PARAMETERS' 1503 WRITE(*,*)
'RHO value not properly set' 1504 WRITE(*,*)
'Please check the input file' 1510 IF ( emissivity .EQ. 0.d0 )
THEN 1512 WRITE(*,*)
'No radiative term: emissivity =',emissivity
1516 IF ( atm_heat_transf_coeff .EQ. 0.d0 )
THEN 1518 WRITE(*,*)
'No convective term: atm_heat_transf_coeff =', &
1519 atm_heat_transf_coeff
1523 IF ( thermal_conductivity .EQ. 0.d0 )
THEN 1525 WRITE(*,*)
'No conductive term: thermal_conductivity =', &
1526 thermal_conductivity
1530 IF ( rho .LE. 0.d0 )
THEN 1532 WRITE(*,*)
'ERROR: problem with namelist TEMPERATURE_PARAMETERS' 1533 WRITE(*,*)
'RHO =' , rho
1534 WRITE(*,*)
'Please check the input file' 1544 IF ( rheology_flag )
THEN 1546 READ(
input_unit, rheology_parameters,iostat=ios)
1548 IF ( ios .NE. 0 )
THEN 1550 WRITE(*,*)
'IOSTAT=',ios
1551 WRITE(*,*)
'ERROR: problem with namelist RHEOLOGY_PARAMETERS' 1552 WRITE(*,*)
'Please check the input file' 1561 IF ( rheology_model .EQ. 0 )
THEN 1563 WRITE(*,*)
'ERROR: problem with namelist RHEOLOGY_PARAMETERS' 1564 WRITE(*,*)
'RHEOLOGY_FLAG' , rheology_flag ,
'RHEOLOGY_MODEL =' , &
1566 WRITE(*,*)
'Please check the input file' 1569 ELSEIF ( rheology_model .EQ. 1 )
THEN 1571 IF ( ( mu .EQ. -1.d0 ) .AND. ( xi .EQ. -1.d0 ) )
THEN 1573 WRITE(*,*)
'ERROR: problem with namelist RHEOLOGY_PARAMETERS' 1574 WRITE(*,*)
'RHEOLOGY_MODEL =' , rheology_model
1575 WRITE(*,*)
'MU =' , mu ,
' XI =' , xi
1576 WRITE(*,*)
'Please check the input file' 1581 IF ( ( t_ref .NE. -1.d0 ) .OR. ( nu_ref .NE. -1.d0 ) .OR. &
1582 ( visc_par .NE. -1.d0 ) .OR. ( tau .NE. -1.d0 ) )
THEN 1584 WRITE(*,*)
'WARNING: parameters not used in RHEOLOGY_PARAMETERS' 1585 IF ( t_ref .NE. -1.d0 )
WRITE(*,*)
'T_ref =',t_ref
1586 IF ( nu_ref .NE. -1.d0 )
WRITE(*,*)
'nu_ref =',nu_ref
1587 IF ( visc_par .NE. -1.d0 )
WRITE(*,*)
'visc_par =',visc_par
1588 IF ( tau .NE. -1.d0 )
WRITE(*,*)
'tau =',tau
1589 WRITE(*,*)
'Press ENTER to continue' 1594 ELSEIF ( rheology_model .EQ. 2 )
THEN 1596 IF ( tau .EQ. -1.d0 )
THEN 1598 WRITE(*,*)
'ERROR: problem with namelist RHEOLOGY_PARAMETERS' 1599 WRITE(*,*)
'RHEOLOGY_MODEL =' , rheology_model
1600 WRITE(*,*)
'TAU =' , tau
1601 WRITE(*,*)
'Please check the input file' 1606 IF ( ( t_ref .NE. -1.d0 ) .OR. ( nu_ref .NE. -1.d0 ) .OR. &
1607 ( visc_par .NE. -1.d0 ) .OR. ( mu .NE. -1.d0 ) .OR. &
1608 ( xi .NE. -1.d0 ) )
THEN 1610 WRITE(*,*)
'WARNING: parameters not used in RHEOLOGY_PARAMETERS' 1611 IF ( t_ref .NE. -1.d0 )
WRITE(*,*)
'T_ref =',t_ref
1612 IF ( nu_ref .NE. -1.d0 )
WRITE(*,*)
'nu_ref =',nu_ref
1613 IF ( visc_par .NE. -1.d0 )
WRITE(*,*)
'visc_par =',visc_par
1614 IF ( mu .NE. -1.d0 )
WRITE(*,*)
'mu =',mu
1615 IF ( xi .NE. -1.d0 )
WRITE(*,*)
'xi =',xi
1616 WRITE(*,*)
'Press ENTER to continue' 1622 ELSEIF ( rheology_model .EQ. 3 )
THEN 1624 IF ( nu_ref .EQ. -1.d0 )
THEN 1626 WRITE(*,*)
'ERROR: problem with namelist RHEOLOGY_PARAMETERS' 1627 WRITE(*,*)
'NU_REF =' , nu_ref
1628 WRITE(*,*)
'Please check the input file' 1633 IF ( visc_par .EQ. -1.d0 )
THEN 1635 WRITE(*,*)
'ERROR: problem with namelist RHEOLOGY_PARAMETERS' 1636 WRITE(*,*)
'VISC_PAR =' , visc_par
1637 WRITE(*,*)
'Please check the input file' 1640 ELSEIF ( visc_par .EQ. 0.d0 )
THEN 1642 WRITE(*,*)
'WARNING: temperature and momentum uncoupled' 1643 WRITE(*,*)
'VISC_PAR =' , visc_par
1644 WRITE(*,*)
'Press ENTER to continue' 1649 IF ( t_ref .EQ. -1.d0 )
THEN 1651 WRITE(*,*)
'ERROR: problem with namelist RHEOLOGY_PARAMETERS' 1652 WRITE(*,*)
'T_REF =' , t_ref
1653 WRITE(*,*)
'Please check the input file' 1660 IF ( ( mu .NE. -1.d0 ) .OR. ( xi .NE. -1.d0 ) .OR. ( tau .NE. -1.d0 ) ) &
1663 WRITE(*,*)
'WARNING: parameters not used in RHEOLOGY_PARAMETERS' 1664 IF ( mu .NE. -1.d0 )
WRITE(*,*)
'mu =',mu
1665 IF ( xi .NE. -1.d0 )
WRITE(*,*)
'xi =',xi
1666 IF ( tau .NE. -1.d0 )
WRITE(*,*)
'tau =',tau
1667 WRITE(*,*)
'Press ENTER to continue' 1672 ELSEIF ( rheology_model .EQ. 4 )
THEN 1674 IF ( .NOT. solid_transport_flag )
THEN 1676 IF ( sed_vol_perc .EQ. -1.d0 )
THEN 1678 WRITE(*,*)
'ERROR: problem with namelist RHEOLOGY_PARAMETERS' 1679 WRITE(*,*)
'RHEOLOGY_MODEL =' , rheology_model
1680 WRITE(*,*)
'SED_VOL_PERC = ' , sed_vol_perc
1687 IF (
alpha2 .EQ. -1.d0 )
THEN 1689 WRITE(*,*)
'ERROR: problem with namelist RHEOLOGY_PARAMETERS' 1690 WRITE(*,*)
'ALPHA2 =' ,
alpha2 1691 WRITE(*,*)
'Please check the input file' 1696 IF (
beta2 .EQ. -1.d0 )
THEN 1698 WRITE(*,*)
'ERROR: problem with namelist RHEOLOGY_PARAMETERS' 1699 WRITE(*,*)
'BETA2 =' ,
beta2 1700 WRITE(*,*)
'Please check the input file' 1705 IF (
alpha1 .EQ. -1.d0 )
THEN 1707 WRITE(*,*)
'ERROR: problem with namelist RHEOLOGY_PARAMETERS' 1708 WRITE(*,*)
'ALPHA1 =' ,
alpha1 1709 WRITE(*,*)
'Please check the input file' 1714 IF (
beta1 .EQ. -1.d0 )
THEN 1716 WRITE(*,*)
'ERROR: problem with namelist RHEOLOGY_PARAMETERS' 1717 WRITE(*,*)
'BETA1 =' ,
beta1 1718 WRITE(*,*)
'Please check the input file' 1723 IF (
kappa .EQ. -1.d0 )
THEN 1725 WRITE(*,*)
'ERROR: problem with namelist RHEOLOGY_PARAMETERS' 1726 WRITE(*,*)
'KAPPA =' ,
kappa 1727 WRITE(*,*)
'Please check the input file' 1732 IF (
n_td .EQ. -1.d0 )
THEN 1734 WRITE(*,*)
'ERROR: problem with namelist RHEOLOGY_PARAMETERS' 1735 WRITE(*,*)
'N_TD =' ,
n_td 1736 WRITE(*,*)
'Please check the input file' 1741 IF (
gamma_w .EQ. -1.d0 )
THEN 1743 WRITE(*,*)
'ERROR: problem with namelist RHEOLOGY_PARAMETERS' 1744 WRITE(*,*)
'GAMMA_W =' ,
gamma_w 1745 WRITE(*,*)
'Please check the input file' 1750 IF (
gamma_s .EQ. -1.d0 )
THEN 1752 WRITE(*,*)
'ERROR: problem with namelist RHEOLOGY_PARAMETERS' 1753 WRITE(*,*)
'GAMMA_S =' ,
gamma_s 1754 WRITE(*,*)
'Please check the input file' 1759 ELSEIF ( rheology_model .EQ. 5 )
THEN 1761 WRITE(*,*)
'RHEOLOGY_MODEL =' , rheology_model
1762 WRITE(*,*)
'Kurganov & Petrova Example 5' 1766 WRITE(*,*)
'ERROR: problem with namelist RHEOLOGY_PARAMETERS' 1767 WRITE(*,*)
'RHEOLOGY_MODEL =' , rheology_model
1768 WRITE(*,*)
'Please check the input file' 1778 IF ( verbose_level .GE. 1 )
WRITE(*,*)
1781 IF ( .NOT.topography_demfile )
THEN 1785 WRITE(*,*)
'Searching for topography_profile' 1787 topography_profile_search:
DO 1791 IF( trim(card) ==
'TOPOGRAPHY_PROFILE' )
THEN 1793 EXIT topography_profile_search
1797 END DO topography_profile_search
1802 IF ( verbose_level .GE. 1 )
WRITE(*,*)
'n_topography_profile_x' , &
1807 IF ( verbose_level .GE. 1 )
WRITE(*,*)
'n_topography_profile_y' , &
1833 WRITE(*,*)
'Searching for DEM file' 1835 INQUIRE(file=
'topography_dem.asc',exist=lexist)
1839 OPEN(2001, file=
'topography_dem.asc', status=
'old', action=
'read')
1843 WRITE(*,*)
'no dem file' 1848 READ(2001,*) chara,
ncols 1849 READ(2001,*) chara,
nrows 1860 WRITE(*,*)
'Computational domain problem' 1868 IF ( x0 + ( comp_cells_x ) * cell_size .GT. &
1871 WRITE(*,*)
'Computational domain problem' 1872 WRITE(*,*)
'right edge > xllcorner+ncols*cellsize', &
1880 WRITE(*,*)
'Computational domain problem' 1886 IF ( abs( ( y0 + comp_cells_y * cell_size ) - (
yllcorner + 0.5d0 + &
1889 WRITE(*,*)
'Computational domain problem' 1890 WRITE(*,*)
'top edge > yllcorner+nrows*cellsize', &
1897 WRITE(*,*)
'Reading DEM file' 1898 WRITE(*,*)
'ncols',
ncols 1899 WRITE(*,*)
'nrows',
nrows 1924 WRITE(*,fmt=
"(A1,A,t21,F6.2,A)",advance=
"NO") achar(13), &
1925 &
" Percent Complete: " , &
1943 READ(
input_unit, runout_parameters,iostat=ios)
1945 IF ( ios .NE. 0 )
THEN 1947 WRITE(*,*)
'IOSTAT=',ios
1948 WRITE(*,*)
'ERROR: problem with namelist RUNOUT_PARAMETERS' 1949 WRITE(*,*)
'Please check the input file' 1960 WRITE(*,*)
'Runout reference location not defined' 1966 WRITE(*,*)
'Computational domain problem' 1967 WRITE(*,*)
'x0_runout < x0',x0,
x0_runout 1972 IF ( x0 .GT. x0+comp_cells_x*cell_size )
THEN 1974 WRITE(*,*)
'Computational domain problem' 1975 WRITE(*,*)
'x0_runout > x0+comp_cells_x*cell_size' , x0 , &
1983 WRITE(*,*)
'Computational domain problem' 1984 WRITE(*,*)
'y0_runout < y0',y0,
y0_runout 1989 IF ( y0 .GT. y0+comp_cells_y*cell_size )
THEN 1991 WRITE(*,*)
'Computational domain problem' 1992 WRITE(*,*)
'y0_runout > y0+comp_cells_y*cell_size' , y0 , &
2011 WRITE(*,*)
'Searching for topography_profile' 2019 IF( trim(card) ==
'PROBES_COORDS' )
THEN 2025 END DO probes_search
2038 IF ( verbose_level.GE.0 )
WRITE(*,*) k ,
probes_coords( 1:2 , k )
2068 IF ( riemann_flag)
THEN 2083 IF ( comp_cells_x .GT. 1 )
THEN 2090 IF ( comp_cells_y .GT. 1 )
THEN 2099 IF ( temperature_flag )
WRITE(
backup_unit,temperature_parameters)
2101 IF ( rheology_flag )
WRITE(
backup_unit,rheology_parameters)
2106 IF ( .NOT.topography_demfile )
THEN 2118 107
FORMAT(3(1x,e14.7))
2135 109
FORMAT(2(1x,e14.7))
2165 CHARACTER(LEN=40) :: run_name_org
2166 LOGICAL :: restart_org
2167 LOGICAL :: topography_demfile_org
2168 REAL*8 :: t_start_org
2170 REAL*8 :: dt_output_org
2171 LOGICAL :: output_cons_flag_org
2172 LOGICAL :: output_phys_flag_org
2173 LOGICAL :: output_esri_flag_org
2174 INTEGER :: verbose_level_org
2178 topography_demfile_org = topography_demfile
2179 t_start_org = t_start
2181 dt_output_org = dt_output
2185 verbose_level_org = verbose_level
2193 IF ( ios .NE. 0 )
THEN 2195 WRITE(*,*)
'IOSTAT=',ios
2196 WRITE(*,*)
'ERROR: problem with namelist RUN_PARAMETERS' 2197 WRITE(*,*)
'Please check the input file' 2208 IF ( t_end_org .NE. t_end )
THEN 2210 WRITE(*,*)
'Modified input file: t_end =',t_end
2214 IF ( dt_output_org .NE. dt_output )
THEN 2216 WRITE(*,*)
'Modified input file: dt_output =',dt_output
2238 IF ( verbose_level_org .NE. verbose_level )
THEN 2240 WRITE(*,*)
'Modified input file: verbose_level =',verbose_level
2246 topography_demfile_org = topography_demfile
2247 t_start_org = t_start
2277 CHARACTER(LEN=15) :: chara
2285 CHARACTER(LEN=30) :: string
2287 CHARACTER(LEN=3) :: check_file
2289 INTEGER :: ncols , nrows , nodata_value
2291 REAL*8 :: xllcorner , yllcorner , cellsize
2295 REAL*8 :: sed_vol_fract_init
2299 IF (lexist .EQV. .false.)
THEN 2316 IF ( check_file .EQ.
'asc' )
THEN 2327 IF ( ncols .NE. comp_cells_x )
THEN 2329 WRITE(*,*)
'ncols not equal to comp_cells_x',ncols,comp_cells_x
2334 IF ( nrows .NE. comp_cells_y )
THEN 2336 WRITE(*,*)
'nrows not equal to comp_cells_y',nrows,comp_cells_y
2341 IF ( dabs( xllcorner - x0 ) .GT. 1.d-5*cellsize )
THEN 2343 WRITE(*,*)
'xllcorner not equal to x0', xllcorner , x0
2348 IF ( dabs( yllcorner - y0 ) .GT. 1.d-5*cellsize )
THEN 2350 WRITE(*,*)
'yllcorner not equal to y0', yllcorner , y0
2355 IF ( cellsize .NE. cell_size )
THEN 2357 WRITE(*,*)
'cellsize not equal to cell_size', cellsize , cell_size
2364 WRITE(*,fmt=
"(A1,A,t21,F6.2,A)",advance=
"NO") achar(13), &
2365 &
" Percent Complete: ",(
REAL(k) /
REAL(comp_cells_y))*100.0,
"%" 2382 WRITE(*,*)
'Total volume =',cellsize**2 * sum(
thickness_init(:,:) )
2387 IF ( solid_transport_flag )
THEN 2397 WRITE(*,*)
'MAXVAL(q(4,:,:))',maxval(
q(4,:,:))
2398 WRITE(*,*)
'xs_ambient,xs_init',xs_ambient,xs_init
2402 ( 1.d0 - xs_init ) *
gamma_s )
2404 WRITE(*,*)
'Total sediment volume =',cellsize**2*sum(
thickness_init* &
2405 sed_vol_fract_init )
2407 IF ( temperature_flag )
THEN 2421 IF ( temperature_flag )
THEN 2437 IF ( verbose_level .GE. 1 )
THEN 2439 WRITE(*,*)
'Min q(1,:,:) =',minval(
q(1,:,:))
2440 WRITE(*,*)
'Max q(1,:,:) =',maxval(
q(1,:,:))
2441 WRITE(*,*)
'SUM(q(1,:,:)) =',sum(
q(1,:,:))
2450 WRITE(*,*)
'SUM(B_cent(:,:)) =',sum(
b_cent(:,:))
2455 ELSEIF ( check_file .EQ.
'q_2' )
THEN 2461 IF ( temperature_flag )
THEN 2471 IF ( verbose_level .GE. 2 )
THEN 2473 WRITE(*,*)
'x,y,q,B',xj,yk,
q(:,j,k),
b_cent(j,k)
2475 WRITE(*,*)
'h',
q(1,j,k)-
b_cent(j,k)
2477 IF ( solid_transport_flag )
THEN 2479 WRITE(*,*)
'xs',
q(4,j,k) / (
q(1,j,k)-
b_cent(j,k) )
2481 IF ( temperature_flag )
THEN 2483 WRITE(*,*)
'T',
q(5,j,k) / (
q(1,j,k)-
b_cent(j,k) )
2491 IF ( temperature_flag )
THEN 2493 WRITE(*,*)
'T',
q(4,j,k) / (
q(1,j,k)-
b_cent(j,k) )
2503 IF (
q(1,j,k) .LE.
b_cent(j,k)+1.d-10 )
THEN 2505 IF ( verbose_level .GE. 2 )
THEN 2507 WRITE(*,*)
'q(1,j,k),B_cent(j,k)',j,k,
q(1,j,k),
b_cent(j,k)
2522 WRITE(*,*)
'Total volume =',dx*dy* sum(
q(1,:,:)-
b_cent(:,:) )
2524 IF ( solid_transport_flag )
THEN 2526 WRITE(*,*)
'Total sediment volume =',dx*dy* sum(
q(4,:,:) * &
2531 1003
FORMAT(6e20.12)
2532 1004
FORMAT(7e20.12)
2540 WRITE(*,*)
'Starting from output index ',
output_idx 2546 WRITE(*,*)
'Restart file not in the right format (*.asc or *)' 2590 REAL*8,
INTENT(IN) :: time
2592 CHARACTER(LEN=4) :: idx_string
2594 REAL*8 :: qp(n_vars)
2621 IF ( dabs(
q(i,j,k)) .LT. 1d-99)
q(i,j,k) = 0.d0
2625 IF ( temperature_flag )
THEN 2660 CALL qc_to_qp(
q(:,j,k),
b_cent(j,k),qp(:))
2662 IF ( dabs(
REAL(
h)) .LT. 1d-99)
h = dcmplx(0.d0,0.d0)
2663 IF ( dabs(
REAL(
u)) .LT. 1d-99)
u = dcmplx(0.d0,0.d0)
2664 IF ( dabs(
REAL(
v)) .LT. 1d-99)
v = dcmplx(0.d0,0.d0)
2666 IF ( solid_transport_flag )
THEN 2668 IF ( dabs(
REAL(
xs)) .LT. 1d-99)
xs = dcmplx(0.d0,0.d0)
2670 IF ( temperature_flag )
THEN 2672 IF ( dabs(
REAL(
t)) .LT. 1d-99)
t = dcmplx(0.d0,0.d0)
2675 REAL(u),
REAL(v) , B_cent(j,k) ,
REAL(h) + B_cent(j,k) , &
2681 REAL(u),
REAL(v) , B_cent(j,k) ,
REAL(h) + B_cent(j,k) , &
2688 IF ( temperature_flag )
THEN 2690 IF ( dabs(
REAL(
t)) .LT. 1d-99)
t = dcmplx(0.d0,0.d0)
2693 REAL(u),
REAL(v) , B_cent(j,k) ,
REAL(h) + B_cent(j,k) , &
2699 REAL(u),
REAL(v) , B_cent(j,k) ,
REAL(h) + B_cent(j,k)
2718 1007
FORMAT(7e20.12)
2719 1008
FORMAT(6e20.12)
2720 1009
FORMAT(8e20.12)
2721 1010
FORMAT(9e20.12)
2722 1011
FORMAT(7e20.12)
2723 1012
FORMAT(8e20.12)
2755 INTEGER,
INTENT(IN) :: output_idx
2757 CHARACTER(LEN=4) :: idx_string
2760 IF ( output_idx .EQ. 1 )
THEN 2762 OPEN(
dem_esri_unit,file=
'dem_esri.asc',status=
'unknown',form=
'formatted')
2771 DO j = comp_cells_y,1,-1
2781 idx_string =
lettera(output_idx-1)
2792 WHERE (
q(1,:,:) -
b_cent(:,:) .GE. 1.d-5 )
2805 DO j = comp_cells_y,1,-1
2813 IF ( temperature_flag )
THEN 2824 WHERE (
q(1,:,:) -
b_cent(:,:) .GE. 1.d-5 )
2837 DO j = comp_cells_y,1,-1
2872 CHARACTER*4 FUNCTION lettera(k)
2874 CHARACTER ones,tens,hund,thou
2878 INTEGER :: iten, ione, ihund, ithou
2881 ihund=int((k-(ithou*1000))/100)
2882 iten=int((k-(ithou*1000)-(ihund*100))/10)
2883 ione=k-ithou*1000-ihund*100-iten*10
2888 lettera=thou//hund//tens//ones
2914 INTEGER,
INTENT(IN) :: output_idx
2916 CHARACTER(LEN=4) :: idx_string
2922 idx_string =
lettera(output_idx-1)
2964 REAL*8,
INTENT(IN) :: time
2965 LOGICAL,
INTENT(INOUT) :: stop_flag
2967 REAL*8,
ALLOCATABLE :: X(:,:), Y(:,:) , dist(:,:)
2969 INTEGER :: imax(2) , imin(2)
2975 ALLOCATE( x(sx,sy) , y(sx,sy) , dist(sx,sy) )
2977 x(:,:) = spread(
x_comp, 2, sy )
2978 y(:,:) = spread(
y_comp, 1, sx )
2982 IF ( time .EQ. t_start )
THEN 2984 ALLOCATE(
h_old(sx,sy) )
2991 imin = maxloc( dist )
2996 WRITE(*,*)
'Runout calculated as linear distance from: (' , &
3002 imax = maxloc( dist )
3012 WHERE(
h_old(:,:) > 1.d-5 ) dist = dsqrt(
q(2,:,:)**2 +
q(3,:,:)**2 )
3014 max_mom = maxval( dist )
3021 WHERE(
q(1,:,:) -
b_cent(:,:) > 1.d-5 ) dist = dsqrt( ( x -
x0_runout )**2 &
3024 imax = maxloc( dist )
3026 WRITE(
runout_unit,
'(A,F12.3,A,F12.3,A,F12.3)')
'Time (s) = ',time , &
3027 ' Runout (m) = ',dist(imax(1),imax(2)) -
init_runout,
' Max mom = ', &
3033 IF ( ( time .GT. t_start ) .AND. ( max_mom .LT.
runout_mom_stop ) )
THEN 3035 WRITE(*,*)
'Steady solution reached, max mom = ', max_mom
3042 OPEN(
dakota_unit,file=
'dakota.txt',status=
'unknown',form=
'formatted')
3050 DEALLOCATE( x , y , dist )
real *8 emissivity
emissivity (eps in Costa & Macedonio, 2005)
real *8 max_dt
Largest time step allowed.
logical topography_demfile
Flag for uploading topography from a different file (topography_dem.asc)
subroutine qc_to_qp(qc, B, qp)
Conservative to physical variables.
integer, parameter probes_unit
Probes data unit.
real *8, dimension(:,:), allocatable probes_coords
real *8 dy
Control volumes size.
integer n_rk
Runge-Kutta order.
character(len=40) run_name
Name of the run.
real *8 t_steady
end time when reached steady solution
real *8, dimension(:), allocatable x_comp
Location of the centers (x) of the control volume of the domain.
real *8 gamma_s
Specific weight of sediments.
real *8 y0
Bottom of the physical domain.
real *8 nu_ref
reference kinematic viscosity [m2/s]
real *8 t_ground
temperature of lava-ground interface
subroutine output_probes(output_idx)
Write solution at selected points on file.
real *8, dimension(:,:), allocatable b_cent
Topography at the centers of the control volumes.
integer comp_cells_x
Number of control volumes x in the comp. domain.
real *8 beta2
2nd parameter for yield strenght empirical relationship (O'Brian et al, 1993)
real *8, dimension(:,:), allocatable thickness_init
real *8, dimension(:), allocatable y_comp
Location of the centers (y) of the control volume of the domain.
logical temperature_flag
Flag to choose if we model temperature transport.
logical rheology_flag
Flag to choose if we add the rheology.
integer, parameter output_esri_unit
Esri Output unit.
integer n_topography_profile_y
subroutine read_solution
Read the solution from the restart unit.
real *8 t_init
Initial temperature of the pile of material.
real *8 u_e
Right velocity x.
real *8 c_p
specific heat [J kg-1 K-1]
real *8 v_w
Left velocity y.
real *8 dx
Control volumes size.
logical output_esri_flag
Flag to save the output in esri ascii format *.asc.
real *8 y_release
Initial y-coordinate of the pile.
real *8 t_end
end time for the run
integer comp_cells_y
Number of control volumes y in the comp. domain.
character(len=40) restart_file
Name of the restart file.
integer rheology_model
choice of the rheology model
character(len=40) probes_file
Name of the probes file.
type(bc), dimension(:), allocatable bcw
bcW&flag defines the west boundary condition:
real *8 riemann_interface
Riemann problem interface relative position. It is a value between 0 and 1.
subroutine update_param
Read the input file.
real *8 u_w
Left velocity x.
real *8 thermal_conductivity
thermal conductivity [W m-1 K-1] (k in Costa & Macedonio, 2005)
real *8 velocity_ang_release
Initial velocity direction (angle in degree): .
real *8 velocity_mod_release
Initial velocity module of the pile.
integer n_topography_profile_x
real *8 beta1
2nd parameter for fluid viscosity empirical relationship (O'Brian et al, 1993)
real *8 released_volume
Initial volume of the flow.
character(len=40) output_esri_file
Name of the esri output files.
integer n_vars
Number of conservative variables.
complex *16 v
velocity (y direction)
integer, parameter dakota_unit
real *8 cfl
Courant-Friedrichs-Lewy parameter.
real *8 t_ambient
Ambient temperature.
real *8 enne
thermal boundary layer fraction of total thickness
logical source_flag
Flag to choose if there is a source of mass within the domain.
real *8 rho
fluid density [kg/m3]
real *8 dt0
Initial time step.
real *8 grav
gravitational acceleration
real *8 mu
drag coefficients (Voellmy-Salm model)
real *8 visc_par
viscosity parameter [K-1] (b in Table 1 Costa & Macedonio, 2005)
real *8 x_release
Initial x-coordiante of the pile.
real *8 n_td
Mannings roughness coefficient ( units: T L^(-1/3) )
logical restart
Flag to start a run from a previous output: .
real *8 x0
Left of the physical domain.
subroutine output_runout(time, stop_flag)
Write runout on file.
subroutine output_solution(time)
Write the solution on the output unit.
integer, parameter backup_unit
Backup input data unit.
character *4 function lettera(k)
Numeric to String conversion.
character(len=20) solver_scheme
Finite volume method: .
logical output_phys_flag
Flag to save the physical variables on file *.p_2d.
real *8, dimension(:,:), allocatable grid_output
Solution in ascii grid format (ESRI)
integer, parameter output_unit_2d
Output data 2D unit.
real *8 t_env
evironment temperature [K]
real *8 alpha2
1st parameter for yield strenght empirical relationship (O'Brian et al, 1993)
integer, parameter output_unit
Output data unit.
real *8 gamma_w
Specific weight of water.
integer, parameter runout_unit
logical output_cons_flag
Flag to save the conservative variables on file *.q_2d.
real *8 theta
Van Leer limiter parameter.
logical riemann_flag
Flag to choose the sort of problem to solve.
character(len=40) output_file
Name of the output files.
real *8 t_w
Left temperature.
real *8 atm_heat_transf_coeff
atmospheric heat trasnfer coefficient [W m-2 K-1] (lambda in C&M, 2005)
real *8 v_e
Right velocity y.
real *8 t_output
time of the next output
subroutine read_param
Read the input file.
real *8 alpha1
1st parameter for fluid viscosity empirical relationship (O'Brian et al, 1993)
real *8 xs_init
Initial sediment concentration in the pile of material.
real *8, dimension(:,:,:), allocatable topography_profile
real *8 t_ref
reference temperature [K]
character(len=40) input_file
File with the run parameters.
real *8 xs_ambient
Ambient sediment concentration.
character(len=20) reconstr_variables
subroutine interp_2d_scalarb(x1, y1, f1, x2, y2, f2)
Scalar interpolation (2D)
subroutine output_esri(output_idx)
Write the thickness in ESRI format.
logical topography_function_flag
Flag to choose in which way we upload the topography.
real *8 exp_area_fract
fractional area of the exposed inner core (f in C&M, 2005)
integer, dimension(10) limiter
Limiter for the slope in the linear reconstruction: .
integer output_idx
Counter for the output files.
type(bc), dimension(:), allocatable bcn
bcN&flag defines the north boundary condition:
real *8 t_runout
time of the next runout output
real *8 t_e
Right temperature.
integer n_eqns
Number of equations.
complex *16 xs
sediment concentration
character(len=40) output_file_2d
Name of the output files.
integer, parameter dem_esri_unit
Computational grid Esri fmt unit.
character(len=40) bak_name
Backup file for the parameters.
subroutine init_param
Initialization of the variables read from the input file.
real *8, dimension(:,:), allocatable h_old
real *8 xs_e
Right sediment concentration.
real *8 xs_w
Left sediment concentration.
real *8 reconstr_coeff
Slope coefficient in the linear reconstruction.
type(bc), dimension(:), allocatable bcs
bcS&flag defines the south boundary condition:
real *8 emme
velocity boundary layer fraction of total thickness
real *8 tau
drag coefficients (plastic model)
type(bc), dimension(:), allocatable bce
bcE&flag defines the east boundary condition:
complex *16 u
velocity (x direction)
real *8 dt_output
time interval for the output of the solution
integer, parameter input_unit
Input data unit.
real *8 kappa
Empirical resistance parameter.
integer, parameter restart_unit
Restart data unit.
logical solid_transport_flag
Flag to choose if we model solid phase transport.
character(len=40) runout_file
Name of the runout file.
subroutine allocate_solver_variables
Memory allocation.
real *8 hb_e
Right height.
logical interfaces_relaxation
Flag to add the relaxation terms after the linear reconstruction: .
logical output_runout_flag
Flag to save the max runout at ouput times.
real *8 t_start
initial time for the run
real *8, dimension(:,:,:), allocatable q
Conservative variables.