levelized_cost parameter is empty
- Dominant language
- Jupyter Notebook
- Stars
- 150
- Forks
- 178
- Avg merge
- 17h 32m
- Merged PRs (30d)
- 2
Description
### What happened?
I found that when we run
`scenario.par("levelized_cost")`
we get an empty data frame.
It is the same if we try to use the reporter:
`lc = rep.get("levelized_cost")`
>> AttrSeries([], Name: levelized_cost, dtype: float64), units: dimensionless
This problem happens across platforms (windows11, macos) and both with the pip install -e . and conda installations.
Currently, I am testing on windows 11, with message_ix 3.11 installed through conda-forge, while IXMP is 3.11.1 also installed through conda-forge.
The odd part is that, if I check the gdx output file in GAMS Studio, the levelized_cost parameter is actually populated with all the correct entries.
### Code Sample
```python
import message_ix
from message_ix import Scenario
import ixmp
mp = ixmp.Platform()
scen = Scenario(mp, "model", "scenario")
lc = scen.par("levelized_cost") # returns empty df
from message_ix.report import Reporter
rep = Reporter.from_scenario(scen)
lc_rep = rep.get("levelized_cost") # returns attrseries[]
```
### What did you expect to happen?
## Expected behavior
I would expect to the data in the first place appearing, possibly in a DF-like format, as the rest of the data retrieved through either `scenario.par()` or `rep.get.()`.
### Versions
```shell
ixmp: 3.11.1
message_ix: 0.0.0
message_ix_models: (not installed)
message_data: (not installed)
click: 8.2.1
dask: 2025.5.1
genno: 1.28.2
graphviz: (not installed)
ixmp4: (not installed)
jpype: 1.6.0
Java VM path: C:\Users\casamassima\.conda\envs\message_devs\Library\lib\jvm\bin\server\jvm.dll
openpyxl: 3.1.5
pandas: 2.3.1
pint: 0.25
xarray: 2025.8.0
yaml: 6.0.2
iam_units: 2023.9.12
jupyter: 5.8.1
matplotlib: 3.10.1
plotnine: 0.15.0
pyam: 1.6.0
GAMS: 50.4.0
system dir: C:\GAMS\50
python: 3.13.5 | packaged by Anaconda, Inc. | (main, Jun 12 2025, 16:37:03) [MSC v.1929 64 bit (AMD64)]
python-bits: 64
OS: Windows
OS-release: 2022Server
machine: AMD64
processor: Intel64 Family 6 Model 85 Stepping 6, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: ('English_United States', '1252')
```
### Additional Context
_No response_
Contributor guide
Research direction
Start by reproducing the empty result through Scenario.par("levelized_cost") and Reporter.from_scenario(scen).get("levelized_cost"), then trace the parameter retrieval path and compare it with the populated GDX output described in the issue. Done means both entry points return the expected levelized_cost records in a DataFrame-like result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100