bopen / c3s-eqc-toolbox-template

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

Ozone #2 - MSR #143

Open sandrocalmanti opened 8 months ago

sandrocalmanti commented 8 months ago

Notebook description

Dear @malmans2

as promised, here's a second notebook on ozone.

I have prepared this draft by assembling pieces of other notebooks on satellite data.

The objective is to compare different versions of the same product (MSR) over regional slices by showing time series, and then select time slices from non-overlapping portions of the different versions to show the global climatology and the annual maps over the South Pole, to describe ozone depletion and recovery.

I have a few problems with this NB that I was not able to solve. I have attached three version of the notebook. It's the same code but with a different error message highlighted in each versions.

Time dimension of v0020

There is a problem with the calendar that I was not able to handle

Coordinates of v0025

There seems to be duplicated Lon Lat dimension in this version which I have tried to eliminate with this function

def rename_dims(ds):
    if "Lat" in ds.dims:
      ds = ds.drop_vars(["longitude", "latitude"])
      ds = ds.rename_dims({"Lon": "longitude", "Lat":"latitude"})
    return ds

which seems to work if applied to the raw dataset after retrieval, but it doesn't work as expected in the transform function to get the regional slices.

Projected map

I have tried to use the same plotting function to make facet plot for both the global and polar projection, by passing the projection as a parameter but:

  1. the mapping does not work as it needs to (maps are empty)
  2. the polar projection does not take the correct boundary (projects the entire globe including the north pole). I have tried to use the same scheme we have adopted for the ERA5 Storm Track Notebook here

Hope it all makes sense and you can help us with this.

Meanwhile,

buona Pasqua

Notebook link or upload

ozone-MSR.zip ozone-MSR-v0020.zip ozone-MSR-v0025.zip

Anything else we need to know?

No response

Environment

malmans2 commented 8 months ago

Hi @sandrocalmanti,

Looks like the problem is that this dataset is not harmonised (different names and conventions are used).

I think I found a better way to harmonise the data using attributes. Basically, you have to pass two additional arguments to download_and_transform (decode_times and preprocess), and you can get rid of convert_source_to_time. I'll implement the same in #142.

Here is the template: https://github.com/bopen/c3s-eqc-toolbox-template/blob/main/notebooks/wp5/ozone_msr.ipynb Here is the notebook executed: https://gist.github.com/malmans2/e6252d057da4f47ae8915a2f07b5ad68

It's meant to get you started, I didn't try to reproduce everything you had in your notebook. Note that in the plotting cells I've reduced the number of grid points by a factor of 10. It can take quite a long time to plot that many projected maps at high resolution. We can get rid of the resampling when we are done developing.

malmans2 commented 7 months ago

Hi @sandrocalmanti,

I just realized that I uploaded the wrong executed NB. It's fixed now.