Skip to content

Commit d602b66

Browse files
committed
Removed deprecated TGLF instructions
1 parent 5573f86 commit d602b66

File tree

1 file changed

+0
-84
lines changed

1 file changed

+0
-84
lines changed

src/mitim_tools/gacode_tools/TGLFtools.py

Lines changed: 0 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -38,90 +38,6 @@ def __init__(
3838
avTime=0.0, # Averaging window to extract CDF file
3939
alreadyRun=None, # Option2: Do more stuff with a class that has already been created and store
4040
):
41-
"""
42-
TGLF class that manages the run and the results.
43-
44-
The philosophy of this is that a single 'tglf' class will handle the tglf simulation and results
45-
at one time slice but with possibility of several radii at once.
46-
47-
It can also handle different TGLF settings, running them one by one, storing results in folders and then
48-
grabbing them.
49-
50-
Scans can also be run. At several radii at once if wanted.
51-
52-
*Note*
53-
The 'run' command does not require label. When performing a 'read', the results extracted from
54-
the specified folder will be saved with the label indicated in 'read', in the "results" or "scans"
55-
dictionaries. Plotting then can happen with more than one label of the same category.
56-
57-
*Note*
58-
The 'run' command uses input.tglf from the specified folder, but one can change the Settings presets,
59-
extraOptions and multipliers. The modified inputs is not rewritten in the actual folder, it is only written
60-
in the tmp folder on which the simulation takes place.
61-
62-
*Note*
63-
After a 'prep' command, the class can be detached from the file system, as it stores the input tglf file
64-
to run later with different options. It also stores the Normalizations, since the runs are expected
65-
to only change dimensionless parameteres.
66-
67-
**************************************
68-
***** Example use for standalone *****
69-
**************************************
70-
71-
# Initialize class, by specifying where the inputs to TGLF come from (TRANSP cdf)
72-
tglf = TGLF(cdf='~/testTGLF/12345B12.CDF',time=1.45,avTime=0.1,rhos=[0.4,0.6])
73-
74-
# Prepare TGLF (this will create input.tglf in the specified folder)
75-
cdf = tglf.prep_using_tgyro('~/testTGLF/')
76-
77-
# Run standalone TGLF (this will find the input.tglf in the previous folder,
78-
# and then copy to this specify TGLF run, and run it there)
79-
tglf.run(subfolder='tglf1/',Settings=1,extraOptions={'NS':3})
80-
81-
# Read results
82-
tglf.read(label='run1',folder='~/testTGLF/tglf1/')
83-
84-
# Plot
85-
plt.ion(); tglf.plot(labels=['run1'])
86-
87-
*********************************
88-
***** Example use for scans *****
89-
*********************************
90-
91-
# Initialize class, by specifying where the inputs to TGLF come from (TRANSP cdf)
92-
tglf = TGLF(cdf='~/testTGLF/12345B12.CDF',time=1.45,avTime=0.1,rhos=[0.4,0.6])
93-
94-
# Prepare TGLF (this will create input.tglf in the specified folder)
95-
cdf = tglf.prep_using_tgyro('~/testTGLF/')
96-
97-
# Run
98-
tglf.run_scan('scan1/',Settings=1,varUpDown=np.linspace(0.5,2.0,20),variable='RLTS_2')
99-
100-
# Read scan
101-
tglf.read_scan(label='scan1',variable='RLTS_2')
102-
103-
# Plot
104-
plt.ion(); tglf.plot_scan(labels=['scan1'],variableLabel='RLTS_2')
105-
106-
****************************
107-
***** Special analysis *****
108-
****************************
109-
110-
Following the prep phase, we can run "runAnalysis()" and select among the different options:
111-
- Chi_inc
112-
- D and V for trace impurity
113-
Then, plotAnalysis() with the right option for different labels too
114-
115-
****************************
116-
***** Do more stuff with a class that has already been created and store
117-
****************************
118-
119-
tglf = TGLF(alreadyRun=previousClass)
120-
tglf.FolderGACODE = '~/testTGLF/'
121-
122-
** Modify the class as wish, and do run,read, etc **
123-
** Because normalizations are stored in the prep phase, that's all ready **
124-
"""
12541

12642
super().__init__(rhos=rhos)
12743

0 commit comments

Comments
 (0)