;
; Open NetCDF file containing geo-potential height forecast information.
;
a = addfile("data/94062612_nH.cdf","r")

;
; Create an X workstation object using defaults.
;
wks = create "wks" xWorkstationLayerClass noparent end create

;
; Create a scalar field object; configure the missing values and
; the start and end information.
;
field1 = create "field1" scalarFieldLayerClass noparent
	"sfDataArray" : a->Z(0,3,:,:) 
	"sfMissingValueV": a->Z@_FillValue
	"sfXCStartV" : a->lon(0)
	"sfXCEndV": a->lon(dimsizes(a->lon) - 1)
	"sfYCStartV" : a->lat(0)
	"sfYCEndV": a->lat(dimsizes(a->lat) - 1)
end create

;
; Create a contour object.
;
con1 = create "con1" contourLayerClass wks 
	"vpXF": .2
	"vpYF": .8
	"vpWidthF" : .6
	"vpHeightF" : .6
	"cnScalarFieldData" : field1
	"cnLevelSelectionMode" : "MANUAL"
	"cnMinLevelValF" : 5400.0
	"cnMaxLevelValF" : 5950.0
	"cnLevelSpacingF" : 50.0
	"cnMonoFillPattern" : "True"
	"cnFillPatterns" : 0
	"cnFillOn" : "True"
	"trXMinF" : -140.0
	"trXMaxF" : -52.5
	"trYMinF" : 20.0
	"trYMaxF" : 60.0
	"tiMainString" : "Geo-potential height @500mb"
	"tiXAxisString" : "Lon"
	"tiYAxisString" : "Lat"
	"tmXBMode" : "EXPLICIT"
	"tmXBValues" : (/-60, -75, -90, -105, -120, -135 /)
	"tmXBLabels" : (/"60W", "75W", "90W", "105W", "120W", "135W"/)
	"tmYLMode" : "EXPLICIT"
	"tmYLValues" : (/60, 50, 40 , 30, 20/)
	"tmYLLabels" : (/"60N", "50N", "40N", "30N", "20N"/)
	"tmXMajorGrid" : "True"
	"tmYMajorGrid" : "True"
	"tmXBMinorOn" : "False"
	"tmYLMinorOn" : "False"
end create
draw(con1)
frame(wks)

;
; Loop on remaing time steps.
;
do i = 1, dimsizes(a->frtime) - 1
	setvalues field1
		"sfDataArray" : a->Z(i,3,:,:) 
	end setvalues
	draw(con1)
	frame(wks)
end do