Ignore:
Timestamp:
10/11/19 00:27:00 (5 years ago)
Author:
bdef
Message:

CHG: syntax cahnge to meet most of Pep8 requirement

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/test/NightlyRun/test1205.py

    r23793 r24214  
    2222md = model()
    2323md = roundmesh(md, 750000., resolution)
    24 md = setmask(md, '', '')    #We can not test iceshelves nor ice rises with this analytical solution
     24md = setmask(md, '', '')  #We can not test iceshelves nor ice rises with this analytical solution
    2525md = parameterize(md, '../Par/RoundSheetStaticEISMINT.py')
    2626
    2727#Calculation of the analytical 2d velocity field
    2828constant = 0.3
    29 vx_obs = constant / 2. * md.mesh.x * (md.geometry.thickness)**-1
    30 vy_obs = constant / 2. * md.mesh.y * (md.geometry.thickness)**-1
     29vx_obs = constant / 2. * md.mesh.x * (md.geometry.thickness)**- 1
     30vy_obs = constant / 2. * md.mesh.y * (md.geometry.thickness)**- 1
    3131vel_obs = np.sqrt((md.inversion.vx_obs)**2 + (md.inversion.vy_obs)**2)
    3232
     
    5858#Plot of the velocity from the exact and calculated solutions
    5959#figure(1)
    60 #set(gcf, 'Position',[1 1 1580 1150])
     60#set(gcf, 'Position', [1 1 1580 1150])
    6161#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', ...
    6363#vel, 'FaceColor', 'interp', 'EdgeColor', 'none')
    6464#title('Modelled velocity', 'FontSize', 14, 'FontWeight', 'bold')
     
    6767
    6868#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', ...
    7070#vel_obs, 'FaceColor', 'interp', 'EdgeColor', 'none')
    7171#title('Analytical velocity', 'FontSize', 14, 'FontWeight', 'bold')
     
    7575#subplot(2, 2, 3)
    7676#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.')
    7979#title('Analytical vs calculated velocity', 'FontSize', 14, 'FontWeight', 'bold')
    8080#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')
    8282#legend('calculated velocity', 'exact velocity')
    8383#axis([0 750000 0 200])
     
    8585
    8686#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')
    8989#title('Relative misfit [%]', 'FontSize', 14, 'FontWeight', 'bold')
    9090#colorbar
Note: See TracChangeset for help on using the changeset viewer.