<jupyter_start><jupyter_text>Test how many times filling is done for each month<jupyter_code>fill_sums_data = {}
for dataset, var_name in [
    (Ext_MOD15A2H_fPAR(), "FAPAR"),
]:
    selected_d = Datasets(dataset).select_variables(var_name).dataset
    selected_d.limit_months(
        PartialDateTime(year=2008, month=1), PartialDateTime(year=2015, month=4)
    )
    cube = selected_d.cube
    assert cube.shape[0] > 10
    filled, fill_masks = _persistent_gap_filling(cube, verbose=True)
    fill_masks_sum = {
        month_number: np.vstack([data[None] for data in fill_masks[month_number]]).mean(
            axis=0
        )
        for month_number in fill_masks
    }
    fill_sums_data[var_name] = fill_masks_sum
for var_name, fill_masks_sum in fill_sums_data.items():
    fig = plt.figure(figsize=(6.9, 5.5))
    axes = []

    cax_height = 0.01
    cax_width = 0.3
    cax = fig.add_axes([0.5 - cax_width / 2, 0, cax_width, cax_height])

    height = (1 - cax_height) / 4
    width = 1 / 3
    width_pad = 0.008

    for y in np.linspace(1, cax_height, 4, endpoint=False):
        for x in np.linspace(0, 1, 3, endpoint=False):
            axes.append(
                fig.add_axes(
                    [x + width_pad, y - height, width - 2 * width_pad, height],
                    projection=ccrs.Robinson(),
                )
            )

    for month_number, ax in zip(fill_masks_sum, axes):
        cube_plotting(
            fill_masks_sum[month_number],
            title="",
            ax=ax,
            boundaries=np.linspace(0, 1, 11),
            colorbar_kwargs=False
            if month_number != 11
            else dict(
                label="Filled Fraction (1)",
                cax=cax,
                orientation="horizontal",
                format="%.1f",
            ),
        )
        ax.set_title(f"{calendar.month_abbr[month_number]}")
    map_figure_saver.save_figure(fig, f"{var_name}_nr_filled_per_month")
    gc.collect()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11288711288711288, 'fraction_numerical': 0.025974025974025976, 'mean_word_length': 2.2099358974358974, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, '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': '605862', 'license': 'MIT', 'n_tokens_mistral': 734, 'n_tokens_neox': 687, 'n_words': 129, 'path': 'analysis/data_exploration/minimum_value_fill_statistics.ipynb', 'repo_name': 'akuhnregnier/empirical-fire-modelling', 'size': '2002'}