• Implemented in diagnostics/new_diag/.
  • Demonstration: diagnostics/new_diag_demo.f90 (make new_diag_demo)

Allows, for instance, to do a Fourier analysis of arbitrary quantities like the pressure. Is used for some of the jorek2_postproc functionality.

Available Expressions

Implement Own Expressions

This is actually very easy in most cases! You have to add the expression in the module new_diag/mod_expressions.f90:

  • Add the expression to the init_expr routine close to the beginning of the file.
  • Add the expression to the case-statement into subroutine eval_expr very close to the end of the file.
  • Make sure that you use the fact_time, fact_T, etc variables appropriately such that your expression is calculated correctly both in JOREK normalized units (normalization) and SI units.
  • If the necessary "ingredients" for your expression have not been calculated already in routine eval_expr, you will have to compute them at the correct places. Put preprocessor directives around model-specific quantities in order to avoid compilation problems for different models.