Open sol1105 opened 5 months ago
version_realization
does not have an entry, it could have an entry similar to driving_variant_label
.
"version_realization": [
"v[[:digit:]]\\{1,\\}-r[[:digit:]]\\{1,\\}$"
Since 0
is not allowed(?!), maybe this example would have to be modified, eg.
"version_realization": [
"v[1-9]\\{1,\\}[[:digit:]]\\{0,\\}-r[1-9]\\{1,\\}[[:digit:]]\\{0,\\}$"
Thanks for pointin this out. That's another relict from the original CMIP6 CV. We did not really change the convention on the variant label so keepin the original regex should be fine. However, i could not really figure out how to evaluate these regex, e.g., have the same questions as in https://github.com/PCMDI/cmip6-cmor-tables/issues/281. Do you know, if cmor actually evaluates regex during cmorization?
My closest approach to evaluate regex is this: https://github.com/euro-cordex/cmor-check/blob/2eb19b36bf39cc1dd1f1a6c93b993a37a1b27331/cmor_check/cmor_check.py#L11-L14
However, that won't work for most of the regular expressions, e.g., in the CMIP6_CV.
The problem seems to be that the re
module in python doesn't know [[:digit:]]
. It also seems to not like all the backslashes. Without those, and with [[:digit:]]
replaced by \d
it works.
There is a typo in the CV attribute
driving_variant_label
. It is currently calleddriving_variant_label
in therequired_global_attributes
, but missing thedriving_
prefix in the actual CV entry (so just being calledvariant_label
).