ACCESS-Community-Hub / ACCESS-MOPPeR

A tool to post-process ACCESS Model output using CMOR, based on APP4, work in progress!
https://access-mopper.readthedocs.io/en/latest/
Apache License 2.0
0 stars 0 forks source link

remove realm dependency from check_timestamp #185

Closed paolap closed 2 hours ago

paolap commented 2 hours ago

Rewriting checktimestamp so it's independent from realm. As before we break the filename using "" and "." in a dummy list. In this version we define a list of possible regex for dates which are ordered and evaluated in order of reliability. These range from YYYYMMDD to YYY for a year <1000 without initial 0 digit. For example if we find a match for YYYYMMDD than we want to select that so this comes first if everything else fail we can check for YYY. We evelauate the strings in dummy list in reverse order and we stop if at least one match is found, so if an experiment name also contains 3+ digits it gets ignored, as usually it will appear first in the filename.

paolap commented 2 hours ago

This is done in pattern branch, refer to test_mop_utils case to see all the cases included.