Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
fleur
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
52
Issues
52
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
fleur
fleur
Commits
dd8a53bb
Commit
dd8a53bb
authored
Jun 07, 2016
by
Gregor Michalicek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Write out starting and ending date and time to out.xml
parent
61dd428d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
1 deletion
+24
-1
io/xmlOutput.f90
io/xmlOutput.f90
+24
-1
No files found.
io/xmlOutput.f90
View file @
dd8a53bb
...
...
@@ -35,24 +35,47 @@ MODULE m_xmlOutput
END
FUNCTION
getXMLOutputUnitNumber
SUBROUTINE
startXMLOutput
()
IMPLICIT
NONE
CHARACTER
(
LEN
=
8
)
::
date
CHARACTER
(
LEN
=
10
)
::
time
CHARACTER
(
LEN
=
5
)
::
zone
CHARACTER
(
LEN
=
10
)
::
dateString
CHARACTER
(
LEN
=
8
)
::
timeString
maxNumElements
=
10
ALLOCATE
(
elementList
(
maxNumElements
))
elementList
=
''
currentElementIndex
=
0
xmlOutputUnit
=
53
CALL
DATE_AND_TIME
(
date
,
time
,
zone
)
WRITE
(
dateString
,
'(a4,a1,a2,a1,a2)'
)
date
(
1
:
4
),
'/'
,
date
(
5
:
6
),
'/'
,
date
(
7
:
8
)
WRITE
(
timeString
,
'(a2,a1,a2,a1,a2)'
)
time
(
1
:
2
),
':'
,
time
(
3
:
4
),
':'
,
time
(
5
:
6
)
OPEN
(
xmlOutputUnit
,
file
=
'out.xml'
,
form
=
'formatted'
,
status
=
'unknown'
)
WRITE
(
xmlOutputUnit
,
'(a)'
)
'<?xml version="1.0" encoding="UTF-8" standalone="no"?>'
WRITE
(
xmlOutputUnit
,
'(a)'
)
'<fleurOutput fleurOutputVersion="0.27">'
! TODO: Write out standard stuff
CALL
writeXMLElement
(
'startDateAndTime'
,(/
'date'
,
'time'
,
'zone'
/),(/
dateString
,
timeString
,
zone
/))
END
SUBROUTINE
startXMLOutput
SUBROUTINE
endXMLOutput
()
IMPLICIT
NONE
CHARACTER
(
LEN
=
8
)
::
date
CHARACTER
(
LEN
=
10
)
::
time
CHARACTER
(
LEN
=
5
)
::
zone
CHARACTER
(
LEN
=
10
)
::
dateString
CHARACTER
(
LEN
=
8
)
::
timeString
DO
WHILE
(
currentElementIndex
.NE.
0
)
CALL
closeXMLElement
(
elementList
(
currentElementIndex
))
END
DO
DEALLOCATE
(
elementList
)
CALL
DATE_AND_TIME
(
date
,
time
,
zone
)
WRITE
(
dateString
,
'(a4,a1,a2,a1,a2)'
)
date
(
1
:
4
),
'/'
,
date
(
5
:
6
),
'/'
,
date
(
7
:
8
)
WRITE
(
timeString
,
'(a2,a1,a2,a1,a2)'
)
time
(
1
:
2
),
':'
,
time
(
3
:
4
),
':'
,
time
(
5
:
6
)
CALL
writeXMLElement
(
'endDateAndTime'
,(/
'date'
,
'time'
,
'zone'
/),(/
dateString
,
timeString
,
zone
/))
WRITE
(
xmlOutputUnit
,
'(a)'
)
'</fleurOutput>'
CLOSE
(
xmlOutputUnit
)
END
SUBROUTINE
endXMLOutput
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment