bopen / c3s-eqc-toolbox-template

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

Ocean color timeseries #90

Closed chiaravol closed 1 year ago

chiaravol commented 1 year ago

Notebook description

Hi Mattia,

I need to modify the template you've shared (https://github.com/bopen/c3s-eqc-toolbox-template/blob/main/notebooks/wp5/ocean_color.ipynb) to download 5 different variables at different latitude slices.

But, as already happened before, the kernel stops working as I modify the request, likely because of their size.

I kept using your template by changing each variable name at a time (and latitude ranges), but I was wondering if it's possibile to create a template to download all 5 variables at once.

Could you please help?

Notebook link or upload

No response

Anything else we need to know?

No response

Environment

malmans2 commented 1 year ago

Which variables do you need to download?

malmans2 commented 1 year ago

I only see 2 variable options in the CDS form: https://cds.climate.copernicus.eu/cdsapp#!/dataset/satellite-ocean-colour?tab=form

chiaravol commented 1 year ago

Please, disregard the download issue about the 5 variables. Still, I need different latitude slices. New slices to download are: lats0 = [90] + [50] + list(range(50, -1, -50)) lats1 = [-90] + [-50] + list(range(0, -51, -50))

Thank you

malmans2 commented 1 year ago

All you need is to re-run the whole notebook using that slices?

chiaravol commented 1 year ago

Yes

malmans2 commented 1 year ago

OK. I'll let you know when it's ready.

malmans2 commented 1 year ago

Just a clarification, nothing is being downloaded as the raw data is already cached. We are only computing new diagnostics, as you need different slices.

Just changing lat0/lat1 did not cause any issue for me, not sure what went wrong for you (you'd have to share the code as well to debug it).

It will take some time tho to compute the new diagnostics, hopefully everything will be cached by tomorrow morning.

chiaravol commented 1 year ago

This is the code I'm running. I cannot share the error message as I'm running it again. I'll let you know if any error will arise. ocean_color-Copy2.ipynb.zip

chiaravol commented 1 year ago

It took forever, but it worked out.

malmans2 commented 1 year ago

It took forever

The running time should be a linear function of the number of months processed, which is in line with the code design. The dataset you are processing is quite big and the VM has limited resources. It takes some time, but it's stable and it's a one-time computation because of the cache.

but it worked out.

Great. (We've been running the same code simultaneously. As I mentioned yesterday, I was running the notebook overnight to cache the new diagnostics requested yesterday).

Here is the latest template, where lat0/lat1 are now in the parameters section: https://github.com/bopen/c3s-eqc-toolbox-template/blob/main/notebooks/wp5/ocean_color.ipynb

malmans2 commented 1 year ago

@chiaravol,

You need me to generalise this notebook to include reflectance variables, right? Masking should only be applied to chl data, correct? Anything else?

malmans2 commented 1 year ago

Looks like you need different regions for Rrs: https://github.com/bopen/c3s-eqc-toolbox-template/issues/92#issuecomment-1671605866

chiaravol commented 1 year ago

We can use the same regions as in the ocean color map template. But, again, I might need to run it over different regions.

malmans2 commented 1 year ago

In this case the region does affect the cache and it's not for plotting purposes only (we are caching spatial averages). So you'll have to ask us to populate the cache if you'll need different regions.

chiaravol commented 1 year ago

ok,I will :)

chiaravol commented 1 year ago

Hi Mattia, Could you also add and cache the region lat (50, -50) and long(180, -180).

Thank you in advance!

malmans2 commented 1 year ago

On it!

malmans2 commented 1 year ago

Done. chlor_a, Rrs_443, Rrs_560 are cached. Here is the latest template: https://github.com/bopen/c3s-eqc-toolbox-template/blob/main/notebooks/wp5/ocean_color_timeseries.ipynb

chiaravol commented 1 year ago

Where can I download it?

malmans2 commented 1 year ago

What do you mean? I added the link to the notebook in my last comment: https://github.com/bopen/c3s-eqc-toolbox-template/blob/main/notebooks/wp5/ocean_color_timeseries.ipynb

chiaravol commented 1 year ago

Following the link, I cannot run that notebook

malmans2 commented 1 year ago

I'm not sure I understand. As always, that's the link to the template stored on GitHub. And as usual, you need to download it to the VM to run it.

chiaravol commented 1 year ago

Oh..sorry...my bad. Just another thing...I guess we have forgotten to not account for chl>100 and chl<0.001 in the maps template. I've added a line for that, but you want maybe verify and modify the public template