Changeset 24214 for issm/trunk-jpl/test/NightlyRun/test1205.py
- Timestamp:
- 10/11/19 00:27:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/test/NightlyRun/test1205.py
r23793 r24214 22 22 md = model() 23 23 md = roundmesh(md, 750000., resolution) 24 md = setmask(md, '', '') 24 md = setmask(md, '', '') #We can not test iceshelves nor ice rises with this analytical solution 25 25 md = parameterize(md, '../Par/RoundSheetStaticEISMINT.py') 26 26 27 27 #Calculation of the analytical 2d velocity field 28 28 constant = 0.3 29 vx_obs = constant / 2. * md.mesh.x * (md.geometry.thickness)**- 130 vy_obs = constant / 2. * md.mesh.y * (md.geometry.thickness)**- 129 vx_obs = constant / 2. * md.mesh.x * (md.geometry.thickness)**- 1 30 vy_obs = constant / 2. * md.mesh.y * (md.geometry.thickness)**- 1 31 31 vel_obs = np.sqrt((md.inversion.vx_obs)**2 + (md.inversion.vy_obs)**2) 32 32 … … 58 58 #Plot of the velocity from the exact and calculated solutions 59 59 #figure(1) 60 #set(gcf, 'Position', [1 1 1580 1150])60 #set(gcf, 'Position', [1 1 1580 1150]) 61 61 #subplot(2, 2, 1) 62 #p = patch('Faces', md.mesh.elements2d, 'Vertices', [md.mesh.x2d md.mesh.y2d], 'FaceVertexCData',...62 #p = patch('Faces', md.mesh.elements2d, 'Vertices', [md.mesh.x2d md.mesh.y2d], 'FaceVertexCData', ... 63 63 #vel, 'FaceColor', 'interp', 'EdgeColor', 'none') 64 64 #title('Modelled velocity', 'FontSize', 14, 'FontWeight', 'bold') … … 67 67 68 68 #subplot(2, 2, 2) 69 #p = patch('Faces', md.mesh.elements2d, 'Vertices', [md.mesh.x2d md.mesh.y2d], 'FaceVertexCData',...69 #p = patch('Faces', md.mesh.elements2d, 'Vertices', [md.mesh.x2d md.mesh.y2d], 'FaceVertexCData', ... 70 70 #vel_obs, 'FaceColor', 'interp', 'EdgeColor', 'none') 71 71 #title('Analytical velocity', 'FontSize', 14, 'FontWeight', 'bold') … … 75 75 #subplot(2, 2, 3) 76 76 #hold on 77 #plot(sqrt((md.mesh.x(1:md.mesh.numberofvertices2d)).^2 +(md.mesh.y(1:md.mesh.numberofvertices2d)).^2), vel, 'r.')78 #plot(sqrt((md.mesh.x2d).^2 +(md.mesh.y2d).^2), vel_obs, 'b.')77 #plot(sqrt((md.mesh.x(1:md.mesh.numberofvertices2d)).^2 + (md.mesh.y(1:md.mesh.numberofvertices2d)).^2), vel, 'r.') 78 #plot(sqrt((md.mesh.x2d).^2 + (md.mesh.y2d).^2), vel_obs, 'b.') 79 79 #title('Analytical vs calculated velocity', 'FontSize', 14, 'FontWeight', 'bold') 80 80 #xlabel('distance to the center of the icesheet [m]', 'FontSize', 14, 'FontWeight', 'bold') 81 #ylabel('velocity [m /yr]', 'FontSize', 14, 'FontWeight', 'bold')81 #ylabel('velocity [m / yr]', 'FontSize', 14, 'FontWeight', 'bold') 82 82 #legend('calculated velocity', 'exact velocity') 83 83 #axis([0 750000 0 200]) … … 85 85 86 86 #subplot(2, 2, 4) 87 #p = patch('Faces', md.mesh.elements2d, 'Vertices', [md.mesh.x2d md.mesh.y2d], 'FaceVertexCData',...88 #abs(vel -vel_obs)./vel_obs*100, 'FaceColor', 'interp', 'EdgeColor', 'none')87 #p = patch('Faces', md.mesh.elements2d, 'Vertices', [md.mesh.x2d md.mesh.y2d], 'FaceVertexCData', ... 88 #abs(vel - vel_obs). / vel_obs * 100, 'FaceColor', 'interp', 'EdgeColor', 'none') 89 89 #title('Relative misfit [%]', 'FontSize', 14, 'FontWeight', 'bold') 90 90 #colorbar
Note:
See TracChangeset
for help on using the changeset viewer.