From 3917b11d19185a7d68d2e2c19eda189a5d702591 Mon Sep 17 00:00:00 2001 From: Lionel GUEZ <guez@lmd.ens.fr> Date: Sat, 26 Mar 2022 00:42:25 +0100 Subject: [PATCH] Rename hshp to hshpc --- Common/write_eddy.f90 | 62 ++++++++++++++++++++++--------------------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/Common/write_eddy.f90 b/Common/write_eddy.f90 index 39a8e6d6..86af0712 100644 --- a/Common/write_eddy.f90 +++ b/Common/write_eddy.f90 @@ -4,7 +4,7 @@ module write_eddy_m contains - subroutine write_eddy(e, hshp, date, i) + subroutine write_eddy(e, hshpc, date, i) use, intrinsic:: ieee_arithmetic, only: ieee_is_nan @@ -17,7 +17,7 @@ contains use derived_types, only: eddy, missing_speed, shpc type(eddy), intent(in):: e - TYPE(shpc), intent(in):: hshp + TYPE(shpc), intent(in):: hshpc integer, intent(in):: date integer, intent(in):: i ! eddy index @@ -26,69 +26,71 @@ contains !------------------------------------------------------------- - call assert(hshp%cyclone .eqv. e%cyclone, & + call assert(hshpc%cyclone .eqv. e%cyclone, & "write_eddy: orientation mismatch") - call shp_append_point_03(ishape, hshp%extremum, e%coord_extr * rad_to_deg) + call shp_append_point_03(ishape, hshpc%extremum, e%coord_extr * rad_to_deg) - call dbf_write_attribute_03(hshp%extremum, ishape, hshp%extr_ssh, & + call dbf_write_attribute_03(hshpc%extremum, ishape, hshpc%extr_ssh, & e%ssh_extr) - call dbf_write_attribute_03(hshp%extremum, ishape, hshp%extr_date, date) - call dbf_write_attribute_03(hshp%extremum, ishape, hshp%extr_eddy_index, i) - call dbf_write_attribute_03(hshp%extremum, ishape, hshp%extr_valid, & + call dbf_write_attribute_03(hshpc%extremum, ishape, hshpc%extr_date, date) + call dbf_write_attribute_03(hshpc%extremum, ishape, hshpc%extr_eddy_index, & + i) + call dbf_write_attribute_03(hshpc%extremum, ishape, hshpc%extr_valid, & merge(1, 0, e%valid)) if (ieee_is_nan(e%max_speed)) then - call dbf_write_attribute_03(hshp%extremum, ishape, hshp%extr_speed, & + call dbf_write_attribute_03(hshpc%extremum, ishape, hshpc%extr_speed, & missing_speed) ! (Cannot write NaN to dbf file.) else - call dbf_write_attribute_03(hshp%extremum, ishape, hshp%extr_speed, & + call dbf_write_attribute_03(hshpc%extremum, ishape, hshpc%extr_speed, & e%max_speed) end if if (e%out_cont%n_points == 0) then - call shp_append_null_03(ishape, hshp%outermost) + call shp_append_null_03(ishape, hshpc%outermost) else - call shp_append_object_03(ishape, hshp%outermost, shpt_polygon, & + call shp_append_object_03(ishape, hshpc%outermost, shpt_polygon, & e%out_cont%points * rad_to_deg) end if if (e%speed_cont%n_points == 0) then - call shp_append_null_03(ishape, hshp%max_speed) + call shp_append_null_03(ishape, hshpc%max_speed) else - call shp_append_object_03(ishape, hshp%max_speed, shpt_polygon, & + call shp_append_object_03(ishape, hshpc%max_speed, shpt_polygon, & e%speed_cont%points * rad_to_deg) end if if (e%out_cont%area >= 0) then - call dbf_write_attribute_03(hshp%outermost, ishape, & - hshp%out_r_eq_area, sqrt(e%out_cont%area / 1e6 / pi)) + call dbf_write_attribute_03(hshpc%outermost, ishape, & + hshpc%out_r_eq_area, sqrt(e%out_cont%area / 1e6 / pi)) else - call dbf_write_attribute_03(hshp%outermost, ishape, & - hshp%out_r_eq_area, - 100.) + call dbf_write_attribute_03(hshpc%outermost, ishape, & + hshpc%out_r_eq_area, - 100.) end if - call dbf_write_attribute_03(hshp%outermost, ishape, hshp%out_ssh, & + call dbf_write_attribute_03(hshpc%outermost, ishape, hshpc%out_ssh, & e%out_cont%ssh) - call dbf_write_attribute_03(hshp%outermost, ishape, hshp%out_date, date) - call dbf_write_attribute_03(hshp%outermost, ishape, hshp%out_eddy_index, i) - call dbf_write_attribute_03(hshp%outermost, ishape, hshp%out_radius4, & + call dbf_write_attribute_03(hshpc%outermost, ishape, hshpc%out_date, date) + call dbf_write_attribute_03(hshpc%outermost, ishape, hshpc%out_eddy_index, & + i) + call dbf_write_attribute_03(hshpc%outermost, ishape, hshpc%out_radius4, & e%radius4) if (e%speed_cont%area >= 0) then - call dbf_write_attribute_03(hshp%max_speed, ishape, & - hshp%max_speed_r_eq_area, sqrt(e%speed_cont%area / 1e6 / pi)) + call dbf_write_attribute_03(hshpc%max_speed, ishape, & + hshpc%max_speed_r_eq_area, sqrt(e%speed_cont%area / 1e6 / pi)) else - call dbf_write_attribute_03(hshp%max_speed, ishape, & - hshp%max_speed_r_eq_area, - 100.) + call dbf_write_attribute_03(hshpc%max_speed, ishape, & + hshpc%max_speed_r_eq_area, - 100.) end if - call dbf_write_attribute_03(hshp%max_speed, ishape, hshp%max_speed_ssh, & + call dbf_write_attribute_03(hshpc%max_speed, ishape, hshpc%max_speed_ssh, & e%speed_cont%ssh) - call dbf_write_attribute_03(hshp%max_speed, ishape, hshp%max_speed_date, & + call dbf_write_attribute_03(hshpc%max_speed, ishape, hshpc%max_speed_date, & date) - call dbf_write_attribute_03(hshp%max_speed, ishape, & - hshp%max_speed_eddy_index, i) + call dbf_write_attribute_03(hshpc%max_speed, ishape, & + hshpc%max_speed_eddy_index, i) end subroutine write_eddy -- GitLab