Skip to content
Open
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 doc/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import sys

def html():
os.system('sphinx-build -b html -d build/doctrees . build/html')
os.system('LC_ALL=C.UTF-8 sphinx-build -b html -c source/ -d build/doctrees . build/html')

def latex():
if sys.platform != 'win32':
Expand Down
7 changes: 5 additions & 2 deletions doc/source/users/figures/plotdaynight.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import os
import time
import datetime
import numpy as np
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
from datetime import datetime
# miller projection
map = Basemap(projection='mill',lon_0=180)
# plot coastlines, draw label meridians and parallels.
Expand All @@ -13,7 +15,8 @@
map.fillcontinents(color='coral',lake_color='aqua')
# shade the night areas, with alpha transparency so the
# map shows through. Use current time in UTC.
date = datetime.utcnow()
date = datetime.datetime.utcfromtimestamp(
int(os.environ.get('SOURCE_DATE_EPOCH', time.time())))
CS=map.nightshade(date)
plt.title('Day/Night Map for %s (UTC)' % date.strftime("%d %b %Y %H:%M:%S"))
plt.show()
7 changes: 5 additions & 2 deletions doc/source/users/figures/plothighsandlows.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
plot H's and L's on a sea-level pressure map
(uses scipy.ndimage.filters and netcdf4-python)
"""
import datetime as dt
import os
import time
import datetime
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap, addcyclic
Expand All @@ -23,7 +25,8 @@ def extrema(mat,mode='wrap',window=10):

# Plot 00 UTC yesterday.
url = "http://nomads.ncep.noaa.gov/dods/gfs_0p50/gfs%Y%m%d/gfs_0p50_00z"
date = dt.datetime.now() - dt.timedelta(days=1)
date = datetime.datetime.utcfromtimestamp(
int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))) - datetime.timedelta(days=1)

# open OpenDAP dataset.
data = Dataset(date.strftime(url))
Expand Down