Record builders shared by profile readers (mesaload.f90, monload.f90).
Energy and field quantization, colour-field registry, zone run-length compression; re-exports units.f90 constants. Depends only on convdata, typedef and units, so either reader uses it w/o a module cycle.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=real64), | public, | parameter | :: | GROW_FAC | = | 0.5d0*(sqrt(5.d0)+1.d0) |
Growth factor of a reader's full record array, golden ratio. |
| integer(kind=int32), | public, | parameter | :: | EPS_BASE | = | 1 |
Energy level floor,
|
| integer(kind=int32), | public, | parameter | :: | REC_NVERS | = | 10600 |
Record version readers build. |
Return signed integer contour level of energy rate.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in) | :: | f |
Energy rate (erg/g/s). |
Return contour bin (1 to FIELD_NBINS) of value in range of field f.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in) | :: | v |
Value to bin. |
||
| integer(kind=int32), | intent(in) | :: | f |
Field index in registry. |
||
| logical, | intent(in) | :: | logscale |
Bin in |
Run-length compress cell zone types into yzip and iconv.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=1), | intent(in) | :: | zones(:) |
|
||
| integer(kind=int32), | intent(in) | :: | nz |
Number of cells. |
||
| type(convtype), | intent(inout) | :: | cnv |
Record receiving |
Quantize per-cell energy rate into energy-layer step function.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in) | :: | f(:) |
Energy rate of each cell (erg/g/s), centre to surface. |
||
| integer(kind=int32), | intent(in) | :: | nz |
Number of cells. |
||
| integer(kind=int32), | intent(out) | :: | n |
Number of pairs. |
||
| integer(kind=nuc_kind), | intent(out), | allocatable | :: | vals(:) |
Level of each pair. |
|
| integer(kind=idx_kind), | intent(out), | allocatable | :: | idxs(:) |
Coordinate index where each pair starts. |
Allocate convdata.f90 colour-field registry for nf fields.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | nf |
Number of fields. |
Widen running range of field f w/ one sample.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | f |
Field index in registry. |
||
| real(kind=real64), | intent(in) | :: | v |
Sample value. |
Choose default binning of field f once its range is known.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | f |
Field index in registry. |
Run-length compress per-cell field into two (level, coordinate index) step functions.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in) | :: | raw(:) |
Field value of each cell, centre to surface. |
||
| integer(kind=int32), | intent(in) | :: | nz |
Number of cells. |
||
| integer(kind=int32), | intent(in) | :: | f |
Field index in registry. |
||
| type(fieldlayer), | intent(out) | :: | out(2) |
Step functions in default and other scale. |
Allocate layers and arrays profile readers leave unfilled, at size zero.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(convtype), | intent(inout) | :: | cnv |
Record to complete. |