giza devices and scene drawing.
"Emit clamp box" bounds every vertex handed to giza, CLAMP_SPANS window spans past view on
each side; "visible range" ivis0..ivis1 is models whose strips overlap view. draw_scene
sets both each render, and writes st device fields and view limits, chs and coords%xoff.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=int32), | private, | parameter | :: | CI_TYPE(0:NCONVTYPES) | = | [0, 4, 5, 3, 2, 6] |
giza colour index of each convection type, by convdata.f90 code. |
| real(kind=real64), | private, | parameter | :: | PDF_WIDTH | = | 3.5d0 |
PDF save page width, in inches. One column wide, golden ratio. |
| real(kind=real64), | private, | parameter | :: | PDF_CHS | = | 2.0d0 |
PDF save character height. giza text scales w/ page height, so this keeps it legible on small page. |
| character(len=64), | private | :: | xofftxt | = | '' |
Label of |
|
| real(kind=real64), | private, | allocatable | :: | epx(:) |
Polygon scratch for emitted vertices, grown by |
||
| real(kind=real64), | private, | allocatable | :: | epy(:) |
Polygon scratch for emitted vertices, grown by |
||
| real(kind=real64), | private, | parameter | :: | CLAMP_SPANS | = | 1.0d3 |
Emit clamp box reach past each side of view, in window spans. |
| real(kind=real64), | private | :: | exlo | = | -huge(1.d0) |
x limits of emit clamp box, in world coords. |
|
| real(kind=real64), | private | :: | exhi | = | huge(1.d0) |
x limits of emit clamp box, in world coords. |
|
| real(kind=real64), | private | :: | eylo | = | -huge(1.d0) |
y limits of emit clamp box, in world coords. |
|
| real(kind=real64), | private | :: | eyhi | = | huge(1.d0) |
y limits of emit clamp box, in world coords. |
|
| integer(kind=int32), | private | :: | ivis0 | = | 1 |
First and last model of visible range. Band emission, surface line and grid clipped to it, so zoomed redraws scale w/ models on screen, not whole file. |
|
| integer(kind=int32), | private | :: | ivis1 | = | huge(1_int32) |
First and last model of visible range. Band emission, surface line and grid clipped to it, so zoomed redraws scale w/ models on screen, not whole file. |
Draw frame, ticks and tick labels of plot box.
Binds giza's C giza_box directly.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(kind=c_char, len=1), | intent(in), | dimension(*) | :: | xopt |
x axis options, null-terminated |
|
| real(kind=c_double), | value | :: | xtick |
x major tick step, in world coords. |
||
| integer(kind=c_int), | value | :: | nxsub |
Minor tick intervals per x step. |
||
| character(kind=c_char, len=1), | intent(in), | dimension(*) | :: | yopt |
y axis options, null-terminated |
|
| real(kind=c_double), | value | :: | ytick |
y major tick step, in world coords. |
||
| integer(kind=c_int), | value | :: | nysub |
Minor tick intervals per y step. |
Return lower y bound of data, in display units.
Test whether band bd overlaps y window over models j0..j1.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(band_t), | intent(in) | :: | bd |
Band to test. |
||
| integer(kind=int32), | intent(in) | :: | j0 |
First model of visible stretch. |
||
| integer(kind=int32), | intent(in) | :: | j1 |
Last model of visible stretch. |
Clamp world x coord to emit clamp box.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in) | :: | v |
World x coordinate. |
Clamp world y coord to emit clamp box.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in) | :: | v |
World y coordinate. |
Render once to named PNG, or PDF for .pdf name.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | name |
Output file name; |
Close open device, if any.
Shift interval [a, b] into [lo, hi], keeping its span.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in) | :: | lo |
Lower bound. |
||
| real(kind=real64), | intent(in) | :: | hi |
Upper bound. |
||
| real(kind=real64), | intent(inout) | :: | a |
Lower end of interval. |
||
| real(kind=real64), | intent(inout) | :: | b |
Upper end of interval. |
Draw model-number strip above plot.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in) | :: | wx1 |
Left window edge, in world coords. |
||
| real(kind=real64), | intent(in) | :: | wx2 |
Right window edge, in world coords. |
||
| real(kind=real64), | intent(in) | :: | wy1 |
Bottom window edge, in world coords. |
||
| real(kind=real64), | intent(in) | :: | wy2 |
Top window edge, in world coords. |
||
| real(kind=real64), | intent(in) | :: | vx2 |
Right edge of plot viewport, as fraction of page width. |
Set fill hatch of convection type t.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | t |
Convection type code, from convdata.f90. |
Fill each band of bandset as its own polygon.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(bandset_t), | intent(in) | :: | bs |
Bands to fill. |
Fill one cached band as single polygon.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(band_t), | intent(in) | :: | bd |
Band to fill. |
Fill all visible bands of one type as single keyholed polygon.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(bandset_t), | intent(in) | :: | bs |
Bands of one type. |
Stroke cached region outline of one type.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(chainset_t), | intent(in) | :: | cs |
Outline chains of one type. |
Grow polygon scratch epx, epy to hold at least need points.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | need |
Number of points needed. |
Fill colour field as nested solid bands shaded by colormap.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | f |
Colour field index, as registered in convdata.f90. |
Fill energy layer as nested solid bands.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | layer |
Energy layer index, as in layers.f90. |
Draw cell and time-boundary grid over visible range.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in) | :: | wx1 |
Left window edge, in world coords. |
||
| real(kind=real64), | intent(in) | :: | wx2 |
Right window edge, in world coords. |
||
| real(kind=real64), | intent(in) | :: | wy1 |
Bottom window edge, in world coords. |
||
| real(kind=real64), | intent(in) | :: | wy2 |
Top window edge, in world coords. |
Draw time boundary at world x, spanning extent of models i and k.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in) | :: | x |
World x coord of boundary. |
||
| integer(kind=int32), | intent(in) | :: | i |
Model on one side of boundary. |
||
| integer(kind=int32), | intent(in) | :: | k |
Model on other side of boundary. |
Draw cell faces of one strip as zig-zag polyline.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in) | :: | xa |
Left strip edge, in world coords. |
||
| real(kind=real64), | intent(in) | :: | xb |
Right strip edge, in world coords. |
||
| real(kind=real64), | intent(in) | :: | c(:) |
Cell faces in cgs, centre to surface. |
||
| real(kind=real64), | intent(in) | :: | dyw |
Smallest face spacing drawn, in world y units. |