Skip to content
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

Ozone#1 MERGED-UV #142

Closed
sandrocalmanti opened this issue Mar 28, 2024 · 5 comments
Closed

Ozone#1 MERGED-UV #142

sandrocalmanti opened this issue Mar 28, 2024 · 5 comments

Comments

@sandrocalmanti
Copy link

sandrocalmanti commented Mar 28, 2024

Notebook description

Dear @malmans2 ,

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

  • Import data with two different transformation functions (full maps and regional slices, after converting the time dimension)
  • Prepare a few plots (data coverage, time mean, annual cycle, and time series on regional slices).

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
Copy link
Member

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
Copy link
Member

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.

@malmans2 malmans2 added the wp5 label Mar 29, 2024
@sandrocalmanti
Copy link
Author

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
Copy link
Member

malmans2 commented Apr 4, 2024

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
Copy link
Author

Thank you @malmans2 we can close this NB.

I will continue the work on Ozone #2

@malmans2 malmans2 closed this as completed Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants