Skip to content

Fix variable names cut off in MFile#3531

Merged
timothy-nunn merged 2 commits intomainfrom
output-length
Feb 19, 2025
Merged

Fix variable names cut off in MFile#3531
timothy-nunn merged 2 commits intomainfrom
output-length

Conversation

@timothy-nunn
Copy link
Copy Markdown
Collaborator

@timothy-nunn timothy-nunn commented Feb 7, 2025

Closes #3427

Makes the entire output interface in Python which often just calls the underlying Fortran function.

There is a Python implementation of the ovarre, ocosts, and ovarrf functions, with the latter two using the former. This will cause a slight change in the OUT.DAT which won't have 1.234F5 style variables, instead 1.234e5.

The Fortran implementations of ocosts and ovarrf are removed. ovarre's Fortran implementation can be removed in the scan conversion #3526.

new_large_tokamak_nof.MFILE.DAT.txt
new_large_tokamak_nof.OUT.DAT.txt
old_large_tokamak_nof.MFILE.DAT.txt
old_large_tokamak_nof.OUT.DAT.txt

new_large_tokamak_once_through.MFILE.DAT.txt
new_large_tokamak_once_through.OUT.DAT.txt
old_large_tokamak_once_through.MFILE.DAT.txt
old_large_tokamak_once_through.OUT.DAT.txt

By eye, some of these have more decimal places but @jonmaddock please double check this still respects your 17 sig fig changes.

This also changes the cost output from

(c211)              Site improvements, facilities, land (M$)                                                     35.20

to

Site improvements, facilities, land (M$)                                (c211)                        3.52000000000000028e+01

I also corrected some namespaced outputs that I found along the way e.g. physics_variables.rmajor. to rmajor.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 7, 2025

Codecov Report

Attention: Patch coverage is 94.68085% with 5 lines in your changes missing coverage. Please review.

Project coverage is 31.40%. Comparing base (b61a1c5) to head (43775ff).

Files with missing lines Patch % Lines
process/process_output.py 87.50% 4 Missing ⚠️
process/init.py 97.43% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3531      +/-   ##
==========================================
+ Coverage   31.31%   31.40%   +0.09%     
==========================================
  Files          81       82       +1     
  Lines       19515    19548      +33     
==========================================
+ Hits         6111     6140      +29     
- Misses      13404    13408       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@timothy-nunn timothy-nunn force-pushed the output-length branch 3 times, most recently from 641aa10 to a5d8989 Compare February 11, 2025 13:34
Copy link
Copy Markdown
Collaborator

@chris-ashe chris-ashe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy with the truncation removal. Some variables are not aligned properly but this can be fixed later

@timothy-nunn timothy-nunn merged commit f700a31 into main Feb 19, 2025
@timothy-nunn timothy-nunn deleted the output-length branch February 19, 2025 15:03
chris-ashe pushed a commit that referenced this pull request Feb 21, 2025
* Use process_output via Python interface

* Convert ovarre, ovarrf, ocosts to Python
chris-ashe pushed a commit that referenced this pull request Feb 21, 2025
* Use process_output via Python interface

* Convert ovarre, ovarrf, ocosts to Python
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.

Need to increase space in output files to stop variable names being cut off

4 participants