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

Output `cont_list`

parent fa95ccb5
No related branches found
No related tags found
No related merge requests found
program test_get_1_outerm
! Libraries:
use jumble, only: csvread, deg_to_rad
use jumble, only: csvread, deg_to_rad, rad_to_deg
use shapelib, only: shpfileobject, ftdouble, shpt_polygon, shpclose
use shapelib_03, only: shp_create_03, dbf_add_field_03, &
shp_append_object_03, dbf_write_attribute_03
use config_m, only: config
use derived_types, only: eddy, shpc_slice_handler, null_ssh_contour, &
......@@ -14,7 +17,7 @@ program test_get_1_outerm
implicit none
integer:: date = 0
integer:: date = 0, i, ifield, ishape
real, allocatable:: ssh(:, :)
! (1 - max_radius(1):nlon + max_radius(1), nlat) if the grid is periodic
......@@ -57,6 +60,7 @@ program test_get_1_outerm
! contours are in monotonic order of ssh.
integer n_cont ! number of good contours found and stored in cont_list
TYPE(shpfileobject) hshp_cont_list
namelist /main_nml/ ind_targ_extr, innermost_level, cyclone, date, &
grid_lon_lat
......@@ -89,6 +93,22 @@ program test_get_1_outerm
write(hshp%unit, fmt = *) 0
CALL shpc_close(hshp)
print *, 'test_get_1_outerm: Created "SHPC".'
! cont_list shapefile:
call shp_create_03("cont_list", shpt_polygon, hshp_cont_list)
call dbf_add_field_03(ifield, hshp_cont_list, 'ssh', ftdouble, &
nwidth = 13, ndecimals = 6)
do i = 1, n_cont
call shp_append_object_03(ishape, hshp_cont_list, shpt_polygon, &
cont_list(i)%points * rad_to_deg)
call dbf_write_attribute_03(hshp_cont_list, ishape, ifield, &
cont_list(i)%ssh)
end do
CALL shpclose(hshp_cont_list)
print *, 'test_get_1_outerm: Created shapefile "cont_list".'
else
print *, "test_get_1_outerm: Could not find an outermost contour."
end if
......
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