-
Notifications
You must be signed in to change notification settings - Fork 220
/
create_name_database.f90
47 lines (37 loc) · 1.69 KB
/
create_name_database.f90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
!=====================================================================
!
! S p e c f e m 3 D V e r s i o n 1 . 4
! ---------------------------------------
!
! Dimitri Komatitsch and Jeroen Tromp
! Seismological Laboratory - California Institute of Technology
! (c) California Institute of Technology September 2006
!
! This program is free software; you can redistribute it and/or modify
! it under the terms of the GNU General Public License as published by
! the Free Software Foundation; either version 2 of the License, or
! (at your option) any later version.
!
! This program is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! GNU General Public License for more details.
!
! You should have received a copy of the GNU General Public License along
! with this program; if not, write to the Free Software Foundation, Inc.,
! 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
!
!=====================================================================
subroutine create_name_database(prname,iproc,LOCAL_PATH)
! create the name of the database for the mesher and the solver
implicit none
integer iproc
! name of the database file
character(len=150) prname,procname,LOCAL_PATH,clean_LOCAL_PATH
! create the name for the database of the current slide and region
write(procname,"('/proc',i6.6,'_')") iproc
! suppress white spaces if any
clean_LOCAL_PATH = adjustl(LOCAL_PATH)
! create full name with path
prname = clean_LOCAL_PATH(1:len_trim(clean_LOCAL_PATH)) // procname
end subroutine create_name_database