Open jgrooss opened 2 years ago
In the ICG data structure we have plot_min and plot_max defined for this specific plot information. This didn't look like much different.
The name of the attribute is not so important. My thought behind that is to have a more suggestive attribute name that tells what it's for. One could also switch logarithmic and linear colorbar by something like logical mss_cbar_log or mss_cbar_lin. one may also choose different color map types, maybe mss_cmap_type. I don't insist on these names. If they are somewhat systematically defined, this would add a lot of flexibility for the plots of the individual species/components.
It may be easier to add an additional description meta file which can be used to configure the wanted behaviour.
If we do this in the datafile itselfs we need to decide what we want also when one file has logarithmic and the next one linear colorbar defined or they have opposite other borders set. We cannot rely on that noone mixes attributes up.
Isn't that similar to the handling of the mslib/mswms/utils:Targets.RANGES variable? This defines standard_name specific ranges.
yes and no. In my case I was asked to have identical colobar ranges for 4 parameters regardless of their individual parameter range. This can easily be provided during production of the data set and would be more complicated to incorporate afterwards in a program like ranges.py that modifies the RANGES variable. This brought me up to the idea to have parameter attributes in the data file, which -if present- define the colobar range, type and style.
If we add a dependency to an optional attribute to have this as precedence we additional would need an option to ignore it. Therefore I would prefer a solution without a need for an additional attribute in a datafile. How have you solved it?
There is often a request or the wish to set specific things to the plots like the number range of the colorbar style. To do this request, one could of course always enlarge the number of plot styles, but I suggest a different way for doing that.
One could define color bar ranges (or other parameters like cmap style) for the generic plot class in the data file as variable attribute. for example as an array (dimension number of layers) mss_cbar_range_min and mss_cbar_range_max, that contains the minimum and maximum value for each layer level
One would need some meaningful naming convention for these attributes and then they are searched for and if found would replace the default setting.