diff --git a/Inst_eddies/Tests/examine_eddy.f90 b/Inst_eddies/Tests/examine_eddy.f90 index f615e4dcdd6d0fdf6c05d9924bbd22b3ada79285..08e469a457020706f72fb6396a12c57b2738804e 100644 --- a/Inst_eddies/Tests/examine_eddy.f90 +++ b/Inst_eddies/Tests/examine_eddy.f90 @@ -35,7 +35,7 @@ program examine_eddy use config_m, only: config, max_radius use cont_list_m, only: create_cont_list, close_cont_list use derived_types, only: snapshot, shpc_slice_handler, eddy - use input_ssh_m, only: input_ssh, corner_whole, step, nlon + use input_ssh_m, only: input_ssh, corner_whole, step, nlon, uniform_lon_lat use read_eddy_m, only: read_eddy use shpc_create_m, only: shpc_create use set_all_extr_m, only: set_all_extr @@ -122,8 +122,14 @@ program examine_eddy slice_o_dir = slice_dir // "/Anticyclones" end if - call shp_open_03(hshp, pszshapefile = slice_o_dir // "/extremum", & - pszaccess = "rb") + if (uniform_lon_lat) then + call shp_open_03(hshp, pszshapefile = slice_o_dir // "/extremum", & + pszaccess = "rb") + else + call shp_open_03(hshp, pszshapefile = slice_o_dir // "/extr_proj", & + pszaccess = "rb") + end if + call dbf_get_field_index_03(hshp, "date", ifield) call dbf_read_attribute_03(d0, hshp, ifield, ishape = 0) call read_column(ishape_last, file = slice_o_dir // "/ishape_last.txt", & @@ -140,8 +146,13 @@ program examine_eddy do ishape = ishape_first, ishape_last(date) call shp_read_point(coord, hshp, ishape) - coord_proj(:, ishape - ishape_first + 1) = nint((coord * deg_to_rad & - - corner_whole) / step + 1.) + + if (uniform_lon_lat) then + coord_proj(:, ishape - ishape_first + 1) = nint((coord * deg_to_rad & + - corner_whole) / step + 1.) + else + coord_proj(:, ishape - ishape_first + 1) = nint(coord) + end if end do e%extr%coord = (coord_proj(:, eddy_i_target) - 1) * step + corner_whole