Repository: ecmwf/earthkit-data
Pull request #738 (2025-07-02 11:04:40)

Allow specifying metadata defaults in to_xarray
This PR adds the ``fill`` option to `to_xarray()`.

Example:

```python
# "number" is missing in the input data
ds_ek = from_source("sample", "t2_td2_1_year.grib")
   
# set the default to "numbers". Without this there would be no number dimension in the Xarray
ds = ds_ek[10].to_xarray(time_dim_mode="valid_time", ensure_dims="number", fill={"number": 0})
ds
```

Output:
```
Dimensions:    (number: 1, latitude: 3, longitude: 3)
Coordinates:
  * number     (number) int64 8B 0
  * latitude   (latitude) float64 24B 60.0 45.0 30.0
  * longitude  (longitude) float64 24B 0.0 15.0 30.0
Data variables:
    2t         (number, latitude, longitude) float64 72B ...
```


Patch:
diff --git a/docs/examples/xarray_engine_mono_variable.ipynb b/docs/examples/xarray_engine_mono_variable.ipynb
index 89214f4..5889788 100644
--- a/docs/examples/xarray_engine_mono_variable.ipynb
+++ b/docs/examples/xarray_engine_mono_variable.ipynb
@@ -33,7 +33,7 @@
     {
      "data": {
       "application/vnd.jupyter.widget-view+json": {
-       "model_id": "641267a088ac44939fe68ce9888c0bba",
+       "model_id": "a94193f267f44a6290653fc872d10ad3",
        "version_major": 2,
        "version_minor": 0
       },
@@ -66,7 +66,7 @@
    "id": "20e27e09-02fb-4f80-9224-03c3c54ecbf8",
    "metadata": {
     "editable": true,
-    "raw_mimetype": "text/x-rst",
+    "raw_mimetype": "text/restructuredtext",
     "slideshow": {
      "slide_type": ""
     },
@@ -482,10 +482,10 @@
        "    time:         0\n",
        "    domain:       g\n",
        "    Conventions:  CF-1.8\n",
-       "    institution:  ECMWF</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-8173c523-b4b6-43f0-a519-f09062454c60' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-8173c523-b4b6-43f0-a519-f09062454c60' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>valid_time</span>: 732</li><li><span class='xr-has-index'>param</span>: 2</li><li><span>values</span>: 9</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-a1ad803e-2f67-4fa2-abea-d6b0d5ff3883' class='xr-section-summary-in' type='checkbox'  checked><label for='section-a1ad803e-2f67-4fa2-abea-d6b0d5ff3883' class='xr-section-summary' >Coordinates: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>valid_time</span></div><div class='xr-var-dims'>(valid_time)</div><div class='xr-var-dtype'>datetime64[ns]</div><div class='xr-var-preview xr-preview'>2020-01-01 ... 2020-12-31T12:00:00</div><input id='attrs-b4ba56ec-fe0d-4982-bb42-2344b2cf0d69' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-b4ba56ec-fe0d-4982-bb42-2344b2cf0d69' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-d7cf18c4-9dda-42ab-8871-72b25513894c' class='xr-var-data-in' type='checkbox'><label for='data-d7cf18c4-9dda-42ab-8871-72b25513894c' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>standard_name :</span></dt><dd>time</dd><dt><span>long_name :</span></dt><dd>valid_time</dd></dl></div><div class='xr-var-data'><pre>array([&#x27;2020-01-01T00:00:00.000000000&#x27;, &#x27;2020-01-01T12:00:00.000000000&#x27;,\n",
+       "    institution:  ECMWF</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-bcb066e4-6901-4c21-9159-043a656aad92' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-bcb066e4-6901-4c21-9159-043a656aad92' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>valid_time</span>: 732</li><li><span class='xr-has-index'>param</span>: 2</li><li><span>values</span>: 9</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-ffbb21e5-821c-4f9c-b238-9cfbb9bf05fd' class='xr-section-summary-in' type='checkbox'  checked><label for='section-ffbb21e5-821c-4f9c-b238-9cfbb9bf05fd' class='xr-section-summary' >Coordinates: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>valid_time</span></div><div class='xr-var-dims'>(valid_time)</div><div class='xr-var-dtype'>datetime64[ns]</div><div class='xr-var-preview xr-preview'>2020-01-01 ... 2020-12-31T12:00:00</div><input id='attrs-7f5fc022-a8e4-4b1c-8489-9df2df79c298' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-7f5fc022-a8e4-4b1c-8489-9df2df79c298' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-52fea9dd-bd25-4b9d-be73-34a4ea2675de' class='xr-var-data-in' type='checkbox'><label for='data-52fea9dd-bd25-4b9d-be73-34a4ea2675de' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>standard_name :</span></dt><dd>time</dd><dt><span>long_name :</span></dt><dd>valid_time</dd></dl></div><div class='xr-var-data'><pre>array([&#x27;2020-01-01T00:00:00.000000000&#x27;, &#x27;2020-01-01T12:00:00.000000000&#x27;,\n",
        "       &#x27;2020-01-02T00:00:00.000000000&#x27;, ..., &#x27;2020-12-30T12:00:00.000000000&#x27;,\n",
        "       &#x27;2020-12-31T00:00:00.000000000&#x27;, &#x27;2020-12-31T12:00:00.000000000&#x27;],\n",
-       "      dtype=&#x27;datetime64[ns]&#x27;)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>param</span></div><div class='xr-var-dims'>(param)</div><div class='xr-var-dtype'>&lt;U2</div><div class='xr-var-preview xr-preview'>&#x27;2d&#x27; &#x27;2t&#x27;</div><input id='attrs-5f733b1d-53de-460d-9729-fc6047fb765a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-5f733b1d-53de-460d-9729-fc6047fb765a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f2f0358d-f0e3-4391-8baf-6ac1138aa399' class='xr-var-data-in' type='checkbox'><label for='data-f2f0358d-f0e3-4391-8baf-6ac1138aa399' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([&#x27;2d&#x27;, &#x27;2t&#x27;], dtype=&#x27;&lt;U2&#x27;)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>latitude</span></div><div class='xr-var-dims'>(values)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>dask.array&lt;chunksize=(9,), meta=np.ndarray&gt;</div><input id='attrs-5108f09a-1caf-4833-8592-a719346dac29' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-5108f09a-1caf-4833-8592-a719346dac29' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-e14dec05-f9b7-401a-b1d5-4201aa55fff7' class='xr-var-data-in' type='checkbox'><label for='data-e14dec05-f9b7-401a-b1d5-4201aa55fff7' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>degrees_north</dd><dt><span>standard_name :</span></dt><dd>latitude</dd><dt><span>long_name :</span></dt><dd>latitude</dd></dl></div><div class='xr-var-data'><table>\n",
+       "      dtype=&#x27;datetime64[ns]&#x27;)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>param</span></div><div class='xr-var-dims'>(param)</div><div class='xr-var-dtype'>&lt;U2</div><div class='xr-var-preview xr-preview'>&#x27;2d&#x27; &#x27;2t&#x27;</div><input id='attrs-7e481c91-c8c7-4dbd-9345-345bc1d58ba2' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-7e481c91-c8c7-4dbd-9345-345bc1d58ba2' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-133fc06a-b26d-468c-9893-370ee3a58d41' class='xr-var-data-in' type='checkbox'><label for='data-133fc06a-b26d-468c-9893-370ee3a58d41' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([&#x27;2d&#x27;, &#x27;2t&#x27;], dtype=&#x27;&lt;U2&#x27;)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>latitude</span></div><div class='xr-var-dims'>(values)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>dask.array&lt;chunksize=(9,), meta=np.ndarray&gt;</div><input id='attrs-e10b14e7-aff9-40fe-811e-7b45e5dbd8ba' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-e10b14e7-aff9-40fe-811e-7b45e5dbd8ba' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-bfc9fc03-9563-4329-a1ff-0055418b9824' class='xr-var-data-in' type='checkbox'><label for='data-bfc9fc03-9563-4329-a1ff-0055418b9824' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>degrees_north</dd><dt><span>standard_name :</span></dt><dd>latitude</dd><dt><span>long_name :</span></dt><dd>latitude</dd></dl></div><div class='xr-var-data'><table>\n",
        "    <tr>\n",
        "        <td>\n",
        "            <table style=\"border-collapse: collapse;\">\n",
@@ -540,7 +540,7 @@
        "</svg>\n",
        "        </td>\n",
        "    </tr>\n",
-       "</table></div></li><li class='xr-var-item'><div class='xr-var-name'><span>longitude</span></div><div class='xr-var-dims'>(values)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>dask.array&lt;chunksize=(9,), meta=np.ndarray&gt;</div><input id='attrs-93ff4743-3c5c-4043-974a-ffbb30a36d6e' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-93ff4743-3c5c-4043-974a-ffbb30a36d6e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ec8a9f7a-dc32-4663-8b34-fad608dc39bf' class='xr-var-data-in' type='checkbox'><label for='data-ec8a9f7a-dc32-4663-8b34-fad608dc39bf' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>degrees_east</dd><dt><span>standard_name :</span></dt><dd>longitude</dd><dt><span>long_name :</span></dt><dd>longitude</dd></dl></div><div class='xr-var-data'><table>\n",
+       "</table></div></li><li class='xr-var-item'><div class='xr-var-name'><span>longitude</span></div><div class='xr-var-dims'>(values)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>dask.array&lt;chunksize=(9,), meta=np.ndarray&gt;</div><input id='attrs-82ab82a2-d77d-443d-a7bd-762b6d513022' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-82ab82a2-d77d-443d-a7bd-762b6d513022' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-7c13fffc-791e-41b8-8d0e-95424feab5c0' class='xr-var-data-in' type='checkbox'><label for='data-7c13fffc-791e-41b8-8d0e-95424feab5c0' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>degrees_east</dd><dt><span>standard_name :</span></dt><dd>longitude</dd><dt><span>long_name :</span></dt><dd>longitude</dd></dl></div><div class='xr-var-data'><table>\n",
        "    <tr>\n",
        "        <td>\n",
        "            <table style=\"border-collapse: collapse;\">\n",
@@ -595,7 +595,7 @@
        "</svg>\n",
        "        </td>\n",
        "    </tr>\n",
-       "</table></div></li></ul></div></li><li class='xr-section-item'><input id='section-38073386-09f3-4e4f-9815-b8e5e6f93567' class='xr-section-summary-in' type='checkbox'  checked><label for='section-38073386-09f3-4e4f-9815-b8e5e6f93567' class='xr-section-summary' >Data variables: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>data</span></div><div class='xr-var-dims'>(valid_time, param, values)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>dask.array&lt;chunksize=(1, 2, 9), meta=np.ndarray&gt;</div><input id='attrs-5590f922-6d51-47e3-901b-8c9593499f67' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-5590f922-6d51-47e3-901b-8c9593499f67' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-3f434e46-4ef1-4b26-b0ea-542adc5240bb' class='xr-var-data-in' type='checkbox'><label for='data-3f434e46-4ef1-4b26-b0ea-542adc5240bb' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>standard_name :</span></dt><dd>unknown</dd><dt><span>long_name :</span></dt><dd>2 metre dewpoint temperature</dd><dt><span>units :</span></dt><dd>K</dd></dl></div><div class='xr-var-data'><table>\n",
+       "</table></div></li></ul></div></li><li class='xr-section-item'><input id='section-c2147d1a-4e38-4f39-8c45-0cb6cae0392b' class='xr-section-summary-in' type='checkbox'  checked><label for='section-c2147d1a-4e38-4f39-8c45-0cb6cae0392b' class='xr-section-summary' >Data variables: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>data</span></div><div class='xr-var-dims'>(valid_time, param, values)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>dask.array&lt;chunksize=(1, 2, 9), meta=np.ndarray&gt;</div><input id='attrs-c1aa8063-56ee-4e30-9bdf-04ed4ba986a2' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-c1aa8063-56ee-4e30-9bdf-04ed4ba986a2' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-80e1d3e8-2f1f-4884-8d41-24e77e8aca0e' class='xr-var-data-in' type='checkbox'><label for='data-80e1d3e8-2f1f-4884-8d41-24e77e8aca0e' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>standard_name :</span></dt><dd>unknown</dd><dt><span>long_name :</span></dt><dd>2 metre dewpoint temperature</dd><dt><span>units :</span></dt><dd>K</dd></dl></div><div class='xr-var-data'><table>\n",
        "    <tr>\n",
        "        <td>\n",
        "            <table style=\"border-collapse: collapse;\">\n",
@@ -709,7 +709,7 @@
        "</svg>\n",
        "        </td>\n",
        "    </tr>\n",
-       "</table></div></li></ul></div></li><li class='xr-section-item'><input id='section-0aeafe67-1dad-47b9-a1b5-b28e87fb1767' class='xr-section-summary-in' type='checkbox'  ><label for='section-0aeafe67-1dad-47b9-a1b5-b28e87fb1767' class='xr-section-summary' >Indexes: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>valid_time</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-433c44f6-1da6-4b04-a288-e33365265e43' class='xr-index-data-in' type='checkbox'/><label for='index-433c44f6-1da6-4b04-a288-e33365265e43' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(DatetimeIndex([&#x27;2020-01-01 00:00:00&#x27;, &#x27;2020-01-01 12:00:00&#x27;,\n",
+       "</table></div></li></ul></div></li><li class='xr-section-item'><input id='section-b60f2945-03ba-4d3a-90f4-5dd6ebf8fdcc' class='xr-section-summary-in' type='checkbox'  ><label for='section-b60f2945-03ba-4d3a-90f4-5dd6ebf8fdcc' class='xr-section-summary' >Indexes: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>valid_time</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-3314309f-9f77-4f2c-b8af-d24fdb542b26' class='xr-index-data-in' type='checkbox'/><label for='index-3314309f-9f77-4f2c-b8af-d24fdb542b26' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(DatetimeIndex([&#x27;2020-01-01 00:00:00&#x27;, &#x27;2020-01-01 12:00:00&#x27;,\n",
        "               &#x27;2020-01-02 00:00:00&#x27;, &#x27;2020-01-02 12:00:00&#x27;,\n",
        "               &#x27;2020-01-03 00:00:00&#x27;, &#x27;2020-01-03 12:00:00&#x27;,\n",
        "               &#x27;2020-01-04 00:00:00&#x27;, &#x27;2020-01-04 12:00:00&#x27;,\n",
@@ -720,7 +720,7 @@
        "               &#x27;2020-12-29 00:00:00&#x27;, &#x27;2020-12-29 12:00:00&#x27;,\n",
        "               &#x27;2020-12-30 00:00:00&#x27;, &#x27;2020-12-30 12:00:00&#x27;,\n",
        "               &#x27;2020-12-31 00:00:00&#x27;, &#x27;2020-12-31 12:00:00&#x27;],\n",
-       "              dtype=&#x27;datetime64[ns]&#x27;, name=&#x27;valid_time&#x27;, length=732, freq=None))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>param</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-f1b85bfe-48c4-4b5f-884f-9078b397cca4' class='xr-index-data-in' type='checkbox'/><label for='index-f1b85bfe-48c4-4b5f-884f-9078b397cca4' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([&#x27;2d&#x27;, &#x27;2t&#x27;], dtype=&#x27;object&#x27;, name=&#x27;param&#x27;))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-4bd1ab4f-91f2-4d49-b5e5-15e3bd6f88d2' class='xr-section-summary-in' type='checkbox'  ><label for='section-4bd1ab4f-91f2-4d49-b5e5-15e3bd6f88d2' class='xr-section-summary' >Attributes: <span>(11)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>paramId :</span></dt><dd>168</dd><dt><span>class :</span></dt><dd>d1</dd><dt><span>stream :</span></dt><dd>clte</dd><dt><span>levtype :</span></dt><dd>sfc</dd><dt><span>type :</span></dt><dd>fc</dd><dt><span>expver :</span></dt><dd>0001</dd><dt><span>date :</span></dt><dd>20200101</dd><dt><span>time :</span></dt><dd>0</dd><dt><span>domain :</span></dt><dd>g</dd><dt><span>Conventions :</span></dt><dd>CF-1.8</dd><dt><span>institution :</span></dt><dd>ECMWF</dd></dl></div></li></ul></div></div>"
+       "              dtype=&#x27;datetime64[ns]&#x27;, name=&#x27;valid_time&#x27;, length=732, freq=None))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>param</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-a2785abe-5c11-481e-9880-e0d3afda7474' class='xr-index-data-in' type='checkbox'/><label for='index-a2785abe-5c11-481e-9880-e0d3afda7474' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([&#x27;2d&#x27;, &#x27;2t&#x27;], dtype=&#x27;object&#x27;, name=&#x27;param&#x27;))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-05f708fd-20b1-4c6f-8d78-6a32c65b4fd9' class='xr-section-summary-in' type='checkbox'  ><label for='section-05f708fd-20b1-4c6f-8d78-6a32c65b4fd9' class='xr-section-summary' >Attributes: <span>(11)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>paramId :</span></dt><dd>168</dd><dt><span>class :</span></dt><dd>d1</dd><dt><span>stream :</span></dt><dd>clte</dd><dt><span>levtype :</span></dt><dd>sfc</dd><dt><span>type :</span></dt><dd>fc</dd><dt><span>expver :</span></dt><dd>0001</dd><dt><span>date :</span></dt><dd>20200101</dd><dt><span>time :</span></dt><dd>0</dd><dt><span>domain :</span></dt><dd>g</dd><dt><span>Conventions :</span></dt><dd>CF-1.8</dd><dt><span>institution :</span></dt><dd>ECMWF</dd></dl></div></li></ul></div></div>"
       ],
       "text/plain": [
        "<xarray.Dataset> Size: 111kB\n",
@@ -758,7 +758,7 @@
     "                     mono_variable=True,\n",
     "                     chunks={\"valid_time\": 1},                    \n",
     "                     flatten_values=True,                   \n",
-    "                     add_earthkit_attrs=False,                     \n",
+    "                     add_earthkit_attrs=False,   \n",
     "                    )\n",
     "ds"
    ]
@@ -1161,7 +1161,7 @@
        "Attributes:\n",
        "    standard_name:  unknown\n",
        "    long_name:      2 metre dewpoint temperature\n",
-       "    units:          K</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.DataArray</div><div class='xr-array-name'>'data'</div><ul class='xr-dim-list'><li><span class='xr-has-index'>valid_time</span>: 732</li><li><span class='xr-has-index'>param</span>: 2</li><li><span>values</span>: 9</li></ul></div><ul class='xr-sections'><li class='xr-section-item'><div class='xr-array-wrap'><input id='section-be027a52-acbe-4057-a0ab-c96392adbea0' class='xr-array-in' type='checkbox' checked><label for='section-be027a52-acbe-4057-a0ab-c96392adbea0' title='Show/hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-array-preview xr-preview'><span>dask.array&lt;chunksize=(1, 2, 9), meta=np.ndarray&gt;</span></div><div class='xr-array-data'><table>\n",
+       "    units:          K</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.DataArray</div><div class='xr-array-name'>'data'</div><ul class='xr-dim-list'><li><span class='xr-has-index'>valid_time</span>: 732</li><li><span class='xr-has-index'>param</span>: 2</li><li><span>values</span>: 9</li></ul></div><ul class='xr-sections'><li class='xr-section-item'><div class='xr-array-wrap'><input id='section-f9968fe6-d1ee-431c-9dda-9d9775823b24' class='xr-array-in' type='checkbox' checked><label for='section-f9968fe6-d1ee-431c-9dda-9d9775823b24' title='Show/hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-array-preview xr-preview'><span>dask.array&lt;chunksize=(1, 2, 9), meta=np.ndarray&gt;</span></div><div class='xr-array-data'><table>\n",
        "    <tr>\n",
        "        <td>\n",
        "            <table style=\"border-collapse: collapse;\">\n",
@@ -1275,10 +1275,10 @@
        "</svg>\n",
        "        </td>\n",
        "    </tr>\n",
-       "</table></div></div></li><li class='xr-section-item'><input id='section-7cff37d2-a036-4ba7-ae85-20cb912d5f8e' class='xr-section-summary-in' type='checkbox'  checked><label for='section-7cff37d2-a036-4ba7-ae85-20cb912d5f8e' class='xr-section-summary' >Coordinates: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>valid_time</span></div><div class='xr-var-dims'>(valid_time)</div><div class='xr-var-dtype'>datetime64[ns]</div><div class='xr-var-preview xr-preview'>2020-01-01 ... 2020-12-31T12:00:00</div><input id='attrs-557bc4de-4a06-4779-8bce-da668a6e1bb2' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-557bc4de-4a06-4779-8bce-da668a6e1bb2' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c909fc56-8616-4ec4-ba70-d931999a6c19' class='xr-var-data-in' type='checkbox'><label for='data-c909fc56-8616-4ec4-ba70-d931999a6c19' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>standard_name :</span></dt><dd>time</dd><dt><span>long_name :</span></dt><dd>valid_time</dd></dl></div><div class='xr-var-data'><pre>array([&#x27;2020-01-01T00:00:00.000000000&#x27;, &#x27;2020-01-01T12:00:00.000000000&#x27;,\n",
+       "</table></div></div></li><li class='xr-section-item'><input id='section-7639ff28-7ff4-4e83-bb77-15dadca9e349' class='xr-section-summary-in' type='checkbox'  checked><label for='section-7639ff28-7ff4-4e83-bb77-15dadca9e349' class='xr-section-summary' >Coordinates: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>valid_time</span></div><div class='xr-var-dims'>(valid_time)</div><div class='xr-var-dtype'>datetime64[ns]</div><div class='xr-var-preview xr-preview'>2020-01-01 ... 2020-12-31T12:00:00</div><input id='attrs-0842a17f-939e-404d-9b47-74998a1f07f8' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-0842a17f-939e-404d-9b47-74998a1f07f8' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c07036dd-86c0-47e9-a014-672ee9ee21ff' class='xr-var-data-in' type='checkbox'><label for='data-c07036dd-86c0-47e9-a014-672ee9ee21ff' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>standard_name :</span></dt><dd>time</dd><dt><span>long_name :</span></dt><dd>valid_time</dd></dl></div><div class='xr-var-data'><pre>array([&#x27;2020-01-01T00:00:00.000000000&#x27;, &#x27;2020-01-01T12:00:00.000000000&#x27;,\n",
        "       &#x27;2020-01-02T00:00:00.000000000&#x27;, ..., &#x27;2020-12-30T12:00:00.000000000&#x27;,\n",
        "       &#x27;2020-12-31T00:00:00.000000000&#x27;, &#x27;2020-12-31T12:00:00.000000000&#x27;],\n",
-       "      dtype=&#x27;datetime64[ns]&#x27;)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>param</span></div><div class='xr-var-dims'>(param)</div><div class='xr-var-dtype'>&lt;U2</div><div class='xr-var-preview xr-preview'>&#x27;2d&#x27; &#x27;2t&#x27;</div><input id='attrs-a78eccfb-9f8f-4172-93a2-572dd68162b0' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-a78eccfb-9f8f-4172-93a2-572dd68162b0' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-122826ed-3cda-4938-bf8c-4a0fa0b8d2d0' class='xr-var-data-in' type='checkbox'><label for='data-122826ed-3cda-4938-bf8c-4a0fa0b8d2d0' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([&#x27;2d&#x27;, &#x27;2t&#x27;], dtype=&#x27;&lt;U2&#x27;)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>latitude</span></div><div class='xr-var-dims'>(values)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>dask.array&lt;chunksize=(9,), meta=np.ndarray&gt;</div><input id='attrs-46c34f16-9fff-4e6c-8e56-918c98dbc055' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-46c34f16-9fff-4e6c-8e56-918c98dbc055' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-95bb89bb-c7c4-412d-aa86-b8bd1ab0dbfa' class='xr-var-data-in' type='checkbox'><label for='data-95bb89bb-c7c4-412d-aa86-b8bd1ab0dbfa' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>degrees_north</dd><dt><span>standard_name :</span></dt><dd>latitude</dd><dt><span>long_name :</span></dt><dd>latitude</dd></dl></div><div class='xr-var-data'><table>\n",
+       "      dtype=&#x27;datetime64[ns]&#x27;)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>param</span></div><div class='xr-var-dims'>(param)</div><div class='xr-var-dtype'>&lt;U2</div><div class='xr-var-preview xr-preview'>&#x27;2d&#x27; &#x27;2t&#x27;</div><input id='attrs-468953ac-253d-4611-9a1b-5c7af60b6037' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-468953ac-253d-4611-9a1b-5c7af60b6037' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-5524bff2-8a29-4393-9f40-2b648e7091ad' class='xr-var-data-in' type='checkbox'><label for='data-5524bff2-8a29-4393-9f40-2b648e7091ad' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([&#x27;2d&#x27;, &#x27;2t&#x27;], dtype=&#x27;&lt;U2&#x27;)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>latitude</span></div><div class='xr-var-dims'>(values)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>dask.array&lt;chunksize=(9,), meta=np.ndarray&gt;</div><input id='attrs-0044bf68-2ae7-40a0-aa15-43e762dc4511' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-0044bf68-2ae7-40a0-aa15-43e762dc4511' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-8173d76e-4ffc-492b-98c1-bc580c09df27' class='xr-var-data-in' type='checkbox'><label for='data-8173d76e-4ffc-492b-98c1-bc580c09df27' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>degrees_north</dd><dt><span>standard_name :</span></dt><dd>latitude</dd><dt><span>long_name :</span></dt><dd>latitude</dd></dl></div><div class='xr-var-data'><table>\n",
        "    <tr>\n",
        "        <td>\n",
        "            <table style=\"border-collapse: collapse;\">\n",
@@ -1333,7 +1333,7 @@
        "</svg>\n",
        "        </td>\n",
        "    </tr>\n",
-       "</table></div></li><li class='xr-var-item'><div class='xr-var-name'><span>longitude</span></div><div class='xr-var-dims'>(values)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>dask.array&lt;chunksize=(9,), meta=np.ndarray&gt;</div><input id='attrs-6fe78a51-a447-4f9a-aef9-2cac95c0cb90' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-6fe78a51-a447-4f9a-aef9-2cac95c0cb90' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-5607aa16-48af-4803-8f7f-9dac53fbacc7' class='xr-var-data-in' type='checkbox'><label for='data-5607aa16-48af-4803-8f7f-9dac53fbacc7' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>degrees_east</dd><dt><span>standard_name :</span></dt><dd>longitude</dd><dt><span>long_name :</span></dt><dd>longitude</dd></dl></div><div class='xr-var-data'><table>\n",
+       "</table></div></li><li class='xr-var-item'><div class='xr-var-name'><span>longitude</span></div><div class='xr-var-dims'>(values)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>dask.array&lt;chunksize=(9,), meta=np.ndarray&gt;</div><input id='attrs-95a5d976-e6c8-4216-97e4-320ea6ccf630' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-95a5d976-e6c8-4216-97e4-320ea6ccf630' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-13c8ce63-4cd4-48d6-8ecb-c3659198ec4c' class='xr-var-data-in' type='checkbox'><label for='data-13c8ce63-4cd4-48d6-8ecb-c3659198ec4c' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>degrees_east</dd><dt><span>standard_name :</span></dt><dd>longitude</dd><dt><span>long_name :</span></dt><dd>longitude</dd></dl></div><div class='xr-var-data'><table>\n",
        "    <tr>\n",
        "        <td>\n",
        "            <table style=\"border-collapse: collapse;\">\n",
@@ -1388,7 +1388,7 @@
        "</svg>\n",
        "        </td>\n",
        "    </tr>\n",
-       "</table></div></li></ul></div></li><li class='xr-section-item'><input id='section-ec1d6134-d4ad-44b1-b2db-9911f327adad' class='xr-section-summary-in' type='checkbox'  ><label for='section-ec1d6134-d4ad-44b1-b2db-9911f327adad' class='xr-section-summary' >Indexes: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>valid_time</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-cf7151dd-6f7e-413f-90c0-88ab96dac93e' class='xr-index-data-in' type='checkbox'/><label for='index-cf7151dd-6f7e-413f-90c0-88ab96dac93e' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(DatetimeIndex([&#x27;2020-01-01 00:00:00&#x27;, &#x27;2020-01-01 12:00:00&#x27;,\n",
+       "</table></div></li></ul></div></li><li class='xr-section-item'><input id='section-3e8be3f4-b9b1-4247-b5f6-915db4833eb1' class='xr-section-summary-in' type='checkbox'  ><label for='section-3e8be3f4-b9b1-4247-b5f6-915db4833eb1' class='xr-section-summary' >Indexes: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>valid_time</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-f53144f6-6b58-4a26-b38b-9dca0eb51b3c' class='xr-index-data-in' type='checkbox'/><label for='index-f53144f6-6b58-4a26-b38b-9dca0eb51b3c' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(DatetimeIndex([&#x27;2020-01-01 00:00:00&#x27;, &#x27;2020-01-01 12:00:00&#x27;,\n",
        "               &#x27;2020-01-02 00:00:00&#x27;, &#x27;2020-01-02 12:00:00&#x27;,\n",
        "               &#x27;2020-01-03 00:00:00&#x27;, &#x27;2020-01-03 12:00:00&#x27;,\n",
        "               &#x27;2020-01-04 00:00:00&#x27;, &#x27;2020-01-04 12:00:00&#x27;,\n",
@@ -1399,7 +1399,7 @@
        "               &#x27;2020-12-29 00:00:00&#x27;, &#x27;2020-12-29 12:00:00&#x27;,\n",
        "               &#x27;2020-12-30 00:00:00&#x27;, &#x27;2020-12-30 12:00:00&#x27;,\n",
        "               &#x27;2020-12-31 00:00:00&#x27;, &#x27;2020-12-31 12:00:00&#x27;],\n",
-       "              dtype=&#x27;datetime64[ns]&#x27;, name=&#x27;valid_time&#x27;, length=732, freq=None))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>param</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-a4c7bfb7-07e4-4171-b803-090c0673e01e' class='xr-index-data-in' type='checkbox'/><label for='index-a4c7bfb7-07e4-4171-b803-090c0673e01e' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([&#x27;2d&#x27;, &#x27;2t&#x27;], dtype=&#x27;object&#x27;, name=&#x27;param&#x27;))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-28047f30-9000-4cc9-a0de-55ab72c90329' class='xr-section-summary-in' type='checkbox'  checked><label for='section-28047f30-9000-4cc9-a0de-55ab72c90329' class='xr-section-summary' >Attributes: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>standard_name :</span></dt><dd>unknown</dd><dt><span>long_name :</span></dt><dd>2 metre dewpoint temperature</dd><dt><span>units :</span></dt><dd>K</dd></dl></div></li></ul></div></div>"
+       "              dtype=&#x27;datetime64[ns]&#x27;, name=&#x27;valid_time&#x27;, length=732, freq=None))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>param</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-88e59b82-3594-4b1e-9dab-688e842da9d5' class='xr-index-data-in' type='checkbox'/><label for='index-88e59b82-3594-4b1e-9dab-688e842da9d5' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([&#x27;2d&#x27;, &#x27;2t&#x27;], dtype=&#x27;object&#x27;, name=&#x27;param&#x27;))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-1e8e7f56-5039-4e7e-86f0-7ba01a297a01' class='xr-section-summary-in' type='checkbox'  checked><label for='section-1e8e7f56-5039-4e7e-86f0-7ba01a297a01' class='xr-section-summary' >Attributes: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>standard_name :</span></dt><dd>unknown</dd><dt><span>long_name :</span></dt><dd>2 metre dewpoint temperature</dd><dt><span>units :</span></dt><dd>K</dd></dl></div></li></ul></div></div>"
       ],
       "text/plain": [
        "<xarray.DataArray 'data' (valid_time: 732, param: 2, values: 9)> Size: 105kB\n",
@@ -1425,13 +1425,722 @@
     "ds[\"data\"]"
    ]
   },
+  {
+   "cell_type": "markdown",
+   "id": "ae085ca1-8899-4cf3-aef9-44a052353120",
+   "metadata": {
+    "editable": true,
+    "slideshow": {
+     "slide_type": ""
+    },
+    "tags": []
+   },
+   "source": [
+    "#### Adding ensemble dimension"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "id": "7db65a70-e815-4e81-835e-2a705251355d",
+   "metadata": {},
+   "source": [
+    "We add the ensemble member as an additional dimension to the generated Xarray. Because the input is not ensemble data the value of the \"number\" ecCodes key can be missing. So we need to provide a meaningful default with the ``fill`` kwarg to be able to build the \"number\" dimension. "
+   ]
+  },
   {
    "cell_type": "code",
-   "execution_count": null,
-   "id": "007c3800-63f9-4050-9f58-00f5aa3267ff",
+   "execution_count": 4,
+   "id": "6f2a78d3-3ace-49e7-a99e-49154bd17620",
    "metadata": {},
-   "outputs": [],
-   "source": []
+   "outputs": [
+    {
+     "data": {
+      "text/html": [
+       "<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
+       "<defs>\n",
+       "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
+       "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
+       "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
+       "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
+       "</symbol>\n",
+       "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
+       "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
+       "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
+       "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
+       "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
+       "</symbol>\n",
+       "</defs>\n",
+       "</svg>\n",
+       "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
+       " *\n",
+       " */\n",
+       "\n",
+       ":root {\n",
+       "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
+       "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
+       "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
+       "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
+       "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
+       "  --xr-background-color: var(--jp-layout-color0, white);\n",
+       "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
+       "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
+       "}\n",
+       "\n",
+       "html[theme=\"dark\"],\n",
+       "html[data-theme=\"dark\"],\n",
+       "body[data-theme=\"dark\"],\n",
+       "body.vscode-dark {\n",
+       "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
+       "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
+       "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
+       "  --xr-border-color: #1f1f1f;\n",
+       "  --xr-disabled-color: #515151;\n",
+       "  --xr-background-color: #111111;\n",
+       "  --xr-background-color-row-even: #111111;\n",
+       "  --xr-background-color-row-odd: #313131;\n",
+       "}\n",
+       "\n",
+       ".xr-wrap {\n",
+       "  display: block !important;\n",
+       "  min-width: 300px;\n",
+       "  max-width: 700px;\n",
+       "}\n",
+       "\n",
+       ".xr-text-repr-fallback {\n",
+       "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
+       "  display: none;\n",
+       "}\n",
+       "\n",
+       ".xr-header {\n",
+       "  padding-top: 6px;\n",
+       "  padding-bottom: 6px;\n",
+       "  margin-bottom: 4px;\n",
+       "  border-bottom: solid 1px var(--xr-border-color);\n",
+       "}\n",
+       "\n",
+       ".xr-header > div,\n",
+       ".xr-header > ul {\n",
+       "  display: inline;\n",
+       "  margin-top: 0;\n",
+       "  margin-bottom: 0;\n",
+       "}\n",
+       "\n",
+       ".xr-obj-type,\n",
+       ".xr-array-name {\n",
+       "  margin-left: 2px;\n",
+       "  margin-right: 10px;\n",
+       "}\n",
+       "\n",
+       ".xr-obj-type {\n",
+       "  color: var(--xr-font-color2);\n",
+       "}\n",
+       "\n",
+       ".xr-sections {\n",
+       "  padding-left: 0 !important;\n",
+       "  display: grid;\n",
+       "  grid-template-columns: 150px auto auto 1fr 0 20px 0 20px;\n",
+       "}\n",
+       "\n",
+       ".xr-section-item {\n",
+       "  display: contents;\n",
+       "}\n",
+       "\n",
+       ".xr-section-item input {\n",
+       "  display: inline-block;\n",
+       "  opacity: 0;\n",
+       "  height: 0;\n",
+       "}\n",
+       "\n",
+       ".xr-section-item input + label {\n",
+       "  color: var(--xr-disabled-color);\n",
+       "}\n",
+       "\n",
+       ".xr-section-item input:enabled + label {\n",
+       "  cursor: pointer;\n",
+       "  color: var(--xr-font-color2);\n",
+       "}\n",
+       "\n",
+       ".xr-section-item input:focus + label {\n",
+       "  border: 2px solid var(--xr-font-color0);\n",
+       "}\n",
+       "\n",
+       ".xr-section-item input:enabled + label:hover {\n",
+       "  color: var(--xr-font-color0);\n",
+       "}\n",
+       "\n",
+       ".xr-section-summary {\n",
+       "  grid-column: 1;\n",
+       "  color: var(--xr-font-color2);\n",
+       "  font-weight: 500;\n",
+       "}\n",
+       "\n",
+       ".xr-section-summary > span {\n",
+       "  display: inline-block;\n",
+       "  padding-left: 0.5em;\n",
+       "}\n",
+       "\n",
+       ".xr-section-summary-in:disabled + label {\n",
+       "  color: var(--xr-font-color2);\n",
+       "}\n",
+       "\n",
+       ".xr-section-summary-in + label:before {\n",
+       "  display: inline-block;\n",
+       "  content: \"►\";\n",
+       "  font-size: 11px;\n",
+       "  width: 15px;\n",
+       "  text-align: center;\n",
+       "}\n",
+       "\n",
+       ".xr-section-summary-in:disabled + label:before {\n",
+       "  color: var(--xr-disabled-color);\n",
+       "}\n",
+       "\n",
+       ".xr-section-summary-in:checked + label:before {\n",
+       "  content: \"▼\";\n",
+       "}\n",
+       "\n",
+       ".xr-section-summary-in:checked + label > span {\n",
+       "  display: none;\n",
+       "}\n",
+       "\n",
+       ".xr-section-summary,\n",
+       ".xr-section-inline-details {\n",
+       "  padding-top: 4px;\n",
+       "  padding-bottom: 4px;\n",
+       "}\n",
+       "\n",
+       ".xr-section-inline-details {\n",
+       "  grid-column: 2 / -1;\n",
+       "}\n",
+       "\n",
+       ".xr-section-details {\n",
+       "  display: none;\n",
+       "  grid-column: 1 / -1;\n",
+       "  margin-bottom: 5px;\n",
+       "}\n",
+       "\n",
+       ".xr-section-summary-in:checked ~ .xr-section-details {\n",
+       "  display: contents;\n",
+       "}\n",
+       "\n",
+       ".xr-array-wrap {\n",
+       "  grid-column: 1 / -1;\n",
+       "  display: grid;\n",
+       "  grid-template-columns: 20px auto;\n",
+       "}\n",
+       "\n",
+       ".xr-array-wrap > label {\n",
+       "  grid-column: 1;\n",
+       "  vertical-align: top;\n",
+       "}\n",
+       "\n",
+       ".xr-preview {\n",
+       "  color: var(--xr-font-color3);\n",
+       "}\n",
+       "\n",
+       ".xr-array-preview,\n",
+       ".xr-array-data {\n",
+       "  padding: 0 5px !important;\n",
+       "  grid-column: 2;\n",
+       "}\n",
+       "\n",
+       ".xr-array-data,\n",
+       ".xr-array-in:checked ~ .xr-array-preview {\n",
+       "  display: none;\n",
+       "}\n",
+       "\n",
+       ".xr-array-in:checked ~ .xr-array-data,\n",
+       ".xr-array-preview {\n",
+       "  display: inline-block;\n",
+       "}\n",
+       "\n",
+       ".xr-dim-list {\n",
+       "  display: inline-block !important;\n",
+       "  list-style: none;\n",
+       "  padding: 0 !important;\n",
+       "  margin: 0;\n",
+       "}\n",
+       "\n",
+       ".xr-dim-list li {\n",
+       "  display: inline-block;\n",
+       "  padding: 0;\n",
+       "  margin: 0;\n",
+       "}\n",
+       "\n",
+       ".xr-dim-list:before {\n",
+       "  content: \"(\";\n",
+       "}\n",
+       "\n",
+       ".xr-dim-list:after {\n",
+       "  content: \")\";\n",
+       "}\n",
+       "\n",
+       ".xr-dim-list li:not(:last-child):after {\n",
+       "  content: \",\";\n",
+       "  padding-right: 5px;\n",
+       "}\n",
+       "\n",
+       ".xr-has-index {\n",
+       "  font-weight: bold;\n",
+       "}\n",
+       "\n",
+       ".xr-var-list,\n",
+       ".xr-var-item {\n",
+       "  display: contents;\n",
+       "}\n",
+       "\n",
+       ".xr-var-item > div,\n",
+       ".xr-var-item label,\n",
+       ".xr-var-item > .xr-var-name span {\n",
+       "  background-color: var(--xr-background-color-row-even);\n",
+       "  margin-bottom: 0;\n",
+       "}\n",
+       "\n",
+       ".xr-var-item > .xr-var-name:hover span {\n",
+       "  padding-right: 5px;\n",
+       "}\n",
+       "\n",
+       ".xr-var-list > li:nth-child(odd) > div,\n",
+       ".xr-var-list > li:nth-child(odd) > label,\n",
+       ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
+       "  background-color: var(--xr-background-color-row-odd);\n",
+       "}\n",
+       "\n",
+       ".xr-var-name {\n",
+       "  grid-column: 1;\n",
+       "}\n",
+       "\n",
+       ".xr-var-dims {\n",
+       "  grid-column: 2;\n",
+       "}\n",
+       "\n",
+       ".xr-var-dtype {\n",
+       "  grid-column: 3;\n",
+       "  text-align: right;\n",
+       "  color: var(--xr-font-color2);\n",
+       "}\n",
+       "\n",
+       ".xr-var-preview {\n",
+       "  grid-column: 4;\n",
+       "}\n",
+       "\n",
+       ".xr-index-preview {\n",
+       "  grid-column: 2 / 5;\n",
+       "  color: var(--xr-font-color2);\n",
+       "}\n",
+       "\n",
+       ".xr-var-name,\n",
+       ".xr-var-dims,\n",
+       ".xr-var-dtype,\n",
+       ".xr-preview,\n",
+       ".xr-attrs dt {\n",
+       "  white-space: nowrap;\n",
+       "  overflow: hidden;\n",
+       "  text-overflow: ellipsis;\n",
+       "  padding-right: 10px;\n",
+       "}\n",
+       "\n",
+       ".xr-var-name:hover,\n",
+       ".xr-var-dims:hover,\n",
+       ".xr-var-dtype:hover,\n",
+       ".xr-attrs dt:hover {\n",
+       "  overflow: visible;\n",
+       "  width: auto;\n",
+       "  z-index: 1;\n",
+       "}\n",
+       "\n",
+       ".xr-var-attrs,\n",
+       ".xr-var-data,\n",
+       ".xr-index-data {\n",
+       "  display: none;\n",
+       "  background-color: var(--xr-background-color) !important;\n",
+       "  padding-bottom: 5px !important;\n",
+       "}\n",
+       "\n",
+       ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
+       ".xr-var-data-in:checked ~ .xr-var-data,\n",
+       ".xr-index-data-in:checked ~ .xr-index-data {\n",
+       "  display: block;\n",
+       "}\n",
+       "\n",
+       ".xr-var-data > table {\n",
+       "  float: right;\n",
+       "}\n",
+       "\n",
+       ".xr-var-name span,\n",
+       ".xr-var-data,\n",
+       ".xr-index-name div,\n",
+       ".xr-index-data,\n",
+       ".xr-attrs {\n",
+       "  padding-left: 25px !important;\n",
+       "}\n",
+       "\n",
+       ".xr-attrs,\n",
+       ".xr-var-attrs,\n",
+       ".xr-var-data,\n",
+       ".xr-index-data {\n",
+       "  grid-column: 1 / -1;\n",
+       "}\n",
+       "\n",
+       "dl.xr-attrs {\n",
+       "  padding: 0;\n",
+       "  margin: 0;\n",
+       "  display: grid;\n",
+       "  grid-template-columns: 125px auto;\n",
+       "}\n",
+       "\n",
+       ".xr-attrs dt,\n",
+       ".xr-attrs dd {\n",
+       "  padding: 0;\n",
+       "  margin: 0;\n",
+       "  float: left;\n",
+       "  padding-right: 10px;\n",
+       "  width: auto;\n",
+       "}\n",
+       "\n",
+       ".xr-attrs dt {\n",
+       "  font-weight: normal;\n",
+       "  grid-column: 1;\n",
+       "}\n",
+       "\n",
+       ".xr-attrs dt:hover span {\n",
+       "  display: inline-block;\n",
+       "  background: var(--xr-background-color);\n",
+       "  padding-right: 10px;\n",
+       "}\n",
+       "\n",
+       ".xr-attrs dd {\n",
+       "  grid-column: 2;\n",
+       "  white-space: pre-wrap;\n",
+       "  word-break: break-all;\n",
+       "}\n",
+       "\n",
+       ".xr-icon-database,\n",
+       ".xr-icon-file-text2,\n",
+       ".xr-no-icon {\n",
+       "  display: inline-block;\n",
+       "  vertical-align: middle;\n",
+       "  width: 1em;\n",
+       "  height: 1.5em !important;\n",
+       "  stroke-width: 0;\n",
+       "  stroke: currentColor;\n",
+       "  fill: currentColor;\n",
+       "}\n",
+       "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt; Size: 111kB\n",
+       "Dimensions:     (valid_time: 732, param: 2, number: 1, values: 9)\n",
+       "Coordinates:\n",
+       "  * valid_time  (valid_time) datetime64[ns] 6kB 2020-01-01 ... 2020-12-31T12:...\n",
+       "  * param       (param) &lt;U2 16B &#x27;2d&#x27; &#x27;2t&#x27;\n",
+       "  * number      (number) int64 8B 0\n",
+       "    latitude    (values) float64 72B dask.array&lt;chunksize=(9,), meta=np.ndarray&gt;\n",
+       "    longitude   (values) float64 72B dask.array&lt;chunksize=(9,), meta=np.ndarray&gt;\n",
+       "Dimensions without coordinates: values\n",
+       "Data variables:\n",
+       "    data        (valid_time, param, number, values) float64 105kB dask.array&lt;chunksize=(1, 2, 1, 9), meta=np.ndarray&gt;\n",
+       "Attributes:\n",
+       "    paramId:      168\n",
+       "    class:        d1\n",
+       "    stream:       clte\n",
+       "    levtype:      sfc\n",
+       "    type:         fc\n",
+       "    expver:       0001\n",
+       "    date:         20200101\n",
+       "    time:         0\n",
+       "    domain:       g\n",
+       "    Conventions:  CF-1.8\n",
+       "    institution:  ECMWF</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-359bfbf6-eff7-4def-95b1-c39de9661431' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-359bfbf6-eff7-4def-95b1-c39de9661431' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>valid_time</span>: 732</li><li><span class='xr-has-index'>param</span>: 2</li><li><span class='xr-has-index'>number</span>: 1</li><li><span>values</span>: 9</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-e8e99019-8e71-420b-80e4-a578588dcf03' class='xr-section-summary-in' type='checkbox'  checked><label for='section-e8e99019-8e71-420b-80e4-a578588dcf03' class='xr-section-summary' >Coordinates: <span>(5)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>valid_time</span></div><div class='xr-var-dims'>(valid_time)</div><div class='xr-var-dtype'>datetime64[ns]</div><div class='xr-var-preview xr-preview'>2020-01-01 ... 2020-12-31T12:00:00</div><input id='attrs-0be66621-b332-4a0e-8b45-f4a79c81ca90' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-0be66621-b332-4a0e-8b45-f4a79c81ca90' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f24e606c-ca90-4839-b687-ef0e5090c5d4' class='xr-var-data-in' type='checkbox'><label for='data-f24e606c-ca90-4839-b687-ef0e5090c5d4' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>standard_name :</span></dt><dd>time</dd><dt><span>long_name :</span></dt><dd>valid_time</dd></dl></div><div class='xr-var-data'><pre>array([&#x27;2020-01-01T00:00:00.000000000&#x27;, &#x27;2020-01-01T12:00:00.000000000&#x27;,\n",
+       "       &#x27;2020-01-02T00:00:00.000000000&#x27;, ..., &#x27;2020-12-30T12:00:00.000000000&#x27;,\n",
+       "       &#x27;2020-12-31T00:00:00.000000000&#x27;, &#x27;2020-12-31T12:00:00.000000000&#x27;],\n",
+       "      dtype=&#x27;datetime64[ns]&#x27;)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>param</span></div><div class='xr-var-dims'>(param)</div><div class='xr-var-dtype'>&lt;U2</div><div class='xr-var-preview xr-preview'>&#x27;2d&#x27; &#x27;2t&#x27;</div><input id='attrs-7c88567b-8e2d-49d4-9836-e4d530830278' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-7c88567b-8e2d-49d4-9836-e4d530830278' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-1ac0beff-d50e-48e7-9aef-0f3945214443' class='xr-var-data-in' type='checkbox'><label for='data-1ac0beff-d50e-48e7-9aef-0f3945214443' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([&#x27;2d&#x27;, &#x27;2t&#x27;], dtype=&#x27;&lt;U2&#x27;)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>number</span></div><div class='xr-var-dims'>(number)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0</div><input id='attrs-ed4b21be-1000-4705-b54a-023a7f3f0456' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-ed4b21be-1000-4705-b54a-023a7f3f0456' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-95e6efb8-6fde-4694-93c2-2aa166580d47' class='xr-var-data-in' type='checkbox'><label for='data-95e6efb8-6fde-4694-93c2-2aa166580d47' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>latitude</span></div><div class='xr-var-dims'>(values)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>dask.array&lt;chunksize=(9,), meta=np.ndarray&gt;</div><input id='attrs-20cfa52c-09f3-4381-95e6-effc65741e7e' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-20cfa52c-09f3-4381-95e6-effc65741e7e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-6b5939b5-4f44-4483-9b1c-9dfcd84e6c87' class='xr-var-data-in' type='checkbox'><label for='data-6b5939b5-4f44-4483-9b1c-9dfcd84e6c87' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>degrees_north</dd><dt><span>standard_name :</span></dt><dd>latitude</dd><dt><span>long_name :</span></dt><dd>latitude</dd></dl></div><div class='xr-var-data'><table>\n",
+       "    <tr>\n",
+       "        <td>\n",
+       "            <table style=\"border-collapse: collapse;\">\n",
+       "                <thead>\n",
+       "                    <tr>\n",
+       "                        <td> </td>\n",
+       "                        <th> Array </th>\n",
+       "                        <th> Chunk </th>\n",
+       "                    </tr>\n",
+       "                </thead>\n",
+       "                <tbody>\n",
+       "                    \n",
+       "                    <tr>\n",
+       "                        <th> Bytes </th>\n",
+       "                        <td> 72 B </td>\n",
+       "                        <td> 72 B </td>\n",
+       "                    </tr>\n",
+       "                    \n",
+       "                    <tr>\n",
+       "                        <th> Shape </th>\n",
+       "                        <td> (9,) </td>\n",
+       "                        <td> (9,) </td>\n",
+       "                    </tr>\n",
+       "                    <tr>\n",
+       "                        <th> Dask graph </th>\n",
+       "                        <td colspan=\"2\"> 1 chunks in 2 graph layers </td>\n",
+       "                    </tr>\n",
+       "                    <tr>\n",
+       "                        <th> Data type </th>\n",
+       "                        <td colspan=\"2\"> float64 numpy.ndarray </td>\n",
+       "                    </tr>\n",
+       "                </tbody>\n",
+       "            </table>\n",
+       "        </td>\n",
+       "        <td>\n",
+       "        <svg width=\"170\" height=\"89\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
+       "\n",
+       "  <!-- Horizontal lines -->\n",
+       "  <line x1=\"0\" y1=\"0\" x2=\"120\" y2=\"0\" style=\"stroke-width:2\" />\n",
+       "  <line x1=\"0\" y1=\"39\" x2=\"120\" y2=\"39\" style=\"stroke-width:2\" />\n",
+       "\n",
+       "  <!-- Vertical lines -->\n",
+       "  <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"39\" style=\"stroke-width:2\" />\n",
+       "  <line x1=\"120\" y1=\"0\" x2=\"120\" y2=\"39\" style=\"stroke-width:2\" />\n",
+       "\n",
+       "  <!-- Colored Rectangle -->\n",
+       "  <polygon points=\"0.0,0.0 120.0,0.0 120.0,39.17227773220867 0.0,39.17227773220867\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
+       "\n",
+       "  <!-- Text -->\n",
+       "  <text x=\"60.000000\" y=\"59.172278\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >9</text>\n",
+       "  <text x=\"140.000000\" y=\"19.586139\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(0,140.000000,19.586139)\">1</text>\n",
+       "</svg>\n",
+       "        </td>\n",
+       "    </tr>\n",
+       "</table></div></li><li class='xr-var-item'><div class='xr-var-name'><span>longitude</span></div><div class='xr-var-dims'>(values)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>dask.array&lt;chunksize=(9,), meta=np.ndarray&gt;</div><input id='attrs-0fc365bd-378f-492c-82a5-18a60f9dce0d' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-0fc365bd-378f-492c-82a5-18a60f9dce0d' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f27a3516-029d-4f9f-8192-1cdd22e729ab' class='xr-var-data-in' type='checkbox'><label for='data-f27a3516-029d-4f9f-8192-1cdd22e729ab' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>degrees_east</dd><dt><span>standard_name :</span></dt><dd>longitude</dd><dt><span>long_name :</span></dt><dd>longitude</dd></dl></div><div class='xr-var-data'><table>\n",
+       "    <tr>\n",
+       "        <td>\n",
+       "            <table style=\"border-collapse: collapse;\">\n",
+       "                <thead>\n",
+       "                    <tr>\n",
+       "                        <td> </td>\n",
+       "                        <th> Array </th>\n",
+       "                        <th> Chunk </th>\n",
+       "                    </tr>\n",
+       "                </thead>\n",
+       "                <tbody>\n",
+       "                    \n",
+       "                    <tr>\n",
+       "                        <th> Bytes </th>\n",
+       "                        <td> 72 B </td>\n",
+       "                        <td> 72 B </td>\n",
+       "                    </tr>\n",
+       "                    \n",
+       "                    <tr>\n",
+       "                        <th> Shape </th>\n",
+       "                        <td> (9,) </td>\n",
+       "                        <td> (9,) </td>\n",
+       "                    </tr>\n",
+       "                    <tr>\n",
+       "                        <th> Dask graph </th>\n",
+       "                        <td colspan=\"2\"> 1 chunks in 2 graph layers </td>\n",
+       "                    </tr>\n",
+       "                    <tr>\n",
+       "                        <th> Data type </th>\n",
+       "                        <td colspan=\"2\"> float64 numpy.ndarray </td>\n",
+       "                    </tr>\n",
+       "                </tbody>\n",
+       "            </table>\n",
+       "        </td>\n",
+       "        <td>\n",
+       "        <svg width=\"170\" height=\"89\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
+       "\n",
+       "  <!-- Horizontal lines -->\n",
+       "  <line x1=\"0\" y1=\"0\" x2=\"120\" y2=\"0\" style=\"stroke-width:2\" />\n",
+       "  <line x1=\"0\" y1=\"39\" x2=\"120\" y2=\"39\" style=\"stroke-width:2\" />\n",
+       "\n",
+       "  <!-- Vertical lines -->\n",
+       "  <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"39\" style=\"stroke-width:2\" />\n",
+       "  <line x1=\"120\" y1=\"0\" x2=\"120\" y2=\"39\" style=\"stroke-width:2\" />\n",
+       "\n",
+       "  <!-- Colored Rectangle -->\n",
+       "  <polygon points=\"0.0,0.0 120.0,0.0 120.0,39.17227773220867 0.0,39.17227773220867\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
+       "\n",
+       "  <!-- Text -->\n",
+       "  <text x=\"60.000000\" y=\"59.172278\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >9</text>\n",
+       "  <text x=\"140.000000\" y=\"19.586139\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(0,140.000000,19.586139)\">1</text>\n",
+       "</svg>\n",
+       "        </td>\n",
+       "    </tr>\n",
+       "</table></div></li></ul></div></li><li class='xr-section-item'><input id='section-d8e4f4ac-7981-41c4-b92b-db2a1b44d8b4' class='xr-section-summary-in' type='checkbox'  checked><label for='section-d8e4f4ac-7981-41c4-b92b-db2a1b44d8b4' class='xr-section-summary' >Data variables: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>data</span></div><div class='xr-var-dims'>(valid_time, param, number, values)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>dask.array&lt;chunksize=(1, 2, 1, 9), meta=np.ndarray&gt;</div><input id='attrs-3bb4014c-9555-42d1-b78e-019928b1307a' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-3bb4014c-9555-42d1-b78e-019928b1307a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a4267e70-d7be-4ce9-b9e8-02ec0dabef26' class='xr-var-data-in' type='checkbox'><label for='data-a4267e70-d7be-4ce9-b9e8-02ec0dabef26' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>standard_name :</span></dt><dd>unknown</dd><dt><span>long_name :</span></dt><dd>2 metre dewpoint temperature</dd><dt><span>units :</span></dt><dd>K</dd></dl></div><div class='xr-var-data'><table>\n",
+       "    <tr>\n",
+       "        <td>\n",
+       "            <table style=\"border-collapse: collapse;\">\n",
+       "                <thead>\n",
+       "                    <tr>\n",
+       "                        <td> </td>\n",
+       "                        <th> Array </th>\n",
+       "                        <th> Chunk </th>\n",
+       "                    </tr>\n",
+       "                </thead>\n",
+       "                <tbody>\n",
+       "                    \n",
+       "                    <tr>\n",
+       "                        <th> Bytes </th>\n",
+       "                        <td> 102.94 kiB </td>\n",
+       "                        <td> 144 B </td>\n",
+       "                    </tr>\n",
+       "                    \n",
+       "                    <tr>\n",
+       "                        <th> Shape </th>\n",
+       "                        <td> (732, 2, 1, 9) </td>\n",
+       "                        <td> (1, 2, 1, 9) </td>\n",
+       "                    </tr>\n",
+       "                    <tr>\n",
+       "                        <th> Dask graph </th>\n",
+       "                        <td colspan=\"2\"> 732 chunks in 2 graph layers </td>\n",
+       "                    </tr>\n",
+       "                    <tr>\n",
+       "                        <th> Data type </th>\n",
+       "                        <td colspan=\"2\"> float64 numpy.ndarray </td>\n",
+       "                    </tr>\n",
+       "                </tbody>\n",
+       "            </table>\n",
+       "        </td>\n",
+       "        <td>\n",
+       "        <svg width=\"471\" height=\"90\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
+       "\n",
+       "  <!-- Horizontal lines -->\n",
+       "  <line x1=\"0\" y1=\"0\" x2=\"120\" y2=\"0\" style=\"stroke-width:2\" />\n",
+       "  <line x1=\"0\" y1=\"25\" x2=\"120\" y2=\"25\" style=\"stroke-width:2\" />\n",
+       "\n",
+       "  <!-- Vertical lines -->\n",
+       "  <line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"25\" style=\"stroke-width:2\" />\n",
+       "  <line x1=\"3\" y1=\"0\" x2=\"3\" y2=\"25\" />\n",
+       "  <line x1=\"7\" y1=\"0\" x2=\"7\" y2=\"25\" />\n",
+       "  <line x1=\"11\" y1=\"0\" x2=\"11\" y2=\"25\" />\n",
+       "  <line x1=\"14\" y1=\"0\" x2=\"14\" y2=\"25\" />\n",
+       "  <line x1=\"18\" y1=\"0\" x2=\"18\" y2=\"25\" />\n",
+       "  <line x1=\"22\" y1=\"0\" x2=\"22\" y2=\"25\" />\n",
+       "  <line x1=\"26\" y1=\"0\" x2=\"26\" y2=\"25\" />\n",
+       "  <line x1=\"30\" y1=\"0\" x2=\"30\" y2=\"25\" />\n",
+       "  <line x1=\"33\" y1=\"0\" x2=\"33\" y2=\"25\" />\n",
+       "  <line x1=\"37\" y1=\"0\" x2=\"37\" y2=\"25\" />\n",
+       "  <line x1=\"41\" y1=\"0\" x2=\"41\" y2=\"25\" />\n",
+       "  <line x1=\"44\" y1=\"0\" x2=\"44\" y2=\"25\" />\n",
+       "  <line x1=\"48\" y1=\"0\" x2=\"48\" y2=\"25\" />\n",
+       "  <line x1=\"52\" y1=\"0\" x2=\"52\" y2=\"25\" />\n",
+       "  <line x1=\"56\" y1=\"0\" x2=\"56\" y2=\"25\" />\n",
+       "  <line x1=\"60\" y1=\"0\" x2=\"60\" y2=\"25\" />\n",
+       "  <line x1=\"63\" y1=\"0\" x2=\"63\" y2=\"25\" />\n",
+       "  <line x1=\"67\" y1=\"0\" x2=\"67\" y2=\"25\" />\n",
+       "  <line x1=\"71\" y1=\"0\" x2=\"71\" y2=\"25\" />\n",
+       "  <line x1=\"74\" y1=\"0\" x2=\"74\" y2=\"25\" />\n",
+       "  <line x1=\"78\" y1=\"0\" x2=\"78\" y2=\"25\" />\n",
+       "  <line x1=\"82\" y1=\"0\" x2=\"82\" y2=\"25\" />\n",
+       "  <line x1=\"86\" y1=\"0\" x2=\"86\" y2=\"25\" />\n",
+       "  <line x1=\"90\" y1=\"0\" x2=\"90\" y2=\"25\" />\n",
+       "  <line x1=\"93\" y1=\"0\" x2=\"93\" y2=\"25\" />\n",
+       "  <line x1=\"97\" y1=\"0\" x2=\"97\" y2=\"25\" />\n",
+       "  <line x1=\"101\" y1=\"0\" x2=\"101\" y2=\"25\" />\n",
+       "  <line x1=\"104\" y1=\"0\" x2=\"104\" y2=\"25\" />\n",
+       "  <line x1=\"108\" y1=\"0\" x2=\"108\" y2=\"25\" />\n",
+       "  <line x1=\"112\" y1=\"0\" x2=\"112\" y2=\"25\" />\n",
+       "  <line x1=\"116\" y1=\"0\" x2=\"116\" y2=\"25\" />\n",
+       "  <line x1=\"120\" y1=\"0\" x2=\"120\" y2=\"25\" style=\"stroke-width:2\" />\n",
+       "\n",
+       "  <!-- Colored Rectangle -->\n",
+       "  <polygon points=\"0.0,0.0 120.0,0.0 120.0,25.412616514582485 0.0,25.412616514582485\" style=\"fill:#8B4903A0;stroke-width:0\"/>\n",
+       "\n",
+       "  <!-- Text -->\n",
+       "  <text x=\"60.000000\" y=\"45.412617\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >732</text>\n",
+       "  <text x=\"140.000000\" y=\"12.706308\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(0,140.000000,12.706308)\">1</text>\n",
+       "\n",
+       "\n",
+       "  <!-- Horizontal lines -->\n",
+       "  <line x1=\"190\" y1=\"0\" x2=\"204\" y2=\"14\" style=\"stroke-width:2\" />\n",
+       "  <line x1=\"190\" y1=\"25\" x2=\"204\" y2=\"40\" style=\"stroke-width:2\" />\n",
+       "\n",
+       "  <!-- Vertical lines -->\n",
+       "  <line x1=\"190\" y1=\"0\" x2=\"190\" y2=\"25\" style=\"stroke-width:2\" />\n",
+       "  <line x1=\"204\" y1=\"14\" x2=\"204\" y2=\"40\" style=\"stroke-width:2\" />\n",
+       "\n",
+       "  <!-- Colored Rectangle -->\n",
+       "  <polygon points=\"190.0,0.0 204.9485979497544,14.948597949754403 204.9485979497544,40.36121446433689 190.0,25.412616514582485\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
+       "\n",
+       "  <!-- Horizontal lines -->\n",
+       "  <line x1=\"190\" y1=\"0\" x2=\"216\" y2=\"0\" style=\"stroke-width:2\" />\n",
+       "  <line x1=\"204\" y1=\"14\" x2=\"231\" y2=\"14\" style=\"stroke-width:2\" />\n",
+       "\n",
+       "  <!-- Vertical lines -->\n",
+       "  <line x1=\"190\" y1=\"0\" x2=\"204\" y2=\"14\" style=\"stroke-width:2\" />\n",
+       "  <line x1=\"216\" y1=\"0\" x2=\"231\" y2=\"14\" style=\"stroke-width:2\" />\n",
+       "\n",
+       "  <!-- Colored Rectangle -->\n",
+       "  <polygon points=\"190.0,0.0 216.42907590347951,0.0 231.37767385323392,14.948597949754403 204.9485979497544,14.948597949754403\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
+       "\n",
+       "  <!-- Horizontal lines -->\n",
+       "  <line x1=\"204\" y1=\"14\" x2=\"231\" y2=\"14\" style=\"stroke-width:2\" />\n",
+       "  <line x1=\"204\" y1=\"40\" x2=\"231\" y2=\"40\" style=\"stroke-width:2\" />\n",
+       "\n",
+       "  <!-- Vertical lines -->\n",
+       "  <line x1=\"204\" y1=\"14\" x2=\"204\" y2=\"40\" style=\"stroke-width:2\" />\n",
+       "  <line x1=\"231\" y1=\"14\" x2=\"231\" y2=\"40\" style=\"stroke-width:2\" />\n",
+       "\n",
+       "  <!-- Colored Rectangle -->\n",
+       "  <polygon points=\"204.9485979497544,14.948597949754403 231.37767385323392,14.948597949754403 231.37767385323392,40.36121446433689 204.9485979497544,40.36121446433689\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
+       "\n",
+       "  <!-- Text -->\n",
+       "  <text x=\"218.163136\" y=\"60.361214\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >9</text>\n",
+       "  <text x=\"251.377674\" y=\"27.654906\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(0,251.377674,27.654906)\">1</text>\n",
+       "  <text x=\"187.474299\" y=\"52.886915\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(45,187.474299,52.886915)\">2</text>\n",
+       "</svg>\n",
+       "        </td>\n",
+       "    </tr>\n",
+       "</table></div></li></ul></div></li><li class='xr-section-item'><input id='section-5437cb12-6d05-43bf-abb0-c3e451077f46' class='xr-section-summary-in' type='checkbox'  ><label for='section-5437cb12-6d05-43bf-abb0-c3e451077f46' class='xr-section-summary' >Indexes: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>valid_time</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-fa6e310b-193c-462b-8881-b3fe68e5a5e6' class='xr-index-data-in' type='checkbox'/><label for='index-fa6e310b-193c-462b-8881-b3fe68e5a5e6' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(DatetimeIndex([&#x27;2020-01-01 00:00:00&#x27;, &#x27;2020-01-01 12:00:00&#x27;,\n",
+       "               &#x27;2020-01-02 00:00:00&#x27;, &#x27;2020-01-02 12:00:00&#x27;,\n",
+       "               &#x27;2020-01-03 00:00:00&#x27;, &#x27;2020-01-03 12:00:00&#x27;,\n",
+       "               &#x27;2020-01-04 00:00:00&#x27;, &#x27;2020-01-04 12:00:00&#x27;,\n",
+       "               &#x27;2020-01-05 00:00:00&#x27;, &#x27;2020-01-05 12:00:00&#x27;,\n",
+       "               ...\n",
+       "               &#x27;2020-12-27 00:00:00&#x27;, &#x27;2020-12-27 12:00:00&#x27;,\n",
+       "               &#x27;2020-12-28 00:00:00&#x27;, &#x27;2020-12-28 12:00:00&#x27;,\n",
+       "               &#x27;2020-12-29 00:00:00&#x27;, &#x27;2020-12-29 12:00:00&#x27;,\n",
+       "               &#x27;2020-12-30 00:00:00&#x27;, &#x27;2020-12-30 12:00:00&#x27;,\n",
+       "               &#x27;2020-12-31 00:00:00&#x27;, &#x27;2020-12-31 12:00:00&#x27;],\n",
+       "              dtype=&#x27;datetime64[ns]&#x27;, name=&#x27;valid_time&#x27;, length=732, freq=None))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>param</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-60f47f37-e24e-47a3-8507-6ec39491e824' class='xr-index-data-in' type='checkbox'/><label for='index-60f47f37-e24e-47a3-8507-6ec39491e824' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([&#x27;2d&#x27;, &#x27;2t&#x27;], dtype=&#x27;object&#x27;, name=&#x27;param&#x27;))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>number</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-e7aa2df7-8803-42fc-ab68-71141c446049' class='xr-index-data-in' type='checkbox'/><label for='index-e7aa2df7-8803-42fc-ab68-71141c446049' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([0], dtype=&#x27;int64&#x27;, name=&#x27;number&#x27;))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-5328141e-a779-45e8-8378-c4b188e47c90' class='xr-section-summary-in' type='checkbox'  ><label for='section-5328141e-a779-45e8-8378-c4b188e47c90' class='xr-section-summary' >Attributes: <span>(11)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>paramId :</span></dt><dd>168</dd><dt><span>class :</span></dt><dd>d1</dd><dt><span>stream :</span></dt><dd>clte</dd><dt><span>levtype :</span></dt><dd>sfc</dd><dt><span>type :</span></dt><dd>fc</dd><dt><span>expver :</span></dt><dd>0001</dd><dt><span>date :</span></dt><dd>20200101</dd><dt><span>time :</span></dt><dd>0</dd><dt><span>domain :</span></dt><dd>g</dd><dt><span>Conventions :</span></dt><dd>CF-1.8</dd><dt><span>institution :</span></dt><dd>ECMWF</dd></dl></div></li></ul></div></div>"
+      ],
+      "text/plain": [
+       "<xarray.Dataset> Size: 111kB\n",
+       "Dimensions:     (valid_time: 732, param: 2, number: 1, values: 9)\n",
+       "Coordinates:\n",
+       "  * valid_time  (valid_time) datetime64[ns] 6kB 2020-01-01 ... 2020-12-31T12:...\n",
+       "  * param       (param) <U2 16B '2d' '2t'\n",
+       "  * number      (number) int64 8B 0\n",
+       "    latitude    (values) float64 72B dask.array<chunksize=(9,), meta=np.ndarray>\n",
+       "    longitude   (values) float64 72B dask.array<chunksize=(9,), meta=np.ndarray>\n",
+       "Dimensions without coordinates: values\n",
+       "Data variables:\n",
+       "    data        (valid_time, param, number, values) float64 105kB dask.array<chunksize=(1, 2, 1, 9), meta=np.ndarray>\n",
+       "Attributes:\n",
+       "    paramId:      168\n",
+       "    class:        d1\n",
+       "    stream:       clte\n",
+       "    levtype:      sfc\n",
+       "    type:         fc\n",
+       "    expver:       0001\n",
+       "    date:         20200101\n",
+       "    time:         0\n",
+       "    domain:       g\n",
+       "    Conventions:  CF-1.8\n",
+       "    institution:  ECMWF"
+      ]
+     },
+     "execution_count": 4,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "ds = ds_fl.to_xarray(fixed_dims=[\"valid_time\", \"param\", \"number\"],\n",
+    "                     ensure_dims=[\"number\"],\n",
+    "                     mono_variable=True,\n",
+    "                     chunks={\"valid_time\": 1},                    \n",
+    "                     flatten_values=True,                   \n",
+    "                     add_earthkit_attrs=False,   \n",
+    "                     fill={\"number\": 0},\n",
+    "                    )\n",
+    "ds"
+   ]
   }
  ],
  "metadata": {
diff --git a/src/earthkit/data/readers/grib/xarray.py b/src/earthkit/data/readers/grib/xarray.py
index e55930e..77ea868 100644
--- a/src/earthkit/data/readers/grib/xarray.py
+++ b/src/earthkit/data/readers/grib/xarray.py
@@ -320,6 +320,8 @@ class XarrayMixIn:
                 (None) expands to True unless the ``profile`` overwrites it.
             * rename_attrs: dict, None
                 A dictionary of attribute to rename. Default is None.
+            * fill: dict, None
+                Define fill values to metadata keys. Default is None.
             * remapping: dict, None
                 Define new metadata keys for indexing. Default is None.
             * lazy_load: bool, None
diff --git a/src/earthkit/data/utils/xarray/engine.py b/src/earthkit/data/utils/xarray/engine.py
index c0265b5..8feeff4 100644
--- a/src/earthkit/data/utils/xarray/engine.py
+++ b/src/earthkit/data/utils/xarray/engine.py
@@ -47,6 +47,7 @@ class EarthkitBackendEntrypoint(BackendEntrypoint):
         coord_attrs=None,
         add_earthkit_attrs=None,
         rename_attrs=None,
+        fill=None,
         remapping=None,
         flatten_values=None,
         lazy_load=None,
@@ -280,6 +281,8 @@ class EarthkitBackendEntrypoint(BackendEntrypoint):
             (None) expands to True unless the ``profile`` overwrites it.
         rename_attrs: dict, None
             A dictionary of attribute to rename. Default is None.
+        fill: dict, None
+            Define fill values to metadata keys. Default is None.
         remapping: dict, None
             Define new metadata keys for indexing. Default is None.
         lazy_load: bool, None
@@ -340,6 +343,7 @@ class EarthkitBackendEntrypoint(BackendEntrypoint):
                 add_valid_time_coord=add_valid_time_coord,
                 add_geo_coords=add_geo_coords,
                 flatten_values=flatten_values,
+                fill=fill,
                 remapping=remapping,
                 decode_times=decode_times,
                 decode_timedelta=decode_timedelta,
diff --git a/src/earthkit/data/utils/xarray/profile.py b/src/earthkit/data/utils/xarray/profile.py
index 15a826d..4463260 100644
--- a/src/earthkit/data/utils/xarray/profile.py
+++ b/src/earthkit/data/utils/xarray/profile.py
@@ -186,7 +186,7 @@ class MonoVariable(ProfileVariable):
 
 
 class Profile:
-    USER_ONLY_OPTIONS = ["remapping", "patches"]
+    USER_ONLY_OPTIONS = ["remapping", "patches", "fill"]
     DEFAULT_PROFILE_NAME = "mars"
 
     def __init__(
@@ -202,6 +202,18 @@ class Profile:
         self.index_keys = []
 
         patches = dict()
+
+        # defaults
+        fill_md = kwargs.pop("fill", None)
+        if fill_md:
+            if not isinstance(fill_md, dict):
+                raise ValueError("fill must be a dict!")
+            for k, v in fill_md.items():
+                if isinstance(v, (str, int, float, bool)):
+                    patches[k] = lambda x: x if x is not None else v
+                elif isinstance(v, dict) or callable(v):
+                    patches[k] = v
+
         self.remapping = RemappingBuilder(kwargs.pop("remapping", None), patches)
 
         # variables


Test patch:
diff --git a/tests/xr_engine/test_xr_ens.py b/tests/xr_engine/test_xr_ens.py
index 319155b..572d4ac 100644
--- a/tests/xr_engine/test_xr_ens.py
+++ b/tests/xr_engine/test_xr_ens.py
@@ -66,3 +66,16 @@ def test_xr_number_dim(kwargs, dims):
 
     ds = ds_ek.to_xarray(**kwargs)
     compare_dims(ds, dims, order_ref_var="t")
+
+
+@pytest.mark.cache
+def test_xr_number_dim_missing():
+    ds_ek = from_source(
+        "url", earthkit_remote_test_data_file("test-data", "xr_engine", "date", "t2_td2_1_year.grib")
+    )
+
+    ds = ds_ek[10].to_xarray(time_dim_mode="valid_time", ensure_dims="number", fill={"number": 10})
+    assert ds is not None
+
+    dims = {"number": [10]}
+    compare_dims(ds, dims, order_ref_var="2t")
diff --git a/tests/xr_engine/xr_engine_fixtures.py b/tests/xr_engine/xr_engine_fixtures.py
index 7dabb88..ab933ef 100644
--- a/tests/xr_engine/xr_engine_fixtures.py
+++ b/tests/xr_engine/xr_engine_fixtures.py
@@ -95,6 +95,7 @@ def compare_dim_order(ds, dims, order_ref_var, check_coord=True):
         return
 
     dim_order = []
+
     for d in ds[order_ref_var].dims:
         if d in dims:
             dim_order.append(d)