ukaea / ukaea/PROCESS

Restore fixed point output in OUT.DAT

Open
#4,425 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
71
Forks
27
Avg merge
2d 18h
Merged PRs (30d)
33

Description

A while ago we were very concerned to read in the exact output from a PROCESS run so it could be used as the input for another run. As a consequence all the output was lengthened to 17 decimal places. The fixed point option was also removed for reasons I can no longer remember.

This format is fine for the MFILE but since the OUT.DAT is supposed to be human-readable, a more friendly format could be used for it. The power ouputs below are an example - the range of interest can always fit into the format 9999.999 MW. It is, of course possible that something might go badly wrong, giving an output outside this range - but the full data will always be available in the MFILE.

******************** Plasma power balance across separatrix ********************
 
Net power transported by electrons (MW)                                   (p_electron_transport_loss_mw)  1.58096940029733332e+02 OP 
Net power transported by ions (MW)                                        (p_ion_transport_loss_mw)       1.44019518447840625e+02 OP 
Power lost by beam ions and unthermalised alphas (MW)                     (p_loss_mw)                     1.62180954385507121e+01 OP 
Net loss by synchrotron radiation (MW)                                    (p_plasma_sync_mw)              1.56553279025850056e+01 OP 
Power lost by line radiation and bremsstrahlung (MW)                      (p_impurity_mw)                 2.15015886843129067e+02 OP 
Total (MW)                                                                (p_plasma_out)                  5.49005768661838715e+02 OP 
 

Proposed solution

Add the option to output fixed point numbers in the OUT.DAT (only), using the format 99999.9999 (including trailing zeros but without leading zeros).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the code path that formats PROCESS results for OUT.DAT, then compare it with the MFILE output handling. Add fixed-point formatting only for OUT.DAT using 99999.9999 with trailing zeros and no leading zeros, while retaining full-precision MFILE output; verify the shown power-balance values and out-of-range behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.