source: configs/testing/python/common.py @ 502

Last change on this file since 502 was 502, checked in by dubos, 8 years ago

configs/testing : towards first working version

File size: 461 bytes
Line 
1import numpy as np
2import netCDF4 as cdf
3import matplotlib.pyplot as plt
4
5def getdims(nc, *names): return [len(nc.dimensions[name]) for name in names]
6def getvars(nc, *names): return [nc.variables[name] for name in names]
7
8def axis_longitude():
9    plt.xlim((0,360))
10    plt.xlabel('longitude (degrees)')
11    plt.xticks(np.arange(0,361,30))
12
13def axis_latitude():
14    plt.ylim((-90,90))
15    plt.ylabel('latitude (degrees)')
16    plt.yticks(np.arange(-90,91,30))
17
Note: See TracBrowser for help on using the repository browser.