Changeset 27088
- Timestamp:
- 06/22/22 01:44:10 (3 years ago)
- Location:
- issm/trunk-jpl/src/m/plot
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/plot/plot_BC.py
r24290 r27088 4 4 from plot_icefront import plot_icefront 5 5 from hydrologydc import hydrologydc 6 from hydrologyglads import hydrologyglads 6 7 from mpl_toolkits.mplot3d import Axes3D 7 8 from mpl_toolkits.axes_grid1.inset_locator import inset_axes … … 36 37 #define what to plot with plot style 37 38 spc_dict = {'spcvx': ['stressbalance', 'o', 'r', 240, 'vx Dirichlet'], 38 'spcvy': ['stressbalance', 'o', 'b', 160, 'vy Dirichlet']} 39 'spcvy': ['stressbalance', 'o', 'b', 160, 'vy Dirichlet'], 40 'spcthickness': ['masstransport', 'o', 'k', 40, 'Thickness']} 39 41 if not is2d: 40 42 spc_dict['spcvz'] = ['stressbalance', 'o', 'y', 80, 'vy Dirichlet'] … … 44 46 if md.hydrology.isefficientlayer: 45 47 spc_dict['spcsediment_head'] = ['hydrology', '^', 'b', 240, 'IDS Head'] 48 49 if isinstance(md.hydrology, hydrologyglads): 50 spc_dict['spcphi'] = ['hydrology', 'v', 'r', 240, 'phi'] 46 51 47 52 for key in spc_dict: -
issm/trunk-jpl/src/m/plot/plot_icefront.py
r24290 r27088 1 1 import numpy as np 2 2 from processmesh import processmesh 3 import matplotlib as mpl 3 4 from mpl_toolkits.mplot3d.art3d import Line3DCollection 4 5 from mpl_toolkits.axes_grid1.inset_locator import inset_axes … … 26 27 icefront = np.where(np.logical_and(iceelement != nodes_per_elt, iceelement != 0)) 27 28 29 oceannodes = md.mask.ocean_levelset < 0 30 oceanelement = np.sum(oceannodes[elements], axis=1) 31 32 #icefront check 33 groundingline = np.where(np.logical_and(oceanelement != nodes_per_elt, oceanelement != 0)) 34 28 35 #plot mesh 29 36 if is2d: … … 32 39 #highlight elements on neumann 33 40 if len(icefront[0]) > 0: 34 colors = np.asarray([0.5 for element in elements[icefront]]) 35 ax.tripcolor(x, y, elements[icefront], facecolors=colors, alpha=0.5, label='elements on ice front') 41 colors = np.ones(np.shape(elements[icefront])[0]) 42 cmap = mpl.colors.ListedColormap("navy") 43 ax.tripcolor(x, y, elements[icefront], facecolors=colors, edgecolor='k', label='elements on ice front', cmap=cmap) 44 if len(groundingline[0]) > 0: 45 colors = np.ones(np.shape(elements[groundingline])[0]) 46 cmap = mpl.colors.ListedColormap("limegreen") 47 ax.tripcolor(x, y, elements[groundingline], facecolors=colors, edgecolor='k', label='elements on grounding line', cmap=cmap) 36 48 else: 37 49 ax = inset_axes(ax, width='100%', height='100%', loc=3, borderpad=0, axes_class=Axes3D)
Note:
See TracChangeset
for help on using the changeset viewer.