Skip to content

Commit

Permalink
Disable llc basemap tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jahn committed May 16, 2024
1 parent e2729a3 commit df63f4b
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions utils/python/MITgcmutils/tests/test_llc.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,26 +95,26 @@ def test_pcol_xg(tmp_path):
if err:
raise AssertionError(err)

if havebasemap:
def test_pcol_stere(tmp_path):
x = mit.rdmds(pjoin(TEST_DATA_PATH, 'llc90', 'XG'))
y = mit.rdmds(pjoin(TEST_DATA_PATH, 'llc90', 'YG'))
e = mit.rdmds(pjoin(TEST_DATA_PATH, 'llc90', 'Eta'), 8)
lm = mit.rdmds(pjoin(TEST_DATA_PATH, 'llc90', 'hFacC'), lev=0) == 0
e[lm] = np.nan

fig = plt.figure(figsize=(8., 8.))
plt.clf()
mp = Basemap(-45, 30, 135, 30, projection='stere', lon_0=0., lat_0=90.,
resolution = 'l', area_thresh = 1000.)
h = pcol(x, y, e, mp, vmin=-2., vmax=1., cmap = 'jet')
mp.fillcontinents(color = 'grey')
mp.drawmapboundary()
mp.drawmeridians(np.arange(0, 360, 30))
mp.drawparallels(np.arange(-90, 90, 30))
pngname = tmp_path / 'llc_pcol_stere.png'
plt.savefig(pngname)
err = compare_images(pjoin(BASELINE_PATH, pngname), pngname, 13)
if err:
raise AssertionError(err)
# if havebasemap:
# def test_pcol_stere(tmp_path):
# x = mit.rdmds(pjoin(TEST_DATA_PATH, 'llc90', 'XG'))
# y = mit.rdmds(pjoin(TEST_DATA_PATH, 'llc90', 'YG'))
# e = mit.rdmds(pjoin(TEST_DATA_PATH, 'llc90', 'Eta'), 8)
# lm = mit.rdmds(pjoin(TEST_DATA_PATH, 'llc90', 'hFacC'), lev=0) == 0
# e[lm] = np.nan
#
# fig = plt.figure(figsize=(8., 8.))
# plt.clf()
# mp = Basemap(-45, 30, 135, 30, projection='stere', lon_0=0., lat_0=90.,
# resolution = 'l', area_thresh = 1000.)
# h = pcol(x, y, e, mp, vmin=-2., vmax=1., cmap = 'jet')
# mp.fillcontinents(color = 'grey')
# mp.drawmapboundary()
# mp.drawmeridians(np.arange(0, 360, 30))
# mp.drawparallels(np.arange(-90, 90, 30))
# pngname = tmp_path / 'llc_pcol_stere.png'
# plt.savefig(pngname)
# err = compare_images(pjoin(BASELINE_PATH, pngname), pngname, 13)
# if err:
# raise AssertionError(err)

0 comments on commit df63f4b

Please sign in to comment.