Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/post_process/m_start_up.f90
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ subroutine s_read_input_file() ! ---------------------------------------
!! Generic logical used for the purpose of asserting whether a file
!! is or is not present in the designated location

integer :: iostatus
!! Integer to check iostat of file read

! Namelist for all of the parameters to be inputed by the user
namelist /user_inputs/ case_dir, m, n, p, t_step_start, &
t_step_stop, t_step_save, model_eqns, &
Expand Down Expand Up @@ -60,7 +63,14 @@ subroutine s_read_input_file() ! ---------------------------------------
if (file_check) then
open (1, FILE=trim(file_loc), FORM='formatted', &
STATUS='old', ACTION='read')
read (1, NML=user_inputs)
read (1, NML=user_inputs, iostat=iostatus)

if (iostatus /= 0) then
print '(A)', 'Invalid line in post_process.inp. It is '// &
'likely due to a datatype mismatch. Exiting ...'
call s_mpi_abort()
end if

close (1)
! Store m,n,p into global m,n,p
m_glb = m
Expand Down
10 changes: 9 additions & 1 deletion src/pre_process/m_start_up.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ contains
!! Generic logical used for the purpose of asserting whether a file
!! is or is not present in the designated location

integer :: iostatus
!! Integer to check iostat of file read

! Namelist for all of the parameters to be inputed by the user
namelist /user_inputs/ case_dir, old_grid, old_ic, &
t_step_old, m, n, p, x_domain, y_domain, z_domain, &
Expand Down Expand Up @@ -111,7 +114,12 @@ contains
if (file_check) then
open (1, FILE=trim(file_loc), FORM='formatted', &
STATUS='old', ACTION='read')
read (1, NML=user_inputs)
read (1, NML=user_inputs, iostat=iostatus)
if (iostatus /= 0) then
print '(A)', 'Invalid line in pre_process.inp. It is '// &
'likely due to a datatype mismatch. Exiting ...'
call s_mpi_abort()
end if
close (1)
! Store m,n,p into global m,n,p
m_glb = m
Expand Down
13 changes: 12 additions & 1 deletion src/simulation/m_start_up.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ contains
logical :: file_exist !<
!! Logical used to check the existence of the input file

integer :: iostatus
!! Integer to check iostat of file read

! Namelist of the global parameters which may be specified by user
namelist /user_inputs/ case_dir, run_time_info, m, n, p, dt, &
t_step_start, t_step_stop, t_step_save, &
Expand Down Expand Up @@ -107,7 +110,15 @@ contains
FORM='formatted', &
ACTION='read', &
STATUS='old')
read (1, NML=user_inputs); close (1)
read (1, NML=user_inputs, iostat=iostatus)

if (iostatus /= 0) then
print '(A)', 'Invalid line in simulation.inp. It is '// &
'likely due to a datatype mismatch. Exiting ...'
call s_mpi_abort()
end if

close (1)

! Store BC information into global BC
bc_x_glb%beg = bc_x%beg
Expand Down