This node app provides a simple way to inspect GTC(Gyrokinetic Toroidal Code) output data. Once deployed on the server, you can examine various plot generated from raw output data, without downloading any files.
Node.js, v16.13.1 and v18.17.1 are both guaranteed to work
git clone https://github.com/12ff54e/GTC-Visualizationcp .env_example .envand modifies it as you wish.- PORT is the port to which this app listening. Set a larger number to avoid conflicts.
- HOST_DIR is the folder where this app will search gtc output files in.
- LIMIT is the maximum number of concurrent opening GTC output folders.
- Set NODE_ENV to production (for example,
EXPORT NODE_ENV=productionin Linux). - run
npm install npm run pack-custom-plotly npm test
Note: npm install needs access to a npm repository. If your server do not have Internet access, you can run npm pack and all necessary files are packed into a compressed file, which you can upload to your server. Or download the latest version from here. Then you can unpack files and start the server by
tar -xf GTC-Visualization.tar.gz
cd GTC-Visualization
mv .env_example .env
# change .env file as you wish
npm startYou can also, and I suggest to, use process manager or init system to keep app ALWAYS running.
This app use express.js as server framework, and plot figures with the help of Plotly.js, which relies on MathJax to render expressions. Most, if not all figure types are from Huasheng Xie's Matlab program.