Purge the directory based on the input
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(controltype), | intent(in) | :: | control | 
    subroutine purge_dump_dir(control)
      !< Purge the directory based on the input
      implicit none
      type(controltype), intent(in) :: control
      integer                         :: purge_num
      purge_num = control%checkpoint_iter_count-control%purge_write
      if (control%purge_write /=0 .and. purge_num > 0) then
        write(purge_dirname,'(A,I4.4)') 'time_directories/', purge_num
        call remove_directory(purge_dirname)
      end if
    end subroutine purge_dump_dir