Skip to content

Commit dbfa65c

Browse files
alxsmithcursoragent
andcommitted
Add NYISO supply ancillary MC generation capability
Adds the ability to generate NY supply ancillary marginal costs from NYISO ancillary-services clearing prices, without changing any published RIE/NY results and without enforcing ancillary on existing runs. - data/nyiso/ancillary/: fetch/validate/update pipeline for NYISO AS prices (mirrors data/isone/ancillary/ conventions). - supply_ancillary.py / generate_supply_ancillary_mc.py: --iso nyiso support (NYISO regulation capacity + movement). ISO-NE path is behavior-preserving. - supply_utils.py: DEFAULT_NYISO_ANCILLARY_S3_BASE. - ny/Justfile: opt-in create-supply-ancillary-mc-data[-all] recipes (not wired into create-supply-mc-data). Enable a run later by setting SUPPLY_ANCILLARY_MC. - Tests for the NYISO transform and ancillary end-use computation. Refs #396. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent ccd54c6 commit dbfa65c

10 files changed

Lines changed: 1788 additions & 88 deletions

data/nyiso/ancillary/Justfile

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# NYISO ancillary service clearing prices (day-ahead hourly + real-time 5-min AS)
2+
#
3+
# Same recipe shape as data/isone/ancillary/Justfile: fetch, validate, prepare,
4+
# upload, update, clean. Default ``markets=rt`` (5-minute real-time)—finest MIS
5+
# resolution. Override: ``markets=dam`` (hourly day-ahead) or ``markets=both``.
6+
#
7+
# Run from repo root: just -f data/nyiso/ancillary/Justfile <recipe>
8+
# Or from this dir: just <recipe>
9+
10+
path_local_repo := `git rev-parse --show-toplevel`
11+
path_local_base := justfile_directory()
12+
path_local_parquet := path_local_base + "/parquet"
13+
14+
# Mirror ISO-NE: s3://data.sb/isone/ancillary/ → s3://data.sb/nyiso/ancillary/
15+
16+
path_s3_parquet := "s3://data.sb/nyiso/ancillary/"
17+
start := "2010-01"
18+
end := ""
19+
markets := "rt"
20+
21+
fetch:
22+
uv run python "{{ path_local_base }}/fetch_nyiso_as_prices_parquet.py" \
23+
--start "{{ start }}" --end "{{ end }}" \
24+
--path-local-parquet "{{ path_local_parquet }}" \
25+
--markets "{{ markets }}"
26+
27+
validate:
28+
uv run python "{{ path_local_base }}/validate_nyiso_as_prices_parquet.py" \
29+
--path-local-parquet "{{ path_local_parquet }}"
30+
31+
prepare: fetch validate
32+
33+
# Upload: syncs whatever is under parquet/ (resolution is determined at fetch time).
34+
upload:
35+
aws s3 sync "{{ path_local_parquet }}/" "{{ path_s3_parquet }}" \
36+
--exclude "*" --include "*.parquet"
37+
@echo "Uploaded to {{ path_s3_parquet }}"
38+
39+
update:
40+
uv run python "{{ path_local_base }}/update_nyiso_as_prices_to_latest.py" \
41+
--path-local-parquet "{{ path_local_parquet }}" \
42+
--path-s3-parquet "{{ path_s3_parquet }}" \
43+
--markets "{{ markets }}"
44+
45+
clean:
46+
rm -rf "{{ path_local_parquet }}"
47+
@echo "Removed parquet/"

0 commit comments

Comments
 (0)