-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert model initialisation routines to python #3586
base: main
Are you sure you want to change the base?
Convert model initialisation routines to python #3586
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3586 +/- ##
==========================================
+ Coverage 31.76% 37.38% +5.62%
==========================================
Files 85 85
Lines 20175 21983 +1808
==========================================
+ Hits 6408 8218 +1810
+ Misses 13767 13765 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
95dcc3a
to
1fc5a9d
Compare
1fc5a9d
to
c4770f3
Compare
7e17115
to
5f1352e
Compare
Errors in the TF coil are being caused by setting tfv.poisson_cond_axial = 0.3
tfv.poisson_cond_trans = 0.3 The reason PROCESS/source/fortran/tfcoil_variables.f90 Lines 929 to 930 in cb982be
If you look around, every other float variable being assigned is followed by a D0 which explicitly sets the value to double precision. Therefore, in the Fortran these variables were being initialised to single precision 0.3 (still being assigned to a double precision variable however). When we set 0.3 across the Python-Fortran interface, it does it to double precision not single precision.
To verify, I changed the Fortran code to poisson_cond_axial = 0.3D0
poisson_cond_trans = 0.3D0 and the same errors (differences) occur as in the Python case. |
Converts module initialisation (setting of initial defaults) to Python.
In some cases, there was not an obvious places for these functions to live and so I just added to the file that seemed to use the variables the most.
See comment below for the annoying reason there are some slight test changes despite this being a line-for-line port of the code from Fortran to Python.