XGC-S Output Parameters ======================= At the moment XGC-S has a separate output from the main tokamak XGC code. The output is limited compared to main XGC, but we are continuously adding more ADIOS2 output. The available ADIOS2 output in XGC-S contains the same output parameters as main XGC, but there can be an additional dimension for the radial-poloidal plane number since each plane has a different mesh. Moreover, XGC-S also outputs files with ASCII data. ASCII output ------------ XGC-S outputs ASCII files ``nnnnnn_*****_######.fd2D`` and ``nnnnnn_*****_######.tn2D`` where ``nnnnnn`` is the output files prefix given by ``sml_outfile_s`` in the `XGC-S Input Parameters `__, ``*****`` is the plane index and ``######`` is the time step. .. New line .. |br| raw:: html
**nnnnnn_*****_######.fd2D file content** |br| *(Mesh output)* |br| | line 1: Description to come | line 2: Description to come | line 3: Description to come | line 4: Description to come | line 5: Description to come | line 6: Description to come | line 7: Description to come | line 8: Description to come | line 9: Description to come **nnnnnn_*****_######.tn2D file content** |br| *(Physics quantities output)* |br| | line 1: node index | line 2: :math:`R` coordinate of node [ :math:`\mathrm{m}` ]. | line 3: :math:`Z` coordinate of node [ :math:`\mathrm{m}` ]. | line 4: Flux-surface averaged electrostatic potential [ :math:`\mathrm{V}` ]. | line 5: Perturbed potential [ :math:`\mathrm{V}` ]. | line 6: Perturbed ion density [ :math:`{\mathrm{m}}^{-3}` ]. | line 7: Equilibrium ion density [ :math:`{\mathrm{m}}^{-3}` ]. | line 8: Equilibrium ion temperature [ :math:`\mathrm{eV}` ]. | line 9: Background radial electric field [ :math:`\mathrm{V}` ]. | line 10: Normalized minor radius :math:`\sqrt{\psi/\psi_a}`. **Plot with gnuplot** |br| The perturbed potential in a plane can plotted using gnuplot: .. code-block:: bash > gnuplot --persist -e 'plot "w7x_te_00045_002000.tn2D" using 2:3:5 lc palette' .. image:: ./img/xgc-s_test_run_w7x_te_00045_002000.png :width: 60% :align: center :alt: Alternative text *Fig. 1: Example of the perturbed electrostatic potential illustrated with gnuplot.* ADIOS2 output ------------- At the moment the XGC-S ADIOS2 output includes quantities to plot the potential. We provide some Python scripts for plotting in `XGC-Devel/XGC-S/utils/python/ `_. To be able to read ADIOS2 in Python .. code-block:: python import adios2 follow the instructions `here `__. On the Princeton Stellar cluster .. code-block:: bash > module load anaconda3/2023.3 > export PYTHONPATH=/projects/XGC/STELLAR/Software/install/adios2/2.8.3_python/gcc-8/lib/python3.10/site-packages/adios2 should be sufficient. Use the Python scripts in the XGC-S run directory to plot perturbed quantities .. code-block:: bash > python xgc_2D_dpot.py .. image:: ./img/xgc-s_test_run_2D_dpot.png :width: 99% :align: center :alt: Alternative text *Fig. 2: Example of perturbed quantities illustrated with Python.* and linear growth rate .. code-block:: bash > python xgc_linear_growth_rate.py .. image:: ./img/xgc-s_test_run_linear_growth_rate.png :width: 80% :align: center :alt: Alternative text *Fig. 3: Example of a linear growth rate calculation illustrated with Python.* .. toctree:: :maxdepth: 1