Download & install

In a linux shell:

git clone https://gitlab.mpcdf.mpg.de/git/astra.git a8
cd a8

The install.sh command installs the relevant directories, compiles the fixed and variable parts of the code, and runs the default test case.


ae -m <equ> -v <exp> -s <tbeg> -e <tend> [-tpause <tpause>] [-debug] [-resize <factor>]

Note that ae -h prints help in the shell.


Please use the support email

New with respect to ASTRA7

User's end

  • Need to replace include status.inc and similar statements with use status_inc, before the implicit none statement in sbr, 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:

    • Rename NETCDF->A2CDF

    • 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)...

  • Removed the ObjectCode variable: use different installations for different platforms

  • tmp/<exp><equ>.nml instead of tmp/astra.log; tmp/*.f90 instead of tmp/*.inc, so the generated code is all enclosed in fortran subroutines, no code blocks

  • exe/as_exe -debug option: localise crash and sequence of calls

  • exe/as_exe -resize 1.5 option: larger graphic window!

  • Removed work, work1 arrays from the modules neocl4, a2strahl, neut as well as from tglf, 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).

Behind the curtains

  1. Using modules instead of commons
  2. Less memory constraints, cleaner programming
  3. All implicit none, even in astra_main.f90, stepon.f90
  4. python parser replacing the historic Fortran parser, for generating the variable fortran code (tmp/)
  5. Removed intermediate layers in metric.f90, including COUPLING_SCHEME

Equilibrium solver switch IPEQL

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)

New directory trees

User's part

The usual $AWD subdirs equ, exp, sbr, fml, fnc, ipc, 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 the level to communicate (also upstream) with 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 communicating directly with 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) the actual executables

FAQ & workarounds



Astra6.0 astra.pdf

Addendum Astra7 addendum_EF.pdf