cylc-flow icon indicating copy to clipboard operation
cylc-flow copied to clipboard

datetime cycling: +PT1H/T00 invalid?

Open oliver-sanders opened this issue 2 years ago • 5 comments

Issue reported in the cylc-flow Element room.

I'm trying to use a scheduling syntax that was shown as an example in the documentation, but cylc says it can't parse it. The syntax is "+PT1H/T00", which appears on https://cylc.github.io/cylc-doc/stable/html/tutorial/scheduling/datetime-cycling.html?highlight=t00#inferred-recurrence. In the documentation it says this syntax means "every day starting on the first midnight after the point one hour after the initial cycle point." But when I use this syntax in my graph, cylc gives the error "Could not parse +PT1H/T00."

-- https://matrix.to/#/!hwZqSYihGPuhDdIzIP:matrix.org/$166369828613472kBzeF:matrix.org?via=matrix.org

  • Should we expect +PT1H/T00 to work?
  • Did it work at Cylc 7?

oliver-sanders avatar Sep 21 '22 08:09 oliver-sanders

Did it work at Cylc 7?

(I checked that it didn't work back to 8.0b1, but didn't try Cylc 7)

Should we expect +PT1H/T00 to work?

I don't see why not, and the tutorial says it's valid which suggests "we" expected it to work.

hjoliver avatar Sep 21 '22 09:09 hjoliver

Checked Cylc 7.9.6 - same result. Any idea who wrote this section of the tutorial?

hjoliver avatar Sep 21 '22 20:09 hjoliver

Above this entry in the tutorial is the example 2000-01-01T00/T00, I expect this was copied and mutated to something we would have expected to work, but which doesn't and clearly wasn't tested.

Assuming 2000-01-01T12/T00 works it's odd that +PT1H/T00 doesn't.

I think the implicit ICP context is a Cylc feature (as opposed to an ISO8601 one) so this may be a Cylc bug.

Suggest a documentation fix for now and put this on the back-burner.

oliver-sanders avatar Sep 22 '22 07:09 oliver-sanders

Documentation fix https://github.com/cylc/cylc-doc/pull/540/files

oliver-sanders avatar Sep 22 '22 10:09 oliver-sanders

2000-01-01T12/T00 doesn't work either...

T00 is a (truncated) datetime - it is not valid to have [datetime]/[datetime] (unless using recurrence format no. 3 but then you need to include Rn/ at the beginning, and even then it seems the parser does not allow the second datetime in the recurrence to be truncated).


Aside: T00 has the special property of apparently assuming T00/P1D if used alone, though it is still possible to do e.g. T00/PT6H

MetRonnie avatar Sep 28 '22 12:09 MetRonnie

So sounds like +PT1H/T00 should be invalid (and is) then. If agreed, please close this issue as fixed by https://github.com/cylc/cylc-doc/pull/540

oliver-sanders avatar Oct 18 '22 14:10 oliver-sanders

(closed by accident)

oliver-sanders avatar Oct 18 '22 14:10 oliver-sanders