<jupyter_start><jupyter_text>Plot each epoch<jupyter_code>fig=plt.figure( figsize=[8, 6])
ax=fig.subplots(3, 5, gridspec_kw={'wspace':0.05, 'hspace':0.05})#, sharex=True, sharey=True)
strings=xover_epochs+['2019.Q2-2019.Q3', '2019.Q3-2019.Q4', '2019.Q4-2020.Q1']

for row, model in enumerate(['Data',  'MARv3_11_2_ERA_6km', 'GSFC_fdm_v1_1']):
    for col, epoch in enumerate(strings):
        if row==0:
            ax[row, col].set_title(epoch.replace('-','\n to '))
        if col==0:
            ax[row, col].set_ylabel(model)
        if model == 'Data':
            D=delta_data['MARv3_11_2_ERA_6km']
            temp=D[epoch]
            dh=temp.data
        else:
            D=delta_data[model]
            temp=D[epoch]            
            dh=D[epoch].corrected   
        ind=np.argsort(np.abs(dh))    
        hi=ax[row, col].scatter(temp.x[ind], temp.y[ind], 1, c=dh[ind],\
                 vmin=-2.5, vmax=2.5, cmap='Spectral');
        ax[row, col].set_xticks([])
        ax[row, col].set_yticks([])
        plt.axis('equal');
plt.colorbar(hi, ax=ax, shrink=0.5, extend='both', label='$\delta h$, m');
out_file=data_root+f'/combined_xover_at_differences_{version}.h5'
if os.path.isfile(out_file):
    os.remove(out_file)
for model in delta_data.keys():
    for epoch in delta_data[model]:
        delta_data[model][epoch].to_h5(out_file, group='/'+model+'/'+epoch, replace=False)

fig=plt.figure(22, figsize=[8, 6])
ax=fig.subplots(3, 5, gridspec_kw={'wspace':0.05, 'hspace':0.05})
strings=xover_epochs+['2019.Q2-2019.Q3', '2019.Q2-2019.Q4', '2019.Q2-2020.Q1']

for row, model in enumerate(['Data',  'MARv3_11_2_ERA_6km', 'GSFC_fdm_v1_1']):
    for col, epoch in enumerate(strings):
        if row==0:
            ax[row, col].set_title(epoch.replace('-','\n to '))
        if col==0:
            ax[row, col].set_ylabel(model.replace('_zsurf','').replace('_6km',''))
        if model == 'Data':
            D=delta_data_c3['MARv3_11_2_ERA_6km']
            temp=D[epoch]
            dh=temp.data
        else:
            D=delta_data_c3[model]
            temp=D[epoch]            
            dh=D[epoch].corrected     
        ind=np.argsort(np.abs(dh))    
        hi=ax[row, col].scatter(temp.x[ind], temp.y[ind], 1, c=dh[ind],\
                 vmin=-2.5, vmax=2.5, cmap='Spectral');
        ax[row, col].set_xticks([])
        ax[row, col].set_yticks([])
        plt.axis('equal');
plt.colorbar(hi, ax=ax, shrink=0.5, extend='both', label='$\delta h$, m');


out_file=data_root+f'/combined_xover_at_differences_wrtc3_{version}.h5'
if os.path.isfile(out_file):
    os.remove(out_file)
for model in delta_data_c3.keys():
    for epoch in delta_data_c3[model]:
        delta_data_c3[model][epoch].to_h5(out_file, group='/'+model+'/'+epoch, replace=False)
! ls -lt /Volumes/ice2/ben/MAR/ATL11_with_corrections//combined_xover_at_differences_*

! ls -l {out_file}
fig=plt.figure( figsize=[8, 2])
ax=fig.subplots(1, 5, gridspec_kw={'wspace':0.05, 'hspace':0.05})#, sharex=True, sharey=True)
strings=xover_epochs+['2019.Q2-2019.Q3', '2019.Q3-2019.Q4', '2019.Q4-2020.Q1']


for col, epoch in enumerate(strings):
    ax[ col].set_title(epoch.replace('-','\n to '))
   
    temp=delta_data['MARv3_11_2_ERA_6km'][epoch]
    dh=temp.melt
        
    ind=np.argsort(np.abs(dh))    
    hi=ax[col].scatter(temp.x[ind], temp.y[ind], 1, c=dh[ind],\
                 vmin=-2.5, vmax=2.5, cmap='Spectral');
    ax[row, col].set_xticks([])
    ax[row, col].set_yticks([])
    plt.axis('equal');
plt.colorbar(hi, ax=ax, shrink=0.5, extend='both', label='$\delta h$, m');<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1932889628397116, 'fraction_numerical': 0.05268996117581808, 'mean_word_length': 3.1412169919632604, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '368701', 'license': 'MIT', 'n_tokens_mistral': 1584, 'n_tokens_neox': 1475, 'n_words': 206, 'path': 'notebooks/reduce_firn_dh_rel002.ipynb', 'repo_name': 'SmithB/SMBcorr', 'size': '3606'}