aboutsummaryrefslogtreecommitdiff
path: root/common/utilities.F90
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2021-05-25 07:49:38 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2021-05-25 07:49:38 -0400
commit4a2f81c205df8e6e2a90f41e19c552d35cf54ce1 (patch)
treeab4dbf8eb369c13995d00a68b512a7c534721c86 /common/utilities.F90
parent9cfaf50daf1497511315cd5c40ac2b4ed8a54bd1 (diff)
downloadlevitating-4a2f81c205df8e6e2a90f41e19c552d35cf54ce1.tar.gz
levitating-4a2f81c205df8e6e2a90f41e19c552d35cf54ce1.zip
Added directory to filename for upload when mask is specified.
Diffstat (limited to 'common/utilities.F90')
-rw-r--r--common/utilities.F9020
1 files changed, 20 insertions, 0 deletions
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