1) To run LRDFIT, at a UNIX prompt on the PPPL UNIX cluster type: lrdfit
- An X-window with title "LRDFIT_STATUS_WINDOW" should appear. This window displays the execution status of LRDFIT.
- When LRDFIT is initiated, it must restore a system definition file which can take several seconds.
- NOTE: Until this file is loaded, other LRDFIT functions cannot be performed.
- Three additional windows entitled "NSTX Power Supply Currents - Group 1,2,3" also appear.
- LRDFIT is controlled from the "LRDFIT" menu item at the top of each window, and any of these windows can be used to control LRDFIT.
2) When fitting any new shot number, you must perform an automated SVD fit to compute system toroidal currents
- Hold down the left mouse-button on the "LRDFIT" menu item, and highlight "Automated Execution" followed by "Auto SVD Fit" in the menu list.
- Release the mouse button, and a GUI should appear.
- Enter the shot number of interest, leaving the t-min and t-max values at -0.7s and -1.0s.
- NOTE: entering t-max < t-min forces LRDFIT to use the plasma current waveform for determining t-max.
- Set dt to the desired value for the SVD time-step - leave set at 0.001s for most applications.
- Finally, hit the "Get Shot Number" button (or "Get Last Shot" for last shot)
- Data will be loaded for this shot number, and the LRDFIT circuit equations will then be solved.
3) Check the quality of the fit to the magnetic diagnostics
- The magnetics fit is shown graphically by using the:
- Page through this displayed postscript file to make sure there are no large differences between data (red) and simulated signals (black) with the error bars shown in blue.
- Sensor data with an orange "X" through the plot means those signals are not used as constraints in the SVD initial condition fit or in the force-balance constrained reconstructions.
- To remove a bad sensor, use: "LRDFIT --> Data Management --> Data Weighting --> ?" where ? refers to the diagnostic type of a bad sensor or measurement.
- "Poloidal Magnetic Field" sensors most frequently cause bad fits.
- The same control menu is used to control the weighting and usage of all other measurements as well.
4) Perform an interactive single-time-slice GSE reconstruction to assess fit quality
- Grad-Shafranov Equilibrium (GSE) reconstructions are performed using the: "LRDFIT --> Automated Execution --> Auto GSE Fit" menu option.
- Next, the use must choose the equilibrium reconstruction constraint set:
- LRDFIT standardized constraint sets are mapped to the "fitting index" numbers shown in the list below.
- To set/change the constraint set, enter the desired index number in the entry field next to the "Set Fitting Index to -->" button, and then press this button.
- At the present version of LRDFIT, only fits with indices 01-09 are trustworthy and/or implemented:
- 1 --> Magnetics only
- 2 --> 1 + Pitch angle data
- 3 --> 2 + Er correction
- 4 --> 1 + Te-iso
- 5 --> 2 + Te-iso
- 6 --> 3 + Te-iso
- 7 --> 4 + Rotation
- 8 --> 5 + Rotation
- 9 --> 6 + Rotation
- The fitting indices shown below will be usable/implemented at a future date and are shown only for reference. Fits to the thermal pressure do not easily converge, and the TRANSP interface for fast-ion pressure does not yet exist in this version.
- 10 --> 4 + Thermal p
- 11 --> 5 + Thermal p
- 12 --> 6 + Thermal p
- 13 --> 7 + Thermal p
- 14 --> 8 + Thermal p
- 15 --> 9 + Thermal p
- 16 --> 10 + Fast-ion p
- 17 --> 12 + Fast-ion p
- 18 --> 13 + Fast-ion p
- 19 --> 15 + Fast-ion p
Next, to test equilibrium reconstruction quality, enter a time during the plasma current top in the "t-min" entry field, and enter the same value in the "t-max" field.
By setting t-min = t-max, a single reconstruction will be performed for the time chosen.
Then, at the bottom of the data entry window, press the: "APPLY and EXECUTE LOCALLY" button to graphically observe a full reconstruction cycle.
To interrupt a reconstruction, type "Control-C" to stop IDL, then "retall" in the LRDFIT_STATUS_WINDOW window to return all routines to the main level in IDL.
A reconstruction interrupt GUI will be implemented in a later version of LRDFIT...
Note that the local execution mode DOES NOT write to the LRDFIT MDS+ tree, but the batch mode DOES write to the MDS+ tree.
5) Perform multiple time-slice reconstructions
- If the boundary and profiles look "reasonable", the sensor fitting errors are small, and the "fiterr" value shown during iteration is approximately 5.0 or less, then additional reconstructions can be automatically.
- Again, use the "LRDFIT --> Automated Execution --> Auto GSE Fit" menu option.
- Press the "Range for this Index" in the top panel of the control window.
- When the control window re-appears, the "Full Time Range for Reconstruction" time range should cover most of the discharge duration.
- The reconstruction time-step and maximum number of reconstructions (and most other parameters) can also be changed by modifying the entry fields and pressing the "APPLY and UPDATE INPUT PARAMETERS ABOVE" button near the bottom of the control window.
- To observe each reconstruction serially (which might take up to several hours in total!), again press the "APPLY and EXECUTE LOCALLY" button.
- For parallel execution using the PPPL UNIX cluster batch que, press the "APPLY and EXECUTE RECONSTRUCTIONS USING BATCH QUE" button.
- Next, enter "a" in the LRDFIT_STATUS_WINDOW window to confirm automatically pick the ques and number or processors to use, or enter "i" to interactively choose the ques and number of processors.
- If you choose "i", then for each que, enter "d" to use the default number of processors, or another number, or nothing to cancel.
- LRDFIT will then attempt to run and archive all reconstructions and other related time-dependent results in the MDS+ tree upon completion of the batch job.
NOTE: The "MONITOR" window MUST remain on your X-term screen until batch-job completion in order for the results to be written to the MDS+ tree automatically.
To write all existing data (from either interactive or batch mode) for the shot and index in memory, use "LRDFIT --> Manage LRDFIT Results --> Write latest fit results to MDS".
ALL fits performed for a given shot and index will be written to the tree, even if you change something in the fitting settings.
To be sure you have fits with the same settings, delete old/unwanted reconstruction output files.
The user who creates an LRDFIT subtree for a given shot and index "owns" that tree. Other users can write results for that shot, but not for that index.
For example, if user "rmaingi" owns LRDFIT04 for shot #117830, that user must delete their fits from the tree before another user can write to this index (contact Jon Menard for easy ways to do this).
6) Monitoring and deleting LRDFIT batch jobs
LRDFIT batch execution can be monitored from any PPPL UNIX machine with interactive access by typing "qstat" at a UNIX prompt.
The job will have "lrdfit", the index, and shot number in the name, and the UNIX username will also be listed. Example:
106395.phoenix lrdfit_4_119758 rmaqueda 0 Q falcon
You can kill unwanted or hung jobs with the "qdel" command:
UNIX> qdel 106395
will kill the example PBS lrdfit job above.
It is also possible to kill all of your LRDFIT batch jobs by using the "qdel_lrdfit" command, which is actually a UNIX shell script made especially for killing lrdfit jobs.