160 namelist / run_parameters /
run_name ,
restart , topography_demfile , &
164 namelist / restart_parameters /
restart_file , alphas_init , alphas_ambient , &
165 t_init , t_ambient , sed_vol_perc
167 namelist / newrun_parameters / x0 , y0 , comp_cells_x , comp_cells_y , &
168 cell_size , temperature_flag , source_flag , solid_transport_flag , &
169 rheology_flag , riemann_flag
171 namelist / initial_conditions / released_volume , x_release , y_release , &
172 velocity_mod_release , velocity_ang_release , t_init , t_ambient
174 namelist / left_state / riemann_interface , hb_w , u_w , v_w , alphas_w , t_w
190 namelist / numeric_parameters / solver_scheme, dt0 , max_dt , cfl, limiter , &
191 theta , reconstr_variables , reconstr_coeff , interfaces_relaxation , n_rk
193 namelist / expl_terms_parameters / grav , x_source , y_source , r_source , &
194 vfr_source , t_source
196 namelist / temperature_parameters / emissivity , atm_heat_transf_coeff , &
197 thermal_conductivity , exp_area_fract , c_p , enne , emme , t_env , &
200 namelist / rheology_parameters /
rheology_model , mu , xi , tau , nu_ref , &
201 visc_par , t_ref , alpha2 , beta2 , alpha1 , beta1 , kappa , n_td
206 namelist / solid_transport_parameters / rho_s , rho_w ,
erosion_coeff , &
239 topography_function_flag=.false.
240 topography_demfile=.false.
253 alphas_ambient = 0.d0
264 temperature_flag = .false.
265 source_flag = .false.
266 rheology_flag = .false.
268 solid_transport_flag = .false.
271 riemann_interface = 0.5d0
357 reconstr_variables =
'phys' 369 exp_area_fract = 0.5d0
371 atm_heat_transf_coeff = 0.0d0
372 thermal_conductivity = 0.0d0
401 IF (lexist .EQV. .false.)
THEN 451 108
FORMAT(3(1x,e14.7))
459 WRITE(*,*)
'Input file IMEX_SfloW2D.inp not found' 460 WRITE(*,*)
'A new one with default values has been created' 527 exp_area_fract = -1.d0
529 atm_heat_transf_coeff = -1.d0
530 thermal_conductivity = -1.d0
577 CHARACTER(LEN=80) :: card
583 CHARACTER(LEN=3) :: check_file
587 CHARACTER(LEN=15) :: chara
597 IF ( ios .NE. 0 )
THEN 599 WRITE(*,*)
'IOSTAT=',ios
600 WRITE(*,*)
'ERROR: problem with namelist RUN_PARAMETERS' 601 WRITE(*,*)
'Please check the input file' 613 IF ( ios .NE. 0 )
THEN 615 WRITE(*,*)
'IOSTAT=',ios
616 WRITE(*,*)
'ERROR: problem with namelist NEWRUN_PARAMETERS' 617 WRITE(*,*)
'Please check the input file' 626 IF ( ( comp_cells_x .EQ. 1 ) .OR. ( comp_cells_y .EQ. 1 ) )
THEN 628 WRITE(*,*)
'----- 1D SIMULATION -----' 632 WRITE(*,*)
'----- 2D SIMULATION -----' 636 IF ( solid_transport_flag )
THEN 638 IF ( temperature_flag )
THEN 652 IF ( temperature_flag )
THEN 666 ALLOCATE(
bcw(n_vars) ,
bce(n_vars) ,
bcs(n_vars) ,
bcn(n_vars) )
670 READ(
input_unit,restart_parameters,iostat=ios)
672 IF ( ios .NE. 0 )
THEN 674 WRITE(*,*)
'IOSTAT=',ios
675 WRITE(*,*)
'ERROR: problem with namelist RESTART_PARAMETERS' 676 WRITE(*,*)
'Please check the input file' 681 IF ( solid_transport_flag )
THEN 683 IF ( ( sed_vol_perc .LT. 0.d0 ) .OR. ( sed_vol_perc .GT. 100.d0 ) ) &
686 WRITE(*,*)
'ERROR: problem with namelist RESTART_PARAMETERS' 687 WRITE(*,*)
'SED_VOL_PERC =' , sed_vol_perc
692 alphas_init = 1.d-2 * sed_vol_perc
693 alphas_ambient = 1.d-2 * sed_vol_perc
701 IF ( temperature_flag .AND.
restart )
THEN 707 IF ( ( check_file .EQ.
'asc' ) .AND. &
708 ( t_init*t_ambient .EQ. 0.d0 ) )
THEN 710 WRITE(*,*)
'T_init=',t_init
711 WRITE(*,*)
'T_ambient=',t_ambient
712 WRITE(*,*)
'Add the variables to the namelist RESTART_PARAMETERS' 721 IF ( riemann_flag )
THEN 725 IF ( ios .NE. 0 )
THEN 727 WRITE(*,*)
'IOSTAT=',ios
728 WRITE(*,*)
'ERROR: problem with namelist LEFT_PARAMETERS' 729 WRITE(*,*)
'Please check the input file' 736 IF ( ( temperature_flag ) .AND. ( t_w .EQ. -1.d0 ) )
THEN 738 WRITE(*,*)
'ERROR: problem with namelist LEFT_PARAMETERS' 739 WRITE(*,*)
'Initial temperature T_W not defined' 748 IF ( ios .NE. 0 )
THEN 750 WRITE(*,*)
'IOSTAT=',ios
751 WRITE(*,*)
'ERROR: problem with namelist RIGHT_PARAMETERS' 752 WRITE(*,*)
'Please check the input file' 759 IF ( ( temperature_flag ) .AND. (
t_e .EQ. -1.d0 ) )
THEN 761 WRITE(*,*)
'ERROR: problem with namelist RIGHT_PARAMETERS' 762 WRITE(*,*)
'Initial temperature T_E not defined' 772 READ(
input_unit,initial_conditions,iostat=ios)
774 IF ( ios .NE. 0 )
THEN 776 WRITE(*,*)
'IOSTAT=',ios
777 WRITE(*,*)
'ERROR: problem with namelist INITIAL_CONDITIONS' 778 WRITE(*,*)
'Please check the input file' 787 IF ( ( temperature_flag ) .AND. ( t_init*t_ambient .EQ. 0.d0 ) )
THEN 789 WRITE(*,*)
'T_init=',t_init
790 WRITE(*,*)
'T_ambient=',t_ambient
791 WRITE(*,*)
'Add the two variables to namelist INITIAL_CONDITIONS' 804 IF ( ios .NE. 0 )
THEN 806 WRITE(*,*)
'IOSTAT=',ios
807 WRITE(*,*)
'ERROR: problem with namelist NUMERIC_PARAMETERS' 808 WRITE(*,*)
'Please check the input file' 817 IF ( ( solver_scheme .NE.
'LxF' ) .AND. ( solver_scheme .NE.
'KT' ) .AND. &
818 ( solver_scheme .NE.
'GFORCE' ) )
THEN 820 WRITE(*,*)
'WARNING: no correct solver scheme selected',solver_scheme
821 WRITE(*,*)
'Chose between: LxF, GFORCE or KT' 826 IF ( ( solver_scheme.EQ.
'LxF' ) .OR. ( solver_scheme.EQ.
'GFORCE' ) )
THEN 830 ELSEIF ( solver_scheme .EQ.
'KT' )
THEN 832 IF ( ( comp_cells_x .EQ. 1 ) .OR. ( comp_cells_y .EQ. 1 ) )
THEN 845 IF ( ( cfl .GT. max_cfl ) .OR. ( cfl .LT. 0.d0 ) )
THEN 847 WRITE(*,*)
'WARNING: wrong value of cfl ',cfl
848 WRITE(*,*)
'Choose a value between 0.0 and ',max_cfl
853 IF ( verbose_level .GE. 1 )
WRITE(*,*)
'Limiters',limiter(1:n_vars)
855 IF ( ( maxval(limiter(1:n_vars)) .GT. 3 ) .OR. &
856 ( minval(limiter(1:n_vars)) .LT. 0 ) )
THEN 858 WRITE(*,*)
'WARNING: wrong limiter ',limiter(1:n_vars)
859 WRITE(*,*)
'Choose among: none, minmod,superbee,van_leer' 864 IF ( reconstr_variables .EQ.
'phys' )
THEN 866 IF ( solid_transport_flag )
THEN 868 IF ( temperature_flag )
THEN 870 WRITE(*,*)
'Linear reconstruction and b. c. applied to variables:' 871 WRITE(*,*)
'h+B,u,v,alphas,T' 875 WRITE(*,*)
'Linear reconstruction and b. c. applied to variables:' 876 WRITE(*,*)
'h+B,u,v,alphas' 882 IF ( temperature_flag )
THEN 884 WRITE(*,*)
'Linear reconstruction and b. c. applied to variables:' 885 WRITE(*,*)
'h+B,u,v,T' 889 WRITE(*,*)
'Linear reconstruction and b. c. applied to variables:' 896 ELSEIF ( reconstr_variables .EQ.
'cons' )
THEN 898 IF ( solid_transport_flag )
THEN 900 IF ( temperature_flag )
THEN 902 WRITE(*,*)
'Linear reconstruction and b. c. applied to variables:' 903 WRITE(*,*)
'h+B,hu,hv,alphas,T' 907 WRITE(*,*)
'Linear reconstruction and b. c. applied to variables:' 908 WRITE(*,*)
'h+B,hu,hv,alphas' 914 IF ( solid_transport_flag )
THEN 916 WRITE(*,*)
'Linear reconstruction and b. c. applied to variables:' 917 WRITE(*,*)
'h+B,hu,hv,T' 921 WRITE(*,*)
'Linear reconstruction and b. c. applied to variables:' 922 WRITE(*,*)
'h+B,hu,hv' 931 IF ( ( reconstr_coeff .GT. 1.0d0 ) .OR. ( reconstr_coeff .LT. 0.d0 ) )
THEN 933 WRITE(*,*)
'WARNING: wrong value of reconstr_coeff ',reconstr_coeff
934 WRITE(*,*)
'Change the value between 0.0 and 1.0 in the input file' 941 IF ( comp_cells_x .GT. 1 )
THEN 945 READ(
input_unit,west_boundary_conditions,iostat=ios)
947 IF ( ios .NE. 0 )
THEN 949 WRITE(*,*)
'IOSTAT=',ios
950 WRITE(*,*)
'ERROR: problem with namelist WEST_BOUNDARY_CONDITIONS' 951 WRITE(*,*)
'Please check the input file' 960 IF ( reconstr_variables .EQ.
'phys' )
THEN 962 IF ( (
hb_bcw%flag .EQ. -1 ) )
THEN 964 WRITE(*,*)
'ERROR: problem with namelist WEST_BOUNDARY_CONDITIONS' 965 WRITE(*,*)
'B.C. for h+B not set properly' 966 WRITE(*,*)
'Please check the input file' 971 IF ( comp_cells_x .GT. 1 )
THEN 973 IF (
u_bcw%flag .EQ. -1 )
THEN 975 WRITE(*,*)
'ERROR: problem with namelist WEST_BOUNDARY_CONDITIONS' 976 WRITE(*,*)
'B.C. for velocities not set properly' 977 WRITE(*,*)
'Please check the input file' 989 IF ( comp_cells_y .GT. 1 )
THEN 991 IF (
v_bcw%flag .EQ. -1 )
THEN 993 WRITE(*,*)
'ERROR: problem with namelist WEST_BOUNDARY_CONDITIONS' 994 WRITE(*,*)
'B.C. for velocities not set properly' 995 WRITE(*,*)
'Please check the input file' 1007 ELSEIF ( reconstr_variables .EQ.
'cons' )
THEN 1009 IF ( (
hb_bcw%flag .EQ. -1 ) )
THEN 1011 WRITE(*,*)
'ERROR: problem with namelist WEST_BOUNDARY_CONDITIONS' 1012 WRITE(*,*)
'B.C. for h not set properly' 1013 WRITE(*,*)
'Please check the input file' 1018 IF (
hu_bcw%flag .EQ. -1 )
THEN 1020 WRITE(*,*)
'ERROR: problem with namelist WEST_BOUNDARY_CONDITIONS' 1021 WRITE(*,*)
'B.C. for x-velocity not set properly' 1022 WRITE(*,*)
'Please check the input file' 1027 IF ( ( comp_cells_y .GT. 1 ) .AND. (
hv_bcw%flag .EQ. -1 ) )
THEN 1029 WRITE(*,*)
'ERROR: problem with namelist WEST_BOUNDARY_CONDITIONS' 1030 WRITE(*,*)
'B.C. for y-velocity not set properly' 1031 WRITE(*,*)
'Please check the input file' 1038 IF ( ( solid_transport_flag ) .AND. (
alphas_bcw%flag .EQ. -1 ) )
THEN 1040 WRITE(*,*)
'ERROR: problem with namelist WEST_BOUNDARY_CONDITIONS' 1041 WRITE(*,*)
'B.C. for sediment conentration not set properly' 1042 WRITE(*,*)
'Please check the input file' 1047 IF ( ( temperature_flag ) .AND. (
t_bcw%flag .EQ. -1 ) )
THEN 1049 WRITE(*,*)
'ERROR: problem with namelist WEST_BOUNDARY_CONDITIONS' 1050 WRITE(*,*)
'B.C. for temperature not set properly' 1051 WRITE(*,*)
'Please check the input file' 1058 IF ( reconstr_variables .EQ.
'phys' )
THEN 1064 ELSEIF ( reconstr_variables .EQ.
'cons' )
THEN 1074 READ(
input_unit,east_boundary_conditions,iostat=ios)
1076 IF ( ios .NE. 0 )
THEN 1078 WRITE(*,*)
'IOSTAT=',ios
1079 WRITE(*,*)
'ERROR: problem with namelist EAST_BOUNDARY_CONDITIONS' 1080 WRITE(*,*)
'Please check the input file' 1089 IF ( reconstr_variables .EQ.
'phys' )
THEN 1091 IF ( (
hb_bce%flag .EQ. -1 ) )
THEN 1093 WRITE(*,*)
'ERROR: problem with namelist EAST_BOUNDARY_CONDITIONS' 1094 WRITE(*,*)
'B.C. for h+B not set properly' 1095 WRITE(*,*)
'Please check the input file' 1100 IF ( comp_cells_x .GT. 1 )
THEN 1102 IF (
u_bce%flag .EQ. -1 )
THEN 1104 WRITE(*,*)
'ERROR: problem with namelist EAST_BOUNDARY_CONDITIONS' 1105 WRITE(*,*)
'B.C. for x-velocity not set properly' 1106 WRITE(*,*)
'Please check the input file' 1118 IF ( comp_cells_y .GT. 1 )
THEN 1120 IF (
v_bce%flag .EQ. -1 )
THEN 1122 WRITE(*,*)
'ERROR: problem with namelist EAST_BOUNDARY_CONDITIONS' 1123 WRITE(*,*)
'B.C. for y-velocity not set properly' 1124 WRITE(*,*)
'Please check the input file' 1137 ELSEIF ( reconstr_variables .EQ.
'cons' )
THEN 1139 IF ( (
hb_bce%flag .EQ. -1 ) )
THEN 1141 WRITE(*,*)
'ERROR: problem with namelist EAST_BOUNDARY_CONDITIONS' 1142 WRITE(*,*)
'B.C. for h not set properly' 1143 WRITE(*,*)
'Please check the input file' 1149 IF (
hu_bce%flag .EQ. -1 )
THEN 1151 WRITE(*,*)
'ERROR: problem with namelist EAST_BOUNDARY_CONDITIONS' 1152 WRITE(*,*)
'B.C. for velocities not set properly' 1153 WRITE(*,*)
'Please check the input file' 1158 IF ( ( comp_cells_y .GT. 1 ) .AND. (
hv_bce%flag .EQ. -1 ) )
THEN 1160 WRITE(*,*)
'ERROR: problem with namelist EAST_BOUNDARY_CONDITIONS' 1161 WRITE(*,*)
'B.C. for velocities not set properly' 1162 WRITE(*,*)
'Please check the input file' 1169 IF ( ( solid_transport_flag ) .AND. (
alphas_bce%flag .EQ. -1 ) )
THEN 1171 WRITE(*,*)
'ERROR: problem with namelist EAST_BOUNDARY_CONDITIONS' 1172 WRITE(*,*)
'B.C. for sediment concentration not set properly' 1173 WRITE(*,*)
'Please check the input file' 1178 IF ( ( temperature_flag ) .AND. (
t_bce%flag .EQ. -1 ) )
THEN 1180 WRITE(*,*)
'ERROR: problem with namelist EAST_BOUNDARY_CONDITIONS' 1181 WRITE(*,*)
'B.C. for temperature not set properly' 1182 WRITE(*,*)
'Please check the input file' 1188 IF ( reconstr_variables .EQ.
'phys' )
THEN 1194 ELSEIF ( reconstr_variables .EQ.
'cons' )
THEN 1204 IF ( comp_cells_y .GT. 1 )
THEN 1208 READ(
input_unit,south_boundary_conditions,iostat=ios)
1210 IF ( ios .NE. 0 )
THEN 1212 WRITE(*,*)
'IOSTAT=',ios
1213 WRITE(*,*)
'ERROR: problem with namelist SOUTH_BOUNDARY_CONDITIONS' 1214 WRITE(*,*)
'Please check the input file' 1224 IF ( reconstr_variables .EQ.
'phys' )
THEN 1226 IF ( (
hb_bcs%flag .EQ. -1 ) )
THEN 1228 WRITE(*,*)
'ERROR: problem with namelist SOUTH_BOUNDARY_CONDITIONS' 1229 WRITE(*,*)
'B.C. for h+B not set properly' 1230 WRITE(*,*)
'Please check the input file' 1235 IF ( comp_cells_x .GT. 1 )
THEN 1237 IF (
u_bcs%flag .EQ. -1 )
THEN 1239 WRITE(*,*)
'ERROR: problem with namelist SOUTH_BOUNDARY_CONDITIONS' 1240 WRITE(*,*)
'B.C. for x-velocity not set properly' 1241 WRITE(*,*)
'Please check the input file' 1253 IF ( comp_cells_y .GT. 1 )
THEN 1255 IF (
v_bcs%flag .EQ. -1 )
THEN 1257 WRITE(*,*)
'ERROR: problem with namelist SOUTH_BOUNDARY_CONDITIONS' 1258 WRITE(*,*)
'B.C. for velocities not set properly' 1259 WRITE(*,*)
'Please check the input file' 1271 ELSEIF ( reconstr_variables .EQ.
'cons' )
THEN 1273 IF ( (
hb_bcs%flag .EQ. -1 ) )
THEN 1275 WRITE(*,*)
'ERROR: problem with namelist SOUTH_BOUNDARY_CONDITIONS' 1276 WRITE(*,*)
'B.C. for h+B not set properly' 1277 WRITE(*,*)
'Please check the input file' 1283 IF ( ( comp_cells_x .GT. 1 ) .AND. (
hu_bcs%flag .EQ. -1 ) )
THEN 1285 WRITE(*,*)
'ERROR: problem with namelist SOUTH_BOUNDARY_CONDITIONS' 1286 WRITE(*,*)
'B.C. for velocities not set properly' 1287 WRITE(*,*)
'Please check the input file' 1292 IF (
hv_bcs%flag .EQ. -1 )
THEN 1294 WRITE(*,*)
'ERROR: problem with namelist SOUTH_BOUNDARY_CONDITIONS' 1295 WRITE(*,*)
'B.C. for velocities not set properly' 1296 WRITE(*,*)
'Please check the input file' 1303 IF ( ( solid_transport_flag ) .AND. (
alphas_bcs%flag .EQ. -1 ) )
THEN 1305 WRITE(*,*)
'ERROR: problem with namelist SOUTH_BOUNDARY_CONDITIONS' 1306 WRITE(*,*)
'B.C. for sediment concentrations not set properly' 1307 WRITE(*,*)
'Please check the input file' 1312 IF ( ( temperature_flag ) .AND. (
t_bcs%flag .EQ. -1 ) )
THEN 1314 WRITE(*,*)
'ERROR: problem with namelist SOUTH_BOUNDARY_CONDITIONS' 1315 WRITE(*,*)
'B.C. for temperature not set properly' 1316 WRITE(*,*)
'Please check the input file' 1321 IF ( reconstr_variables .EQ.
'phys' )
THEN 1327 ELSEIF ( reconstr_variables .EQ.
'cons' )
THEN 1337 READ(
input_unit,north_boundary_conditions,iostat=ios)
1339 IF ( ios .NE. 0 )
THEN 1341 WRITE(*,*)
'IOSTAT=',ios
1342 WRITE(*,*)
'ERROR: problem with namelist NORTH_BOUNDARY_CONDITIONS' 1343 WRITE(*,*)
'Please check the input file' 1353 IF ( reconstr_variables .EQ.
'phys' )
THEN 1355 IF ( (
hb_bcn%flag .EQ. -1 ) )
THEN 1357 WRITE(*,*)
'ERROR: problem with namelist NORTH_BOUNDARY_CONDITIONS' 1358 WRITE(*,*)
'B.C. for h+B not set properly' 1359 WRITE(*,*)
'Please check the input file' 1365 IF ( comp_cells_x .GT. 1 )
THEN 1367 IF (
u_bcn%flag .EQ. -1 )
THEN 1369 WRITE(*,*)
'ERROR: problem with namelist NORTH_BOUNDARY_CONDITIONS' 1370 WRITE(*,*)
'B.C. for velocities not set properly' 1371 WRITE(*,*)
'Please check the input file' 1383 IF ( comp_cells_y .GT. 1 )
THEN 1385 IF (
v_bcn%flag .EQ. -1 )
THEN 1387 WRITE(*,*)
'ERROR: problem with namelist NORTH_BOUNDARY_CONDITIONS' 1388 WRITE(*,*)
'B.C. for velocities not set properly' 1389 WRITE(*,*)
'Please check the input file' 1401 ELSEIF ( reconstr_variables .EQ.
'cons' )
THEN 1403 IF ( (
hb_bcn%flag .EQ. -1 ) )
THEN 1405 WRITE(*,*)
'ERROR: problem with namelist NORTH_BOUNDARY_CONDITIONS' 1406 WRITE(*,*)
'B.C. for h not set properly' 1407 WRITE(*,*)
'Please check the input file' 1412 IF ( ( comp_cells_x .GT. 1 ) .AND. (
hu_bcn%flag .EQ. -1 ) )
THEN 1414 WRITE(*,*)
'ERROR: problem with namelist NORTH_BOUNDARY_CONDITIONS' 1415 WRITE(*,*)
'B.C. for velocities not set properly' 1416 WRITE(*,*)
'Please check the input file' 1421 IF (
hv_bcn%flag .EQ. -1 )
THEN 1423 WRITE(*,*)
'ERROR: problem with namelist NORTH_BOUNDARY_CONDITIONS' 1424 WRITE(*,*)
'B.C. for velocities not set properly' 1425 WRITE(*,*)
'Please check the input file' 1432 IF (( solid_transport_flag ) .AND. (
alphas_bcn%flag .EQ. -1 ) )
THEN 1434 WRITE(*,*)
'ERROR: problem with namelist NORTH_BOUNDARY_CONDITIONS' 1435 WRITE(*,*)
'B.C. for sediment concentrations not set properly' 1436 WRITE(*,*)
'Please check the input file' 1441 IF ( ( temperature_flag ) .AND. (
t_bcn%flag .EQ. -1 ) )
THEN 1443 WRITE(*,*)
'ERROR: problem with namelist NORTH_BOUNDARY_CONDITIONS' 1444 WRITE(*,*)
'B.C. for temperature not set properly' 1445 WRITE(*,*)
'Please check the input file' 1450 IF ( reconstr_variables .EQ.
'phys' )
THEN 1456 ELSEIF ( reconstr_variables .EQ.
'cons' )
THEN 1466 IF ( solid_transport_flag )
THEN 1473 IF ( temperature_flag )
THEN 1484 IF ( temperature_flag )
THEN 1497 READ(
input_unit, expl_terms_parameters,iostat=ios)
1499 IF ( ios .NE. 0 )
THEN 1501 WRITE(*,*)
'IOSTAT=',ios
1502 WRITE(*,*)
'ERROR: problem with namelist EXPL_TERMS_PARAMETERS' 1503 WRITE(*,*)
'Please check the input file' 1512 IF ( grav .EQ. -1.d0 )
THEN 1514 WRITE(*,*)
'ERROR: problem with namelist EXPL_TERMS_PARAMETERS' 1515 WRITE(*,*)
'R_SOURCE not set properly' 1516 WRITE(*,*)
'Please check the input file' 1521 IF ( source_flag )
THEN 1523 IF ( r_source .EQ. 0.d0 )
THEN 1525 WRITE(*,*)
'ERROR: problem with namelist EXPL_TERMS_PARAMETERS' 1526 WRITE(*,*)
'R_SOURCE =',r_source
1527 WRITE(*,*)
'Please check the input file' 1532 IF ( vfr_source .EQ. 0.d0 )
THEN 1534 WRITE(*,*)
'ERROR: problem with namelist EXPL_TERMS_PARAMETERS' 1535 WRITE(*,*)
'VFR_SOURCE not set properly' 1536 WRITE(*,*)
'Please check the input file' 1541 IF ( temperature_flag .AND. ( r_source .EQ. 0.d0 ) )
THEN 1543 WRITE(*,*)
'ERROR: problem with namelist EXPL_TERMS_PARAMETERS' 1544 WRITE(*,*)
'TEMPERATURE_FLAG =',temperature_flag,
' R_SOURCE =',r_source
1545 WRITE(*,*)
'Please check the input file' 1554 IF ( temperature_flag )
THEN 1556 READ(
input_unit, temperature_parameters,iostat=ios)
1558 IF ( ios .NE. 0 )
THEN 1560 WRITE(*,*)
'IOSTAT=',ios
1561 WRITE(*,*)
'ERROR: problem with namelist TEMPERATURE_PARAMETERS' 1562 WRITE(*,*)
'Please check the input file' 1571 IF ( exp_area_fract .EQ. -1.d0 )
THEN 1573 WRITE(*,*)
'ERROR: problem with namelist TEMPERATURE_PARAMETERS' 1574 WRITE(*,*)
'EXP_AREA_FRACT value not properly set' 1575 WRITE(*,*)
'Please check the input file' 1580 IF ( emissivity .EQ. -1.d0 )
THEN 1582 WRITE(*,*)
'ERROR: problem with namelist TEMPERATURE_PARAMETERS' 1583 WRITE(*,*)
'EMISSIVITY value not properly set' 1584 WRITE(*,*)
'Please check the input file' 1589 IF ( atm_heat_transf_coeff .EQ. -1.d0 )
THEN 1591 WRITE(*,*)
'ERROR: problem with namelist TEMPERATURE_PARAMETERS' 1592 WRITE(*,*)
'ATM_HEAT_TRANSF_COEFF value not properly set' 1593 WRITE(*,*)
'Please check the input file' 1598 IF ( thermal_conductivity .EQ. -1.d0 )
THEN 1600 WRITE(*,*)
'ERROR: problem with namelist TEMPERATURE_PARAMETERS' 1601 WRITE(*,*)
'THERMAL CONDUCTIVITY value not properly set' 1602 WRITE(*,*)
'Please check the input file' 1607 IF ( enne .EQ. -1.d0 )
THEN 1609 WRITE(*,*)
'ERROR: problem with namelist TEMPERATURE_PARAMETERS' 1610 WRITE(*,*)
'ENNE value not properly set' 1611 WRITE(*,*)
'Please check the input file' 1616 IF ( emme .EQ. -1.d0 )
THEN 1618 WRITE(*,*)
'ERROR: problem with namelist TEMPERATURE_PARAMETERS' 1619 WRITE(*,*)
'EMME value not properly set' 1620 WRITE(*,*)
'Please check the input file' 1625 IF ( t_env .EQ. -1.d0 )
THEN 1627 WRITE(*,*)
'ERROR: problem with namelist TEMPERATURE_PARAMETERS' 1628 WRITE(*,*)
'T_ENV value not properly set' 1629 WRITE(*,*)
'Please check the input file' 1634 IF ( t_ground .EQ. -1.d0 )
THEN 1636 WRITE(*,*)
'ERROR: problem with namelist TEMPERATURE_PARAMETERS' 1637 WRITE(*,*)
'T_GROUND value not properly set' 1638 WRITE(*,*)
'Please check the input file' 1643 IF ( c_p .EQ. -1.d0 )
THEN 1645 WRITE(*,*)
'ERROR: problem with namelist TEMPERATURE_PARAMETERS' 1646 WRITE(*,*)
'C_P value not properly set' 1647 WRITE(*,*)
'Please check the input file' 1652 IF ( rho .EQ. -1.d0 )
THEN 1654 WRITE(*,*)
'ERROR: problem with namelist TEMPERATURE_PARAMETERS' 1655 WRITE(*,*)
'RHO value not properly set' 1656 WRITE(*,*)
'Please check the input file' 1662 IF ( emissivity .EQ. 0.d0 )
THEN 1664 WRITE(*,*)
'No radiative term: emissivity =',emissivity
1668 IF ( atm_heat_transf_coeff .EQ. 0.d0 )
THEN 1670 WRITE(*,*)
'No convective term: atm_heat_transf_coeff =', &
1671 atm_heat_transf_coeff
1675 IF ( thermal_conductivity .EQ. 0.d0 )
THEN 1677 WRITE(*,*)
'No conductive term: thermal_conductivity =', &
1678 thermal_conductivity
1682 IF ( rho .LE. 0.d0 )
THEN 1684 WRITE(*,*)
'ERROR: problem with namelist TEMPERATURE_PARAMETERS' 1685 WRITE(*,*)
'RHO =' , rho
1686 WRITE(*,*)
'Please check the input file' 1695 IF ( solid_transport_flag )
THEN 1697 READ(
input_unit, solid_transport_parameters,iostat=ios)
1699 IF ( ios .NE. 0 )
THEN 1701 WRITE(*,*)
'IOSTAT=',ios
1702 WRITE(*,*)
'ERROR: problem with namelist SOLID_TRANSPORT_PARAMETERS' 1703 WRITE(*,*)
'Please check the input file' 1712 IF ( rho_s .EQ. -1.d0 )
THEN 1714 WRITE(*,*)
'ERROR: problem with namelist SOLID_TRANSPORT_PARAMETERS' 1715 WRITE(*,*)
'RHO_s =' , rho_s
1716 WRITE(*,*)
'Please check the input file' 1721 IF ( rho_w .EQ. -1.d0 )
THEN 1723 WRITE(*,*)
'ERROR: problem with namelist SOLID_TRANSPORT_PARAMETERS' 1724 WRITE(*,*)
'RHO_s =' , rho_w
1725 WRITE(*,*)
'Please check the input file' 1732 WRITE(*,*)
'ERROR: problem with namelist SOLID_TRANSPORT_PARAMETERS' 1734 WRITE(*,*)
'Please check the input file' 1741 WRITE(*,*)
'ERROR: problem with namelist SOLID_TRANSPORT_PARAMETERS' 1743 WRITE(*,*)
'Please check the input file' 1753 IF ( rheology_flag )
THEN 1755 READ(
input_unit, rheology_parameters,iostat=ios)
1757 IF ( ios .NE. 0 )
THEN 1759 WRITE(*,*)
'IOSTAT=',ios
1760 WRITE(*,*)
'ERROR: problem with namelist RHEOLOGY_PARAMETERS' 1761 WRITE(*,*)
'Please check the input file' 1770 IF ( rheology_model .EQ. 0 )
THEN 1772 WRITE(*,*)
'ERROR: problem with namelist RHEOLOGY_PARAMETERS' 1773 WRITE(*,*)
'RHEOLOGY_FLAG' , rheology_flag ,
'RHEOLOGY_MODEL =' , &
1775 WRITE(*,*)
'Please check the input file' 1778 ELSEIF ( rheology_model .EQ. 1 )
THEN 1780 IF ( ( mu .EQ. -1.d0 ) .AND. ( xi .EQ. -1.d0 ) )
THEN 1782 WRITE(*,*)
'ERROR: problem with namelist RHEOLOGY_PARAMETERS' 1783 WRITE(*,*)
'RHEOLOGY_MODEL =' , rheology_model
1784 WRITE(*,*)
'MU =' , mu ,
' XI =' , xi
1785 WRITE(*,*)
'Please check the input file' 1790 IF ( ( t_ref .NE. -1.d0 ) .OR. ( nu_ref .NE. -1.d0 ) .OR. &
1791 ( visc_par .NE. -1.d0 ) .OR. ( tau .NE. -1.d0 ) )
THEN 1793 WRITE(*,*)
'WARNING: parameters not used in RHEOLOGY_PARAMETERS' 1794 IF ( t_ref .NE. -1.d0 )
WRITE(*,*)
'T_ref =',t_ref
1795 IF ( nu_ref .NE. -1.d0 )
WRITE(*,*)
'nu_ref =',nu_ref
1796 IF ( visc_par .NE. -1.d0 )
WRITE(*,*)
'visc_par =',visc_par
1797 IF ( tau .NE. -1.d0 )
WRITE(*,*)
'tau =',tau
1798 WRITE(*,*)
'Press ENTER to continue' 1803 ELSEIF ( rheology_model .EQ. 2 )
THEN 1805 IF ( tau .EQ. -1.d0 )
THEN 1807 WRITE(*,*)
'ERROR: problem with namelist RHEOLOGY_PARAMETERS' 1808 WRITE(*,*)
'RHEOLOGY_MODEL =' , rheology_model
1809 WRITE(*,*)
'TAU =' , tau
1810 WRITE(*,*)
'Please check the input file' 1815 IF ( ( t_ref .NE. -1.d0 ) .OR. ( nu_ref .NE. -1.d0 ) .OR. &
1816 ( visc_par .NE. -1.d0 ) .OR. ( mu .NE. -1.d0 ) .OR. &
1817 ( xi .NE. -1.d0 ) )
THEN 1819 WRITE(*,*)
'WARNING: parameters not used in RHEOLOGY_PARAMETERS' 1820 IF ( t_ref .NE. -1.d0 )
WRITE(*,*)
'T_ref =',t_ref
1821 IF ( nu_ref .NE. -1.d0 )
WRITE(*,*)
'nu_ref =',nu_ref
1822 IF ( visc_par .NE. -1.d0 )
WRITE(*,*)
'visc_par =',visc_par
1823 IF ( mu .NE. -1.d0 )
WRITE(*,*)
'mu =',mu
1824 IF ( xi .NE. -1.d0 )
WRITE(*,*)
'xi =',xi
1825 WRITE(*,*)
'Press ENTER to continue' 1831 ELSEIF ( rheology_model .EQ. 3 )
THEN 1833 IF ( nu_ref .EQ. -1.d0 )
THEN 1835 WRITE(*,*)
'ERROR: problem with namelist RHEOLOGY_PARAMETERS' 1836 WRITE(*,*)
'NU_REF =' , nu_ref
1837 WRITE(*,*)
'Please check the input file' 1842 IF ( visc_par .EQ. -1.d0 )
THEN 1844 WRITE(*,*)
'ERROR: problem with namelist RHEOLOGY_PARAMETERS' 1845 WRITE(*,*)
'VISC_PAR =' , visc_par
1846 WRITE(*,*)
'Please check the input file' 1849 ELSEIF ( visc_par .EQ. 0.d0 )
THEN 1851 WRITE(*,*)
'WARNING: temperature and momentum uncoupled' 1852 WRITE(*,*)
'VISC_PAR =' , visc_par
1853 WRITE(*,*)
'Press ENTER to continue' 1858 IF ( t_ref .EQ. -1.d0 )
THEN 1860 WRITE(*,*)
'ERROR: problem with namelist RHEOLOGY_PARAMETERS' 1861 WRITE(*,*)
'T_REF =' , t_ref
1862 WRITE(*,*)
'Please check the input file' 1869 IF ( ( mu .NE. -1.d0 ) .OR. ( xi .NE. -1.d0 ) .OR. ( tau .NE. -1.d0 ) ) &
1872 WRITE(*,*)
'WARNING: parameters not used in RHEOLOGY_PARAMETERS' 1873 IF ( mu .NE. -1.d0 )
WRITE(*,*)
'mu =',mu
1874 IF ( xi .NE. -1.d0 )
WRITE(*,*)
'xi =',xi
1875 IF ( tau .NE. -1.d0 )
WRITE(*,*)
'tau =',tau
1876 WRITE(*,*)
'Press ENTER to continue' 1881 ELSEIF ( rheology_model .EQ. 4 )
THEN 1883 IF ( .NOT. solid_transport_flag )
THEN 1885 IF ( sed_vol_perc .EQ. -1.d0 )
THEN 1887 WRITE(*,*)
'ERROR: problem with namelist RHEOLOGY_PARAMETERS' 1888 WRITE(*,*)
'RHEOLOGY_MODEL =' , rheology_model
1889 WRITE(*,*)
'SED_VOL_PERC = ' , sed_vol_perc
1896 IF ( alpha2 .EQ. -1.d0 )
THEN 1898 WRITE(*,*)
'ERROR: problem with namelist RHEOLOGY_PARAMETERS' 1899 WRITE(*,*)
'ALPHA2 =' , alpha2
1900 WRITE(*,*)
'Please check the input file' 1905 IF ( beta2 .EQ. -1.d0 )
THEN 1907 WRITE(*,*)
'ERROR: problem with namelist RHEOLOGY_PARAMETERS' 1908 WRITE(*,*)
'BETA2 =' , beta2
1909 WRITE(*,*)
'Please check the input file' 1914 IF ( alpha1 .EQ. -1.d0 )
THEN 1916 WRITE(*,*)
'ERROR: problem with namelist RHEOLOGY_PARAMETERS' 1917 WRITE(*,*)
'ALPHA1 =' , alpha1
1918 WRITE(*,*)
'Please check the input file' 1923 IF ( beta1 .EQ. -1.d0 )
THEN 1925 WRITE(*,*)
'ERROR: problem with namelist RHEOLOGY_PARAMETERS' 1926 WRITE(*,*)
'BETA1 =' , beta1
1927 WRITE(*,*)
'Please check the input file' 1932 IF ( kappa .EQ. -1.d0 )
THEN 1934 WRITE(*,*)
'ERROR: problem with namelist RHEOLOGY_PARAMETERS' 1935 WRITE(*,*)
'KAPPA =' , kappa
1936 WRITE(*,*)
'Please check the input file' 1941 IF ( n_td .EQ. -1.d0 )
THEN 1943 WRITE(*,*)
'ERROR: problem with namelist RHEOLOGY_PARAMETERS' 1944 WRITE(*,*)
'N_TD =' , n_td
1945 WRITE(*,*)
'Please check the input file' 1950 IF ( rho_w .EQ. -1.d0 )
THEN 1952 WRITE(*,*)
'ERROR: problem with namelist RHEOLOGY_PARAMETERS' 1953 WRITE(*,*)
'RHO_W =' , rho_w
1954 WRITE(*,*)
'Please check the input file' 1959 IF ( rho_s .EQ. -1.d0 )
THEN 1961 WRITE(*,*)
'ERROR: problem with namelist RHEOLOGY_PARAMETERS' 1962 WRITE(*,*)
'RHO_S =' , rho_s
1963 WRITE(*,*)
'Please check the input file' 1968 ELSEIF ( rheology_model .EQ. 5 )
THEN 1970 WRITE(*,*)
'RHEOLOGY_MODEL =' , rheology_model
1971 WRITE(*,*)
'Kurganov & Petrova Example 5' 1975 WRITE(*,*)
'ERROR: problem with namelist RHEOLOGY_PARAMETERS' 1976 WRITE(*,*)
'RHEOLOGY_MODEL =' , rheology_model
1977 WRITE(*,*)
'Please check the input file' 1987 IF ( verbose_level .GE. 1 )
WRITE(*,*)
1990 IF ( .NOT.topography_demfile )
THEN 1994 WRITE(*,*)
'Searching for topography_profile' 1996 topography_profile_search:
DO 2000 IF( trim(card) ==
'TOPOGRAPHY_PROFILE' )
THEN 2002 EXIT topography_profile_search
2006 END DO topography_profile_search
2011 IF ( verbose_level .GE. 1 )
WRITE(*,*)
'n_topography_profile_x' , &
2016 IF ( verbose_level .GE. 1 )
WRITE(*,*)
'n_topography_profile_y' , &
2042 WRITE(*,*)
'Searching for DEM file' 2044 INQUIRE(file=
'topography_dem.asc',exist=lexist)
2048 OPEN(2001, file=
'topography_dem.asc', status=
'old', action=
'read')
2052 WRITE(*,*)
'no dem file' 2057 READ(2001,*) chara,
ncols 2058 READ(2001,*) chara,
nrows 2069 WRITE(*,*)
'Computational domain problem' 2077 IF ( x0 + ( comp_cells_x ) * cell_size .GT. &
2080 WRITE(*,*)
'Computational domain problem' 2081 WRITE(*,*)
'right edge > xllcorner+ncols*cellsize', &
2089 WRITE(*,*)
'Computational domain problem' 2095 IF ( abs( ( y0 + comp_cells_y * cell_size ) - (
yllcorner + 0.5d0 + &
2098 WRITE(*,*)
'Computational domain problem' 2099 WRITE(*,*)
'top edge > yllcorner+nrows*cellsize', &
2106 WRITE(*,*)
'Reading DEM file' 2107 WRITE(*,*)
'ncols',
ncols 2108 WRITE(*,*)
'nrows',
nrows 2133 WRITE(*,fmt=
"(A1,A,t21,F6.2,A)",advance=
"NO") achar(13), &
2134 &
" Percent Complete: " , &
2154 READ(
input_unit, runout_parameters,iostat=ios)
2156 IF ( ios .NE. 0 )
THEN 2158 WRITE(*,*)
'IOSTAT=',ios
2159 WRITE(*,*)
'ERROR: problem with namelist RUNOUT_PARAMETERS' 2160 WRITE(*,*)
'Please check the input file' 2171 WRITE(*,*)
'Runout reference location not defined' 2177 WRITE(*,*)
'Computational domain problem' 2178 WRITE(*,*)
'x0_runout < x0',x0,
x0_runout 2183 IF ( x0 .GT. x0+comp_cells_x*cell_size )
THEN 2185 WRITE(*,*)
'Computational domain problem' 2186 WRITE(*,*)
'x0_runout > x0+comp_cells_x*cell_size' , x0 , &
2194 WRITE(*,*)
'Computational domain problem' 2195 WRITE(*,*)
'y0_runout < y0',y0,
y0_runout 2200 IF ( y0 .GT. y0+comp_cells_y*cell_size )
THEN 2202 WRITE(*,*)
'Computational domain problem' 2203 WRITE(*,*)
'y0_runout > y0+comp_cells_y*cell_size' , y0 , &
2222 WRITE(*,*)
'Searching for topography_profile' 2230 IF( trim(card) ==
'PROBES_COORDS' )
THEN 2236 END DO probes_search
2249 IF ( verbose_level.GE.0 )
WRITE(*,*) k ,
probes_coords( 1:2 , k )
2280 IF ( riemann_flag)
THEN 2295 IF ( comp_cells_x .GT. 1 )
THEN 2302 IF ( comp_cells_y .GT. 1 )
THEN 2311 IF ( temperature_flag )
WRITE(
backup_unit,temperature_parameters)
2313 IF ( solid_transport_flag )
WRITE(
backup_unit,solid_transport_parameters)
2315 IF ( rheology_flag )
WRITE(
backup_unit,rheology_parameters)
2320 IF ( .NOT.topography_demfile )
THEN 2332 107
FORMAT(3(1x,e14.7))
2349 109
FORMAT(2(1x,e14.7))
2379 CHARACTER(LEN=40) :: run_name_org
2380 LOGICAL :: restart_org
2381 LOGICAL :: topography_demfile_org
2382 REAL*8 :: t_start_org
2384 REAL*8 :: dt_output_org
2385 LOGICAL :: output_cons_flag_org
2386 LOGICAL :: output_phys_flag_org
2387 LOGICAL :: output_esri_flag_org
2388 INTEGER :: verbose_level_org
2392 topography_demfile_org = topography_demfile
2393 t_start_org = t_start
2395 dt_output_org = dt_output
2399 verbose_level_org = verbose_level
2407 IF ( ios .NE. 0 )
THEN 2409 WRITE(*,*)
'IOSTAT=',ios
2410 WRITE(*,*)
'ERROR: problem with namelist RUN_PARAMETERS' 2411 WRITE(*,*)
'Please check the input file' 2422 IF ( t_end_org .NE. t_end )
THEN 2424 WRITE(*,*)
'Modified input file: t_end =',t_end
2428 IF ( dt_output_org .NE. dt_output )
THEN 2430 WRITE(*,*)
'Modified input file: dt_output =',dt_output
2452 IF ( verbose_level_org .NE. verbose_level )
THEN 2454 WRITE(*,*)
'Modified input file: verbose_level =',verbose_level
2460 topography_demfile_org = topography_demfile
2461 t_start_org = t_start
2494 CHARACTER(LEN=15) :: chara
2502 CHARACTER(LEN=30) :: string
2504 CHARACTER(LEN=3) :: check_file
2506 INTEGER :: ncols , nrows , nodata_value
2508 REAL*8 :: xllcorner , yllcorner , cellsize
2512 REAL*8,
ALLOCATABLE :: thickness_input(:,:)
2514 REAL*8,
ALLOCATABLE :: x1(:) , y1(:)
2518 REAL*8 :: xl , xr , yl , yr
2522 IF (lexist .EQV. .false.)
THEN 2539 IF ( check_file .EQ.
'asc' )
THEN 2549 ALLOCATE( thickness_input(ncols,nrows) )
2551 IF ( ( xllcorner - x0 ) .GT. 1.d-5*cellsize )
THEN 2554 WRITE(*,*)
'WARNING: initial solution and domain extent' 2555 WRITE(*,*)
'xllcorner greater than x0', xllcorner , x0
2559 IF ( ( yllcorner - y0 ) .GT. 1.d-5*cellsize )
THEN 2562 WRITE(*,*)
'WARNING: initial solution and domain extent' 2563 WRITE(*,*)
'yllcorner greater then y0', yllcorner , y0
2567 IF ( x0+cell_size*(comp_cells_x+1) - ( xllcorner+cellsize*(ncols+1) ) &
2568 .GT. 1.d-5*cellsize )
THEN 2571 WRITE(*,*)
'WARNING: initial solution and domain extent' 2572 WRITE(*,*)
'xrrcorner greater than ', xllcorner , x0
2576 IF ( x0+cell_size*(comp_cells_x+1) - ( xllcorner+cellsize*(ncols+1) ) &
2577 .GT. 1.d-5*cellsize )
THEN 2580 WRITE(*,*)
'WARNING: initial solution and domain extent' 2581 WRITE(*,*)
'yllcorner greater then y0', yllcorner , y0
2586 IF ( cellsize .NE. cell_size )
THEN 2589 WRITE(*,*)
'WARNING: changing resolution of restart' 2590 WRITE(*,*)
'cellsize not equal to cell_size', cellsize , cell_size
2597 WRITE(*,fmt=
"(A1,A,t21,F6.2,A)",advance=
"NO") achar(13), &
2598 &
" Percent Complete: ",(
REAL(k) /
REAL(nrows))*100.0,
"%" 2600 READ(
restart_unit,*) thickness_input(1:ncols,nrows-k+1)
2605 WRITE(*,*)
'Total volume from restart =',cellsize**2*sum(thickness_input)
2615 ALLOCATE( x1(ncols) , y1(nrows) )
2619 x1(j) = xllcorner + (j-1)*cellsize
2625 y1(k) = yllcorner + (k-1)*cellsize
2631 x2 = x0 + (j-1)*cell_size
2635 y2 = y0 + (k-1)*cell_size
2637 CALL interp_2d_scalarb( x1 , y1 , thickness_input , x2 , y2 , &
2645 DEALLOCATE( x1 , y1 )
2647 ALLOCATE( x1(ncols+1) , y1(nrows+1) )
2651 x1(j) = xllcorner + (j-1)*cellsize
2657 y1(k) = yllcorner + (k-1)*cellsize
2663 xl = x0 + (j-1)*cell_size
2664 xr = x0 + (j)*cell_size
2668 yl = y0 + (k-1)*cell_size
2669 yr = y0 + (k)*cell_size
2671 CALL regrid_scalar( x1 , y1 , thickness_input , xl , xr , yl , &
2683 WRITE(*,*)
'Total volume on computational grid =',cell_size**2 * sum(
thickness_init(:,:) )
2688 IF ( solid_transport_flag )
THEN 2698 WRITE(*,*)
'MAXVAL(q(4,:,:))',maxval(
q(4,:,:))
2702 WRITE(*,*)
'Total sediment volume =',cell_size**2*sum(
thickness_init* &
2705 IF ( temperature_flag )
THEN 2719 IF ( temperature_flag )
THEN 2735 IF ( verbose_level .GE. 1 )
THEN 2737 WRITE(*,*)
'Min q(1,:,:) =',minval(
q(1,:,:))
2738 WRITE(*,*)
'Max q(1,:,:) =',maxval(
q(1,:,:))
2739 WRITE(*,*)
'SUM(q(1,:,:)) =',sum(
q(1,:,:))
2748 WRITE(*,*)
'SUM(B_cent(:,:)) =',sum(
b_cent(:,:))
2753 DEALLOCATE( thickness_input )
2756 ELSEIF ( check_file .EQ.
'q_2' )
THEN 2762 IF ( temperature_flag )
THEN 2772 IF ( verbose_level .GE. 2 )
THEN 2774 WRITE(*,*)
'x,y,q,B',xj,yk,
q(:,j,k),
b_cent(j,k)
2776 WRITE(*,*)
'h',
q(1,j,k)
2778 IF ( solid_transport_flag )
THEN 2780 WRITE(*,*)
'alphas',
q(4,j,k) /
q(1,j,k)
2782 IF ( temperature_flag )
THEN 2784 WRITE(*,*)
'T',
q(5,j,k) /
q(1,j,k)
2792 IF ( temperature_flag )
THEN 2794 WRITE(*,*)
'T',
q(4,j,k) /
q(1,j,k)
2804 IF (
q(1,j,k) .LE.1.d-10 )
THEN 2806 IF ( verbose_level .GE. 2 )
THEN 2808 WRITE(*,*)
'q(1,j,k),B_cent(j,k)',j,k,
q(1,j,k),
b_cent(j,k)
2823 WRITE(*,*)
'Total volume =',dx*dy* sum(
q(1,:,:) )
2825 IF ( solid_transport_flag )
THEN 2827 WRITE(*,*)
'Total sediment volume =',dx*dy* sum(
q(4,:,:) *
q(1,:,:) )
2831 1003
FORMAT(6e20.12)
2832 1004
FORMAT(7e20.12)
2840 WRITE(*,*)
'Starting from output index ',
output_idx 2846 WRITE(*,*)
'Restart file not in the right format (*.asc or *)' 2890 REAL*8,
INTENT(IN) :: time
2892 CHARACTER(LEN=4) :: idx_string
2894 REAL*8 :: qp(n_vars)
2921 IF ( dabs(
q(i,j,k)) .LT. 1d-99)
q(i,j,k) = 0.d0
2925 IF ( temperature_flag )
THEN 2960 CALL qc_to_qp(
q(:,j,k),
b_cent(j,k),qp(:))
2962 IF ( dabs(
REAL(
h)) .LT. 1d-99)
h = dcmplx(0.d0,0.d0)
2963 IF ( dabs(
REAL(
u)) .LT. 1d-99)
u = dcmplx(0.d0,0.d0)
2964 IF ( dabs(
REAL(
v)) .LT. 1d-99)
v = dcmplx(0.d0,0.d0)
2966 IF ( solid_transport_flag )
THEN 2968 IF ( dabs(
REAL(
alphas)) .LT. 1d-99)
alphas = dcmplx(0.d0,0.d0)
2970 IF ( temperature_flag )
THEN 2972 IF ( dabs(
REAL(
t)) .LT. 1d-99)
t = dcmplx(0.d0,0.d0)
2975 REAL(u),
REAL(v) , B_cent(j,k) ,
REAL(h) + B_cent(j,k) , &
2976 REAL(alphas) ,
REAL(
t)
2981 REAL(u),
REAL(v) , B_cent(j,k) ,
REAL(h) + B_cent(j,k) , &
2988 IF ( temperature_flag )
THEN 2990 IF ( dabs(
REAL(
t)) .LT. 1d-99)
t = dcmplx(0.d0,0.d0)
2993 REAL(u),
REAL(v) , B_cent(j,k) ,
REAL(h) + B_cent(j,k) , &
2999 REAL(u),
REAL(v) , B_cent(j,k) ,
REAL(h) + B_cent(j,k)
3018 1007
FORMAT(7e20.12)
3019 1008
FORMAT(6e20.12)
3020 1009
FORMAT(8e20.12)
3021 1010
FORMAT(9e20.12)
3022 1011
FORMAT(7e20.12)
3023 1012
FORMAT(8e20.12)
3031 IF ( ( time .GE. t_end ) .OR. ( time .GE.
t_steady ) )
THEN 3073 WHERE (
q1max(:,:).GE. 1.d-5 )
3086 DO j = comp_cells_y,1,-1
3120 INTEGER,
INTENT(IN) :: output_idx
3122 CHARACTER(LEN=4) :: idx_string
3125 IF ( output_idx .EQ. 1 )
THEN 3127 OPEN(
dem_esri_unit,file=
'dem_esri.asc',status=
'unknown',form=
'formatted')
3136 DO j = comp_cells_y,1,-1
3146 idx_string =
lettera(output_idx-1)
3157 WHERE (
q(1,:,:).GE. 1.d-5 )
3170 DO j = comp_cells_y,1,-1
3178 IF ( temperature_flag )
THEN 3189 WHERE (
q(1,:,:) .GE. 1.d-5 )
3202 DO j = comp_cells_y,1,-1
3237 CHARACTER*4 FUNCTION lettera(k)
3239 CHARACTER ones,tens,hund,thou
3243 INTEGER :: iten, ione, ihund, ithou
3246 ihund=int((k-(ithou*1000))/100)
3247 iten=int((k-(ithou*1000)-(ihund*100))/10)
3248 ione=k-ithou*1000-ihund*100-iten*10
3253 lettera=thou//hund//tens//ones
3279 INTEGER,
INTENT(IN) :: output_idx
3281 CHARACTER(LEN=4) :: idx_string
3287 idx_string =
lettera(output_idx-1)
3329 REAL*8,
INTENT(IN) :: time
3330 LOGICAL,
INTENT(INOUT) :: stop_flag
3332 REAL*8,
ALLOCATABLE :: X(:,:), Y(:,:) , dist(:,:)
3334 INTEGER :: imax(2) , imin(2)
3336 REAL*8 :: area , area0 , dareaRel_dt
3342 ALLOCATE( x(sx,sy) , y(sx,sy) , dist(sx,sy) )
3344 x(:,:) = spread(
x_comp, 2, sy )
3345 y(:,:) = spread(
y_comp, 1, sx )
3349 IF ( time .EQ. t_start )
THEN 3351 ALLOCATE(
h_old(sx,sy) )
3357 WHERE(
q(1,:,:) > 1.d-5 ) dist =
b_cent 3358 imin = maxloc( dist )
3363 WRITE(*,*)
'Runout calculated as linear distance from: (' , &
3368 WHERE(
q(1,:,:) >1.d-5 ) dist = dsqrt( (x-
x0_runout)**2 &
3371 imax = maxloc( dist )
3381 WHERE(
h_old(:,:) > 1.d-5 ) dist = dsqrt(
q(2,:,:)**2 +
q(3,:,:)**2 )
3383 max_mom = maxval( dist )
3391 WHERE(
q(1,:,:) > 1.d-5 ) dist = dsqrt( ( x -
x0_runout )**2 &
3394 imax = maxloc( dist )
3396 OPEN(
dakota_unit,file=
'dakota.txt',status=
'replace',form=
'formatted')
3403 area0 =
dx*
dy*count(
q0(1,:,:).GT.1.d-7)
3404 area =
dx*
dy*count(
q(1,:,:).GT.1.d-7)
3406 WRITE(
runout_unit,
'(A,F12.3,A,F12.3,A,F14.3)')
'Time (s) = ',time , &
3407 ' Runout (m) = ',dist(imax(1),imax(2)) -
init_runout,
' Area (m^2) = ', &
3414 WHERE(
q(1,:,:) > 1.d-5 ) dist = abs(
q(1,:,:)-
q0(1,:,:)) / &
3415 max(
q(1,:,:),
q0(1,:,:))
3417 darearel_dt = abs( area - area0 ) / ( area *
dt )
3418 dhrel_dt = sum( dist /
dt ) / count(
q(1,:,:).GT.1.d-5)
3424 IF ( ( time .GT. t_start ) .AND. ( max(darearel_dt,dhrel_dt) .LT. &
3425 eps_stop ) .AND. (.NOT.stop_flag) )
THEN 3427 WRITE(*,*)
'Steady solution reached' 3428 WRITE(*,*)
'dareaRel_dt',darearel_dt
3429 WRITE(*,*)
'dhRel_dt',dhrel_dt
3434 DEALLOCATE( x , y , dist )
real *8 emissivity
emissivity (eps in Costa & Macedonio, 2005)
real *8 rho_s
Specific weight of sediments.
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 y0
Bottom of the physical domain.
real *8 nu_ref
reference kinematic viscosity [m2/s]
real *8 t_ground
temperature of lava-ground interface
real *8, dimension(:,:,:), allocatable q0
Conservative variables.
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 alphas_e
Right sediment concentration.
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 rho_w
Specific weight of water.
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 alphas_init
Initial sediment concentration in the pile of material.
subroutine regrid_scalar(xin, yin, fin, xl, xr, yl, yr, fout)
Scalar regrid (2D)
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.
subroutine output_max
Write the maximum thickness in ESRI format.
complex *16 v
velocity (y direction)
integer, parameter dakota_unit
real *8 cfl
Courant-Friedrichs-Lewy parameter.
real *8 alphas_ambient
Ambient sediment concentration.
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)
real *8 erosion_coeff
erosion model coefficient
integer, parameter output_unit
Output data unit.
character(len=40) output_max_file
Name of the esri max. thick. file.
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 settling_vel
hindered settling
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, dimension(:,:,:), allocatable topography_profile
real *8 t_ref
reference temperature [K]
character(len=40) input_file
File with the run parameters.
integer, parameter output_max_unit
Esri max thick. output unit.
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.
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 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 alphas
sediment volume fraction
real *8, dimension(:,:), allocatable q1max
Maximum over time of thickness.
complex *16 u
velocity (x direction)
real *8 alphas_w
Left sediment concentration.
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.