Describe the bug
When you try to run fre pp validate with history_segment: P1M and pp_chunk_a: P1Y, you'll get an error that says that pp_chunk_a should be evenly divisible by the size of the history segment
To Reproduce
Add the above key value pairs to your pp yaml
Expected behavior
The validator should recognize months as being divisible by years and accept PXM as a history segment for any pp chunk of the form PNY if 12*N is divisible by X.
Additional context
This issue seems to stem from how the metomi.isodatetime.parser interprets months - it assumes all months are 30 days long, so when we try to check if a year (which metomi interprets as 365 days) is divisible by months, we get false in the following function:
Describe the bug When you try to run
fre pp validate
withhistory_segment: P1M
andpp_chunk_a: P1Y
, you'll get an error that says thatpp_chunk_a
should be evenly divisible by the size of the history segmentTo Reproduce Add the above key value pairs to your pp yaml
Expected behavior The validator should recognize months as being divisible by years and accept
PXM
as a history segment for any pp chunk of the formPNY
if 12*N is divisible by X.Additional context This issue seems to stem from how the
metomi.isodatetime.parser
interprets months - it assumes all months are 30 days long, so when we try to check if a year (which metomi interprets as 365 days) is divisible by months, we get false in the following function:https://github.com/NOAA-GFDL/fre-workflows/blob/c18dedd918a09fef11a24ffcab692ab8d86a3e7b/meta/lib/python/macros/chunkcheck.py#L23-L31