<jupyter_start><jupyter_text>Create some variation to simulate use of an ensemble of runs<jupyter_code>data = []

for i in range(10):
    v = np.zeros(arr.shape)
    logging.info("Iteration {}".format(i))
    data.append(arr + v)
    
data = np.array(data)
data.shape
mean = data.mean(axis=0)
std = data.std(axis=0)<jupyter_output><empty_output><jupyter_text>CF Creation of DatasetThe intention is to add the necessary parameters to the below dataset call in xarray that will create a CF compliant file.<jupyter_code>ds = xr.Dataset(
    data_vars=dict(
        mean=(["xc", "yc", "leadtime"], mean.squeeze()),
        std=(["xc", "yc", "leadtime"], std.squeeze()),       
    ),
    coords=dict(
        xc=xc,
        yc=yc,
        leadtime=dates,
        forecast_date=forecast_date,
    )
)
ds.sel(leadtime=dates[0]).data_vars["mean"].plot(x="xc", y="yc", size=8, cmap="twilight", vmin=0.25, vmax=0.75)
ds.sel(leadtime=dates[1]).data_vars["mean"].plot(x="xc", y="yc", size=8, cmap="twilight", vmin=0.25, vmax=0.75)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.17159199237368922, 'fraction_numerical': 0.019065776930409915, 'mean_word_length': 4.198019801980198, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '72355', 'license': 'MIT', 'n_tokens_mistral': 409, 'n_tokens_neox': 394, 'n_words': 79, 'path': 'scratch/cf/Untitled.ipynb', 'repo_name': 'antarctica/IceNet-Pipeline', 'size': '1049'}