Skip to content

Commit

Permalink
apply black formatting (fix typo)
Browse files Browse the repository at this point in the history
  • Loading branch information
blaylockbk committed Sep 8, 2023
1 parent 0f0dfd6 commit ad06d76
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 28 deletions.
38 changes: 19 additions & 19 deletions docs/user_guide/_model_notebooks/rtma.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"from paint.standard2 import cm_tmp, cm_pcp, cm_wind\n",
"\n",
"import matplotlib.pyplot as plt\n",
"import cartopy.crs as ccrs\n"
"import cartopy.crs as ccrs"
]
},
{
Expand All @@ -50,7 +50,7 @@
" \"2023-01-01 06:00\",\n",
" model=\"rtma\",\n",
" product=\"anl\",\n",
")\n"
")"
]
},
{
Expand All @@ -75,7 +75,7 @@
],
"source": [
"# Show available products\n",
"H.PRODUCTS\n"
"H.PRODUCTS"
]
},
{
Expand All @@ -97,7 +97,7 @@
}
],
"source": [
"H.SOURCES\n"
"H.SOURCES"
]
},
{
Expand Down Expand Up @@ -127,7 +127,7 @@
}
],
"source": [
"H.download()\n"
"H.download()"
]
},
{
Expand Down Expand Up @@ -411,7 +411,7 @@
}
],
"source": [
"H.inventory()\n"
"H.inventory()"
]
},
{
Expand Down Expand Up @@ -880,7 +880,7 @@
],
"source": [
"ds = H.xarray(\"TMP:2 m\")\n",
"ds\n"
"ds"
]
},
{
Expand Down Expand Up @@ -933,7 +933,7 @@
" f\"{ds.model.upper()}: {H.product_description}\\nValid: {ds.valid_time.dt.strftime('%H:%M UTC %d %b %Y').item()}\",\n",
" loc=\"left\",\n",
")\n",
"ax.set_title(ds.t2m.GRIB_name, loc=\"right\")\n"
"ax.set_title(ds.t2m.GRIB_name, loc=\"right\")"
]
},
{
Expand Down Expand Up @@ -966,7 +966,7 @@
" \"2023-01-01 06:00\",\n",
" model=\"rtma\",\n",
" product=\"pcp\",\n",
")\n"
")"
]
},
{
Expand All @@ -987,7 +987,7 @@
}
],
"source": [
"H.download()\n"
"H.download()"
]
},
{
Expand Down Expand Up @@ -1444,7 +1444,7 @@
"source": [
"ds = H.xarray()\n",
"ds[\"tp\"] = ds.tp.where(ds.tp > 0)\n",
"ds\n"
"ds"
]
},
{
Expand Down Expand Up @@ -1497,7 +1497,7 @@
" f\"{ds.model.upper()}: {H.product_description}\\nValid: {ds.valid_time.dt.strftime('%H:%M UTC %d %b %Y').item()}\",\n",
" loc=\"left\",\n",
")\n",
"ax.set_title(ds.tp.GRIB_name, loc=\"right\")\n"
"ax.set_title(ds.tp.GRIB_name, loc=\"right\")"
]
},
{
Expand Down Expand Up @@ -1528,7 +1528,7 @@
" \"2023-01-01 06:00\",\n",
" model=\"rtma_ak\",\n",
" product=\"anl\",\n",
")\n"
")"
]
},
{
Expand All @@ -1549,7 +1549,7 @@
}
],
"source": [
"H.download()\n"
"H.download()"
]
},
{
Expand Down Expand Up @@ -1833,7 +1833,7 @@
}
],
"source": [
"H.inventory()\n"
"H.inventory()"
]
},
{
Expand Down Expand Up @@ -2301,7 +2301,7 @@
],
"source": [
"ds = H.xarray(\"WIND:10 m\")\n",
"ds\n"
"ds"
]
},
{
Expand Down Expand Up @@ -2354,7 +2354,7 @@
" f\"{ds.model.upper()}: {H.product_description}\\nValid: {ds.valid_time.dt.strftime('%H:%M UTC %d %b %Y').item()}\",\n",
" loc=\"left\",\n",
")\n",
"ax.set_title(ds.si10.GRIB_name, loc=\"right\")\n"
"ax.set_title(ds.si10.GRIB_name, loc=\"right\")"
]
},
{
Expand Down Expand Up @@ -2427,8 +2427,8 @@
],
"source": [
"# Just open the entire GRIB2 files (opened in multiple DataSets)\n",
"rtma = Herbie(\"2023-05-22 00:00\", model='rtma').xarray()\n",
"urma = Herbie(\"2023-05-22 00:00\", model='urma').xarray()"
"rtma = Herbie(\"2023-05-22 00:00\", model=\"rtma\").xarray()\n",
"urma = Herbie(\"2023-05-22 00:00\", model=\"urma\").xarray()"
]
},
{
Expand Down
14 changes: 7 additions & 7 deletions docs/user_guide/_tutorial_notebooks/wgrib2-wrapper.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
}
],
"source": [
"H = Herbie('2023-02-01')\n",
"H = Herbie(\"2023-02-01\")\n",
"\n",
"ss = \"[U|V]GRD:10 m above ground\" # ss is for searchString\n",
"H.download(ss)\n",
Expand Down Expand Up @@ -347,7 +347,7 @@
],
"source": [
"# Look at the inventory file again to see it is different from before the region subset\n",
"pd.read_csv(str(subset_file)+'.idx', delimiter=\":\", header=None)"
"pd.read_csv(str(subset_file) + \".idx\", delimiter=\":\", header=None)"
]
},
{
Expand Down Expand Up @@ -399,7 +399,7 @@
"crs = ds.herbie.crs\n",
"\n",
"# (can't use Herbie to open FILE yet, so just use xarray)\n",
"ds_region = xr.open_dataset(subset_file, engine='cfgrib')"
"ds_region = xr.open_dataset(subset_file, engine=\"cfgrib\")"
]
},
{
Expand Down Expand Up @@ -429,11 +429,11 @@
}
],
"source": [
"ax = EasyMap(crs=crs).STATES(color='k').ax\n",
"ax.pcolormesh(ds.longitude, ds.latitude, ds.u10, alpha=.5, transform=pc)\n",
"ax = EasyMap(crs=crs).STATES(color=\"k\").ax\n",
"ax.pcolormesh(ds.longitude, ds.latitude, ds.u10, alpha=0.5, transform=pc)\n",
"ax.pcolormesh(ds_region.longitude, ds_region.latitude, ds_region.u10, transform=pc)\n",
"\n",
"ax.gridlines(xlocs=extent[:2], ylocs=extent[2:], color='k', ls='--', draw_labels=True)"
"ax.gridlines(xlocs=extent[:2], ylocs=extent[2:], color=\"k\", ls=\"--\", draw_labels=True)"
]
},
{
Expand Down Expand Up @@ -1381,7 +1381,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.0"
"version": "3.11.4"
},
"orig_nbformat": 4,
"vscode": {
Expand Down
4 changes: 2 additions & 2 deletions herbie/models/hafs.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def template(self):
"ww3": "?",
}
self.SOURCES = {
"nomads": f"https://nomads.ncep.noaa.gov/pub/data/nccf/com/hafs/prod/{self.model}.{self.date:%Y%m%d/%H}/{self.label}.{self.date:%Y%m%d%H}.{self.model}.{self.product}.f{self.fxx:02d}.grb2
"nomads": f"https://nomads.ncep.noaa.gov/pub/data/nccf/com/hafs/prod/{self.model}.{self.date:%Y%m%d/%H}/{self.label}.{self.date:%Y%m%d%H}.{self.model}.{self.product}.f{self.fxx:02d}.grb2"
}
self.EXPECT_IDX_FILE = "remote"
self.LOCALFILE = f"{self.get_remoteFileName}"
Expand All @@ -39,7 +39,7 @@ def template(self):
"ww3": "?",
}
self.SOURCES = {
"nomads": f"https://nomads.ncep.noaa.gov/pub/data/nccf/com/hafs/prod/{self.model}.{self.date:%Y%m%d/%H}/{self.label}.{self.date:%Y%m%d%H}.{self.model}.{self.product}.f{self.fxx:02d}.grb2
"nomads": f"https://nomads.ncep.noaa.gov/pub/data/nccf/com/hafs/prod/{self.model}.{self.date:%Y%m%d/%H}/{self.label}.{self.date:%Y%m%d%H}.{self.model}.{self.product}.f{self.fxx:02d}.grb2"
}
self.EXPECT_IDX_FILE = "remote"
self.LOCALFILE = f"{self.get_remoteFileName}"

0 comments on commit ad06d76

Please sign in to comment.