-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMovieOptions.f90
78 lines (52 loc) · 2.19 KB
/
MovieOptions.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
MODULE MovieOptions
IMPLICIT NONE
NAMELIST /movie/ movieOutputDir, plotShellScript, plotCommand, fepScript, fepusScript, genericDataFileName, moviestep
CHARACTER(500) :: movieOutputDir, plotShellScript, plotCommand, fepScript, fepusScript, genericDataFileName
INTEGER :: moviestep
CONTAINS
!*
SUBROUTINE ProcessNameList()
IMPLICIT NONE
CALL ReadNameList()
CALL CheckNameList()
CALL PrintNameList()
END SUBROUTINE ProcessNameList
!*
SUBROUTINE ReadNameList()
USE FileIO, ONLY : OpenFile, CloseFile
IMPLICIT NONE
INTEGER, PARAMETER :: nmlUnit = 69
! usable defaults
movieOutputDir = "fep-movie-files"
plotShellScript = "makeMovie.sh"
plotCommand = "Rscript"
fepScript = "plotFep.r"
fepusScript = "plotFepus.r"
genericDataFileName = "data.csv"
moviestep = 1
CALL OpenFile(nmlUnit,"movie.nml","read")
READ(nmlUnit,NML=movie)
CALL CloseFile(nmlUnit)
END SUBROUTINE ReadNameList
!*
SUBROUTINE CheckNameList()
IMPLICIT NONE
IF (movieOutputDir == "") STOP "Blank output directory for movie data not valid"
IF (plotShellScript == "") STOP "Blank movie generation script not valid"
IF (moviestep <= 0) STOP "Skip parameter must be >= 1"
END SUBROUTINE CheckNameList
!*
SUBROUTINE PrintNameList()
USE Log, ONLY : logUnit
IMPLICIT NONE
WRITE(logUnit,'(A)') "* Movie Generation Settings *"; WRITE(logUnit,*)
WRITE(logUnit,'(A,A)') "Output directory for movie data: ", TRIM(ADJUSTL(movieOutputDir))
WRITE(logUnit,'(A,A)') "Script to plot all data files: ", TRIM(ADJUSTL(plotShellScript))
WRITE(logUnit,'(A,A)') "Command for plotting data: ", TRIM(ADJUSTL(plotCommand))
WRITE(logUnit,'(A,A)') "Script for plotting FEP data: ", TRIM(ADJUSTL(fepScript))
WRITE(logUnit,'(A,A)') "Script for plotting FEP/US data: ", TRIM(ADJUSTL(fepusScript))
WRITE(logUnit,'(A,A)') "Name for generic data file: ", TRIM(ADJUSTL(genericDataFileName))
WRITE(logUnit,'(A,I0.4)') "Step between movie data points: ", moviestep
WRITE(logUnit,*)
END SUBROUTINE PrintNameList
END MODULE MovieOptions