From bba67bb2c112dea7d21c2a2038932472d00f7383 Mon Sep 17 00:00:00 2001
From: Lionel GUEZ <guez@lmd.ens.fr>
Date: Thu, 1 Jul 2021 10:36:57 +0200
Subject: [PATCH] Remove interpolat field from shapefiles

Thus remove too component interpolated of derived type eddy and
component `extr_interp` of derived type shpc.
---
 Common/derived_types.f90                | 5 +----
 Common/read_eddy.f90                    | 4 ----
 Common/read_field_indices.f90           | 3 ---
 Common/shpc_create.f90                  | 2 --
 Common/write_eddy.f90                   | 2 --
 Inst_eddies/Tests/test_get_1_outerm.f90 | 1 -
 Inst_eddies/set_all_outerm.f90          | 1 -
 Overlap/recv_snapshot.f90               | 1 -
 Overlap/send_snapshot.f90               | 1 -
 9 files changed, 1 insertion(+), 19 deletions(-)

diff --git a/Common/derived_types.f90 b/Common/derived_types.f90
index 47875415..0a7a575b 100644
--- a/Common/derived_types.f90
+++ b/Common/derived_types.f90
@@ -25,8 +25,6 @@ module derived_types
      logical valid ! valid out_cont found: not a null contour, and
                    ! with sufficient area
 
-     logical interpolated
-     
      integer:: delta_in = huge(0)
      ! Minimum difference in time subscript where there is a direct
      ! predecessor. Huge means there is no direct predecessor.
@@ -73,8 +71,7 @@ module derived_types
      logical cyclone
      
      ! Field identifiers:
-     integer extr_ssh, extr_date, extr_eddy_index, extr_interp, extr_valid, &
-          extr_speed
+     integer extr_ssh, extr_date, extr_eddy_index, extr_valid, extr_speed
      integer out_r_eq_area, out_ssh, out_date, out_eddy_index, out_radius4
      integer max_speed_r_eq_area, max_speed_ssh, max_speed_date, &
           max_speed_eddy_index
diff --git a/Common/read_eddy.f90 b/Common/read_eddy.f90
index 3636367b..d21ee3f4 100644
--- a/Common/read_eddy.f90
+++ b/Common/read_eddy.f90
@@ -40,10 +40,6 @@ contains
     call dbf_read_attribute_03(d, hshp%extremum, hshp%extr_date, ishape)
     call dbf_read_attribute_03(i, hshp%extremum, hshp%extr_eddy_index, ishape)
 
-    call dbf_read_attribute_03(int_attr, hshp%extremum, hshp%extr_interp, &
-         ishape)
-    e%interpolated = int_attr == 1
-
     e%cyclone = hshp%cyclone
 
     call dbf_read_attribute_03(int_attr, hshp%extremum, hshp%extr_valid, &
diff --git a/Common/read_field_indices.f90 b/Common/read_field_indices.f90
index 3d358c3e..93f012d4 100644
--- a/Common/read_field_indices.f90
+++ b/Common/read_field_indices.f90
@@ -22,8 +22,6 @@ contains
        call dbf_get_field_index_03(hshp%extremum, "days_1950", hshp%extr_date)
        call dbf_get_field_index_03(hshp%extremum, "eddy_index", &
             hshp%extr_eddy_index)
-       call dbf_get_field_index_03(hshp%extremum, "interpolat", &
-            hshp%extr_interp)
        call dbf_get_field_index_03(hshp%extremum, "valid", hshp%extr_valid)
        call dbf_get_field_index_03(hshp%extremum, "speed", hshp%extr_speed)
 
@@ -40,7 +38,6 @@ contains
     call ezmpi_bcast(hshp%extr_ssh, root = 0)
     call ezmpi_bcast(hshp%extr_date, root = 0)
     call ezmpi_bcast(hshp%extr_eddy_index, root = 0)
-    call ezmpi_bcast(hshp%extr_interp, root = 0)
     call ezmpi_bcast(hshp%extr_valid, root = 0)
     call ezmpi_bcast(hshp%extr_speed, root = 0)
     call ezmpi_bcast(hshp%out_r_eq_area, root = 0)
diff --git a/Common/shpc_create.f90 b/Common/shpc_create.f90
index 094f68db..0c896b6b 100644
--- a/Common/shpc_create.f90
+++ b/Common/shpc_create.f90
@@ -30,8 +30,6 @@ contains
          ftinteger, nwidth = 5, ndecimals = 0)
     call dbf_add_field_03(hshp%extr_eddy_index, hshp%extremum, 'eddy_index', &
          ftinteger, nwidth = 5, ndecimals = 0)
-    call dbf_add_field_03(hshp%extr_interp, hshp%extremum, 'interpolat', &
-         ftinteger, nwidth = 1, ndecimals = 0)
     call dbf_add_field_03(hshp%extr_valid, hshp%extremum, 'valid', &
          ftinteger, nwidth = 1, ndecimals = 0)
     call dbf_add_field_03(hshp%extr_speed, hshp%extremum, 'speed', ftdouble, &
diff --git a/Common/write_eddy.f90 b/Common/write_eddy.f90
index a730a1be..5b22294e 100644
--- a/Common/write_eddy.f90
+++ b/Common/write_eddy.f90
@@ -35,8 +35,6 @@ contains
     call dbf_write_attribute_03(hshp%extremum, ishape, hshp%extr_date, &
          days_1950)
     call dbf_write_attribute_03(hshp%extremum, ishape, hshp%extr_eddy_index, i)
-    call dbf_write_attribute_03(hshp%extremum, ishape, hshp%extr_interp, &
-         merge(1, 0, e%interpolated))
     call dbf_write_attribute_03(hshp%extremum, ishape, hshp%extr_valid, &
          merge(1, 0, e%valid))
 
diff --git a/Inst_eddies/Tests/test_get_1_outerm.f90 b/Inst_eddies/Tests/test_get_1_outerm.f90
index ad696689..f46639cc 100644
--- a/Inst_eddies/Tests/test_get_1_outerm.f90
+++ b/Inst_eddies/Tests/test_get_1_outerm.f90
@@ -109,7 +109,6 @@ program test_get_1_outerm
      e%max_speed = missing_speed
      e%radius4 = - 1
      e%valid = .true.
-     e%interpolated = .false.
      call shpc_create(hshp, shpc_dir = "SHPC", cyclone = cyclone)
      call write_eddy(e, hshp, days_1950, i = 1)
      CALL shpc_close(hshp)
diff --git a/Inst_eddies/set_all_outerm.f90 b/Inst_eddies/set_all_outerm.f90
index 9844df6d..667fada0 100644
--- a/Inst_eddies/set_all_outerm.f90
+++ b/Inst_eddies/set_all_outerm.f90
@@ -110,7 +110,6 @@ contains
        
        s%list_vis(i)%ssh_extr = ssh(s%ind_extr(1, i), s%ind_extr(2, i))
        s%list_vis(i)%cyclone = cyclone(i)
-       s%list_vis(i)%interpolated = .false.
 
        s%list_vis(i)%valid = .true.
        ! must be intialized to true because it is used in nearby_extr
diff --git a/Overlap/recv_snapshot.f90 b/Overlap/recv_snapshot.f90
index a5c53240..f592d5e2 100644
--- a/Overlap/recv_snapshot.f90
+++ b/Overlap/recv_snapshot.f90
@@ -37,7 +37,6 @@ contains
        call recv_ssh_contour(s%list_vis(i)%speed_cont, source, tag)
        call ezmpi_recv(s%list_vis(i)%max_speed, source, tag)
        call ezmpi_recv(s%list_vis(i)%valid, source, tag)
-       call ezmpi_recv(s%list_vis(i)%interpolated, source, tag)
        call ezmpi_recv(s%list_vis(i)%delta_in, source, tag)
        call ezmpi_recv(s%list_vis(i)%delta_out, source, tag)
        call ezmpi_recv(s%list_vis(i)%radius4, source, tag)
diff --git a/Overlap/send_snapshot.f90 b/Overlap/send_snapshot.f90
index f22e51fe..5f9d1834 100644
--- a/Overlap/send_snapshot.f90
+++ b/Overlap/send_snapshot.f90
@@ -32,7 +32,6 @@ contains
        call send_ssh_contour(s%list_vis(i)%speed_cont, dest, tag)
        call ezmpi_send(s%list_vis(i)%max_speed, dest, tag)
        call ezmpi_send(s%list_vis(i)%valid, dest, tag)
-       call ezmpi_send(s%list_vis(i)%interpolated, dest, tag)
        call ezmpi_send(s%list_vis(i)%delta_in, dest, tag)
        call ezmpi_send(s%list_vis(i)%delta_out, dest, tag)
        call ezmpi_send(s%list_vis(i)%radius4, dest, tag)
-- 
GitLab