Contains all global variables.
| Type | Visibility | Attributes | Name | Initial | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| character(len=500), | public | :: | runname |
Root of input file name. |
|||||||||||||||||||||||||||||||||
| character(len=500), | public | :: | foldername |
Directory of input file name. |
|||||||||||||||||||||||||||||||||
| integer, | public | :: | nroots |
Number of dispersion solutions under consideration. |
|||||||||||||||||||||||||||||||||
| integer, | public | :: | nroots_max |
Number of dispersion solutions found in frequency map scan. |
|||||||||||||||||||||||||||||||||
| logical, | public | :: | use_map |
Choice of: (T) searching for roots over a map in complex frequency space, via map_read; (F) input (nroots) guesses for solutions, via solution_read |
|||||||||||||||||||||||||||||||||
| logical, | public | :: | kperp_norm | = | .true. |
Use the tensor in Stix's (10-57) (true) or Multiply by kperp^2 d_ref^2 (false) |
|||||||||||||||||||||||||||||||
| logical, | public | :: | writeOut | = | .true. |
Write or suppress output to screen. |
|||||||||||||||||||||||||||||||
| logical, | public | :: | profile_startup | = | .false. |
Enable optional startup profiling through the |
|||||||||||||||||||||||||||||||
| character(len=16), | public | :: | rel_cache | = | 'off' |
Relativistic cache mode: off (default), auto, or refresh; used only on rank 0.
Set in the optional |
|||||||||||||||||||||||||||||||
| character(len=1024), | public | :: | rel_cache_dir | = | 'distribution/' |
Existing directory for native content-addressed cache entries and temporary files.
Shared by relativistic species; configured only through |
|||||||||||||||||||||||||||||||
| double precision, | public | :: | startup_seconds(14) | = | 0.d0 |
Accumulated local startup wall times in seconds, initially zero. Repeated startup_tock calls add to the selected phase, so the normal rank-0 report sums work across species. No MPI reduction is performed.
Phase 10 includes MPI distribution and harmonic/Bessel setup, but excludes MPI initialization and namelist input. It overlaps phases 1--9 and must not be added to them. Phase 14 overlaps phases 3--8 and 11--13; phase 10 also includes cache work. startup_report does not reset these accumulators. |
|||||||||||||||||||||||||||||||
| integer, | public | :: | unit_error |
Output unit for error file. |
|||||||||||||||||||||||||||||||||
| integer, | public | :: | nproc |
Total number of processors. |
|||||||||||||||||||||||||||||||||
| integer, | public | :: | iproc |
Number of local processor. |
|||||||||||||||||||||||||||||||||
| logical, | public | :: | proc0 |
T if iproc=0. |
|||||||||||||||||||||||||||||||||
| integer, | public | :: | ierror |
Integer error flag. |
|||||||||||||||||||||||||||||||||
| double precision, | public | :: | kperp |
Perpendicular wavenumber, normalized by inverse reference inertial length, . |
|||||||||||||||||||||||||||||||||
| double precision, | public | :: | kpar |
Parallel wavenumber, normalized by inverse reference inertial length, . |
|||||||||||||||||||||||||||||||||
| double precision, | public | :: | vA |
Alfven Velocity, normalized to speed of light, . |
|||||||||||||||||||||||||||||||||
| double precision, | public | :: | Bessel_zero | = | 1.d-45 |
Calculate Bessel functions until the maximum is less than this value. |
|||||||||||||||||||||||||||||||
| integer, | public | :: | nspec |
Number of plasma components. |
|||||||||||||||||||||||||||||||||
| integer, | public | :: | nspec_rel |
Number of relativistic plasma components. |
|||||||||||||||||||||||||||||||||
| double complex, | public, | dimension(:), allocatable | :: | wroots |
Dispersion solutions, ranging from 1 to numroots. |
||||||||||||||||||||||||||||||||
| integer, | public | :: | numroots | = | 100 |
Maximum number of solutions. |
|||||||||||||||||||||||||||||||
| double precision, | public | :: | omi |
Smallest value for complex map search. |
|||||||||||||||||||||||||||||||||
| double precision, | public | :: | omf |
Largest value for complex map search. |
|||||||||||||||||||||||||||||||||
| double precision, | public | :: | gami |
Smallest value for complex map search. |
|||||||||||||||||||||||||||||||||
| double precision, | public | :: | gamf |
Largest value for complex map search. |
|||||||||||||||||||||||||||||||||
| logical, | public | :: | loggridw |
Linear (F) or Log (T) spacing for map search. |
|||||||||||||||||||||||||||||||||
| logical, | public | :: | loggridg |
Linear (F) or Log (T) spacing for map search. |
|||||||||||||||||||||||||||||||||
| integer, | public | :: | nr | = | 128 |
Number of points in frequency grid. |
|||||||||||||||||||||||||||||||
| integer, | public | :: | ni | = | 128 |
Number of points in frequency grid. |
|||||||||||||||||||||||||||||||
| integer, | public | :: | nperp |
Number of perpendicular momentum space grid points, . |
|||||||||||||||||||||||||||||||||
| integer, | public | :: | npar |
Number of parallel momentum space grid points, . |
|||||||||||||||||||||||||||||||||
| integer, | public | :: | ngamma | = | 100 |
Number of intervals in relativistic ,
(Eqn. 3.14), giving array bounds |
|||||||||||||||||||||||||||||||
| integer, | public | :: | npparbar | = | 200 |
Number of intervals in dimensionless parallel momentum
, , giving bounds |
|||||||||||||||||||||||||||||||
| integer, | public | :: | positions_principal | = | 5 |
Number of parallel momentum steps distant from the resonant momentum included in the numerical calculation of Eqn 3.5, . |
|||||||||||||||||||||||||||||||
| double precision, | public | :: | Tlim | = | 0.01d0 |
Threshold for analytical principal-value integration for evaluating Eqn 3.6 and 3.7, . |
|||||||||||||||||||||||||||||||
| integer, | public | :: | sproc |
The species number on which this process is working. |
|||||||||||||||||||||||||||||||||
| integer, | public | :: | secant_method | = | 2 |
Selection of root finding method. 0: secant 1: rtsec 2: secant_osc: an improvement to reduce oscillatory loops. |
|||||||||||||||||||||||||||||||
| integer, | public | :: | numiter | = | 50 |
Maximum number of iterations in secant method. |
|||||||||||||||||||||||||||||||
| double precision, | public | :: | D_threshold | = | 1.d-5 |
Minimum threshold for secant method. |
|||||||||||||||||||||||||||||||
| double precision, | public | :: | D_prec | = | 1.d-5 |
Size of bounding region for secant method. |
|||||||||||||||||||||||||||||||
| double precision, | public | :: | D_gap | = | 1.d-5 |
Size of allowable difference between roots. |
|||||||||||||||||||||||||||||||
| double precision, | public | :: | D_tol | = | 1.d-7 |
Tolerance for secant method=1, alps_fn |
|||||||||||||||||||||||||||||||
| double precision, | public | :: | pi |
The ratio of a circle's circumference to its diameter. |
|||||||||||||||||||||||||||||||||
| character(len=75), | public | :: | arrayName |
Name of input files for distributions. |
|||||||||||||||||||||||||||||||||
| double precision, | public, | dimension(:,:,:), allocatable | :: | f0 |
Background distribution function array ; (1:nspec,0:nperp,0:npar). |
||||||||||||||||||||||||||||||||
| double precision, | public, | dimension(:,:,:), allocatable | :: | f0_rel |
Relativistic background distribution function array ; (1:nspec,0:ngamma,0:npparbar). |
||||||||||||||||||||||||||||||||
| double precision, | public, | dimension(:,:,:,:), allocatable | :: | df0 |
Perpendicular and parallel derivatives of ; (1:nspec,0:nperp,0:npar,1:2), with in index 1, and in index 2. |
||||||||||||||||||||||||||||||||
| double precision, | public, | dimension(:,:,:,:), allocatable | :: | df0_rel |
Derivatives of ; (1:nspec,0:nperp,0:npar,1:2), with in index 1 and in index 2. |
||||||||||||||||||||||||||||||||
| double precision, | public, | dimension(:,:,:,:), allocatable | :: | pp |
Momentum Space Array for ; (1:nspec,0:nperp,0:npar,1:2) with in index 1 and in index 2. |
||||||||||||||||||||||||||||||||
| double precision, | public, | dimension(:), allocatable | :: | current_int |
Current density, (0:nspec) Zeroth index is sum over all species |
||||||||||||||||||||||||||||||||
| double precision, | public, | dimension(:), allocatable | :: | density_int |
density, (0:nspec) Zeroth index is sum over all species |
||||||||||||||||||||||||||||||||
| double precision, | public, | dimension(:,:,:), allocatable | :: | gamma_rel |
Relativistic momentum space array of ; (1:nspec,0:ngamma,0:npparbar). |
||||||||||||||||||||||||||||||||
| double precision, | public, | dimension(:,:,:), allocatable | :: | pparbar_rel |
Relativistic momentum space array of ; (1:nspec,0:ngamma,0:npparbar). |
||||||||||||||||||||||||||||||||
| integer, | public, | dimension(:), allocatable | :: | nmax |
number of n values to sum over, (1:nspec). |
||||||||||||||||||||||||||||||||
| integer, | public | :: | nlim(2) |
Lower and Upper limits for n values for iproc to sum over. |
|||||||||||||||||||||||||||||||||
| double precision, | public, | dimension(:), allocatable | :: | ns |
Ratio of species density to reference , (1:nspec). |
||||||||||||||||||||||||||||||||
| double precision, | public, | dimension(:), allocatable | :: | qs |
Ratio of species charge to reference , (1:nspec). |
||||||||||||||||||||||||||||||||
| double precision, | public, | dimension(:), allocatable | :: | ms |
Ratio of species mass to reference , (1:nspec). |
||||||||||||||||||||||||||||||||
| logical, | public, | dimension(:), allocatable | :: | relativistic |
Use relativistic treatment; (1:nspec). |
||||||||||||||||||||||||||||||||
| double complex, | public, | dimension(:,:), allocatable | :: | wave |
Wave Equation Tensor (1:3,1:3). |
||||||||||||||||||||||||||||||||
| double complex, | public, | dimension(:,:,:), allocatable | :: | chi0 |
Susceptibility Tensor (1:nspec,1:3,1:3). |
||||||||||||||||||||||||||||||||
| double complex, | public, | dimension(:,:,:,:), allocatable | :: | chi0_low |
Susceptibility Tensor (1:nspec,1:3,1:3,0:1). |
||||||||||||||||||||||||||||||||
| double precision, | public, | dimension(:,:), allocatable | :: | bessel_array |
Array of Bessel functions; (nlim(1):nlim(2)+1,0:nperp). |
||||||||||||||||||||||||||||||||
| integer, | public, | dimension(:), allocatable | :: | ACmethod |
Selection of method for Hybrid-Analytical Continutation, (1:nspec) 0) Use the analytic function. 1) Use the 'n_fits' functions described with 'fit_type' 2) Use a polynomial basis representation. |
||||||||||||||||||||||||||||||||
| double precision, | public, | dimension(:,:,:), allocatable | :: | polynomials |
Polynomials of order (0,poly_order) evaluatated at (0,npar) abscissa points, (1:nspec,0:npar,0:poly_order) poly_order is taken to be the maximum order across all species. |
||||||||||||||||||||||||||||||||
| double precision, | public, | dimension(:,:,:), allocatable | :: | poly_fit_coeffs |
Fit Coefficients for Polynomials from Generarl Linear Least Squares Method (1:nspec,0:nperp,0:poly_order) poly_order is taken to be the maximum order across all species. The fit is taken in one dimension at each perpendicular momentum value. |
||||||||||||||||||||||||||||||||
| integer, | public, | dimension(:), allocatable | :: | poly_kind |
Selection of Orthogonal Basis Function, (1:nspec) 1) Chebyshev Polynomials Other Polynomials can be added in future releases. |
||||||||||||||||||||||||||||||||
| double precision, | public, | dimension(:), allocatable | :: | poly_log_max |
Limit on the Evaluation of the Polynomial Representation, (1:nspec) |
||||||||||||||||||||||||||||||||
| integer, | public, | dimension(:), allocatable | :: | poly_order |
Selection of Maximum Order of Orthogonal Basis Function, (1:nspec) |
||||||||||||||||||||||||||||||||
| integer, | public, | dimension(:), allocatable | :: | poly_derivative_type |
Selection of derivative type for Orthogonal Basis Function, (1:nspec) 0: Finite Difference 1: Analytic Evaluation |
||||||||||||||||||||||||||||||||
| integer, | public, | dimension(:), allocatable | :: | n_fits |
Number of fitted functions, (1:nspec) |
||||||||||||||||||||||||||||||||
| integer, | public, | dimension(:,:), allocatable | :: | fit_type |
Type of analytic function to be fit, (1:nspec,1:maxval(nfits)); 1) Maxwellian, 2) Kappa, 3) Juettner with , 4) Juettner with , constant , 5) Juettner with ; variable , 6) Bi-Moyal distribution. |
||||||||||||||||||||||||||||||||
| integer, | public | :: | maxsteps_fit | = | 500 |
Maximum number of fitting iterations. |
|||||||||||||||||||||||||||||||
| double precision, | public | :: | lambda_initial_fit | = | 1.d0 |
Inital Levenberg-Marquardt damping parameter. |
|||||||||||||||||||||||||||||||
| double precision, | public | :: | lambdafac_fit | = | 1.d1 |
Adjustment factor for Levenberg-Marquardt damping parameter. |
|||||||||||||||||||||||||||||||
| double precision, | public | :: | epsilon_fit | = | 1.d-8 |
Convergence for Levenberg-Marquardt fit. |
|||||||||||||||||||||||||||||||
| double precision, | public, | dimension(:,:,:,:), allocatable | :: | param_fit |
Fit parameters, (1:nspec,0:nperp,4,maxval(n_fits)). |
||||||||||||||||||||||||||||||||
| double precision, | public, | dimension(:,:), allocatable | :: | perp_correction |
This parameter, in Eqn. B1, compensates for the strong dependence of , making the fit more reliable. |
||||||||||||||||||||||||||||||||
| logical, | public | :: | fit_check | = | .true. |
If true, output fitted functions to ASCII file for each species. |
|||||||||||||||||||||||||||||||
| logical, | public | :: | determine_minima | = | .true. |
If true, after map search, determine minima and refine solutions. |
|||||||||||||||||||||||||||||||
| integer, | public | :: | n_resonance_interval | = | 100 |
How many steps should be used to integrate around the resonance, , used for integrating near poles (see section 3.1). |
|||||||||||||||||||||||||||||||
| integer, | public | :: | scan_option | = | 1 |
Select case for scans; 1) consecutive scans along input paths in wavevector space, 2) double scans of two selected parameters. |
|||||||||||||||||||||||||||||||
| integer, | public | :: | n_scan | = | 0 |
Number of wavevector scans. Must be set to 2 for scan_option=2; Must be 1 or larger for scan_option=1. 0 turns off wavevector scans. |
|||||||||||||||||||||||||||||||
| logical, | public, | dimension(:), allocatable | :: | logfit |
Use logarithmic fitting, (1:nspec). |
||||||||||||||||||||||||||||||||
| logical, | public, | dimension(:), allocatable | :: | usebM |
Use bi-Maxwellian/cold calculation from NHDS, (1:nspec). |
||||||||||||||||||||||||||||||||
| integer, | public, | dimension(:), allocatable | :: | bMnmaxs |
Maximum number of n for NHDS bi-Maxwellian calculation, (1:nspec). |
||||||||||||||||||||||||||||||||
| double precision, | public, | dimension(:), allocatable | :: | bMBessel_zeros |
Bessel-zero for NHDS bi-Maxwellian calculation (1:nspec). |
||||||||||||||||||||||||||||||||
| double precision, | public, | dimension(:), allocatable | :: | bMbetas |
Species beta for NHDS bi-Maxwellian calculation (1:nspec). If bMbetas=0.d0, then this species is treated with the cold-plasma susceptibility. |
||||||||||||||||||||||||||||||||
| double precision, | public, | dimension(:), allocatable | :: | bMalphas |
Species temperature anisotropy for NHDS bi-Maxwellian calculation. |
||||||||||||||||||||||||||||||||
| double precision, | public, | dimension(:), allocatable | :: | bMpdrifts |
Species drift momentum for NHDS bi-Maxwellian/cold calculation, in units of (1:nspec). |
||||||||||||||||||||||||||||||||
| type(scanner), | public, | dimension (:), allocatable | :: | scan |
Scan parameters for each wavevector scan. Read in from scan_read. |
||||||||||||||||||||||||||||||||
| double precision, | public | :: | kperp_last |
Previous value of . |
|||||||||||||||||||||||||||||||||
| double precision, | public | :: | kpar_last |
Previous value of . |
|||||||||||||||||||||||||||||||||
| double precision, | public | :: | kperp_0 |
Current value of . |
|||||||||||||||||||||||||||||||||
| double precision, | public | :: | kpar_0 |
Current value of . |
Description of wavevector scan behavior. Read in from scan_read.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| double precision, | public | :: | range_i |
Initial scan value. |
|||
| double precision, | public | :: | range_f |
Final scan value. |
|||
| logical, | public | :: | log_scan |
Use log (T) or linear (F) spacing. |
|||
| logical, | public | :: | heat_s |
Calculates heating rates if true. |
|||
| logical, | public | :: | eigen_s |
Calculates eigenfunctions if true. |
|||
| integer, | public | :: | type_s |
Type of parameter scan; 0: Current value of to =range and =range. 1: at fixed from current value of to range. 2: Wavevector scan at fixed angle to =range. 3: scan with constant . 4: scan with constant . |
|||
| integer, | public | :: | n_out |
Number of output scan values. |
|||
| integer, | public | :: | n_res |
Resolution between output scan values. |
|||
| double precision, | public | :: | diff |
step size for first wavevector variation. |
|||
| double precision, | public | :: | diff2 |
step size for second wavevector variation. |
Start an optional elapsed-wall-time interval for startup_tock.
Returns a local MPI_Wtime timestamp when profile_startup is enabled,
or zero otherwise. MPI must be initialized when profiling is enabled.
This routine performs no MPI communication or synchronization.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(out) | :: | start |
Local start timestamp in seconds, or zero when profiling is disabled. |
Add the elapsed time since startup_tick to one startup_seconds entry. Does nothing when profile_startup is disabled. The caller must supply a valid phase index and a timestamp obtained on the same MPI rank, and keep profiling enabled throughout the interval. MPI must still be initialized. No barrier or reduction is performed; overlapping intervals remain separate.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | phase |
Accumulator index in |
||
| double precision, | intent(in) | :: | start |
Local timestamp returned by startup_tick for this interval. |
Print the accumulated startup wall times in seconds on rank 0. Returns without output unless both profile_startup and proc0 are true. The report is independent of writeOut and describes local rank-0 elapsed time, not CPU time or the maximum across MPI ranks. Accumulators are neither reset nor reduced across ranks.