Repo - REFACTOR - Write every run and replay output into one gpec.h5 file

Abierto
#643 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Refactorización
Claridad
Bastante claro
Estado de actividad
Activo
Área
data

Línea de trabajo

Start in src/Rerun.jl at build_inputs_from_h5, which writes the _forcing.h5, _tolerances.toml, _kinetic.h5 and _wall.dat side files, then trace preloaded_coil_sets to see how in-memory data is passed to a run. The Grad-Shafranov side files come from src/Equilibrium/Axisymmetric/GradShafranovResidual.jl, and src/Analysis/Equilibrium.jl reads them back. Done when a test runs a deck and its replay, each into an empty directory, and each leaves exactly one file behind; docs/src/workflow.md should also stop listing side files.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

A deck run should write exactly one file, gpec.h5, and a replay of a gpec.h5 should write exactly one file, <stem>_rerun.h5. Two code paths still write extra files:

Replay side files. build_inputs_from_h5 (src/Rerun.jl) turns the stored snapshot back into a deck that reads its inputs from files. So, for each input the source run had, it writes a file next to the rerun output:

  • <stem>_forcing.h5 (the forcing spectrum, Input/RawInputs/ForcingTerms);
  • <stem>_tolerances.toml (Input/RawInputs/ErrorFields/tolerance_toml_raw);
  • <stem>_kinetic.h5 (Input/RawInputs/Kinetic);
  • <stem>_wall.dat (Input/RawInputs/Wall/wall_file_raw).

Grad-Shafranov residual diagnostics. With [Equilibrium] diagnose_src = true, src/Equilibrium/Axisymmetric/GradShafranovResidual.jl writes gsec.h5, gse.h5 and gsei.h5 into the directory of the equilibrium file (dirname(eq_filename)). That is the user's input directory, not the run directory. src/Analysis/Equilibrium.jl reads gse.h5 and gsei.h5 from next to the output file, so the plot works only when the two directories are the same.

Proposed approach

  • Kinetic profiles: no side file is needed. The deck already accepts kinetic_group, so the replay can point kinetic_file at the source gpec.h5 with kinetic_group = "Input/RawInputs/Kinetic".
  • Forcing, tolerances and wall: hand the snapshot data to the run in memory, as preloaded_coil_sets already does for coil geometry.
  • Grad-Shafranov residual: write it into gpec.h5, under the Equilibrium/ group, following the HDF5 conventions. Point Analysis.Equilibrium at the new datasets.

Done when

  • A test runs a deck and replays its output, and checks that each wrote exactly one file into an otherwise empty directory.
  • diagnose_src = true writes nothing outside gpec.h5, and its plot reads from gpec.h5.
  • The "Replaying a run" section of docs/src/workflow.md no longer lists side files.
Lenguaje dominante
Julia
Estrellas
11
Forks
7
Merge medio
3 d 22 h
PR fusionados (30 d)
70

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de OpenFUSIONToolkit/GPEC

Todos los issues de OpenFUSIONToolkit/GPEC

Issues similares

Más issues de Julia

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.