Nano Banana Pro
Agent skill for nano-banana-pro
This is a climate data processing project that downloads ERA5 reanalysis data from Copernicus Climate Data Store (CDS) and creates climatological averages. The main workflow downloads historical hourly 10m wind data for the North Atlantic region (1940-1945) and builds a "typical year" by averaging e
Sign in to like and favorite skills
This is a climate data processing project that downloads ERA5 reanalysis data from Copernicus Climate Data Store (CDS) and creates climatological averages. The main workflow downloads historical hourly 10m wind data for the North Atlantic region (1940-1945) and builds a "typical year" by averaging each hour across all available years.
down-climate.py: Single-file pipeline that handles data download → processing → format conversionera5_data/: Storage for downloaded yearly NetCDF files (era5_hourly_{year}_natl.nc)era5_typical_year_10m_wind_natlantic.nc (intermediate NetCDF)era5_typical_year_10m_wind_natlantic.grb2 (final GRIB2 for OpenCPN)# Installation varies by system sudo apt-get install cdo # Ubuntu/Debian brew install cdo # macOS
Core scientific stack with climate-specific libraries:
cdsapi: Copernicus Climate Data Store API clientxarray: Multi-dimensional labeled data processingnumpy, pandas: Standard scientific computingnetCDF4 (implicit dependency for xarray NetCDF support)CDS API requires credentials in
~/.cdsapirc:
url: https://cds.climate.copernicus.eu/api/v2 key: {uid}:{api-key}
All data requests use North Atlantic bounding box
[70, -100, 0, 20] (N,W,S,E format).
This is hardcoded for marine weather routing applications.
dayofyear < 366) for consistent 365-day climatology2001-01-01 as base for typical year (non-leap reference)groupby([dayofyear, hour]) for climatological averagingera5_hourly_{year}_natl.nc (year-specific downloads)era5_typical_year_10m_wind_natlantic.{nc,grb2} (climatological products)The script checks for existing files before downloading (
os.path.exists(outfile)) to support resumable operations.
python3 down-climate.py
No command-line arguments - all configuration is embedded in the script.
Adjust the
years list in down-climate.py. Current range: 1940-1945 (limited for development).
Modify the
area variable: [North, West, South, East] in decimal degrees.
Extend the
variables list with ERA5 parameter names (e.g., 'mean_sea_level_pressure').
Uses
open_mfdataset() with combine='by_coords' for automatic file concatenation.
Assumes consistent coordinate systems across yearly files.
down-climate.pyCreate a virtual environment:
python3 -m venv env source env/bin/activate
Install Python dependencies:
pip install cdsapi xarray numpy pandas netCDF4
Install CDO as per your OS instructions above.
Configure CDS API credentials in
~/.cdsapirc.
Run the pipeline:
python3 down-climate.py
ncdump (NetCDF) and w grib (GRIB2).down-climate.py if extending functionality.