Skip to content

Commit 1cb9242

Browse files
committed
Copy diag manifests to cylc-managed workflow share directory
1 parent 7aa7295 commit 1cb9242

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

flow.cylc

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -371,19 +371,24 @@
371371
exit 1
372372
fi
373373
374+
# Check history files for expected timesteps
375+
echo " checking data integrity with fre pp histval..."
376+
fre -vv pp histval --warn --history $ptmpDir$historyDir/$(basename -s .tar $file) \
377+
--date_string $(cylc cycle-point --template CCYYMMDD)
378+
374379
echo " Linking staged files to ${CYLC_WORKFLOW_SHARE_DIR}"
375380
mkdir -p $CYLC_WORKFLOW_SHARE_DIR/cycle/$CYLC_TASK_CYCLE_POINT/history/native
376381
cd $CYLC_WORKFLOW_SHARE_DIR/cycle/$CYLC_TASK_CYCLE_POINT/history/native
377382
ln -f $ptmpDir/$historyDir/$(cylc cycle-point --template CCYYMMDD).nc/* . \
378383
|| ln -sf $ptmpDir/$historyDir/$(cylc cycle-point --template CCYYMMDD).nc/* .
379384
380-
echo " checking data integrity with fre pp histval..."
381-
fre -vv pp histval --warn --history $ptmpDir$historyDir/$(basename -s .tar $file) \
382-
--date_string $(cylc cycle-point --template CCYYMMDD)
383-
384385
# save any diag manifests
385-
if ls *diag_manifest.yaml; then
386-
cp *diag_manifest.yaml $CYLC_WORKFLOW_SHARE_DIR
386+
cd $ptmpDir/$historyDir/$(cylc cycle-point --template CCYYMMDD).nc
387+
if ls *diag_manifest.yaml.*; then
388+
cp *diag_manifest.yaml.* $CYLC_WORKFLOW_SHARE_DIR/cycle/$CYLC_TASK_CYCLE_POINT
389+
echo "Copied diag manifests to $CYLC_WORKFLOW_SHARE_DIR/cycle/$CYLC_TASK_CYCLE_POINT"
390+
else
391+
echo "No diag manifests found"
387392
fi
388393
389394
echo "Natural end of the history file staging"

0 commit comments

Comments
 (0)