diff --git a/Common/read_eddy.f90 b/Common/read_eddy.f90 index 1816f9ad0f48aa60b17fb73456034f34f0fc1bb8..c633c59b909627dc7130fb9a743994d166f4c47f 100644 --- a/Common/read_eddy.f90 +++ b/Common/read_eddy.f90 @@ -63,8 +63,13 @@ contains call dbf_read_attribute_03(e%out_cont%ssh, hshp%outermost, hshp%out_ssh, & ishape) - call dbf_read_attribute_03(e%radius4, hshp%outermost, hshp%out_radius4, & - ishape) + + if (hshp%out_radius4 /= - 1) then + call dbf_read_attribute_03(e%radius4, hshp%outermost, hshp%out_radius4, & + ishape) + else + e%radius4 = - 1 + end if call shp_read_object_03(hshp%outermost, ishape, psobject) p = shpobj2pol(psobject) diff --git a/Common/read_field_indices.F90 b/Common/read_field_indices.F90 index 421b5571bde4606561cc47f8fcabf23e41a92fb3..55dc27b56aef2816339ff594db65693bb1ef40c2 100644 --- a/Common/read_field_indices.F90 +++ b/Common/read_field_indices.F90 @@ -7,6 +7,7 @@ contains subroutine read_field_indices(hshp) ! Libraries: + use shapelib, only: dbfgetfieldindex use shapelib_03, only: dbf_get_field_index_03 use derived_types, only: shpc @@ -28,7 +29,9 @@ contains call dbf_get_field_index_03(hshp%outermost, "date", hshp%out_date) call dbf_get_field_index_03(hshp%outermost, "eddy_index", & hshp%out_eddy_index) - call dbf_get_field_index_03(hshp%outermost, "radius4", hshp%out_radius4) + + ! We allow the field radius4 to be missing: + hshp%out_radius4 = dbfgetfieldindex(hshp%outermost, "radius4") call dbf_get_field_index_03(hshp%max_speed, "r_eq_area", & hshp%max_speed_r_eq_area)