From a45da720e2c1a94a64b5b86e4b39a8c3175c7dd2 Mon Sep 17 00:00:00 2001 From: Brian Blaylock Date: Tue, 20 Feb 2024 22:12:49 -0800 Subject: [PATCH] update --- docs/user_guide/_model_notebooks/rrfs.ipynb | 4 +- .../_tutorial_notebooks/inventory.ipynb | 1608 ++++++++++++++++- 2 files changed, 1608 insertions(+), 4 deletions(-) diff --git a/docs/user_guide/_model_notebooks/rrfs.ipynb b/docs/user_guide/_model_notebooks/rrfs.ipynb index 13ab300e..c5aaf620 100644 --- a/docs/user_guide/_model_notebooks/rrfs.ipynb +++ b/docs/user_guide/_model_notebooks/rrfs.ipynb @@ -633,7 +633,7 @@ ")\n", "\n", "ax.set_title(\n", - " f\"{ds.t2m.GRIB_name}\\n{ds.time.dt.strftime(\"%H:%M UTC %d %b %Y\").item()} F{int(ds.step.dt.total_seconds() / 60 / 60):02d}\",\n", + " f\"{ds.t2m.GRIB_name}\\n{ds.time.dt.strftime('%H:%M UTC %d %b %Y').item()} F{int(ds.step.dt.total_seconds() / 60 / 60):02d}\",\n", " loc=\"right\",\n", ")\n", "ax.set_title(\n", @@ -1253,7 +1253,7 @@ ")\n", "\n", "ax.set_title(\n", - " f\"{ds.t.GRIB_name}\\n{ds.time.dt.strftime(\"%H:%M UTC %d %b %Y\").item()} F{int(ds.step.dt.total_seconds() / 60 / 60):02d}\",\n", + " f\"{ds.t.GRIB_name}\\n{ds.time.dt.strftime('%H:%M UTC %d %b %Y').item()} F{int(ds.step.dt.total_seconds() / 60 / 60):02d}\",\n", " loc=\"right\",\n", ")\n", "ax.set_title(\n", diff --git a/docs/user_guide/_tutorial_notebooks/inventory.ipynb b/docs/user_guide/_tutorial_notebooks/inventory.ipynb index 0e1027b8..cbde5ba8 100644 --- a/docs/user_guide/_tutorial_notebooks/inventory.ipynb +++ b/docs/user_guide/_tutorial_notebooks/inventory.ipynb @@ -8,17 +8,1613 @@ "\n", "Ideally, GRIB2 files have a companion \"index\" file that are a plain ASCII text file that provides some details about the contents of each file (i.e., what each GRIB message contains). These files can tell you the variable represented in the GRIB message, the level, forecast lead time, and the starting byte range in the file.\n", "\n", - "There are two \"flavors\" of index files, wgrib-style and eccodes-style." + "There are two \"flavors\" of index files, wgrib-style and eccodes-style.\n", + "\n", + "NCEP models provide the wgrib-style index files while ECMWF models provide the eccodes-style index file.\n", + "\n", + "Herbie provides a parser to read the index file into a Pandas DataFrame and calls it the file's **inventory**.\n", + "\n", + "Let's start by looking at the inventory for a HRRR file.\n" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "from herbie import Herbie" ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "✅ Found ┊ model=hrrr ┊ \u001b[3mproduct=sfc\u001b[0m ┊ \u001b[38;2;41;130;13m2024-Jan-01 00:00 UTC\u001b[92m F00\u001b[0m ┊ \u001b[38;2;255;153;0m\u001b[3mGRIB2 @ aws\u001b[0m ┊ \u001b[38;2;255;153;0m\u001b[3mIDX @ aws\u001b[0m\n" + ] + }, + { + "data": { + "text/plain": [ + "\u001b[48;2;255;255;255m\u001b[38;2;136;33;27m▌\u001b[0m\u001b[38;2;12;53;118m\u001b[48;2;240;234;210m▌\u001b[38;2;0;0;0m\u001b[1mHerbie\u001b[0m HRRR model \u001b[3msfc\u001b[0m product initialized \u001b[38;2;41;130;13m2024-Jan-01 00:00 UTC\u001b[92m F00\u001b[0m ┊ \u001b[38;2;255;153;0m\u001b[3msource=aws\u001b[0m" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "H = Herbie(\"2024-01-01\", model=\"hrrr\")\n", + "H" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The path of the relevant index file is given by `H.idx`. You can go to that URL and see what the raw index file looks like.\n" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'https://noaa-hrrr-bdp-pds.s3.amazonaws.com/hrrr.20240101/conus/hrrr.t00z.wrfsfcf00.grib2.idx'" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "H.idx" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Herbie parses the raw index file as a Pandas DataFrame using `H.inventory()`\n" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
grib_messagestart_byteend_byterangereference_timevalid_timevariablelevelforecast_timesearch_this
010202809.00-2028092024-01-012024-01-01REFCentire atmosphereanl:REFC:entire atmosphere:anl
12202810246792.0202810-2467922024-01-012024-01-01RETOPcloud topanl:RETOP:cloud top:anl
23246793496145.0246793-4961452024-01-012024-01-01var discipline=0 center=7 local_table=1 parmca...entire atmosphereanl:var discipline=0 center=7 local_table=1 parmc...
34496146649032.0496146-6490322024-01-012024-01-01VILentire atmosphereanl:VIL:entire atmosphere:anl
456490332038336.0649033-20383362024-01-012024-01-01VISsurfaceanl:VIS:surface:anl
.................................
165166126776108126785469.0126776108-1267854692024-01-012024-01-01ICECsurfaceanl:ICEC:surface:anl
166167126785470128189723.0126785470-1281897232024-01-012024-01-01SBT123top of atmosphereanl:SBT123:top of atmosphere:anl
167168128189724130514441.0128189724-1305144412024-01-012024-01-01SBT124top of atmosphereanl:SBT124:top of atmosphere:anl
168169130514442131785130.0130514442-1317851302024-01-012024-01-01SBT113top of atmosphereanl:SBT113:top of atmosphere:anl
169170131785131NaN131785131-2024-01-012024-01-01SBT114top of atmosphereanl:SBT114:top of atmosphere:anl
\n", + "

170 rows × 10 columns

\n", + "
" + ], + "text/plain": [ + " grib_message start_byte end_byte range \\\n", + "0 1 0 202809.0 0-202809 \n", + "1 2 202810 246792.0 202810-246792 \n", + "2 3 246793 496145.0 246793-496145 \n", + "3 4 496146 649032.0 496146-649032 \n", + "4 5 649033 2038336.0 649033-2038336 \n", + ".. ... ... ... ... \n", + "165 166 126776108 126785469.0 126776108-126785469 \n", + "166 167 126785470 128189723.0 126785470-128189723 \n", + "167 168 128189724 130514441.0 128189724-130514441 \n", + "168 169 130514442 131785130.0 130514442-131785130 \n", + "169 170 131785131 NaN 131785131- \n", + "\n", + " reference_time valid_time \\\n", + "0 2024-01-01 2024-01-01 \n", + "1 2024-01-01 2024-01-01 \n", + "2 2024-01-01 2024-01-01 \n", + "3 2024-01-01 2024-01-01 \n", + "4 2024-01-01 2024-01-01 \n", + ".. ... ... \n", + "165 2024-01-01 2024-01-01 \n", + "166 2024-01-01 2024-01-01 \n", + "167 2024-01-01 2024-01-01 \n", + "168 2024-01-01 2024-01-01 \n", + "169 2024-01-01 2024-01-01 \n", + "\n", + " variable level \\\n", + "0 REFC entire atmosphere \n", + "1 RETOP cloud top \n", + "2 var discipline=0 center=7 local_table=1 parmca... entire atmosphere \n", + "3 VIL entire atmosphere \n", + "4 VIS surface \n", + ".. ... ... \n", + "165 ICEC surface \n", + "166 SBT123 top of atmosphere \n", + "167 SBT124 top of atmosphere \n", + "168 SBT113 top of atmosphere \n", + "169 SBT114 top of atmosphere \n", + "\n", + " forecast_time search_this \n", + "0 anl :REFC:entire atmosphere:anl \n", + "1 anl :RETOP:cloud top:anl \n", + "2 anl :var discipline=0 center=7 local_table=1 parmc... \n", + "3 anl :VIL:entire atmosphere:anl \n", + "4 anl :VIS:surface:anl \n", + ".. ... ... \n", + "165 anl :ICEC:surface:anl \n", + "166 anl :SBT123:top of atmosphere:anl \n", + "167 anl :SBT124:top of atmosphere:anl \n", + "168 anl :SBT113:top of atmosphere:anl \n", + "169 anl :SBT114:top of atmosphere:anl \n", + "\n", + "[170 rows x 10 columns]" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "H.inventory()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Notice the `search_this` column; that is a column that Herbie can do regular expression searches to filter the GRIB messages you want. For example, if you want all the variables at 500 mb...\n" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
grib_messagestart_byteend_byterangereference_timevalid_timevariablelevelforecast_timesearch_this
131462993327003497.06299332-70034972024-01-012024-01-01HGT500 mbanl:HGT:500 mb:anl
141570034987550668.07003498-75506682024-01-012024-01-01TMP500 mbanl:TMP:500 mb:anl
151675506698417238.07550669-84172382024-01-012024-01-01DPT500 mbanl:DPT:500 mb:anl
161784172398997799.08417239-89977992024-01-012024-01-01UGRD500 mbanl:UGRD:500 mb:anl
171889978009584981.08997800-95849812024-01-012024-01-01VGRD500 mbanl:VGRD:500 mb:anl
\n", + "
" + ], + "text/plain": [ + " grib_message start_byte end_byte range reference_time \\\n", + "13 14 6299332 7003497.0 6299332-7003497 2024-01-01 \n", + "14 15 7003498 7550668.0 7003498-7550668 2024-01-01 \n", + "15 16 7550669 8417238.0 7550669-8417238 2024-01-01 \n", + "16 17 8417239 8997799.0 8417239-8997799 2024-01-01 \n", + "17 18 8997800 9584981.0 8997800-9584981 2024-01-01 \n", + "\n", + " valid_time variable level forecast_time search_this \n", + "13 2024-01-01 HGT 500 mb anl :HGT:500 mb:anl \n", + "14 2024-01-01 TMP 500 mb anl :TMP:500 mb:anl \n", + "15 2024-01-01 DPT 500 mb anl :DPT:500 mb:anl \n", + "16 2024-01-01 UGRD 500 mb anl :UGRD:500 mb:anl \n", + "17 2024-01-01 VGRD 500 mb anl :VGRD:500 mb:anl " + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "H.inventory(\":500 mb\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Notice that only the rows that contain 500 mb are selected. This is useful when you want to download a subset of variables from the GRIB file. Notice the `range` column which tells us the byte range of each variable in the file. Herbie will use this byte range when you request downloading only the selected variables or opening it in xarray.\n" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "📇 Download subset: \u001b[48;2;255;255;255m\u001b[38;2;136;33;27m▌\u001b[0m\u001b[38;2;12;53;118m\u001b[48;2;240;234;210m▌\u001b[38;2;0;0;0m\u001b[1mHerbie\u001b[0m HRRR model \u001b[3msfc\u001b[0m product initialized \u001b[38;2;41;130;13m2024-Jan-01 00:00 UTC\u001b[92m F00\u001b[0m ┊ \u001b[38;2;255;153;0m\u001b[3msource=aws\u001b[0m \n", + " cURL from https://noaa-hrrr-bdp-pds.s3.amazonaws.com/hrrr.20240101/conus/hrrr.t00z.wrfsfcf00.grib2\n", + "Found \u001b[1m\u001b[38;2;41;130;13m5\u001b[0m grib messages.\n", + "Download subset group 1\n", + " 14 \u001b[38;2;255;153;0m:HGT:500 mb:anl\u001b[0m\n", + " 15 \u001b[38;2;255;153;0m:TMP:500 mb:anl\u001b[0m\n", + " 16 \u001b[38;2;255;153;0m:DPT:500 mb:anl\u001b[0m\n", + " 17 \u001b[38;2;255;153;0m:UGRD:500 mb:anl\u001b[0m\n", + " 18 \u001b[38;2;255;153;0m:VGRD:500 mb:anl\u001b[0m\n", + "curl -s --range 6299332-9584981 \"https://noaa-hrrr-bdp-pds.s3.amazonaws.com/hrrr.20240101/conus/hrrr.t00z.wrfsfcf00.grib2\" > \"/home/blaylock/data/hrrr/20240101/subset_6befbe61__hrrr.t00z.wrfsfcf00.grib2\"\n", + "💾 Saved the subset to /home/blaylock/data/hrrr/20240101/subset_6befbe61__hrrr.t00z.wrfsfcf00.grib2\n" + ] + }, + { + "data": { + "text/plain": [ + "PosixPath('/home/blaylock/data/hrrr/20240101/subset_6befbe61__hrrr.t00z.wrfsfcf00.grib2')" + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "H.download(\":500 mb\", verbose=True, overwrite=True)" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/blaylock/GITHUB/Herbie/herbie/core.py:1088: UserWarning: Will not remove GRIB file because it previously existed.\n", + " warnings.warn(\"Will not remove GRIB file because it previously existed.\")\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
<xarray.Dataset>\n",
+       "Dimensions:              (y: 1059, x: 1799)\n",
+       "Coordinates:\n",
+       "    time                 datetime64[ns] 2024-01-01\n",
+       "    step                 timedelta64[ns] 00:00:00\n",
+       "    isobaricInhPa        float64 500.0\n",
+       "    latitude             (y, x) float64 21.14 21.15 21.15 ... 47.86 47.85 47.84\n",
+       "    longitude            (y, x) float64 237.3 237.3 237.3 ... 299.0 299.0 299.1\n",
+       "    valid_time           datetime64[ns] 2024-01-01\n",
+       "Dimensions without coordinates: y, x\n",
+       "Data variables:\n",
+       "    t                    (y, x) float32 ...\n",
+       "    u                    (y, x) float32 ...\n",
+       "    v                    (y, x) float32 ...\n",
+       "    gh                   (y, x) float32 ...\n",
+       "    dpt                  (y, x) float32 ...\n",
+       "    gribfile_projection  object None\n",
+       "Attributes:\n",
+       "    GRIB_edition:            2\n",
+       "    GRIB_centre:             kwbc\n",
+       "    GRIB_centreDescription:  US National Weather Service - NCEP\n",
+       "    GRIB_subCentre:          0\n",
+       "    Conventions:             CF-1.7\n",
+       "    institution:             US National Weather Service - NCEP\n",
+       "    model:                   hrrr\n",
+       "    product:                 sfc\n",
+       "    description:             High-Resolution Rapid Refresh - CONUS\n",
+       "    remote_grib:             https://noaa-hrrr-bdp-pds.s3.amazonaws.com/hrrr....\n",
+       "    local_grib:              /home/blaylock/data/hrrr/20240101/subset_6befbe6...\n",
+       "    searchString:            :500 mb
" + ], + "text/plain": [ + "\n", + "Dimensions: (y: 1059, x: 1799)\n", + "Coordinates:\n", + " time datetime64[ns] 2024-01-01\n", + " step timedelta64[ns] 00:00:00\n", + " isobaricInhPa float64 500.0\n", + " latitude (y, x) float64 21.14 21.15 21.15 ... 47.86 47.85 47.84\n", + " longitude (y, x) float64 237.3 237.3 237.3 ... 299.0 299.0 299.1\n", + " valid_time datetime64[ns] 2024-01-01\n", + "Dimensions without coordinates: y, x\n", + "Data variables:\n", + " t (y, x) float32 ...\n", + " u (y, x) float32 ...\n", + " v (y, x) float32 ...\n", + " gh (y, x) float32 ...\n", + " dpt (y, x) float32 ...\n", + " gribfile_projection object None\n", + "Attributes:\n", + " GRIB_edition: 2\n", + " GRIB_centre: kwbc\n", + " GRIB_centreDescription: US National Weather Service - NCEP\n", + " GRIB_subCentre: 0\n", + " Conventions: CF-1.7\n", + " institution: US National Weather Service - NCEP\n", + " model: hrrr\n", + " product: sfc\n", + " description: High-Resolution Rapid Refresh - CONUS\n", + " remote_grib: https://noaa-hrrr-bdp-pds.s3.amazonaws.com/hrrr....\n", + " local_grib: /home/blaylock/data/hrrr/20240101/subset_6befbe6...\n", + " searchString: :500 mb" + ] + }, + "execution_count": 13, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "H.xarray(\":500 mb\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "More examples of valid regular expressions are found in the [Herbie Docs: Subset with searchString](https://herbie.readthedocs.io/en/stable/user_guide/searchString.html). Using `H.inventory(searchString)` is an effective way to test differeng regex patterns to get the variables you are interested in downloading.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The eccodes-style index files work the same way, expect the regex for selecting variable names and levels will be different. Here is the ECMWF forecast inventory file.\n" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "✅ Found ┊ model=ecmwf ┊ \u001b[3mproduct=oper\u001b[0m ┊ \u001b[38;2;41;130;13m2024-Jan-01 00:00 UTC\u001b[92m F00\u001b[0m ┊ \u001b[38;2;255;153;0m\u001b[3mGRIB2 @ azure\u001b[0m ┊ \u001b[38;2;255;153;0m\u001b[3mIDX @ azure\u001b[0m\n" + ] + }, + { + "data": { + "text/plain": [ + "'https://ai4edataeuwest.blob.core.windows.net/ecmwf/20240101/00z/0p4-beta/oper/20240101000000-0h-oper-fc.index'" + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "H = Herbie(\"2024-01-01\", model=\"ecmwf\")\n", + "H.idx" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
grib_messagestart_byteend_byterangereference_timevalid_timestepparamlevelistlevtypenumberdomainexpverclasstypestreamsearch_this
0102054830-2054832024-01-012024-01-010 daysgh250plNaNg0001odfcoper:gh:250:pl:g:0001:od:fc:oper
12205483427603205483-4276032024-01-012024-01-010 daysgh925plNaNg0001odfcoper:gh:925:pl:g:0001:od:fc:oper
23427603427827427603-4278272024-01-012024-01-010 daystpNaNsfcNaNg0001odfcoper:tp:sfc:g:0001:od:fc:oper
34427827640309427827-6403092024-01-012024-01-010 daysgh700plNaNg0001odfcoper:gh:700:pl:g:0001:od:fc:oper
45640309878511640309-8785112024-01-012024-01-010 daysr850plNaNg0001odfcoper:r:850:pl:g:0001:od:fc:oper
......................................................
7879238346492438034623834649-243803462024-01-012024-01-010 daysvo700plNaNg0001odfcoper:vo:700:pl:g:0001:od:fc:oper
7980243803462495895524380346-249589552024-01-012024-01-010 daysvo250plNaNg0001odfcoper:vo:250:pl:g:0001:od:fc:oper
8081249589552551516424958955-255151642024-01-012024-01-010 daysvo200plNaNg0001odfcoper:vo:200:pl:g:0001:od:fc:oper
8182255151642609021725515164-260902172024-01-012024-01-010 daysd50plNaNg0001odfcoper:d:50:pl:g:0001:od:fc:oper
8283260902172663938926090217-266393892024-01-012024-01-010 daysvo50plNaNg0001odfcoper:vo:50:pl:g:0001:od:fc:oper
\n", + "

83 rows × 17 columns

\n", + "
" + ], + "text/plain": [ + " grib_message start_byte end_byte range reference_time \\\n", + "0 1 0 205483 0-205483 2024-01-01 \n", + "1 2 205483 427603 205483-427603 2024-01-01 \n", + "2 3 427603 427827 427603-427827 2024-01-01 \n", + "3 4 427827 640309 427827-640309 2024-01-01 \n", + "4 5 640309 878511 640309-878511 2024-01-01 \n", + ".. ... ... ... ... ... \n", + "78 79 23834649 24380346 23834649-24380346 2024-01-01 \n", + "79 80 24380346 24958955 24380346-24958955 2024-01-01 \n", + "80 81 24958955 25515164 24958955-25515164 2024-01-01 \n", + "81 82 25515164 26090217 25515164-26090217 2024-01-01 \n", + "82 83 26090217 26639389 26090217-26639389 2024-01-01 \n", + "\n", + " valid_time step param levelist levtype number domain expver class type \\\n", + "0 2024-01-01 0 days gh 250 pl NaN g 0001 od fc \n", + "1 2024-01-01 0 days gh 925 pl NaN g 0001 od fc \n", + "2 2024-01-01 0 days tp NaN sfc NaN g 0001 od fc \n", + "3 2024-01-01 0 days gh 700 pl NaN g 0001 od fc \n", + "4 2024-01-01 0 days r 850 pl NaN g 0001 od fc \n", + ".. ... ... ... ... ... ... ... ... ... ... \n", + "78 2024-01-01 0 days vo 700 pl NaN g 0001 od fc \n", + "79 2024-01-01 0 days vo 250 pl NaN g 0001 od fc \n", + "80 2024-01-01 0 days vo 200 pl NaN g 0001 od fc \n", + "81 2024-01-01 0 days d 50 pl NaN g 0001 od fc \n", + "82 2024-01-01 0 days vo 50 pl NaN g 0001 od fc \n", + "\n", + " stream search_this \n", + "0 oper :gh:250:pl:g:0001:od:fc:oper \n", + "1 oper :gh:925:pl:g:0001:od:fc:oper \n", + "2 oper :tp:sfc:g:0001:od:fc:oper \n", + "3 oper :gh:700:pl:g:0001:od:fc:oper \n", + "4 oper :r:850:pl:g:0001:od:fc:oper \n", + ".. ... ... \n", + "78 oper :vo:700:pl:g:0001:od:fc:oper \n", + "79 oper :vo:250:pl:g:0001:od:fc:oper \n", + "80 oper :vo:200:pl:g:0001:od:fc:oper \n", + "81 oper :d:50:pl:g:0001:od:fc:oper \n", + "82 oper :vo:50:pl:g:0001:od:fc:oper \n", + "\n", + "[83 rows x 17 columns]" + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "H.inventory()" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
grib_messagestart_byteend_byterangereference_timevalid_timestepparamlevelistlevtypenumberdomainexpverclasstypestreamsearch_this
89156282317991001562823-17991002024-01-012024-01-010 daysr500plNaNg0001odfcoper:r:500:pl:g:0001:od:fc:oper
2324512847753917555128477-53917552024-01-012024-01-010 dayst500plNaNg0001odfcoper:t:500:pl:g:0001:od:fc:oper
3435793153881142927931538-81142922024-01-012024-01-010 daysgh500plNaNg0001odfcoper:gh:500:pl:g:0001:od:fc:oper
5152127400371304115312740037-130411532024-01-012024-01-010 daysu500plNaNg0001odfcoper:u:500:pl:g:0001:od:fc:oper
5253130411531335547813041153-133554782024-01-012024-01-010 daysv500plNaNg0001odfcoper:v:500:pl:g:0001:od:fc:oper
5657142813631461100514281363-146110052024-01-012024-01-010 daysq500plNaNg0001odfcoper:q:500:pl:g:0001:od:fc:oper
6869186937001926911418693700-192691142024-01-012024-01-010 daysd500plNaNg0001odfcoper:d:500:pl:g:0001:od:fc:oper
7576221429642268645322142964-226864532024-01-012024-01-010 daysvo500plNaNg0001odfcoper:vo:500:pl:g:0001:od:fc:oper
\n", + "
" + ], + "text/plain": [ + " grib_message start_byte end_byte range reference_time \\\n", + "8 9 1562823 1799100 1562823-1799100 2024-01-01 \n", + "23 24 5128477 5391755 5128477-5391755 2024-01-01 \n", + "34 35 7931538 8114292 7931538-8114292 2024-01-01 \n", + "51 52 12740037 13041153 12740037-13041153 2024-01-01 \n", + "52 53 13041153 13355478 13041153-13355478 2024-01-01 \n", + "56 57 14281363 14611005 14281363-14611005 2024-01-01 \n", + "68 69 18693700 19269114 18693700-19269114 2024-01-01 \n", + "75 76 22142964 22686453 22142964-22686453 2024-01-01 \n", + "\n", + " valid_time step param levelist levtype number domain expver class type \\\n", + "8 2024-01-01 0 days r 500 pl NaN g 0001 od fc \n", + "23 2024-01-01 0 days t 500 pl NaN g 0001 od fc \n", + "34 2024-01-01 0 days gh 500 pl NaN g 0001 od fc \n", + "51 2024-01-01 0 days u 500 pl NaN g 0001 od fc \n", + "52 2024-01-01 0 days v 500 pl NaN g 0001 od fc \n", + "56 2024-01-01 0 days q 500 pl NaN g 0001 od fc \n", + "68 2024-01-01 0 days d 500 pl NaN g 0001 od fc \n", + "75 2024-01-01 0 days vo 500 pl NaN g 0001 od fc \n", + "\n", + " stream search_this \n", + "8 oper :r:500:pl:g:0001:od:fc:oper \n", + "23 oper :t:500:pl:g:0001:od:fc:oper \n", + "34 oper :gh:500:pl:g:0001:od:fc:oper \n", + "51 oper :u:500:pl:g:0001:od:fc:oper \n", + "52 oper :v:500:pl:g:0001:od:fc:oper \n", + "56 oper :q:500:pl:g:0001:od:fc:oper \n", + "68 oper :d:500:pl:g:0001:od:fc:oper \n", + "75 oper :vo:500:pl:g:0001:od:fc:oper " + ] + }, + "execution_count": 17, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "H.inventory(\":500:pl\")" + ] } ], "metadata": { @@ -28,7 +1624,15 @@ "name": "python3" }, "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", "version": "3.12.1" } },