Commit 99e82ee0 authored by Pierre Cazenave's avatar Pierre Cazenave

Add a map of the time series locations.

parent 0515a3f1
......@@ -8,6 +8,7 @@ The model grids must match exactly in the different model runs.
import os
import glob
import string
import numpy as np
import matplotlib.pyplot as plt
......@@ -201,6 +202,23 @@ if __name__ == '__main__':
# we've got observations.
F, valid_indices = timeseries(conf, sites)
labels = ['{})'.format(s) for s in list(string.ascii_lowercase)]
# Plot a map.
FG = ncread(fvcom[0], vars=('lon', 'lat', 'h', 'nv'))
fig0 = plt.figure(figsize=(10, 7))
ax0 = fig0.add_subplot(1, 1, 1)
tp0 = ax0.tripcolor(FG['lon'], FG['lat'], FG['nv'].transpose() - 1, -FG['h'])
pt0 = ax0.plot(F[names[0]]['lon'], F[names[0]]['lat'], 'wo')
for ii, p in enumerate(valid_indices):
ax0.text(F[names[0]]['lon'][p], F[names[0]]['lat'][p],
labels[ii % len(labels)], color='w')
cb0 = fig0.colorbar(tp0)
cb0.set_label('Depth (m)')
# Fix number formatting.
date_fmt = DateFormatter('%m')
formatter = ScalarFormatter(useOffset=False)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment