Open ccarouge opened 4 months ago
@bouweandela , can you help with this?
If it helps, I'm happy to put a pull request in but I'd appreciate someone confirming my read of the code.
@bouweandela , can you help with this?
I was not involved in the development of this diagnostic. We could try asking the author of the code. @tobstac Are you still active on GitHub? Would you be able to comment on this?
Describe the bug Looking into
ESMValTool/esmvaltool/diag_scripts/runoff_et/catchment_analysis.py
, I think I found a typo that results in the wrong data being plotted but no error being shown.I think it is plotting the reference data (
diag['ref']
) where it should plot the relative data (diag['rel']
). So just a typo on one line. It's the first time I look in this recipe so I could be wrong in my interpretation but considering the comments and labelling on the plots, it does not seem right. I don't know how to check what the intention of the authors was.Detail When plotting the absolute and relative difference bar plots, the code is:
https://github.com/ESMValGroup/ESMValTool/blob/1703b5ddef660ddc582a3fb770e9d9173e0e8c20/esmvaltool/diag_scripts/runoff_et/catchment_analysis.py#L325-L326
This line refers to
diag['ref']
for the relative difference but in the code that prepares the diagnostics we see:https://github.com/ESMValGroup/ESMValTool/blob/1703b5ddef660ddc582a3fb770e9d9173e0e8c20/esmvaltool/diag_scripts/runoff_et/catchment_analysis.py#L252-L253
This shows that
diag['ref']
is the reference data anddiag['rel']
is the relative difference.Fixing the typo is enough, but maybe also using
relative
instead ofrel
would avoid similar issues in the future.Please attach