You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is meant to skip comments in the file value. However, it will also skip anything that is after the comment. Some variables have cell_methods values that have other words proceeding what is in parentheses.
If the file had a cell_methods value of "longitude: sum (comment: basin sum [along zig-zag grid path]) depth: sum time: mean", then it would only check for "longitude: sum" in the table's value.
Should we find a way to ignore everything in parentheses in cell_methods but still check for everything else in the cell_methods attribute?
The text was updated successfully, but these errors were encountered:
Thanks for noting this issue. Yes, it would be great to do what you say. It doesn't seem that this would be too difficult. One possible problem with the simplest approach ("when a parenthesis is found, search for an end parenthesis, and proceed to analyze the cell_methods string from there") would arise if there were embedded parentheses. I'm pretty sure we don't have any data like that, but I don't think embedded parentheses are forbidden by the convention. Would it be difficult to treat this more difficult case? If so, I would simply implement a solution to the simple case, which will be a big improvement from the current treatment.
When PrePARE checks the value of
cell_methods
in a file with that of the table, it will only check the file value before the pattern" ("
.cmor/LibCV/PrePARE/PrePARE.py
Lines 608 to 612 in 9511753
This is meant to skip comments in the file value. However, it will also skip anything that is after the comment. Some variables have
cell_methods
values that have other words proceeding what is in parentheses.Examples:
https://github.com/PCMDI/cmip6-cmor-tables/blob/3b802b4e94fc36c5c9d1c9234fcace7d81f769c3/Tables/CMIP6_Omon.json#L1241-L1258
https://github.com/PCMDI/cmip6-cmor-tables/blob/3b802b4e94fc36c5c9d1c9234fcace7d81f769c3/Tables/CMIP6_EmonZ.json#L125-L142
If the file had a
cell_methods
value of"longitude: sum (comment: basin sum [along zig-zag grid path]) depth: sum time: mean"
, then it would only check for"longitude: sum"
in the table's value.Should we find a way to ignore everything in parentheses in
cell_methods
but still check for everything else in thecell_methods
attribute?The text was updated successfully, but these errors were encountered: