NCAR/music-box

JavaScript solve() output is missing ENV columns

Aberta

#451 aberto em 15 de abr. de 2026

 (0 comentário) (0 reação) (0 responsável)Jupyter Notebook (17 forks)auto 404
good first issue

Métricas do repositório

Stars
 (37 estrelas)
Métricas de merge de PR
 (Métricas PR pendentes)

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

Guia do colaborador