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

Use csvread

This shortens the file `test_get_1_outerm.f90`.
parent 54fbaa7f
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@ program test_get_1_outerm
use, intrinsic:: ISO_FORTRAN_ENV
! Libraries:
use jumble, only: new_unit, count_lines, deg_to_rad
use jumble, only: csvread, deg_to_rad
use config_m, only: config
use derived_types, only: eddy, shpc_slice_handler, null_ssh_contour, &
......@@ -16,7 +16,7 @@ program test_get_1_outerm
implicit none
integer unit, n, l, date
integer date
real, allocatable:: ssh(:, :)
! (1 - max_radius(1):nlon + max_radius(1), nlat) if the grid is periodic
......@@ -64,23 +64,8 @@ program test_get_1_outerm
read *, date
call config
call input_ssh(corner, step, nlon, nlat, periodic, ssh, u, v)
print *, "test_get_1_outerm: Reading from outside_points.csv..."
call new_unit(unit)
open(unit, file = "outside_points.csv", status = "old", action = "read", &
position = "rewind")
call count_lines(unit, n)
n = n - 2 ! 2 title lines
allocate(outside_points(2, n))
rewind(unit)
read(unit, fmt = *)
read(unit, fmt = *)
do l = 1, n
read(unit, fmt = *) outside_points(:, l)
end do
outside_points = outside_points * deg_to_rad
close(unit)
call csvread("outside_points.csv", outside_points, first_r = 3)
outside_points = transpose(outside_points) * deg_to_rad
e%extr%coord = corner + (ind_targ_extr - 1) * step
e%out_cont = get_1_outerm(cyclone, e%extr%coord, innermost_level, &
......
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