! bn_hovmuller_overlays_noremote.jnl
! run this in the gif benchmarks.

def view/xlim=0,.333/ylim=.5,1    ul6
def view/xlim=.333,.666/ylim=.5,1 um6
def view/xlim=.666,1/ylim=.5,1    ur6
def view/xlim=0,.333/ylim=0,.5    ll6
def view/xlim=.333,1/ylim=0,.5    lr6

! The example from the FAQ, "Overlaying a time series on a 2D plot"
set view ul6

! Define a 2D field in YT with a time axis in units of DAYS
DEFINE AXIS/T="1-JAN-1980":"1-JAN-1990":5/UNITS=DAYS tdays
DEFINE AXIS/Y=0:40N:2/UNITS=DEGREES yax

LET/TITLE=XY my_var = 10*cos(T[gt=tdays]/2000)*EXP((-1)*y[gy=yax]/20)

! make a Hovmoller plot

SHADE my_var

! This did not work previously.  Needed to re-define the axis in units of hours
PLOT/OVER my_var[Y=@loc:-4]


! XT variable
set view um6

DEFINE AXIS/X=0:40E:1/UNITS=DEGREES xax
LET/TITLE="XT" my_var = 10*cos(T[gt=tdays]/20)*EXP((-1)*x[gx=xax]/20)
SHADE/t=1-jan-1987:1-jan-1989 my_var
PLOT/OVER/TRANS/THICK my_var[x=@loc:-4]


! Irregular time axis
set view ur6

DEFINE AXIS/T0=1-jan-2001/UNITS=DAYS tdays = {1,2,4,5,6,8,9,10,12,30,35,41,42,44,45,46,48,49,50,58}
DEFINE AXIS/Y=0:40N:2/UNITS=DEGREES yax
LET my_var = 10*cos(T[gt=tdays])*EXP((-1)*y[gy=yax]/8)

FILL/title="irregular t" my_var
PLOT/OVER/thick/y=8 my_var+10

FRAME/FILE=bn_hovmuller_overlays.gif

can data/all
can region

