Add cloud coverage example with description and plot - #165
Conversation
eparkle
commented
Apr 14, 2026
- Added maritime sulfur restriction cloud coverage impact example to examples.md
- Added plot output png to assets (used in examples.md with cloud coverage example)
alxmrs
left a comment
There was a problem hiding this comment.
Thank you so much for submitting your example to the project!
| # Slice North America + North Atlantic for both years | ||
| # 2019 = pre-policy baseline; 2025 = post-IMO 2020 sulfur restriction | ||
| ds_2019 = ds.sel(latitude=slice(75, 10), longitude=slice(-170, -50), valid_time=slice('2019-01-01', '2019-12-31')) | ||
| ds_2025 = ds.sel(latitude=slice(75, 10), longitude=slice(-170, -50), valid_time=slice('2025-01-01', '2025-12-31')) |
There was a problem hiding this comment.
This example is excellent! One easy means of improvement is that we could probably move this logic into the SQL statement as a WHERE clause.
| import xarray_sql as xql | ||
| import matplotlib.pyplot as plt | ||
|
|
||
| ds = xr.open_dataset("era5_dataset.nc", chunks='auto') |
There was a problem hiding this comment.
Where does this netcdf file come from? I bet we could replace this local file with ARCO-ERA5 (a Zarr dataset) and it would still work.
https://github.com/google-research/arco-era5
| [[package]] | ||
| name = "xarray_sql" | ||
| version = "0.2.1" | ||
| version = "0.2.2" |
There was a problem hiding this comment.
Let's not change this version until we do a release -- unless, is this the same version as main?
|
Hey @eparkle, would you like to update these examples based on my feedback? I do really like this idea and it would be welcome in the project. |