write_checkpoint_2d Subroutine

public subroutine write_checkpoint_2d(state, base, t, iter, is_ok, message, written_file, t_comp)

Write a checkpoint: gather to root, write the global file on rank 0, agree outcome across ranks, update the latest_checkpoint_2d pointer file.

absent is written as 0, matching a fresh (non-restarted) run's value.

Arguments

Type IntentOptional Attributes Name
type(solver_state_2d_t), intent(in) :: state
character(len=*), intent(in) :: base
real(kind=wp), intent(in) :: t
integer, intent(in) :: iter
logical, intent(out), optional :: is_ok
character(len=*), intent(out), optional :: message
character(len=*), intent(out), optional :: written_file

Path of the file actually written (<base>_<iter>.bin), set only on success; mirrors checkpoint.f90's write_checkpoint contract.

real(kind=wp), intent(in), optional :: t_comp

Optional Kahan compensation term for t (v6, Q2d);