bopen / c3s-eqc-toolbox-template

CADS Toolbox template application
Apache License 2.0
6 stars 4 forks source link

Ozone#1 MERGED-UV #142

Closed sandrocalmanti closed 8 months ago

sandrocalmanti commented 8 months ago

Notebook description

Dear @malmans2 ,

this is the first of two upcoming notebooks on Ozone. IT should be a rather simple one.

It has been prepared by a collegue and I have tried clean it up a bit before your revision.

It's WP5

Best!

S.

Notebook link or upload

ozone-MERGED-UV.zip

Anything else we need to know?

No response

Environment

malmans2 commented 8 months ago

Hi @sandrocalmanti,

I think there's a bug with the data coverage figure:

  1. The lat/lon sums have quite different values, and the cbar levels are not specified in your code. That means that the default colorbars are quite different for each subplot. However, the same colorbar is added to the figure.
  2. Are the units correct? I only see a sum performed, but the the label says %

This is what I'm getting if I hardcode the same colorbar in your figures (don't worry about messy labels for now):

fig, axs = plt.subplots(2, 1)
levels = range(0, 10_501, 1_500)
for ax, dim in zip(axs.flatten(), ("longitude", "latitude")):
    da = ds_map[varname].sum(dim, keep_attrs=True)
    da.plot.contourf(x="time", ax=ax, levels=levels, extend="max")

image

Questions for you:

  1. Do you want to use the same colorbar for both subplots or on for each subplots? If the latter, we can just use the defaults, otherwise we can easily infer the min/max of both subplots.
  2. Do you want to perform some rescaling (e.g., convert to percentage)?
malmans2 commented 8 months ago

Hi @sandrocalmanti,

Besides for the issue in my previous comment, the notebook was already in great shape. I made some minor change (e.g., units, labels, ...).

Side node: Make sure you use the same chunking when you run download_and_transform on the same data but with different transform functions. Otherwise we download the data twice.

sandrocalmanti commented 8 months ago

Hi @malmans2

very good point with your first comment. It was not clear to me how to handle the colorbar so I didn't notice the problem and the figures just looked wierd to me.

We need to rescale with the number of grid points, so we get the average number of observations per grid point over each latitude (or longitude). With this rescaling it becomes evident that the two figures contain essentially the same information.

So we can use only the first hoevmoller (time, latitude) which shows the seasonal coverage over the polar regions.

Something like the attached NB

ozone_merged_uv.zip

malmans2 commented 8 months ago

Hi @sandrocalmanti,

I made some minor change. It should be in good shape now, but I'll wait for your OK to close this issue.

sandrocalmanti commented 8 months ago

Thank you @malmans2 we can close this NB.

I will continue the work on Ozone #2