Skip to content

Commit 4e9462f

Browse files
author
ericaneininger
committed
ticket:699 : marcstringer : Fix to finalcycle calculation for ARCHIVE_FINAL
git-svn-id: https://metomi/svn/moci.xm/main/trunk@5812 5d77ff06-061d-4adc-8321-d65833a6d205
1 parent 27c2a68 commit 4e9462f

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

Postprocessing/common/utils.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,18 @@ def finalcycle():
125125
Determine whether this cycle is the final cycle for the running suite.
126126
Return True/False
127127
'''
128-
arch_final = load_env('ARCHIVE_FINAL')
129-
if arch_final is not True:
128+
arch_final = load_env('ARCHIVE_FINAL', 'false')
129+
if ('true' in arch_final.lower()):
130+
fcycle = True
131+
log_msg('ARCHIVE_FINAL=true. End-of-run data will be archived.',
132+
level='INFO')
133+
else:
130134
finalpoint = load_env('FINALCYCLE_OVERRIDE')
131135
if finalpoint is None:
132136
finalpoint = load_env('CYLC_SUITE_FINAL_CYCLE_POINT')
137+
if finalpoint == 'None':
138+
# Convert from string.
139+
finalpoint = None
133140

134141
# The end point of final cycle will always be beyond the "final point"
135142
# as defined by either $CYLC_SUITE_FINAL_CYCLE_POINT (calendar cycling
@@ -142,9 +149,6 @@ def finalcycle():
142149
else:
143150
# Cylc8 no longer requires a final cycle point to be set at all
144151
fcycle = False
145-
else:
146-
# Set final cycle according to value of ARCHIVE_FINAL
147-
fcycle = ('true' in arch_final.lower())
148152

149153
return fcycle
150154

Postprocessing/unicicles/unicicles.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def do_archive(self, finalcycle=False, skiptimer=False):
184184
self.do_delete(filelist=arch_success)
185185

186186
if self.suite.finalcycle and normalcycle:
187-
# Archive any files remaining files at the final cycle point
187+
# Archive any files remaining at the final cycle point
188188
utils.log_msg('Running do_archive on final cycle...')
189189
self.do_archive(finalcycle=True, skiptimer=True)
190190

0 commit comments

Comments
 (0)