NCAR/music-box

JavaScript solve() output is missing ENV columns

Open

#451 opened on Apr 15, 2026

View on GitHub
 (0 comments) (0 reactions) (0 assignees)Jupyter Notebook (17 forks)auto 404
good first issue

Repository metrics

Stars
 (37 stars)
PR merge metrics
 (PR metrics pending)

Description

The JavaScript MusicBox.solve() returns only time.s and CONC.* columns. The Python implementation also outputs ENV.temperature.K, ENV.pressure.Pa, and ENV.air number density.mol m-3 by reading them back from the solver state after each step. Any downstream code written against the Python output schema will break when switching to the JavaScript implementation.

Acceptance Criteria

  • JavaScript solve() output includes ENV.temperature.K, ENV.pressure.Pa, and ENV.air number density.mol m-3 columns
  • Column order matches the Python output: time, ENV columns, then CONC columns
  • Parity test confirms the two implementations produce the same column set

Ideas

  • Call state.getConditions() inside appendOutput() alongside the existing state.getConcentrations() call and push the T, P, and air density values into the columns object
  • Check whether getConditions() exists and returns the expected keys in musica 0.15.0 before wiring it up
  • Update the parity test (tests/parity_test.py) to assert column-level equality, not just value-level equality

Contributor guide