!ls *.nc !ncdump -h uas_Amon_ACCESS1-3_rcp85_r1i1p1_205006-205008_aus.nc import cdms2 u_name = 'uas_Amon_ACCESS1-3_rcp85_r1i1p1_205006-205008_aus.nc' u_file = cdms2.open(u_name) u_data = u_file('uas') v_name = 'vas_Amon_ACCESS1-3_rcp85_r1i1p1_205006-205008_aus.nc' v_file = cdms2.open(v_name) v_data = v_file('vas') print 'udata is of type:', type(u_data) print 'Metadata about the time axis:' print u_data.getTime() print 'Raw time axis values:' print u_data.getTime()[:] print 'Time axis values in a friendlier format:' print u_data.getTime().asComponentTime() wsp_data = (u_data**2 + v_data**2)**0.5 print 'Metadata about the time axis:' print wsp_data.getTime() print 'Time axis values in a friendlier format:' print wsp_data.getTime().asComponentTime() global_atts = u_file.attributes old_history = global_atts['history'] print old_history import datetime time_stamp = datetime.datetime.now().strftime("%a %b %d %H:%M:%S %Y") print time_stamp import sys print sys.argv args = " ".join(sys.argv) print args exe = sys.executable print exe from git import Repo import os git_hash = Repo(os.getcwd()).head.commit.hexsha print git_hash entry = """%s: %s %s (Git hash: %s)""" %(time_stamp, exe, args, git_hash[0:7]) print entry !cat calc_wind_speed.py !/usr/local/uvcdat/1.5.1/bin/python calc_wind_speed.py uas_Amon_ACCESS1-3_rcp85_r1i1p1_205006-205008_aus.nc uas vas_Amon_ACCESS1-3_rcp85_r1i1p1_205006-205008_aus.nc vas wsp_Amon_ACCESS1-3_rcp85_r1i1p1_205006-205008_aus.nc !ncdump -h wsp_Amon_ACCESS1-3_rcp85_r1i1p1_205006-205008_aus.nc