coords Module

Model axes and world-coordinate transforms.

"Display units": units of st view limits, xval units on x, st%munit or st%runit on y. "World coords": giza window coords, display units (minus xoff on x) on linear axes, their log10 on log axes.



Variables

Type Visibility Attributes Name Initial
real(kind=real64), private, parameter :: LOGMIN = 1.d-99

Floor applied before log10 so zero and negative values stay finite.

real(kind=real64), public :: xoff = 0.d0

Time offset subtracted from linear x world coords, in st%tunit.

Set w/ its label on each render by draw_scene.


Functions

public pure function yscale() result(s)

Return cgs size of one y display unit.

Read more…

Arguments

None

Return Value real(kind=real64)

public pure function xtrans(x) result(p)

Map x value to world coords.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: x

x value in xval units: time in st%tunit, or model number.

Return Value real(kind=real64)

public pure function ytrans(c) result(p)

Map cgs mass or radius to world coords.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: c

Mass (g) or radius (cm).

Return Value real(kind=real64)

public pure function ytrans2(v) result(p)

Map y value in display units to world coords.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: v

y value in st%munit or st%runit.

Return Value real(kind=real64)

public pure function inv_x(w) result(v)

Map world x coord back to display units.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: w

World x coordinate.

Return Value real(kind=real64)

public pure function inv_y(w) result(v)

Map world y coord back to display units.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: w

World y coordinate.

Return Value real(kind=real64)

public pure function mbound(i, k) result(c)

Return cgs mass or radius of convection boundary k of model i.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: i

Model index; boundary index, 0..nconv.

integer(kind=int32), intent(in) :: k

Model index; boundary index, 0..nconv.

Return Value real(kind=real64)

public pure function coord_at(i, ic) result(c)

Return cgs mass or radius at coordinate index ic of model i.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: i

Model index; coordinate index.

integer(kind=int32), intent(in) :: ic

Model index; coordinate index.

Return Value real(kind=real64)

public pure function bisect_le(arr, v) result(k)

Return largest k w/ arr(k) <= v, or 0 if v < arr(1).

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: arr(:)

Ascending array; value to place.

real(kind=real64), intent(in) :: v

Ascending array; value to place.

Return Value integer(kind=int32)


Subroutines

public subroutine build_axes()

Build per-model x coordinate, strip edges and outer boundary.

Read more…

Arguments

None

public subroutine kipp_autoscale()

Reset auto view limits from data.

Read more…

Arguments

None

public subroutine set_time_unit(k)

Switch time unit to UNAME(k), keeping view.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: k

Unit index into units.f90 tables.