<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Try to show how easy it can be to load files and use built in data values.
(also show the difference in monthly average concentration due to rounding.)
Step1:  any missing data in the set?
Step2:  total points different by more than .5
<ASSISTANT_TASK:>
Python Code:
import rockbag as rb
import matplotlib as mpl
import matplotlib.pyplot as plt
%matplotlib inline
mpl.rcParams["figure.facecolor"] = "white"
mpl.rcParams["axes.facecolor"] = "white"
mpl.rcParams["savefig.facecolor"] = "white"
import numpy as np
# stub list of files for 2012 09
def get_files():
    files = ["/projects/DATASETS/nsidc0051_gsfc_nasateam_seaice/final-gsfc/north/daily/2012/nt_20120901_f17_v01_n.bin",
             "/projects/DATASETS/nsidc0051_gsfc_nasateam_seaice/final-gsfc/north/daily/2012/nt_20120902_f17_v01_n.bin",
             "/projects/DATASETS/nsidc0051_gsfc_nasateam_seaice/final-gsfc/north/daily/2012/nt_20120903_f17_v01_n.bin",
             "/projects/DATASETS/nsidc0051_gsfc_nasateam_seaice/final-gsfc/north/daily/2012/nt_20120904_f17_v01_n.bin",
             "/projects/DATASETS/nsidc0051_gsfc_nasateam_seaice/final-gsfc/north/daily/2012/nt_20120905_f17_v01_n.bin",
             "/projects/DATASETS/nsidc0051_gsfc_nasateam_seaice/final-gsfc/north/daily/2012/nt_20120906_f17_v01_n.bin",
             "/projects/DATASETS/nsidc0051_gsfc_nasateam_seaice/final-gsfc/north/daily/2012/nt_20120907_f17_v01_n.bin",
             "/projects/DATASETS/nsidc0051_gsfc_nasateam_seaice/final-gsfc/north/daily/2012/nt_20120908_f17_v01_n.bin",
             "/projects/DATASETS/nsidc0051_gsfc_nasateam_seaice/final-gsfc/north/daily/2012/nt_20120909_f17_v01_n.bin",
             "/projects/DATASETS/nsidc0051_gsfc_nasateam_seaice/final-gsfc/north/daily/2012/nt_20120910_f17_v01_n.bin",
             "/projects/DATASETS/nsidc0051_gsfc_nasateam_seaice/final-gsfc/north/daily/2012/nt_20120911_f17_v01_n.bin",
             "/projects/DATASETS/nsidc0051_gsfc_nasateam_seaice/final-gsfc/north/daily/2012/nt_20120912_f17_v01_n.bin",
             "/projects/DATASETS/nsidc0051_gsfc_nasateam_seaice/final-gsfc/north/daily/2012/nt_20120913_f17_v01_n.bin",
             "/projects/DATASETS/nsidc0051_gsfc_nasateam_seaice/final-gsfc/north/daily/2012/nt_20120914_f17_v01_n.bin",
             "/projects/DATASETS/nsidc0051_gsfc_nasateam_seaice/final-gsfc/north/daily/2012/nt_20120915_f17_v01_n.bin",
             "/projects/DATASETS/nsidc0051_gsfc_nasateam_seaice/final-gsfc/north/daily/2012/nt_20120916_f17_v01_n.bin",
             "/projects/DATASETS/nsidc0051_gsfc_nasateam_seaice/final-gsfc/north/daily/2012/nt_20120917_f17_v01_n.bin",
             "/projects/DATASETS/nsidc0051_gsfc_nasateam_seaice/final-gsfc/north/daily/2012/nt_20120918_f17_v01_n.bin",
             "/projects/DATASETS/nsidc0051_gsfc_nasateam_seaice/final-gsfc/north/daily/2012/nt_20120919_f17_v01_n.bin",
             "/projects/DATASETS/nsidc0051_gsfc_nasateam_seaice/final-gsfc/north/daily/2012/nt_20120920_f17_v01_n.bin",
             "/projects/DATASETS/nsidc0051_gsfc_nasateam_seaice/final-gsfc/north/daily/2012/nt_20120921_f17_v01_n.bin",
             "/projects/DATASETS/nsidc0051_gsfc_nasateam_seaice/final-gsfc/north/daily/2012/nt_20120922_f17_v01_n.bin",
             "/projects/DATASETS/nsidc0051_gsfc_nasateam_seaice/final-gsfc/north/daily/2012/nt_20120923_f17_v01_n.bin",
             "/projects/DATASETS/nsidc0051_gsfc_nasateam_seaice/final-gsfc/north/daily/2012/nt_20120924_f17_v01_n.bin",
             "/projects/DATASETS/nsidc0051_gsfc_nasateam_seaice/final-gsfc/north/daily/2012/nt_20120925_f17_v01_n.bin",
             "/projects/DATASETS/nsidc0051_gsfc_nasateam_seaice/final-gsfc/north/daily/2012/nt_20120926_f17_v01_n.bin",
             "/projects/DATASETS/nsidc0051_gsfc_nasateam_seaice/final-gsfc/north/daily/2012/nt_20120927_f17_v01_n.bin",
             "/projects/DATASETS/nsidc0051_gsfc_nasateam_seaice/final-gsfc/north/daily/2012/nt_20120928_f17_v01_n.bin",
             "/projects/DATASETS/nsidc0051_gsfc_nasateam_seaice/final-gsfc/north/daily/2012/nt_20120929_f17_v01_n.bin",
             "/projects/DATASETS/nsidc0051_gsfc_nasateam_seaice/final-gsfc/north/daily/2012/nt_20120930_f17_v01_n.bin"]
    return files
files = get_files()
def load_month(files):
    cube = np.dstack(tuple([file_data(f) for f in files]))
    return cube
    
def file_data(file):
    a = rb.suckgrid(file, gpd='N3B', header=300)
    return a
z = load_month(get_files())
average = z.mean(axis=2)
stddev = z.std(axis=2)
Explanation: Try to show how easy it can be to load files and use built in data values.
(also show the difference in monthly average concentration due to rounding.)
End of explanation
np.any(z == 255)
np.any((average > 100) & (average < 250))
with mpl.rc_context(rc={'figure.figsize': (10,9), 'axes.grid':False}, ):
    plt.imshow(stddev)
with mpl.rc_context(rc={'figure.figsize': (10,9), 'axes.grid':False}, ):
    plt.imshow(average)
month_file = '/projects/DATASETS/nsidc0051_gsfc_nasateam_seaice/final-gsfc/north/monthly/nt_201209_f17_v01_n.bin'
gsfc_month_data  = rb.suckgrid(month_file, gpd='N3B', header=300)
with mpl.rc_context(rc={'figure.figsize': (10,9), 'axes.grid':False}, ):
    plt.imshow(gsfc_month_data)
np.min(gsfc_month_data[gsfc_month_data > 0])
np.min(average[average > 0])
gsfc_month_data
diff = average - gsfc_month_data
with mpl.rc_context(rc={'figure.figsize': (10,9), 'axes.grid':False}, ):
    plt.imshow(np.abs(diff) > .6, cmap="Blues")
(np.abs(diff) > .6).sum()
with mpl.rc_context(rc={'figure.figsize': (10,9), 'axes.grid':False}, ):
    plt.imshow(np.abs(diff) > .5, cmap="Blues")
Explanation: any missing data in the set?
End of explanation
(np.abs(diff) > .5).sum()
with mpl.rc_context(rc={'figure.figsize': (10,9), 'axes.grid':False}, ):
    plt.imshow(np.abs(diff) > .2, cmap="Blues")
Explanation: total points different by more than .5
End of explanation
<END_TASK>