import numpy as np
import matplotlib.pyplot as plt
from PyFVCOM.read import MFileReader
from PyFVCOM.plot import Time
# Multiple output files can be loaded with MFileReader.
files = ['sample_april.nc', 'sample_may.nc', 'sample_june.nc']
# Positions we're interested in plotting. The find_nearest_point
# function will find the closest node in the unstructured grid.
xy = np.array(((-4.5, 55), (-6.9, 52))) # lon, lat pairs
# Extract only the surface layer for the plot.
dims = {'siglay': [0]}
# Our variables of interest.
varlist = ['temp']
fvcom = MFileReader(files, variables=varlist, dims=dims)
# Find the nodes in the grid closest to the positions we're interested in plotting.
indices = [fvcom.closest_node(