-
Notifications
You must be signed in to change notification settings - Fork 39
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
Allowed arbitrary CMIP6 fx variables in special preprocessors and added a catch on project not found in config-developer (invalid project) #432
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeh nicely generalized in the new framework, Manu! The question is - do we
really want to raise the not found fx files? I'd be cautious about that
since the fx var might not simply be there and NE masks will be used
instead 🍺
|
We only raise an error if the fx var is not in the CMOR tables, if only the files are not available no error is raised. |
Ow true, my bad, then I'd move the check up where the cmor variable is
built, use a try/except with a debug logger mssg, and let the code go
through even if the cmor variable is not built - if no cmor variable found
return an empty fx_files list so NE masks can still be used
|
Actually, no need for try/except block, just remove the searched_mips and
its use and referencing
Dr Valeriu Predoi.
Computational scientist
NCAS-CMS
University of Reading
Department of Meteorology
Reading RG6 6BB
United Kingdom
…On Thu, 16 Jan 2020, 09:37 Valeriu Predoi, ***@***.***> wrote:
Ow true, my bad, then I'd move the check up where the cmor variable is
built, use a try/except with a debug logger mssg, and let the code go
through even if the cmor variable is not built - if no cmor variable found
return an empty fx_files list so NE masks can still be used
Dr Valeriu Predoi.
Computational scientist
NCAS-CMS
University of Reading
Department of Meteorology
Reading RG6 6BB
United Kingdom
On Thu, 16 Jan 2020, 09:27 Manuel Schlund, ***@***.***>
wrote:
> We only raise an error if the fx var is not in the CMOR tables, if only
> the files are not available no error is raised.
>
> —
> You are receiving this because your review was requested.
> Reply to this email directly, view it on GitHub
> <#432?email_source=notifications&email_token=AG5EFIYOJQ24GPNTAOP7NITQ6ASATA5CNFSM4KHFLTVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJDL72Q#issuecomment-575061994>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AG5EFI5RIES5O3FLMOKITHLQ6ASATANCNFSM4KHFLTVA>
> .
>
|
But why would we need/allow an fx variable name that is not in the CMOR tables? E.g. if you have a typo in your fx name, then it is really hard to figure out what is failing. EDIT: right now, this is only done for CMIP6 |
Hmm, that might be. Am just concerned fx_mips is not exhaustive enough for
hells knows what corner cases. But I guess there it's better to actually
raise a big red flag anyway, rather then quietly apply NE masks
|
Also I believe @ledm case of volcello found in Omon rather than Ofx will
not work now since fx_var can not be constructed with Omon so the file
search will be done with Ofx instead, and return empty
|
I'm pretty sure it works, this line should help: ESMValCore/esmvalcore/_recipe.py Line 398 in 6719ca4
I also added a test for it which should cover this case |
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Does this fix address the other problem raised in #405: Some parts of the preprocessor chain need to be applied to the fx file as well as the diagnostic variable data. |
Nope, that's a completely different dish of curry. I'll think about that today. Also, apologies for my previous email comments introducing my lengthy email signature 🍺 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW if I didn't say it - really nice approach @schlunma 🍺 |
Thanks 😁 I was a bit scared of expanding this to all projects, but actually this should be no problem. One thing I mentioned: Do we check if there's a CMOR table for the project somewhere before this code? If not, then |
|
here's a test running with a fictitious
|
Nice, so not our business 😄 |
of course it is, seaman Beaumont! (ref to Hunt for Red October) |
BTW the last test I added is a message for future us when we will run ESMValTool on CMIP7 data 🤣 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. @mattiarighi Could you please test?
Co-Authored-By: Mattia Righi <[email protected]>
Tasks
yamllint
to check that your YAML files do not contain mistakesIf you need help with any of the tasks above, please do not hesitate to ask by commenting in the issue or pull request.
Closes #431.