Open-MSS / MSS

A QT application, a OGC web map server, a collaboration server to plan atmospheric research flights.
https://open-mss.github.io
Apache License 2.0
57 stars 72 forks source link

get specified plot informations from data file #1506

Open jgrooss opened 2 years ago

jgrooss commented 2 years ago

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.

ReimarBauer commented 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.

jgrooss commented 2 years ago

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.

ReimarBauer commented 2 years ago

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.

joernu76 commented 2 years ago

Isn't that similar to the handling of the mslib/mswms/utils:Targets.RANGES variable? This defines standard_name specific ranges.

jgrooss commented 2 years ago

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.

ReimarBauer commented 1 year ago

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?