subroutine ps_frantic_debug(dpath)

  ! set "debug" mode in ps_frantic private module
  ! provide as argument path where to write files

  use ps_frantic_privmod
  implicit NONE

  character*(*), intent(in) :: dpath   ! path where to write debug files

  !---------------------

  idebug = .TRUE.
  dbg_path = dpath

end subroutine ps_frantic_debug

subroutine ps_frantic_debug_cstr(cpath)

  ! set "debug" mode in ps_frantic private module
  ! provide as argument path where to write files

#include "fpreproc/byte_declare.h"

  BYTE_DECLARE cpath(*)

  character*256 dpath

  call cstring(dpath,cpath,'2F')

  call ps_frantic_debug(dpath)

end subroutine ps_frantic_debug_cstr
