-
Notifications
You must be signed in to change notification settings - Fork 38
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
Add cmor_name as an extra tag for getting variable info #1099
Conversation
Works fine, I am able to load the data by adding the cmor_name for the variable. Maybe some documentation to address these cases could be useful? |
Looks nice, very small impact on existing recipes! Sorry, I only now realize that renaming the |
We will need to modify the I think tweaking the |
I agree, that would be much worse. |
@jvegasbsc To follow up on our discussion yesterday about making backwards-incompatible changes: Could you please add a thorough description of this pull request at the top, highlighting which changes are backwards incompatible and including a guide on how to upgrade that can be used in the changelog? And then tag the core development team and ask them if they think these changes are OK? |
@ESMValGroup/esmvaltool-developmentteam, any issues with the breaking changes on this PR? Should only affect people calling the preprocessor functions for CMOR check and fixes and derivation in diagnostics, which I do not know if it is really a current use case |
Co-authored-by: Bouwe Andela <[email protected]>
Sorry, I've thought about this some more and I'm still not convinced this is the best solution. The variable name (out_name) can be read from the cmor table, so there ahould be no need to provide the extra cmor_name argument in the recipe. If we consider short_name to be the name in the table, we can add var_name (i.e. out_name) automatically from the table in the same place where we add standard_name etc and use that in the DRS. I believe that the filename is the only place where var_name is used, right? This would indeed changing all occurrences of short_name with var_name in config-developer.yaml, but that's a backwards compatible change: older versions of config-developer.yaml will keep working just fine (only not for the rare cases that are fixed by this pr, but those do not work now either, so that's not a problem). |
I am also not convinced that the users will know the It seems there are three classes of variables:
|
Me neither, but what is your proposal to automatically distinguish which variable are the users expecting to get when the out_name is not enough? |
Enough for what? When there are two variables with the same In other words, a user will ask for |
It's too late now for 2.4.0, but this item should receive high priority for 2.5.0. |
Since this has already been postponed once, it might be good to include this in v2.5. |
Finally, it will go to 2.6 . I will address the remaining comments. |
We should address this for 2.6.0, but note that the way to address this may well be to abandon it or to start fresh. The current approach is not quite convincing at the moment. |
Maybe it's better to close this then. I don't think I will have time to address it for 2.6. |
ESMValTool was assuming that the name of all variables in the CMOR tables was the same that their
out_name
, which represents the name in the files (both in the path and inside the file). This is not true for all, so we have to modify it to be able to deal with these kind of variables.To do so, we are using
short_name
for theout_name
andcmor_name
for the name in the tables. This implies changing the name of some parameters fromshort_name
tocmor_name
in most of the CMOR related functions, including checking, fixing and derivation. The only API change that is not a pure replace is thederive
function as it requires both nowTo replace #391
Closes #333
Checklist
It is the responsibility of the author to make sure the pull request is ready to review. The icons indicate whether the item will be subject to the 🛠 Technical or 🧪 Scientific review.
To help with the number pull requests: