A concise, five‑node PyPSA model of the Australian National Electricity Market (NEM), designed for learners and stakeholders exploring energy transition scenarios.
The High‑Level NEM model provides a baseline representation of the NEM’s five regions (one bus per region) at 30-minute resolution, using actual 2024 generation and demand data. It enables:
- Analysis of current dispatch and grid topology
- Exploration of high‑renewable scenarios with storage
- Visualisation of network topology, generation mix, dispatch and curtailment
- Streamlit web app for interactive scenario analysis
Intended Audience:
- Students and professionals learning power system modelling
- Energy analysts and policy researchers interested in the Australian grid
- Anyone curious about the electricity transition and renewable integration
- 5‑bus network representing NSW, QLD, SA, TAS, VIC
- 30-min time series for loads and generator availability
- Baseline vs. Future Scenarios: easily swap in higher VRE/storage capacities
- Optimisation via linear programming (HiGHS/Gurobi)
- Interactive & static plots of dispatch, imports/exports, and curtailment
- Exportable to NetCDF for external tools
.
├───data
│ ├───inputs # Assumption tables
│ └───nemweb # NEMWeb extracts
│ ├───clean
│ └───raw
│
├───docs # Built site & assets for html report
│ ├───High-level_NEM_files
│ │ ├───figure-html
│ │ └───libs
│ │ ├───bootstrap
│ │ ├───clipboard
│ │ └───quarto-html
│ └───images
├───gifs
├───results # Output results from generate_scenarios()
│ └───scenarios # Scenario netCDF + summaries
│ └───hydro_marginal_price_8.58 # Scenario with non-zero hydro
└───scripts # Data prep & rendering helper
- Python 3.10+
- PyPSA
- pypsa, pandas, numpy, matplotlib, cartopy, datetime, great_tables
- (Optional) Gurobi solver (requires license)
-
Input Data
- Components:
generators.csv,buses.csv,loads.csv,lines.csv,links.csv,storage_units.csv - Time series:
loads_t.p_set.csv,generators_t.p_max_pu.csv
- Components:
-
Run the Quarto document
Open High-level_NEM.qmd in Quarto and run cells, or render to HTML by running
quarto_to_html_render.py, or: -
Walk through sections
- Data Import & Preprocessing
- Network Construction (buses, loads, generators, storage, lines/links)
- Optimisation (Solve the network)
- Visualisation (senario analysis) (
plot_dispatchexamples for static & interactive plots (plotly) and the great_tables package for variable renewable curtailment analysis)
- Adjust capacities: edit
generators.csvor use the scenario function to scale VRE/storage. - Temporal window: call
plot_dispatch(n, time="YYYY-MM-DD", days=N, regions=[…]). - Solver choice: switch between HiGHS (default) and Gurobi in the optimisation cell.
Key References:
- TU Berlin: Data Science for Energy System Modelling
- PyPSA Documentation and Components
- PyPSA Earth Documentation
- GitHub PyPSA Sources
- PyPSA-PH: High-Resolution Open Source Power System Model for the Philippines
- 2024 Integrated System Plan (ISP)
- Open Electricity
- Streamlit web app repo
A High-level Open Source Model for the Australian National Electricity Market (NEM)
Note: I'm rendering a single html file (with asssociated assets), which I'm renaming and moving to the docs/ directory via the qaurto_to_html_render.py script. I'm not creating a full website and my project type is not Website Project. Quarto website and web app are best viewed on a larger screen (not mobile phone).
Using quarto render High-level_NEM.qmd --to html will render the Quarto document to HTML in the root directory - however I need it to be in the docs/ directory so that it can be served by GitHub Pages.
