def plot_spot(fcst, variable_name=None): """ Takes a forecast that is assumed to hold a spot forecast and infers the type of variable then uses the corresponding plot utilities. """ variable_name = variable_name or utils.infer_variable(fcst) variable = query_utils.get_variable(variable_name) if isinstance(variable, schemes.VelocityVariable): spot.spot_velocity(fcst, variable) else: raise NotImplementedError("Only support velocity variables at " "the moment.")