Module for reading input and writing output
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public, | parameter | :: | compatible_versions(3) | = | [3, 4, 5] |
List of compatible versions |
| character(len=*), | public, | parameter | :: | fmt_i | = | 'i8' | |
| character(len=*), | public, | parameter | :: | fmt_r | = | 'es16.8' | |
| character(len=*), | public, | parameter | :: | fmt_r2 | = | 'es10.2' | |
| integer, | public | :: | nw_found |
number of w found in dat files |
|||
| integer, | private | :: | itag |
tag for MPI message |
|||
| double precision, | private | :: | rk2_alfa |
coefficient for rk2_alfa |
|||
| logical, | private | :: | stagger_mark_dat | = | .false. |
whether staggered field is in dat |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | filename |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | ix |
Index of snapshot |
Routine to find entries in a string
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | line |
The line from which we want to read |
||
| character(len=*), | intent(in) | :: | delims |
A string with delimiters. For example delims = " ,'"""//char(9) |
||
| integer, | intent(in) | :: | n_max |
Maximum number of entries to read in |
||
| character(len=*), | intent(inout) | :: | fields(n_max) |
Fields in the strings |
||
| integer, | intent(inout) | :: | n_found |
Number of entries found |
||
| logical, | intent(out), | optional | :: | fully_read |
Compute global maxima of iw variables over the leaves of the grid.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(out) | :: | wmax(nw) |
The global maxima |
Compute global minima of iw variables over the leaves of the grid.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(out) | :: | wmin(nw) |
The global maxima |
Compute mean(w**power) over the leaves of the grid. The first mode (power=1) corresponds to the mean, the second to the mean squared values and so on.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | power |
Which mode to compute |
||
| double precision, | intent(out) | :: | mode(nw) |
The computed mode |
||
| double precision, | intent(out) | :: | volume |
The total grid volume |
Compute the volume average of func(w) over the leaves of the grid.
| Type | Intent | Optional | Attributes | Name | |||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
public pure function func(w_vec, w_size) result(val)Arguments
Return Value double precision |
|||||||||||||||||||||||||||
| double precision, | intent(out) | :: | f_avg |
The volume average of func |
|||||||||||||||||||||||
| double precision, | intent(out) | :: | volume |
The total grid volume |
|||||||||||||||||||||||
Compute how much of the domain is covered by each grid level. This routine does not take a non-Cartesian geometry into account.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(out) | :: | vol_cov(1:refine_max_level) |
Write volume-averaged values and other information to the log file
Print a log that can be used to check whether the code still produces the same output (regression test)
Read the command line arguments passed to agile
Read in the user-supplied parameter-file
Routine to read in snapshots (.dat files). When it cannot recognize the file version, it will automatically try the 'old' reader.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | ifile |
Read header for a snapshot
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | fh |
File handle |
||
| integer(kind=MPI_OFFSET_KIND), | intent(out) | :: | offset_tree |
Offset of tree info |
||
| integer(kind=MPI_OFFSET_KIND), | intent(out) | :: | offset_block |
Offset of block data |
Write header for a snapshot
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | fh |
File handle |
||
| integer(kind=MPI_OFFSET_KIND), | intent(in) | :: | offset_tree |
Offset of tree info |
||
| integer(kind=MPI_OFFSET_KIND), | intent(in) | :: | offset_block |
Offset of block data |