euroargodev / BlueCloud

Working space for BlueCloud demontrator 3 - Lops Task
0 stars 1 forks source link

New class plotter: best way to code #7

Closed AndreaGarciaJuan closed 4 years ago

AndreaGarciaJuan commented 4 years ago

I used two new input variables in the new class Plotter:

Do you think this is the best way to code it? How do you do in pyxpcm to determine the name of latitude and longitude coordinates in dataset?

gmaze commented 4 years ago
* data_type (in _init_ function): to know if data is gridded or individual profiles and change the type of plot

can't be this inferred by the class ?

The dataset will be either [Z, N_PROF] for a collection of profiles or any combination of X,Y,T for the others (and possibly also including ensemble dimensions). So, basically, once we remove the vertical dimension, if we're left with 1 other dim, we have a collection of profiles, and if we have something else, we have a "gridded" product.

gmaze commented 4 years ago
* co (in spatial_distribution an plot_posteriors functions): a dictionary to know the exacte name of latitude and longitude coordinate names in the dataset

this should also come as optional: the Plotter class should look for CF standard axis 'X' and 'Y' internally first. If not found, then an error is thrown to request for explicit latitude, longitude coordinate names

they are many grids possible, so we should be precise to document here which kinds are supported.

gmaze commented 4 years ago

another question is about the integration with the existing m.plot class.

Should this new helper come as a separate module, like from pyxpcm import Plotter ?

Or should it come as a parent class leading to for eg m.plot.spatial_distribution() ?

AndreaGarciaJuan commented 4 years ago

I agree with your suggestions. I created a branch dev-plotter to code the modifications. I will also use the branch to develop the application of temporal representation function to 3D gridded data (not working at the moment). And to add a bar plot by year. if you have more suggestions feel free to share them with me

AndreaGarciaJuan commented 4 years ago

List of developments to be donne in class Plotter

Priority

Non priority