Merge branch 'feature/output' into 'development'

Folder name

See merge request JorgeGonz/fpakc!4
This commit is contained in:
Jorge Gonzalez 2021-01-20 15:38:10 +00:00
commit c378f8c3a2
9 changed files with 33 additions and 11 deletions

View file

@ -347,6 +347,7 @@ MODULE moduleInput
TYPE(json_file), INTENT(inout):: config
LOGICAL:: found
CHARACTER(:), ALLOCATABLE:: object
CHARACTER(:), ALLOCATABLE:: baseName
CHARACTER(8) :: date_now=''
CHARACTER(10) :: time_now=''
@ -359,11 +360,22 @@ MODULE moduleInput
END IF
!Creates output folder
!TODO: Add option for custon name output_folder
!Gets actual date and time
CALL DATE_AND_TIME(date_now, time_now)
folder = date_now(1:4) // '-' // date_now(5:6) // '-' // date_now(7:8) // '_' &
// time_now(1:2) // '.' // time_now(3:4) // '.' // time_now(5:6)
!Gets the basename of the folder
CALL config%get(object // '.folder', baseName, found)
PRINT *, baseName
IF (found) THEN
folder = baseName
END IF
!Compose the folder name
folder = folder // '_' // date_now(1:4) // '-' // date_now(5:6) // '-' // date_now(7:8) // '_' &
// time_now(1:2) // '.' // time_now(3:4) // '.' // time_now(5:6)
!Creates the folder
CALL EXECUTE_COMMAND_LINE('mkdir ' // path // folder )
CALL config%get(object // '.cpuTime', timeOutput, found)