Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Restart Probe Files #690

Merged
merged 3 commits into from
Nov 6, 2024
Merged
Changes from 1 commit
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
17 changes: 14 additions & 3 deletions src/simulation/m_data_output.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ contains
!! Relative path to the probe data file in the case directory

integer :: i !< Generic loop iterator
logical :: file_exist

do i = 1, num_probes
! Generating the relative path to the data file
Expand All @@ -183,9 +184,19 @@ contains

! Creating the formatted data file and setting up its
! structure
open (i + 30, FILE=trim(file_path), &
FORM='formatted', &
STATUS='unknown')
inquire(file=trim(file_path), exist=file_exist)

if (file_exist) then
open (i + 30, FILE=trim(file_path), &
FORM='formatted', &
STATUS='old', &
POSITION='append')
else
open (i + 30, FILE=trim(file_path), &
FORM='formatted', &
STATUS='unknown')
endif

! POSITION = 'append', &
!WRITE(i+30,'(A,I0,A)') 'Probe ',i, ' located at:'
!WRITE(i+30,'(A,F10.6)') 'x = ',probe(i)%x
Expand Down
Loading