From 4a2f81c205df8e6e2a90f41e19c552d35cf54ce1 Mon Sep 17 00:00:00 2001 From: Jeffrey Armstrong Date: Tue, 25 May 2021 07:49:38 -0400 Subject: Added directory to filename for upload when mask is specified. --- common/utilities.F90 | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'common/utilities.F90') diff --git a/common/utilities.F90 b/common/utilities.F90 index dbd0423..61c5d93 100644 --- a/common/utilities.F90 +++ b/common/utilities.F90 @@ -98,6 +98,26 @@ contains end subroutine combine_paths + subroutine path_from_file(file, path) + implicit none + + character(*), intent(in)::file + character(*), intent(out)::path + integer::i + + i = index(file, '/', back=.true.) + if(i <= 0) then + i = index(file, '\', back=.true.) + end if + + if(i <= 0) then + path = '.' + else + path = file(1:i) + end if + + end subroutine path_from_file + subroutine write_date_and_time(unit_number, values) implicit none -- cgit v1.2.3