xtrans Function

public pure function xtrans(x) result(p)

Map x value to world coords.

Log axis: log10, floored at LOGMIN. Linear axis: subtracts xoff.

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)


Source Code

   pure function xtrans(x) result(p)
      !! Map x value to world coords.
      !!
      !! Log axis: log10, floored at `LOGMIN`. Linear axis: subtracts `xoff`.
      ! Arguments
      real(real64), intent(in) :: x
         !! x value in `xval` units: time in `st%tunit`, or model number.
      real(real64) :: p
      if (st%xlog) then
         p = log10(max(x, LOGMIN))
      else
         p = x - xoff
      end if
   end function xtrans