Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PrePARE is having issues handling handling cell_methods values containing multiple comments #654

Closed
mauzey1 opened this issue May 11, 2022 · 0 comments · Fixed by #655
Closed
Assignees

Comments

@mauzey1
Copy link
Collaborator

mauzey1 commented May 11, 2022

The values for the cell_methods can contain comments within parentheses.

 "cell_methods": "longitude: sum (comment: basin sum [along zig-zag grid path]) depth: sum time: mean", 

However, some of the files generated by CMOR can create values with multiple parentheses sections.

htovgyre:cell_methods = "longitude: sum (comment: basin sum [along zig-zag grid path]) depth: sum time: mean (interval: 1 month)"

PrePARE is currently only designed to handle removing one parentheses section. Having multiple sections will cause everything from the first starting parenthesis to the last ending parenthesis to be removed. This will then cause an error when comparing the values between the CMIP6 table and the dataset.

=====================================================================================
Your file contains "cell_methods":"longitude: sum" and
CMIP6 tables requires "cell_methods":"longitude: sum depth: sum time: mean".
=====================================================================================

I have made a change to the regex that handles removing the comment sections correctly. I will create a PR for it shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant