Skip to content

Commit

Permalink
Fix issues
Browse files Browse the repository at this point in the history
  • Loading branch information
lauratomkins committed Nov 14, 2023
1 parent d2d99ac commit e441435
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions examples/retrieve/plot_convective_stratiform.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
# mask 3 values (weak echo)
convsf_masked = np.ma.masked_equal(convsf_masked, 3)
# add dimension to array to add to grid object
convsf_dict["feature_detection"]["data"] = convsf_masked[None, :, :]
convsf_dict["feature_detection"]["data"] = convsf_masked
# add field
grid.add_field("convsf", convsf_dict["feature_detection"], replace_existing=True)

Expand Down Expand Up @@ -220,7 +220,7 @@
ax1.set_aspect("equal")
ax2 = plt.subplot(132)
ax2.pcolormesh(
convsf_dict["feature_under"]["data"],
convsf_dict["feature_under"]["data"][0, :, :],
vmin=0,
vmax=2,
cmap=plt.get_cmap("viridis", 3),
Expand All @@ -229,7 +229,10 @@
ax2.set_aspect("equal")
ax3 = plt.subplot(133)
ax3.pcolormesh(
convsf_dict["feature_over"]["data"], vmin=0, vmax=2, cmap=plt.get_cmap("viridis", 3)
convsf_dict["feature_over"]["data"][0, :, :],
vmin=0,
vmax=2,
cmap=plt.get_cmap("viridis", 3)
)
ax3.set_title("Overestimate")
ax3.set_aspect("equal")
Expand Down Expand Up @@ -281,7 +284,7 @@
# mask 3 values (weak echo)
convsf_masked = np.ma.masked_equal(convsf_masked, 3)
# add dimension to array to add to grid object
convsf_dict["feature_detection"]["data"] = convsf_masked[None, :, :]
convsf_dict["feature_detection"]["data"] = convsf_masked
# add field
grid.add_field("convsf", convsf_dict["feature_detection"], replace_existing=True)

Expand Down Expand Up @@ -400,7 +403,7 @@
# mask 3 values (weak echo)
convsf_masked = np.ma.masked_equal(convsf_masked, 3)
# add dimension to array to add to grid object
convsf_dict["feature_detection"]["data"] = convsf_masked[None, :, :]
convsf_dict["feature_detection"]["data"] = convsf_masked
# add field
grid.add_field("convsf", convsf_dict["feature_detection"], replace_existing=True)

Expand Down

0 comments on commit e441435

Please sign in to comment.