|
68 | 68 | div = cf.div_xy(u_2, v_2, radius="earth")
|
69 | 69 |
|
70 | 70 | # %%
|
71 |
| -# 8. Generate the final plot. First we configure the overall plot by |
| 71 | +# 8. First we configure the overall plot by |
72 | 72 | # making the map higher resolution, to show the coastlines of the UK and
|
73 | 73 | # Ireland in greater detail, and changing the colourmap to better reflect
|
74 | 74 | # the data which can be positive or negative, i.e. has 0 as the 'middle'
|
75 |
| -# value of significance, so should use a diverging colour map. Then we |
76 |
| -# plot the current vectors, noting we had to play around with the 'stride' |
77 |
| -# and 'scale' parameter values to adjust the vector spacing and size so that |
78 |
| -# the vector field is best represented and visible without over-cluttering |
79 |
| -# the plot. Finally we plot the divergence as a contour plot without any |
80 |
| -# lines showing. This compound plot is saved on one canvas using 'gopen' |
81 |
| -# and 'gclose' to wrap the two plotting calls: |
| 75 | +# value of significance, so should use a diverging colour map. |
82 | 76 | cfp.mapset(resolution="10m")
|
83 | 77 | cfp.cscale("ncl_default")
|
| 78 | + |
| 79 | +# %% |
| 80 | +# 9. Now generate the final plot. Plot the current vectors, noting we had |
| 81 | +# to play around with the 'stride' and 'scale' parameter values to adjust |
| 82 | +# the vector spacing and size so that the vector field is best represented |
| 83 | +# and visible without over-cluttering the plot. Finally we plot the |
| 84 | +# divergence as a contour plot without any lines showing. This compound |
| 85 | +# plot is saved on one canvas using 'gopen' and 'gclose' to wrap the two |
| 86 | +# plotting calls: |
84 | 87 | cfp.gopen(
|
85 | 88 | file=f"irish-sea-currents-divergence-{chosen_time.replace(' ', '-')}.png"
|
86 | 89 | )
|
|
0 commit comments