-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Populating json colorbar file with environmental variables #949
Comments
@jwarner8 @jfrost-mo For variables on i.e. pressure levels we also want to define pressure level dependent min and max values for colorbars. For this we could use the templated $PLEVEL variable set in the rose-suite.conf file and have a structure in the colorbar.json file along these lines: We then need to modify _colorbar_definiton.py to link the $PLEVEL from the rose-suite.conf GUI or cylc/yaml file with the predefined pressure level min max in the colorfile. This is the bit I um unclear about still how to achieve that. For model levels we would want a bit more intelligent interpolation I assume? _plot_and_save_spatial_plot for instances populates using the variable name. Can we use the pressure level information if existent from this call to select the colour min max based on the variable information. Specify the color bar
|
I created a separate issue for this in #1139. |
Thanks, I did not see #1139. Agree with the concern around a huge json file. To make this more intelligent we would need to be able to set the vmin and vmax level dependent based on all runs that we load. I assume this would require cylc broadcasting and is probably over the top. But I do not see a better way at the moment... |
I agree, the only thing I could think of was to know all the model datas min/max for all case studies for that variable/plev, but that requires processing all the data before plotting which would be a very different design. I guess most people will plot spatial plots on some standard pressure levels 850, 500, 200, so we could just cater for these in the json. |
OFFICIAL
The current colourbar method has been good to get us started, but I don’t think it is a long term solution. The way we are doing colour bars currently requires too much manual configuration and doesn’t have any sensible defaults for unknown variables.
We should definitely have a think about how to do it better, though we always have the constraint of not being able to look at the data before deciding. (Or could we somehow…?)
OFFICIAL
|
I wonder if there is a solution where the workflow reads the data needed for all case studies, filters, does appropriate processing and saves output as per recipes, and does all plotting tasks at the end. This would give us two advantages; ability to determine suitable colorbar ranges for plots at the end, and also reducing duplication of processing when doing case study aggregation. Implementation however, not so clear... |
With the way CSET is currently designed any synchronisation between tasks would be very expensive, as it would have to go via the filesystem. If we were to change CSET to instead run on a single node (or at least a node per variable) then we would able to much more efficiently communicate between the jobs, and something like you suggest would become possible. |
Currently, json entries are fixed for specific variables (where cmap is defined, along with min/max value for colorbar). Some diagnostics much need adaptive colorbar ranges, such as the age of air diagnostic. This colorbar will extend from 0 to the length of the forecast, defined as $CSET_ANALYSIS_PERIOD. Is there a way we can use $CSET_ANALYSIS_PERIOD in the json and when reading this in the plot operator, it fills this with the appropriate environment value?
also addressed here: #1139
The text was updated successfully, but these errors were encountered: