Hands-on workshop using Cursor to explore US weather patterns. Work is organized into modules; Modules 1–2 are ready now, with later modules to follow.
| Module | Focus | Status |
|---|---|---|
| 1 | Map wind across the CONUS from a provided weather station dataset | Ready |
| 2 | Investigate a severe weather event and trace it via station-metadata MCP | Ready |
| 3 | (coming later) | Planned |
Complete this setup before starting Module 1.
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtCartopy may need system libraries (GEOS/PROJ) on some platforms. On macOS with Homebrew:
brew install geos projThe first wind-map run downloads Natural Earth basemap shapefiles into Cartopy's data directory (requires network).
Plot meteorological wind barbs across the contiguous United States using the provided dataset in data/ (~500 real CONUS stations with a week of hourly readings). See data/README.md for schema and units.
The dataset spans one week of hourly readings (2025-06-09 through 2025-06-15). Each run plots a single timestamp. For example, Wednesday noon UTC:
python scripts/plot_wind_map.py --timestamp 2025-06-11T12:00:00ZWrites output/wind_map.png.
On the evening of Friday, 13 June 2025, a strong storm cell moved through central Oklahoma. Start by mapping winds around that time — for example:
python scripts/plot_wind_map.py --timestamp 2025-06-13T22:00:00ZStudy the map, then use Cursor to inspect the underlying hourly readings.
Important: Read these instructions yourself in the editor. During Ask/Agent investigation, attach only the data files you want analyzed (e.g. the CSV below). Do not @README.md — it will leak the exercise framing into the model’s context.
1. Ask mode + @File the dataset
Switch the chat to Ask mode, attach only @data/weather_hourly.csv, and run an open-ended quality check — for example:
@data/weather_hourly.csvDo a quality check of this weather dataset. Flag any physically impossible or suspicious values.
Try a few follow-ups if the first pass is too broad (e.g. focus on wind, or on a specific evening window).
2. Narrow the location
If you find a suspicious station_id, you can @data/stations.csv (or @data/README.md for units) for coordinates and naming. For hardware/software details, use the station-metadata MCP in the next section — do not dig through metadata JSON files by hand.
3. Ask Cursor to quantify
Have Cursor summarize ranges, count impossible values, or walk the hours around the storm for the affected station — whatever helps you explain why the map looked wrong.
Each station has hardware/software metadata (platform, sensors, firmware language and typed fields). That catalog is not meant to be browsed as raw files during the exercise — query it through a local MCP server so the agent can pull details on demand.
Switch back to Agent mode for this step (Ask mode cannot call MCP tools).
- This repo ships a project MCP config at
.cursor/mcp.jsonthat launches:
.venv/bin/python scripts/station_metadata_mcp.py
-
In Cursor: Settings → MCP. Confirm station-metadata appears and shows a green/connected status. If needed, click refresh/restart after creating the venv.
-
In an Agent chat, verify tools such as
get_station,get_firmware,list_stations,search_stations, andlist_firmwareare available.
After you have a suspicious station_id from the hourly CSV (still in Agent mode):
- Ask the agent to look up that station via the station-metadata MCP (not by opening JSON files in the editor).
- Follow the station’s
firmware_idwithget_firmware. - Inspect how that firmware stores wind speed (language, integer width, signedness, range) and connect it to the impossible reading you found.
Example prompts (attach the CSV only if needed; prefer MCP for metadata):
Using the station-metadata MCP, call
get_stationfor the station_id with the impossible wind value. What hardware and software is it running?
Using the station-metadata MCP, call
get_firmwarefor that station’s firmware_id. How is wind speed stored, and could that explain a reading of -127?
Once you understand the bad reading, harden scripts/plot_wind_map.py so one corrupted station cannot distort the CONUS plot.
1. Plan the fix
Switch to Plan mode and ask Cursor to propose an approach — for example:
@scripts/plot_wind_map.pyWe found a physically impossible negative wind speed caused by legacy signed int8 overflow at one station. Plan a fix in this plotting script so invalid wind values are handled safely (without silently inventing weather). Keep valid stations plotting as before.
Review the plan before coding (what counts as invalid, whether to drop vs. flag, logging/messaging, etc.).
2. Implement the fix
Switch to Agent mode and have Cursor implement the agreed plan in scripts/plot_wind_map.py.
3. Re-run the map
Regenerate the storm-time map and confirm it no longer blows up on the bad value:
python scripts/plot_wind_map.py --timestamp 2025-06-13T22:00:00ZCompare output/wind_map.png to your earlier plot. The Oklahoma storm cell should still appear; the impossible barb should not dominate the map.