plt.title(pltnames[i]) plt.colorbar() plt.savefig(file) # <codecell> # change to higher dir for loading to work os.chdir('/home/martin/Projects/Climate/ndw-climate/') # load up the monthly SLP geo-field # print("[%s] Loading SLP geo field..." % (str(datetime.now()))) # gf = load_monthly_slp_all() print("[%s] Loading SAT SH geo field..." % (str(datetime.now()))) gf = load_monthly_data_general('data/air.mon.mean.nc', 'air', date(1948, 1, 1), date(2012, 1, 1), None, None, [-89, 0], 0) # load up the monthly SAT geo-field # print("[%s] Loading SAT geo field..." % (str(datetime.now()))) # gf = load_monthly_sat_all() print("[%s] Field loaded." % (str(datetime.now()))) # <codecell> print gf.d.shape print gf.lons[0], gf.lons[-1] print gf.lats[0], gf.lats[-1] print gf.d.shape[1] * gf.d.shape[2] # <codecell>
plt.colorbar() plt.savefig(file) # <codecell> # change to higher dir for loading to work os.chdir('/home/martin/Projects/Climate/ndw-climate/') # load up the monthly SLP geo-field # print("[%s] Loading SLP geo field..." % (str(datetime.now()))) # gf = load_monthly_slp_all() print("[%s] Loading SAT SH geo field..." % (str(datetime.now()))) gf = load_monthly_data_general('data/air.mon.mean.nc', 'air', date(1948, 1, 1), date(2012, 1, 1), None, None, [-89, 0], 0) # load up the monthly SAT geo-field # print("[%s] Loading SAT geo field..." % (str(datetime.now()))) # gf = load_monthly_sat_all() print("[%s] Field loaded." % (str(datetime.now()))) # <codecell> print gf.d.shape print gf.lons[0], gf.lons[-1] print gf.lats[0], gf.lats[-1] print gf.d.shape[1] * gf.d.shape[2] # <codecell>
# <markdowncell> # **Loading & filtering phase** # # Now we must filter the data in frequency, the data loading has thus been moved here. # <codecell> os.chdir('/home/martin/Projects/ndw-climate/') # load up the monthly SLP geo-field print("[%s] Loading geo field..." % (str(datetime.now()))) gf = load_monthly_data_general("data/hgt.mon.mean.nc", "hgt", date(1948, 1, 1), date(2012, 1, 1), None, None, None, 5) # load up the monthly SLP geo-field if USE_MUVAR: print("[%s] Constructing F2 surrogate ..." % (str(datetime.now()))) sgf = SurrGeoFieldAR() sgf.copy_field(gf) sgf.construct_fourier2_surrogates() sgf.d = sgf.sd.copy() # slide in fourier2 surrogate orig_gf = gf gf = sgf
np.random.seed() # <markdowncell> # **Loading & filtering phase** # # Now we must filter the data in frequency, the data loading has thus been moved here. # <codecell> os.chdir('/home/martin/Projects/ndw-climate/') # load up the monthly SLP geo-field print("[%s] Loading geo field..." % (str(datetime.now()))) gf = load_monthly_data_general("data/hgt.mon.mean.nc", "hgt", date(1948, 1, 1), date(2012, 1, 1), None, None, None, 5) # load up the monthly SLP geo-field if USE_MUVAR: print("[%s] Constructing F2 surrogate ..." % (str(datetime.now()))) sgf = SurrGeoFieldAR() sgf.copy_field(gf) sgf.construct_fourier2_surrogates() sgf.d = sgf.sd.copy() # slide in fourier2 surrogate orig_gf = gf gf = sgf # load up the monthly SLP geo-field print("[%s] Done loading, data hase shape %s." %