Scorecards: Merging changes from CERISE branch
Hi, we decided to open this issue with @nmilders and @nperez to make a summary of the issues that need to be addressed in the Scorecards code. Below is a list with details, please feel free to add/correct anything in the comments.
-
-
Compare VizScorecard.R (master) and SCPlotScorecard.R (dev-test_CERISE) [@vagudets]-> If there are any changes, merge them, test them, and add them to esviz.
-
-
-
Allow land/ocean mask [@nmilders] -> This development was done by Núria in the dev-test_CERISE branch and needs to be implemented for the new version. The function modules/Scorecards/R/load_mask.R needs to be modified to load an .nc mask (if filesystem is not 'cerise'
); and then Scorecards_calculations() needs to apply the mask to the metric arrays before performing aggregation. There should be the option to do both masked and unmasked data in the same execution; for this, Scorecards_calculations(), Scorecards_plotting() and execute_scorecards.R will have to be modified. In the dev-test_CERISE branch there is a parameter in the recipe for this purpose: https://earth.bsc.es/gitlab/es/sunset/-/blob/dev-test_CERISE/modules/Scorecards/Scorecards.R#L78
-
-
-
Allow user to specify the variables to be plotted and the units of these variables that should be displayed in the scorecards [@vagudets + @nmilders] -> This is at least partially done in the dev-Indicators branch, from the same development in dev-test_CERISE. It should be tested to see if any changes are needed: 38c6ccd9
-
-
-
Ensure Scorecards_calculations() saves metrics in the correct order [@nmilders] -> Since all the metrics are saved to the same file as an array with a metric dimension, currently there is no certainty that they are loaded in the correct order when plotting the Scorecards, as the attributes added to the array are not considered when saving the files. This should be fixed.
-
-
-
Add original variable name and other metadata to the global attributes of the .nc files for the metrics [@nmilders] -> This can be useful to avoid the need to read information from the recipe that could be inaccurate or to use the variable-dictionary.yml file to access the longname and other attributes of a variable. The global attributes can be saved with names such as var_short_name
andvar_long_name
.
-
-
-
Remove problematic characters, like the letter 'ñ', from region and variable names [@nmilders] -> This should be done once all the developments above are finished, if it is still necessary.
-
The strategy for now is:
- I create a branch with the changes I made for dev-Indicators, and the corrected version of VizScorecards.R (if it needs any changes).
- @nmilders can work on this branch for the rest of the changes.
I think that's all.
Victòria
Edit: remove duplicated item in the list