Skip to content

docs(units): document units at PyNEATS I/O boundaries and add units a… - #69

Merged
ramondalmau merged 1 commit into
devfrom
docs/units-audit
Oct 20, 2026
Merged

ramondalmau merged 1 commit into
devfrom
docs/units-audit

Conversation

@ramondalmau

Copy link
Copy Markdown
Collaborator

Summary

Units audit of PyNEATS against the AO upload schema, plus unit documentation in code.
No behaviour change: comments, docstrings and one new document only.

  • docs/internal/pyneats_units_audit.md: field-by-field audit of AO inputs and public
    outputs, regulatory definitions (MRR Annex IIIa), and the list of discrepancies found
    (D1–D4, O1–O16, A1–A13, I1–I8). Follow-up fixes will each update this report.
  • Units documented in docstrings/comments in 27 source files (parsing, fuel, performance,
    emissions, climate, runners, weather), including the two conversions done upstream by
    the NEATS application (tas knots→m/s, calorific_value MJ/kg→J/kg).

Why it is safe

  • Code is identical to v1.0.1: for every modified .py file the AST with docstrings
    removed equals v1.0.1 (27/27 files).
  • Full suite with BADA and weather data: 231 passed, 4 skipped, 23 xfailed.
  • ruff check, ruff format --check, mypy src/pyneats/: clean.

Review notes

Docs-only. The findings themselves are discussed issue by issue in follow-up PRs;
numbers-changing fixes will come separately, each with its own evidence.

…udit

Documentation-only patch: comments and docstrings, no code changes
(verified by an AST comparison of every touched file against HEAD).

- State the unit and convention of every AO upload field at the JSON
  boundary (neats_io), the Flight4D view, NEATSFuel, the default
  constants, the BADA performance model, the climate functions and
  the GWP outputs.
- Document the two interface differences handled upstream by the
  NEATS application: tas knots -> m/s and calorific_value MJ/kg ->
  J/kg. PyNEATS expects m/s and J/kg.
- Cite MRR Annex IIIa (Reg. (EU) 2018/2066 as amended by 2024/2493)
  for ff (whole aircraft), ee (overall propulsion efficiency),
  load_factor (payload / maximum payload), H/C (atomic) and take-off
  mass.
- Correct comments that contradicted the code: FL15 vs FL20, the 1.1
  vs 1.2 guardrail, the mass-derived fuel-flow difference, the no-op
  parser timezone, the "automatic unit conversions" claim, the BADA3
  MPL note, the REFERENCE_Q_FUEL origin, the 500 vs 550 hPa default,
  the performance-runner timestamp example and to_dict rounding.
- Add docs/internal/pyneats_units_audit.md: audit tables for every
  AO input field and public output, the regulatory definitions, new
  discrepancies (e.g. PV in SI where the local aCCF H2O regression
  expects PVU; Method D contrails_ef_J holding an AGWP; OpenAirClim
  nox = "NO" for NO2-equivalent input; t_0 pinned to 2025) and open
  questions. No discrepancy is fixed here.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@ramondalmau
ramondalmau merged commit 5228049 into dev Oct 20, 2026
6 checks passed
@ramondalmau
ramondalmau deleted the docs/units-audit branch October 20, 2026 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant