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

Use `convert_to_ind`

parent 68cd7344
No related branches found
No related tags found
No related merge requests found
program test_mean_speed
! Libraries:
use contour_531, only: convert_to_ind
use gpc_f, only: shp_read_pol, polygon
use jumble, only: get_command_arg_dyn, deg_to_rad, twopi, rad_to_deg
use shapelib, only: shpclose, shpfileobject
......@@ -15,7 +16,6 @@ program test_mean_speed
real:: center_deg(2) = [9.625, - 33.875] ! longitude and latitude, in degrees
real center(2) ! longitude and latitude, in rad
integer:: ishape = 0
integer i
real lon_max ! longitude, in rad
real step(2) ! longitude and latitude steps, in rad
......@@ -26,10 +26,6 @@ program test_mean_speed
real, allocatable:: u(:, :), v(:, :) ! (nlon, nlat) wind, in m s-1
TYPE(shpfileobject) hshp
type(polygon) p
real, allocatable:: points_xy(:, :) ! (2, p%part(1)%n_points)
! Points given by projection coordinates.
character(len = :), allocatable:: contour_filename
real min_lon_p ! minimum longitude of p, in rad
logical periodic ! grid is periodic in longitude
......@@ -73,10 +69,8 @@ program test_mean_speed
stop 1
end if
allocate(points_xy(2, p%part(1)%n_points))
forall (i = 1:p%part(1)%n_points) points_xy(:, i) = (p%part(1)%points(:, i) &
- corner) / step + 1.
print *, "mean azimuthal speed = ", mean_speed(u, v, p%part(1), points_xy, &
center, corner, step), "m s-1"
print *, "mean azimuthal speed = ", mean_speed(u, v, p%part(1), &
convert_to_ind(p%part(1)%points, corner, step), center, corner, step), &
"m s-1"
end program test_mean_speed
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