CST_PeriodStandardization (and others?): Rename variable longname, but leave the varName as-is
Hi @tkariyat,
In the function CST_PeriodStandardization(), the name of the variable is modified to append the word "standardized". This should ideally be done to the longname attribute in the metadata which is supposed to give a multi-word description of the variable, as the varName should be a single word with no spaces.
In other words, here (https://earth.bsc.es/gitlab/es/csindicators/-/blob/master/R/PeriodStandardization.R#L128) and in line 136, the varName should not be modified, and instead, data$attrs$Variable$metadata[[data$attrs$Variable$varName]]$longname
should be modified, if it is not NULL.
Ideally, the function should also consider the case where there are multiple variables.
I can provide data to test, or maybe you can use the CSTools sample datasets (see lonlat_pr
and lonlat_temp
in the CSTools documentation)
Let me know if you have any question,
Victòria