Module_Winter_utils

Description of Subroutines and functions in the Winter_utils module.

Subroutine SetGrPlotPage(Frame,PageSize,RGBBACK,PageOrientation)
    Purpose: To set the on screen graphic area equal to the
    aspect of selected paper page size, to keep the shape of the
    on screen plot area within the plot window, regardless of the size and
    shape of the window.
    The subroutine should be called every time there is an expose resize event.
    The graphic window will be cleard to the selected background colour if present,
    if not it will be cleared to a default light grey colour, and the graphic area will be white.
    A frame will be drawn if requested.
    
INTEGER FUNCTION IGrAreaPixels(ITEM)
    This function returns the width or heigth of the graphics area
    in pixels on screen
    
REAL(KIND=SP) FUNCTION PgAreaAspect()
    This function returns the aspect (width/heigth) of the presentation
    graphics area
    
REAL(KIND=SP) FUNCTION GaChrHight(RELHGT)
    A more suitable way to specify character hight.
    This function returns the character cell hight, expressed as a proportion
    of the graphics area size.
    If RELHGT = 1.0 it returns the hight as 1/30 (0.0333333)
    
REAL(KIND=SP) FUNCTION GaChrWidth(RELWIDTH)
    A more suitable way to specify character width.
    This function returns the character cell width, expressed as a proportion
    of the graphics area size.
    If RELHGT = 1.0 it returns the width as 1/75 (0,0133333)
    
REAL(KIND=SP) FUNCTION PGChrHight(RELHGT)
    This function returns the character cell hight, expressed as a proportion
    of the presentation area size.
    If RELHGT = 1.0 it returns the hight as 1/30 (0.0333333) times PG Area
    hight.
    
REAL(KIND=SP) FUNCTION PGChrWidth(RELWIDTH)
    This function returns the character cell width, expressed as a proportion
    of the presentation  area size.
    If RELHGT = 1.0 it returns the hight as 1/75 (0,0133333) times the PG
    Area Width.
    
REAL(KIND=SP) FUNCTION AspectPapersize(PaperSize,PageOrientation)
    This function returns the aspect of the selected paper size
    Used to set the aspect of the graphics area = the aspect
    of a selected paper size.
    
SUBROUTINE IPgXYTickLength(RELLEN)
    Subroutine that sets the Xtic and Ytic length in one call such that
    they appare to be the same length independent of the shape of the PG area.
    For RELLEN = 1.0, tick length is calculated as 1/80 (one eightieth)
    of the extent of the shortest side of PG area
    The ticklength for the other axis is scaled to display the same length.
    
SUBROUTINE SetGrHardcopyMargins(Iunits,Left,Right,Top,Bottom)
    To set the hardcopy device margins in one call, using desired units

SUBROUTINE IPgXScalePosBot(RELLEN)
    This subroutine calculates the position of bottom X-axis scale using the same
    logic as IPgYScalePos. Sets the position of X scale values/descriptions output
    by IPgXScale/IPgXText, on 2D plots
    RELPOS describes the position of X scale numbers or descriptions as a multiple of 
    the length of a normal (i.e. non-log scale) X-axis tick mark. Increasing this value moves X scale
    values away from the bottom X axis.
    
SUBROUTINE IPgXLabelPosBot(RELPOS)
    This subroutine calculates the position of the X-Axis Label
    based on the the character heigth of the label.
    The label is positioned at a distance from the bottom X-axsis
    as RELPOS multiplied the label character hight.
    RELPOS = 0.0 positions the label on the lower x-axis.
    RELPOS = 1.0 positions the label at one character hight from the
    X-AXIS etc.
    The routine limits the X-Axis label position to the limit of the
    main graphical area.
    
SUBROUTINE IPgYLabelPosLeft(RELPOS)
    This subroutine calculates the position of the Y-Axis Label
    based on the the character heigth of the label.
    The labal is positioned at a distance from the left Y-axsis
    as RELPOS multiplied the label character hight.
    RELPOS = 0.0 positions the label on the left y-axis.
    RELPOS = 1.0 positions the label at one character hight from the
    Y-AXIS etc.
    The routine limits the Y-Axis label position to the limit of the
    main graphical area.
    
SUBROUTINE IPgTitlePosTop(RELPOS)
    This subroutine calculates the position of the Pg Title
    based on the the character heigth.
    The title is positioned at a distance from the top of the PG Area
    as RELPOS multiplied the label character hight.
    RELPOS = 0.0 positions the title just on the top of the PG Area,
             centered at this hight
    RELPOS = 1.0 positions the label at one character hight from the
             top of the PG Area etc.
    The routine limits the title position to the limit of the
    main graphical area.
    
SUBROUTINE WComDlgPosCentre( )
    This subroutine centers a dialog at the centre of the present
    window client area.
    
Subroutine Date_time_stamp (cTimestamp)
    Subroutine that generates Date and time as a string, using
    calls to the Winteracter library.
    This subroutine should probably be updated to use the new
    subroutines in Winteracter ver. 16.1, WDateString and WTimeString
    
SUBROUTINE rndlim2(stdinc,givmin, givmax, ndivs, rndmin, rndmax, ascale, nticks, iflag)
    A more flexible way to calculate the Axis tick mark positions than the built in
    IPgXScale(SCALE) and IPgYScaleLeft(SCALE) subrouitines.
    This routine is based on the RNDLIM FORTRAN routine:
    Round limits routine for graphics. December 1976.
    William 0. Johnston. NR-AD-S, White sands missile range.
    New Mexico 88002.
    
    The routine is converted to modern Fortran 90 style and adjusted
    to use an imported list of standard increments to allow use of
    increments suitable for a specific task.
    
REAL(KIND=SP) FUNCTION WinfoPgMargin(MRGIN)
    This function returns the margin between the graphics area and the the
    Presentation graphics area in user defined GA Units
    
REAL(KIND=SP) FUNCTION WinfoPgPos(POS)
    This function returns the positions of Presentation graphics area
    in user defined GA Units.
    POS = 1 returns left position in user grapical units
    POS = 2 returns bottom position in user grapical units
    POS = 3 returns right position in user grapical units
    POS = 4 returns top position in user grapical units
    
