Wiki
Clone wikigs2 / GS2_Results_and_Diagnostics
GS2 Results and Diagnostics
Introduction
GS2 can output many different quantities. Many are written into the Netcdf output file, and unfortunately many more are written into a plethora of undocumented ascii files. Some are always written out, and some are only written out if you set one of a number of flags in the namelist diagnostics. This section tries to make sense of them.
There are perhaps 2 important things we want from GS2 output:
- Physical quantities - results of the simulation.
- Diagnostic quantities - quantities that determine whether the runs are numerically resolved, but are not of interest physically.
These are dealt with separately. Though sometimes the distinction can seem a little arbitrary, as most diagnostic quantities are in fact physical quantities, hopefully it makes it easier to get the full picture.
Physical Quantities
Input Parameters
Suppose you don't have the input file... how do you find out what the input parameters were? The simple answer is
ncdump-crun_name.out.nc
Geometrical Factors
In the various toroidal geometries, GS2 calculates all sorts of interesting quantites -- R, q etc. How do you find out what they were?
Grids
What values of theta, ky, ky are the physical quantities given for?
Again the simple answer is
ncdump-crun_name.out.nc
Fields
Fluxes
Until this section is fleshed out try
grepfluxesrun_name.out
The Distribution Function
Diagnostic Quantities
How do I know if my run is resolved ?
There is no complete answer to this question, but here is a rough sketch. L stands for linear runs, N stands for non-linear.
- Unary Checks: look at properties of that run:
- Eigenfunction:
- \(\phi^2\) vs time (on a log-linear plot).
- Linearly should be a straight line (exponential growth).
- Non-linearly should initially be a straight line and then saturate at some level (a very crude picture - infinite possibilities!).
- Velocity space
- Check the velocity space diagnostics: the fraction of energy in the high k velocity space modes should be around 10% and should certainly not go to 1. (L&N)
- Binary Checks: run another run with different resolution parameters and compare the two.
- Eigenfunctions
- Linearly, the normalised magnitude should be approximately the same.
- Eigenfunctions
Velocity Space Diagnostics
Set write_verr to true.
In the file run_name.lpc the columns are:
- Time
- Fraction of energy in high k for pitch angle harmonics (if this is too big, ngauss may be too small).
- Fraction of energy in high k for energy harmonics (if this is too big, negrid may be too small).
In the file run_name.verr the columns are:
Updated