diff --git a/examples/docs_3_pace_l2.ipynb b/examples/docs_3_pace_l2.ipynb index e2e0041..9677800 100644 --- a/examples/docs_3_pace_l2.ipynb +++ b/examples/docs_3_pace_l2.ipynb @@ -217,8 +217,8 @@ "name": "stdout", "output_type": "stream", "text": [ - "CPU times: user 625 ms, sys: 107 ms, total: 733 ms\n", - "Wall time: 2.04 s\n" + "CPU times: user 675 ms, sys: 67.2 ms, total: 742 ms\n", + "Wall time: 3.72 s\n" ] } ], @@ -276,12 +276,12 @@ "source": [ "## Look at the granule to see groups\n", "\n", - "We will use `plan.open_dataset(0)` to open the first granule and take a look. This uses open_method=\"auto\". It will try `xr.open_dataset`, discover no lat/lon and then try `xr.open_datatree` + merge. If you know, the netcdfs are grouped, you can pass in `open_method=\"datatree-merge\"` yourself." + "We will use `plan.open_dataset(0)` to open the first granule and take a look. This uses open_method=\"auto\". It will try `xr.open_dataset`, discover no lat/lon and then try `xr.open_datatree` + merge. If you know, the netcdfs are grouped, you can pass in `open_method=\"datatree-merge\"` yourself. We want these two groups: `/geophysical_data` and `/navigation_data`. We will create a open method." ] }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 4, "id": "4d074aed-6fca-46db-a08d-f95a351362cd", "metadata": {}, "outputs": [ @@ -289,9 +289,9 @@ "name": "stdout", "output_type": "stream", "text": [ - "open_method: {'xarray_open': 'datatree', 'open_kwargs': {'chunks': {}, 'engine': 'h5netcdf', 'decode_timedelta': False}, 'coords': 'auto', 'set_coords': True, 'dim_renames': None, 'auto_align_phony_dims': None, 'merge': 'all', 'merge_kwargs': {}}\n", - "CPU times: user 2.19 s, sys: 172 ms, total: 2.36 s\n", - "Wall time: 4.78 s\n" + "open_method: {'xarray_open': 'datatree', 'open_kwargs': {'chunks': {}, 'engine': 'h5netcdf', 'decode_timedelta': False}, 'merge': None, 'coords': 'auto', 'set_coords': True, 'dim_renames': None, 'auto_align_phony_dims': None}\n", + "CPU times: user 286 ms, sys: 46.1 ms, total: 332 ms\n", + "Wall time: 1.33 s\n" ] }, { @@ -392,6 +392,7 @@ " min-width: 300px;\n", " max-width: 700px;\n", " line-height: 1.6;\n", + " padding-bottom: 4px;\n", "}\n", "\n", ".xr-text-repr-fallback {\n", @@ -402,8 +403,11 @@ ".xr-header {\n", " padding-top: 6px;\n", " padding-bottom: 6px;\n", - " margin-bottom: 4px;\n", + "}\n", + "\n", + ".xr-header {\n", " border-bottom: solid 1px var(--xr-border-color);\n", + " margin-bottom: 4px;\n", "}\n", "\n", ".xr-header > div,\n", @@ -414,20 +418,15 @@ "}\n", "\n", ".xr-obj-type,\n", - ".xr-obj-name,\n", - ".xr-group-name {\n", + ".xr-obj-name {\n", " margin-left: 2px;\n", " margin-right: 10px;\n", "}\n", "\n", - ".xr-group-name::before {\n", - " content: \"📁\";\n", - " padding-right: 0.3em;\n", - "}\n", - "\n", - ".xr-group-name,\n", - ".xr-obj-type {\n", + ".xr-obj-type,\n", + ".xr-group-box-contents > label {\n", " color: var(--xr-font-color2);\n", + " display: block;\n", "}\n", "\n", ".xr-sections {\n", @@ -442,28 +441,39 @@ " display: contents;\n", "}\n", "\n", - ".xr-section-item input {\n", - " display: inline-block;\n", + ".xr-section-item > input,\n", + ".xr-group-box-contents > input,\n", + ".xr-array-wrap > input {\n", + " display: block;\n", " opacity: 0;\n", " height: 0;\n", " margin: 0;\n", "}\n", "\n", - ".xr-section-item input + label {\n", + ".xr-section-item > input + label,\n", + ".xr-var-item > input + label {\n", " color: var(--xr-disabled-color);\n", - " border: 2px solid transparent !important;\n", "}\n", "\n", - ".xr-section-item input:enabled + label {\n", + ".xr-section-item > input:enabled + label,\n", + ".xr-var-item > input:enabled + label,\n", + ".xr-array-wrap > input:enabled + label,\n", + ".xr-group-box-contents > 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) !important;\n", + ".xr-section-item > input:focus-visible + label,\n", + ".xr-var-item > input:focus-visible + label,\n", + ".xr-array-wrap > input:focus-visible + label,\n", + ".xr-group-box-contents > input:focus-visible + label {\n", + " outline: auto;\n", "}\n", "\n", - ".xr-section-item input:enabled + label:hover {\n", + ".xr-section-item > input:enabled + label:hover,\n", + ".xr-var-item > input:enabled + label:hover,\n", + ".xr-array-wrap > input:enabled + label:hover,\n", + ".xr-group-box-contents > input:enabled + label:hover {\n", " color: var(--xr-font-color0);\n", "}\n", "\n", @@ -471,11 +481,25 @@ " grid-column: 1;\n", " color: var(--xr-font-color2);\n", " font-weight: 500;\n", + " white-space: nowrap;\n", + "}\n", + "\n", + ".xr-section-summary > em {\n", + " font-weight: normal;\n", + "}\n", + "\n", + ".xr-span-grid {\n", + " grid-column-end: -1;\n", "}\n", "\n", ".xr-section-summary > span {\n", " display: inline-block;\n", - " padding-left: 0.5em;\n", + " padding-left: 0.3em;\n", + "}\n", + "\n", + ".xr-group-box-contents > input:checked + label > span {\n", + " display: inline-block;\n", + " padding-left: 0.6em;\n", "}\n", "\n", ".xr-section-summary-in:disabled + label {\n", @@ -503,7 +527,8 @@ "}\n", "\n", ".xr-section-summary,\n", - ".xr-section-inline-details {\n", + ".xr-section-inline-details,\n", + ".xr-group-box-contents > label {\n", " padding-top: 4px;\n", "}\n", "\n", @@ -512,20 +537,29 @@ "}\n", "\n", ".xr-section-details {\n", - " display: none;\n", " grid-column: 1 / -1;\n", " margin-top: 4px;\n", " margin-bottom: 5px;\n", "}\n", "\n", + ".xr-section-summary-in ~ .xr-section-details {\n", + " display: none;\n", + "}\n", + "\n", ".xr-section-summary-in:checked ~ .xr-section-details {\n", " display: contents;\n", "}\n", "\n", + ".xr-children {\n", + " display: inline-grid;\n", + " grid-template-columns: 100%;\n", + " grid-column: 1 / -1;\n", + " padding-top: 4px;\n", + "}\n", + "\n", ".xr-group-box {\n", " display: inline-grid;\n", - " grid-template-columns: 0px 20px auto;\n", - " width: 100%;\n", + " grid-template-columns: 0px 30px auto;\n", "}\n", "\n", ".xr-group-box-vline {\n", @@ -539,13 +573,43 @@ " grid-column-start: 2;\n", " grid-row-start: 1;\n", " height: 1em;\n", - " width: 20px;\n", + " width: 26px;\n", " border-bottom: 0.2em solid;\n", " border-color: var(--xr-border-color);\n", "}\n", "\n", ".xr-group-box-contents {\n", " grid-column-start: 3;\n", + " padding-bottom: 4px;\n", + "}\n", + "\n", + ".xr-group-box-contents > label::before {\n", + " content: \"📂\";\n", + " padding-right: 0.3em;\n", + "}\n", + "\n", + ".xr-group-box-contents > input:checked + label::before {\n", + " content: \"📁\";\n", + "}\n", + "\n", + ".xr-group-box-contents > input:checked + label {\n", + " padding-bottom: 0px;\n", + "}\n", + "\n", + ".xr-group-box-contents > input:checked ~ .xr-sections {\n", + " display: none;\n", + "}\n", + "\n", + ".xr-group-box-contents > input + label > span {\n", + " display: none;\n", + "}\n", + "\n", + ".xr-group-box-ellipsis {\n", + " font-size: 1.4em;\n", + " font-weight: 900;\n", + " color: var(--xr-font-color2);\n", + " letter-spacing: 0.15em;\n", + " cursor: default;\n", "}\n", "\n", ".xr-array-wrap {\n", @@ -775,1536 +839,809 @@ " filter: drop-shadow(1px 1px 5px var(--xr-font-color2));\n", " stroke-width: 0.8px;\n", "}\n", - "
<xarray.Dataset> Size: 3GB\n",
-       "Dimensions:        (number_of_bands: 286, number_of_reflective_bands: 286,\n",
-       "                    wavelength_3d: 172, number_of_lines: 1710,\n",
-       "                    pixels_per_line: 1272)\n",
-       "Coordinates:\n",
-       "  * wavelength_3d  (wavelength_3d) float64 1kB 346.0 348.0 351.0 ... 717.0 719.0\n",
-       "    longitude      (number_of_lines, pixels_per_line) float32 9MB dask.array<chunksize=(256, 1272), meta=np.ndarray>\n",
-       "    latitude       (number_of_lines, pixels_per_line) float32 9MB dask.array<chunksize=(256, 1272), meta=np.ndarray>\n",
-       "Dimensions without coordinates: number_of_bands, number_of_reflective_bands,\n",
-       "                                number_of_lines, pixels_per_line\n",
-       "Data variables: (12/30)\n",
-       "    wavelength     (number_of_bands) float64 2kB dask.array<chunksize=(32,), meta=np.ndarray>\n",
-       "    vcal_gain      (number_of_reflective_bands) float32 1kB dask.array<chunksize=(32,), meta=np.ndarray>\n",
-       "    vcal_offset    (number_of_reflective_bands) float32 1kB dask.array<chunksize=(32,), meta=np.ndarray>\n",
-       "    F0             (number_of_reflective_bands) float32 1kB dask.array<chunksize=(32,), meta=np.ndarray>\n",
-       "    aw             (number_of_reflective_bands) float32 1kB dask.array<chunksize=(32,), meta=np.ndarray>\n",
-       "    bbw            (number_of_reflective_bands) float32 1kB dask.array<chunksize=(32,), meta=np.ndarray>\n",
-       "    ...             ...\n",
-       "    aot_865        (number_of_lines, pixels_per_line) float32 9MB dask.array<chunksize=(256, 1272), meta=np.ndarray>\n",
-       "    angstrom       (number_of_lines, pixels_per_line) float32 9MB dask.array<chunksize=(256, 1272), meta=np.ndarray>\n",
-       "    avw            (number_of_lines, pixels_per_line) float32 9MB dask.array<chunksize=(256, 1272), meta=np.ndarray>\n",
-       "    nflh           (number_of_lines, pixels_per_line) float32 9MB dask.array<chunksize=(256, 1272), meta=np.ndarray>\n",
-       "    l2_flags       (number_of_lines, pixels_per_line) int32 9MB dask.array<chunksize=(256, 1272), meta=np.ndarray>\n",
-       "    tilt           (number_of_lines) float32 7kB dask.array<chunksize=(32,), meta=np.ndarray>