Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pages/gallery/500hPa_Vorticity_Advection.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"outputs": [],
"source": [
"# Open the example netCDF data\n",
"ncss = NCSS('https://www.ncei.noaa.gov/thredds/ncss/grid/namanl/'\n",
"ncss = NCSS('https://www.ncdc.noaa.gov/thredds/ncss//namanl/'\n",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's eliminate the hard-coding of the grid vs. not (which is a thredds server issue) by actually using the catalog. So let's update to something like:

cat = TDSCatalog('https://www.ncdc.noaa.gov/thredds/catalog/namanl/201604/20160416/catalog.xml')
ncss = cat.datasets['namanl_218_20160416_1800_000.grb'].subset()

" '201604/20160416/namanl_218_20160416_1800_000.grb')\n",
"now = datetime.utcnow()\n",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line isn't even used, and really doesn't make sense for archived data.

"\n",
Expand Down
2 changes: 1 addition & 1 deletion pages/gallery/850hPa_Temperature_Advection.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"metadata": {},
"outputs": [],
"source": [
"base_url = 'https://www.ncei.noaa.gov/thredds/ncss/grid/gfs-g4-anl-files/'\n",
"base_url = 'https://www.ncdc.noaa.gov/thredds/ncss//gfs-g4-anl-files/'\n",
"dt = datetime(2017, 4, 5, 12)\n",
"ncss = NCSS('{}{dt:%Y%m}/{dt:%Y%m%d}/gfsanl_4_{dt:%Y%m%d}_'\n",
" '{dt:%H}00_000.grb2'.format(base_url, dt=dt))\n",
Expand Down
2 changes: 1 addition & 1 deletion pages/gallery/Ageostrophic_Wind_Example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"outputs": [],
"source": [
"# Create NCSS object to access the NetcdfSubset\n",
"base_url = 'https://www.ncei.noaa.gov/thredds/ncss/grid/gfs-g4-anl-files/'\n",
"base_url = 'https://www.ncdc.noaa.gov/thredds/ncss//gfs-g4-anl-files/'\n",
"dt = datetime(2016, 8, 22, 18)\n",
"ncss = NCSS('{}{dt:%Y%m}/{dt:%Y%m%d}/gfsanl_4_{dt:%Y%m%d}_'\n",
" '{dt:%H}00_003.grb2'.format(base_url, dt=dt))\n",
Expand Down
2 changes: 1 addition & 1 deletion pages/gallery/HILO_Symbol_Plot.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
"source": [
"dattim = datetime(1999, 1, 3, 0)\n",
"\n",
"ncss = NCSS('https://www.ncei.noaa.gov/thredds/ncss/grid/narr-a-files/{0:%Y%m}/{0:%Y%m%d}/'\n",
"ncss = NCSS('https://www.ncdc.noaa.gov/thredds/ncss//narr-a-files/{0:%Y%m}/{0:%Y%m%d}/'\n",
" 'narr-a_221_{0:%Y%m%d}_{0:%H}00_000.grb'.format(dattim))\n",
"query = ncss.query()\n",
"query.all_times().variables('Pressure_reduced_to_MSL_msl',\n",
Expand Down
2 changes: 1 addition & 1 deletion pages/gallery/MSLP_temp_winds.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"metadata": {},
"outputs": [],
"source": [
"base_url = 'https://www.ncei.noaa.gov/thredds/ncss/grid/gfs-g4-anl-files/'\n",
"base_url = 'https://www.ncdc.noaa.gov/thredds/ncss//gfs-g4-anl-files/'\n",
"dt = datetime(2018, 1, 4, 12)\n",
"ncss = NCSS('{}{dt:%Y%m}/{dt:%Y%m%d}/gfsanl_4_{dt:%Y%m%d}'\n",
" '_{dt:%H}00_000.grb2'.format(base_url, dt=dt))\n",
Expand Down
2 changes: 1 addition & 1 deletion pages/gallery/Smoothing_Contours.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"outputs": [],
"source": [
"dt = datetime(2016, 4, 16, 18)\n",
"base_url = 'https://www.ncei.noaa.gov/thredds/ncss/grid/namanl/'\n",
"base_url = 'https://www.ncdc.noaa.gov/thredds/ncss//namanl/'\n",
"ncss = NCSS('{}{dt:%Y%m}/{dt:%Y%m%d}/namanl_218_{dt:%Y%m%d}_'\n",
" '{dt:%H}00_000.grb'.format(base_url, dt=dt))\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion pages/gallery/declarative_500_hPa.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"date = datetime(2012, 10, 31, 12)\n",
"\n",
"# Open dataset from NCEI\n",
"ds = xr.open_dataset('https://www.ncei.noaa.gov/thredds/dodsC/'\n",
"ds = xr.open_dataset('https://www.ncdc.noaa.gov/thredds/dodsC/'\n",
" f'gfs-g4-anl-files/{date:%Y%m}/{date:%Y%m%d}/'\n",
" f'gfsanl_4_{date:%Y%m%d}_{date:%H}00_000.grb2'\n",
" ).metpy.parse_cf()\n",
Expand Down
2 changes: 1 addition & 1 deletion pages/gallery/miller_composite.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"metadata": {},
"outputs": [],
"source": [
"base_url = 'https://www.ncei.noaa.gov/thredds/ncss/grid/namanl/'\n",
"base_url = 'https://www.ncdc.noaa.gov/thredds/ncss//namanl/'\n",
"dt = datetime(2011, 4, 27)\n",
"ncss = NCSS('{}{dt:%Y%m}/{dt:%Y%m%d}/namanl_218_{dt:%Y%m%d}_'\n",
" '1800_000.grb'.format(base_url, dt=dt))\n",
Expand Down
2 changes: 1 addition & 1 deletion pages/gallery/xarray_500hPa_map.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"source": [
"# Set year, month, day, and hour values as variables to make it\n",
"# easier to change dates for a case study\n",
"base_url = 'https://www.ncei.noaa.gov/thredds/dodsC/namanl/'\n",
"base_url = 'https://www.ncdc.noaa.gov/thredds/dodsC/namanl/'\n",
"dt = datetime(2016, 4, 16, 18)\n",
"data = xr.open_dataset('{}{dt:%Y%m}/{dt:%Y%m%d}/namanl_218_{dt:%Y%m%d}_'\n",
" '{dt:%H}00_000.grb'.format(base_url, dt=dt),\n",
Expand Down
6 changes: 3 additions & 3 deletions pages/workshop/MetPy_Advanced/QG Analysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@
"\n",
"Let's go ahead and use the NARR Analysis data to investigate the past case we identified (The Storm of the Century).\n",
"\n",
"https://www.ncei.noaa.gov/thredds/catalog/narr-a-files/199303/19930313/catalog.html?dataset=narr-a-files/199303/19930313/narr-a_221_19930313_0000_000.grb\n",
"https://www.ncdc.noaa.gov/thredds/catalog/narr-a-files/199303/19930313/catalog.html?dataset=narr-a-files/199303/19930313/narr-a_221_19930313_0000_000.grb\n",
"\n",
"And we will use a python package called Siphon to read this data through the NetCDFSubset (NetCDFServer) link.\n",
"\n",
"https://www.ncei.noaa.gov/thredds/ncss/grid/narr-a-files/199303/19930313/narr-a_221_19930313_0000_000.grb/dataset.html\n",
"https://www.ncdc.noaa.gov/thredds/ncss//narr-a-files/199303/19930313/narr-a_221_19930313_0000_000.grb/dataset.html\n",
"\n",
"First we can set out date using the datetime module"
]
Expand Down Expand Up @@ -117,7 +117,7 @@
"outputs": [],
"source": [
"# Read NARR Data from THREDDS server\n",
"base_url = 'https://www.ncei.noaa.gov/thredds/catalog/narr-a-files/'\n",
"base_url = 'https://www.ncdc.noaa.gov/thredds/catalog/narr-a-files/'\n",
"\n",
"# Programmatically generate the URL to the day of data we want\n",
"cat = TDSCatalog(f'{base_url}{dt:%Y%m}/{dt:%Y%m%d}/catalog.xml')\n",
Expand Down
6 changes: 3 additions & 3 deletions pages/workshop/MetPy_Case_Study/MetPy Case Study.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,11 @@
"**Choosing our data source**\n",
"Let's go ahead and use the NARR Analysis data to investigate the past case we identified (The Storm of the Century).\n",
"\n",
"https://www.ncei.noaa.gov/thredds/catalog/narr-a-files/199303/19930313/catalog.html?dataset=narr-a-files/199303/19930313/narr-a_221_19930313_0000_000.grb\n",
"https://www.ncdc.noaa.gov/thredds/catalog/narr-a-files/199303/19930313/catalog.html?dataset=narr-a-files/199303/19930313/narr-a_221_19930313_0000_000.grb\n",
"\n",
"And we will use a python package called Siphon to read this data through the NetCDFSubset (NetCDFServer) link.\n",
"\n",
"https://www.ncei.noaa.gov/thredds/ncss/grid/narr-a-files/199303/19930313/narr-a_221_19930313_0000_000.grb/dataset.html"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's just kill this link.

"https://www.ncdc.noaa.gov/thredds/ncss//narr-a-files/199303/19930313/narr-a_221_19930313_0000_000.grb/dataset.html"
]
},
{
Expand All @@ -171,7 +171,7 @@
"outputs": [],
"source": [
"# Read NARR Data from THREDDS server\n",
"base_url = 'https://www.ncei.noaa.gov/thredds/catalog/narr-a-files/'\n",
"base_url = 'https://www.ncdc.noaa.gov/thredds/catalog/narr-a-files/'\n",
"\n",
"# Programmatically generate the URL to the day of data we want\n",
"cat = TDSCatalog(f'{base_url}{dt:%Y%m}/{dt:%Y%m%d}/catalog.xml')\n",
Expand Down