NEMS
A long-term energy-economy modeling system of U.S. energy markets.
https://github.com/eiagov/nems
Category: Energy Systems
Sub Category: Energy Markets
Last synced: about 8 hours ago
JSON representation
Repository metadata
- Host: GitHub
- URL: https://github.com/eiagov/nems
- Owner: EIAgov
- Created: 2024-01-19T16:01:00.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-15T18:08:02.000Z (13 days ago)
- Last Synced: 2025-04-25T00:01:59.378Z (3 days ago)
- Language: Fortran
- Homepage:
- Size: 174 MB
- Stars: 13
- Watchers: 7
- Forks: 0
- Open Issues: 0
- Releases: 2
-
Metadata Files:
- Readme: README.md
README.md
The National Energy Modeling System
What is it?
The National Energy Modeling System (NEMS) is a long-term energy-economy modeling system of U.S. energy markets. The model is used to project production, imports, exports, conversion, consumption, and prices of many energy products, subject to user-defined assumptions. The assumptions encompass macroeconomic and financial factors, world energy markets, resource availability and costs, behavioral and technological choice criteria, technology characteristics, and demographics.
NEMS produces a general equilibrium solution for energy supply and demand in the U.S. energy markets on an annual basis.
EIA's Office of Energy Analysis develops and maintains NEMS to support the Annual Energy Outlook (AEO). EIA analysts perform policy analyses requested by decisionmakers in the White House; the U.S. Congress; offices within the U.S. Department of Energy, including program offices; and other government agencies. Users outside of EIA use NEMS for a variety of purposes.
The AEO page contains results from many EIA analysis products that rely on NEMS.
The NEMS documentation page has more details about each module. The Assumptions page contains separate reports about the latest assumptions for each module. The Case Descriptions page explains the cases preconfigured in the repository.
We also publish the World Energy Projection System (WEPS), which we use for global analysis and to support the International Energy Outlook.
Main features
NEMS contains three main parts:
- A central database to store and pass inputs and outputs between the various components
- Energy modules that represent various demand, transformation, and supply projection activities
- An integration, or convergence, module that determines when the system has reached an equilibrium between supply and demand
NEMS is a modular system. The modules represent each of the fuel supply markets, conversion sectors, and end-use consumption sectors of the energy system. The modular design also allows us to use the methodology and level of detail most appropriate for each energy sector. NEMS executes each of the component modules to solve for the prices of energy delivered to end users and the quantities consumed by product, region, and sector. The delivered fuel prices encompass all activities required to produce, import, and transport fuels to end users. The information flows also include economic activity, domestic production, and international petroleum supply.
NEMS consists of the following modules:
Four supply modules:
- Renewable Fuels Module (RFM)
- Natural Gas Market Module (NGMM)
- Hydrocarbon Supply Module (HSM)
- Coal Market Module (CMM)
Four demand modules:
- Residential Demand Module (RDM)
- Commercial Demand Module (CDM)
- Industrial Demand Module (IDM)
- Transportation Demand Module (TDM)
Three conversion modules:
- Electricity Market Module (EMM)
- Liquid Fuels Market Module (LFMM)
- Hydrogen Market Module (HMM)
Five other modules:
- Macroeconomic Activity Module (MAM)
- International Energy Module (IEM)
- Emissions Policy Module (EPM)
- Integrating Module
- Carbon Capture, Allocation, Transportation, and Sequestration (CCATS) Module
NEMS calls each supply, conversion, and end-use demand module in sequence until the modeling system reaches an equilibrium between supply and demand. The AEO offers a solution for each year through 2050.
This latest version of NEMS was used in AEO2025.
Where to get it
NEMS development is a year-round process led by EIA. A snapshot of the source code corresponding to the regularly scheduled annual release of the AEO is hosted on GitHub at: https://github.com/EIAgov/NEMS.
Dependencies
NEMS is a computationally intensive 64-bit application, which runs on 64-bit Windows. Our servers that run NEMS have large amounts of RAM to accommodate multiple runs and users simultaneously, but a single copy of NEMS may execute on a single-user system with smaller amounts of RAM.
We run the integrated NEMS run in two parts simultaneously (in parallel) to speed run time, so we use two processor cores per integrated run. If a (non-integrated) run is done with modules off (for example, turning off coal, electricity, and renewables), then we need only one processor core per run. With a quad core processor, you can run two integrated parallel runs or four non-integrated runs with little speed loss if sufficient memory is available. You can run NEMS as one process, but it requires about two hours more per cycle.
One run of all components of the NEMS model, or a cycle, takes about four hours on our servers, but most cases are solved by making a series of cycles. A four-cycle NEMS run takes 20+ hours. Runs of some individual parts of NEMS, such as the energy demand models, if run separately, can take only a few minutes. All files of a completed run, input and output, take up about 30 GB of storage, but they compress to about 15 GB once the run finishes.
NEMS supporting software
- Intel® Fortran Compiler Classic and Intel® Fortran Compiler
NEMS was compiled using a free download of the 23.2.0 release for Intel Fortran Compiler Classic and Intel Fortran Compiler for Windows (2023.2.1). You can find more information on the Intel website.
- Meson Build System
NEMS Fortran functions were compiled using Meson Build. You can find more information on the Meson website.
- Fair-Isaac Corporation's (FICO) Xpress optimizer (license required)
We use the Xpress optimizer to solve the LFMM LP and the CCATS LP. To purchase an Xpress license, please refer to FICO's webpage.
-
A Fortran-to-SQLite library to use with EMM that holds regional electricity data. SQLite is not required for running NEMS with the default data provided.
-
GAMS. It is used for the LFMM. We used GAMS version 43.2 for this release. Our GAMS implementation uses the Xpress solver mentioned above. We purchased the development license (rather than the run-time license), which allows changes to the linear program matrix during execution of a NEMS run.
-
Advanced Interactive Multidimensional Modeling Software (AIMMS). AIMMS is used for the CMM; the NGMM; the HMM; and the Electricity Capacity Planning (ECP), the Electricity Fuel Dispatch (EFD), and the Renewable Electricity Storage (REStore) Submodules within the EMM. We used AIMMS version 4 (release 4.96.4) for this release licensed with the CPLEX solver.
-
(Optional) The S&P Global Macroeconomic Model as implemented with the EViews13 software package. We currently use the EViews13 standard edition. The S&P Global macro module is executed as a subprocess to NEMS if the macro feedback switch in NEMS is turned on. You can elect to run NEMS without macro feedback, in which case the run uses static macroeconomic inputs taken as is. When the macro feedback switch is on, NEMS will attempt to call the macro model by executing EViews using the S&P Global model's work files as the input to EViews. These EViews work files are not included in the EIA archive, but you can obtain them from EIA after licensing the S&P Global model. You must also get a copy of EViews to run the S&P Global model. Contact S&P Global for more information.
-
Cygwin for certain NEMS utility programs.
-
Python 3.11. You can find the required packages and versions in the requirements.txt
Installation
-
From the NEMS GitHub repository, clone or download NEMS.
-
Extract the zipped files under the output/aeo2025 directory before using NEMS
-
For more information about this repository, please refer to NEMS_Public_Release.pdf
Licenses
The NEMS code, as distributed here, is governed by specific licenses.
Getting help
You can direct questions about the NEMS model to [email protected].
Discussion and development
As part of developing each AEO, EIA schedules working group meetings to gather input from various sectors of the industry. You can find more information on the AEO Working Groups webpage.
Contributing to NEMS
Contributions to NEMS are governed by specific rules. You can direct questions about the NEMS model to [email protected].
Owner metadata
- Name: U.S. Energy Information Administration
- Login: EIAgov
- Email:
- Kind: user
- Description: The U.S. Energy Information Administration collects, analyzes, and disseminates independent and impartial energy information to promote sound policymaking.
- Website: http://www.eia.gov/
- Location: Washington, DC
- Twitter: EIAgov
- Company: U.S. Energy Information Administration
- Icon url: https://avatars.githubusercontent.com/u/10519522?u=2bd0b3f582f45904effc4610cf341ffccf922b59&v=4
- Repositories: 1
- Last ynced at: 2024-05-15T13:31:38.663Z
- Profile URL: https://github.com/EIAgov
GitHub Events
Total
- Release event: 1
- Watch event: 21
- Public event: 1
- Push event: 3
- Fork event: 8
- Create event: 1
Last Year
- Release event: 1
- Watch event: 21
- Public event: 1
- Push event: 3
- Fork event: 8
- Create event: 1
Committers metadata
Last synced: 7 days ago
Total Commits: 11
Total Committers: 4
Avg Commits per committer: 2.75
Development Distribution Score (DDS): 0.455
Commits in past year: 6
Committers in past year: 3
Avg Commits per committer in past year: 2.0
Development Distribution Score (DDS) in past year: 0.333
Name | Commits | |
---|---|---|
WhitlingerEIA | 1****A | 6 |
eia-akahan | 1****n | 3 |
U.S. Energy Information Administration | d****a@e****v | 1 |
Whitlinger | 8****3@f****v | 1 |
Committer domains:
- fedidcard.gov: 1
- eia.gov: 1
Issue and Pull Request metadata
Last synced: 1 day ago
Total issues: 0
Total pull requests: 2
Average time to close issues: N/A
Average time to close pull requests: 1 day
Total issue authors: 0
Total pull request authors: 1
Average comments per issue: 0
Average comments per pull request: 1.0
Merged pull request: 0
Bot issues: 0
Bot pull requests: 0
Past year issues: 0
Past year pull requests: 2
Past year average time to close issues: N/A
Past year average time to close pull requests: 1 day
Past year issue authors: 0
Past year pull request authors: 1
Past year average comments per issue: 0
Past year average comments per pull request: 1.0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
Top Pull Request Authors
- zaneselvans (2)
Top Issue Labels
Top Pull Request Labels
Dependencies
Score: 3.951243718581427