# Data from: 'Merging of zonal flows in gyrofluid resistive drift-wave turbulence'

Fabian Grander et. al., Phys. Plasmas 33, 052303 (2026)

## Content of this data repository
This directory contains the data to reproduce figures from the paper. 
The simulations were produced with the GHWC code. The current version of the code is openly available on the gitlab repository [ghwc](https://git.uibk.ac.at/ionen-angewandte-physik/ag-kendl/ghwc.git). Detailed instructions on how to compile and run the code can be found in the readme there.

The data are given in the following ways:

#### GHWC input files
For some of the figures (4,5,6) average values of many simulations were used. In this case only the inputfile data is given. The data can then be reproduced using the GHWC code. For figure 4 100 simulations were produced in each folder. For every other input file 20 simulations were produced. 

For Figures 6 a,b the raw data are in the python script. They were extracted from a large parameter scan using another script (`fig6/data/mode_scan.py`). Giving each inputfile of this parameter scan would exceed the maximum number of files in this repository. In that case the values for $C$ and $\tau$ have to bo varied accordingly with the standard input file given in `fig6/data/input.toml`.

For figures 1,2,3,7 specific simulations were analyzed. Because of the chaotic nature of the problem the simulations cannot be reproduced easily. (In fact even with static initial conditions we saw different results (in terms of zonal flow mode numbers) for different gpu architectures.) Unfortunately the file-sizes of the data are too large for this server. Thus only the post-processing script is given here. The data can be collected from the author upon request.


## How to reproduce the data?
The following post-processing routines are relying on the `ghwc/scripts/get_ghwc.py` python module in that repository. For easier usage the current (20.7.2026) version of that python module is also available in the `/tools` subdirectory.

Note that the working directory must be the one of the file because relative paths are used.

### Randomness
There can be two reasons for getting different results when trying to reproduce the data.
1) Some of the initial conditions use random number generators.
2) The zonal flow generation and dynamics is chaotic. This was one of the key points of the paper.  It should however be possible to reproduce the results qualitatively.
