Skip to content

Commit 38a3e1e

Browse files
jumapicomr-c
authored andcommitted
1 parent a7473ca commit 38a3e1e

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

doc/make.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import sys
88

99
def html():
10-
os.system('sphinx-build -b html -d build/doctrees . build/html')
10+
os.system('sphinx-build -b html -c source/ -d build/doctrees . build/html')
1111

1212
def latex():
1313
if sys.platform != 'win32':

doc/source/users/figures/plotdaynight.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
import os
2+
import time
3+
import datetime
14
import numpy as np
25
from mpl_toolkits.basemap import Basemap
36
import matplotlib.pyplot as plt
4-
from datetime import datetime
57
# miller projection
68
map = Basemap(projection='mill',lon_0=180)
79
# plot coastlines, draw label meridians and parallels.
@@ -13,7 +15,8 @@
1315
map.fillcontinents(color='coral',lake_color='aqua')
1416
# shade the night areas, with alpha transparency so the
1517
# map shows through. Use current time in UTC.
16-
date = datetime.utcnow()
18+
date = datetime.datetime.utcfromtimestamp(
19+
int(os.environ.get('SOURCE_DATE_EPOCH', time.time())))
1720
CS=map.nightshade(date)
1821
plt.title('Day/Night Map for %s (UTC)' % date.strftime("%d %b %Y %H:%M:%S"))
1922
plt.show()

doc/source/users/figures/plothighsandlows.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
plot H's and L's on a sea-level pressure map
33
(uses scipy.ndimage.filters and netcdf4-python)
44
"""
5-
import datetime as dt
5+
import os
6+
import time
7+
import datetime
68
import numpy as np
79
import matplotlib.pyplot as plt
810
from mpl_toolkits.basemap import Basemap, addcyclic
@@ -23,7 +25,8 @@ def extrema(mat,mode='wrap',window=10):
2325

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

2831
# open OpenDAP dataset.
2932
data = Dataset(date.strftime(url))

0 commit comments

Comments
 (0)