Download & install
If you wish an ssh key, follow the instruction
cd <some_path>
git clone https://gitlab.mpcdf.mpg.de/git/astra.git a8
# git clone git@gitlab.mpcdf.mpg.de:git/astra.git a8 # if you have a ssh key
cd a8
chmod u+x install.sh
./install.sh
The install.sh
command installs the relevant directories, compiles the fixed and variable parts of the code, and runs the default test case.
Pull updates
In the following, $AWD
represents the ASTRA working directory - in the example above, it would be <some_path>/a8
.
cd $AWD
git pull
./install.sh
If git pull
fails due to conflicts, you can do either:
- a new installation from scratch (recommended)
-
git checkout <filename causing conflict>
beforegit pull
Browse commits history
You can browse the previous commits with the command
cd $AWD
module load git # necessary only in toki
gitk
You can see the full history of the past commits, with a list of the summary labels in the user-friendly gitk
GUI, so that you can track all code changes since the repo was created. But you can also view (and copy) any file of any previous version.
Execute
cd $AWD
exe/as_exe -m <equ> -v <exp> -s <tbeg> -e <tend> [-tpause <tpause>] [-debug] [-resize <factor>]
Note that exe/as_exe -h
prints help for the user in the shell.
Support
Please use the support email
astra.support@ipp.mpg.de
Boundary + initial conditions
An overview of the options hierarchy for equation-statements in the equ
file.
New with respect to ASTRA7
User's end
-
The syntax
TE:EQ
in the equ file is not valid anymore. Please always write the fullTE:EQ[2,1.]
instead, the parser needs that -
Need to replace
include status.inc
and similar statements withuse status_inc
, before theimplicit none
statement insbr, xpr
-
In
fml
, make code f90-compatible:-
C
is no comment tag, use!
instead - new-line is done with
&
at the (upper) line end, not at 6th place of the new line
-
-
In the equ files:
-
Remove
NETCDF, A2CDF, A2JSON
-
In the TGLF calls, replace
work(j,21)
->mem_tglf(j,1)
,work(j,22)
->mem_tglf(j,2)
... -
In the QuaLiKiZ calls, replace
work(j,21)
->mem_qlkz(j,1)
,work(j,22)
->mem_qlkz(j,2)
... -
In the NEO calls, replace
work(j,51)
->mem_neo(j,1)
,work(j,52)
->mem_neo(j,2)
...
-
-
./clean.sh
for proper full recompilation (avoiding left-overs, change of platform in same$AWD
) -
Removed the
ObjectCode
variable: use different installations for different platforms -
tmp/<exp><equ>.nml
instead oftmp/astra.log
;tmp/*.f90
instead oftmp/*.inc
, so the generated code is all enclosed in fortran subroutines, no code blocks -
exe/as_exe -debug
option: localise crash and track sequence of calls -
exe/as_exe -resize 1.5
option: larger graphic window! -
Removed
work, work1
arrays from the modulesneocl4, a2strahl, neut
as well as fromtglf, qlkz, neo
-
The ASTRA driver (
astra_main.f90
,stepup.f90
) as well as the variables tables (*.txt) are in$AWD/main
-
The
geom2d
array does not exist anymore: everywhere you can get equilibrium quantities with
use parameters_a2equil, only : equil_now
.
equil_now
is an IMAS-like structure with a full set of equilibrium parameters, 1D profiles and R-z based 2D matrices (Psi, grids).
Default output format
ASTRA writes json
files including all plasma variables automatically, every dPout
seconds (you set dPout
in the $AWD/equ/log/*
files). At the end of the ASTRA run, all these snapshots are concatenated along the time axis into a NetCDF file, located in $AWD/ncdf_out
.
Behind the curtains
- Using modules instead of commons
- Less memory constraints, cleaner programming
- All implicit none, even in
astra_main.f90, stepup.f90
- python parser replacing the historic Fortran parser, for generating the variable fortran code (
tmp/
) - Removed intermediate layers in
metric.f90
, including COUPLING_SCHEME
IPEQL
Equilibrium solver switch The choice of how to solve the equilibrium is not done by special values of NEQUIL
, MEQUIL
anymore, rather by the IPEQL
variable.
Value | Solver |
---|---|
-2 | Cylindrical (no solver) |
-1 | Input metrics from exp/udb |
0 | EQGUESS (no solver) |
1 | EMEQ (3-moments) |
3 | (Don't use: iterations only) |
4 | SPIDER |
5 | FEQIS |
New directory trees
User's part
The usual $AWD
subdirs equ, exp, sbr, fml, fnc, xpr
contain the user part. Scripts and Makefiles are in $AWD/exe
(former $AWD/.exe
).
Note that these dirs are "duplicated" in $AWD/repo_user_area
, which is tracked by the git repo. You do not need to edit this part, unless you really want to contribute/develope.
The level $AWD/equ
(exp
, ...) is the working area, where users can add and modify things without conflicting with the repo, in order to be able to git pull at any time without losing the work done.
The execution command is $AWD/exe/as_exe
Core code
For normal usage, you can sadfely ignore this core part of the code, which compiles into $AWD/lib
the libraries libfor.a, libfeqis.a, libnbi.a, libspider.a
.
The source code is in $AWD/src
, subdirs feqis, for, nbi, spider
.
This part is relevant for developers or for debugging, and it is tracked by the git repo.
The python parser, generating Fortran code from the equ
file, is in $AWD/pyparse
. Also this part is directly linked to the git repo.
Other useful dirs
-
$AWD/tmp
contains the temporary parser-generated code -
$AWD/bin
(former$AWD/.tsk
) tgit@ghe actual executables