Skip to content
Snippets Groups Projects
Commit 602da465 authored by Lionel GUEZ's avatar Lionel GUEZ
Browse files

Shift the longitude of the polyline

So that it is in the grid.
parent 889df293
No related branches found
No related tags found
No related merge requests found
......@@ -28,6 +28,7 @@ program test_mean_speed
TYPE(shpobject) psobject
type(polygon) p
character(len = :), allocatable:: contour_filename
real min_lon_p ! minimum longitude of p, in degrees
namelist /main_nml/ center, ishape
......@@ -71,6 +72,12 @@ program test_mean_speed
CALL shpclose(hshp)
p = shpobj2pol(psobject)
call shpdestroyobject(psobject)
! Shift the longitude of the polyline so that it is in the grid:
min_lon_p = minval(p%part(1)%points(1, :))
p%part(1)%points(1, :) = p%part(1)%points(1, :) &
+ ceiling((corner(1) - min_lon_p) / 360.) * 360.
p%part(1)%points = p%part(1)%points * deg_to_rad
print *, "mean azimuthal speed = ", mean_speed(u, v, p%part(1), &
center * deg_to_rad, corner * deg_to_rad, step * deg_to_rad), "m s-1"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment