Locate sidecar header of .kipp file ("Header file", docs/kippfiles.md).
Tries <path>.hdr next to data file, then <basename>.hdr in working directory (skipped
if data file is there). Missing header stops load w/ error.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | path |
Path of |
||
| character(len=*), | intent(out) | :: | hdrfile |
Path of header. |
subroutine find_kipp_header(path, hdrfile) !! Locate sidecar header of `.kipp` file ("Header file", docs/kippfiles.md). !! !! Tries `<path>.hdr` next to data file, then `<basename>.hdr` in working directory (skipped !! if data file is there). Missing header stops load w/ error. ! Arguments character(len=*), intent(in) :: path !! Path of `.kipp` file. character(len=*), intent(out) :: hdrfile !! Path of header. integer(int32) :: slash logical :: ex hdrfile = trim(path)//'.hdr' inquire (file=trim(hdrfile), exist=ex) if (ex) return slash = index(trim(path), '/', back=.true.) if (slash > 0) then hdrfile = trim(path(slash + 1:))//'.hdr' inquire (file=trim(hdrfile), exist=ex) if (ex) return end if error stop '[loadkipp] cannot find sidecar .hdr for '//trim(path) end subroutine find_kipp_header