diff --git a/Inst_eddies/set_max_speed.F90 b/Inst_eddies/set_max_speed.F90 index eecb124a442e3bf7c3314cbe10bc699305bff9c1..5923c1541c656fd015235e37375eda9ffbff10f4 100644 --- a/Inst_eddies/set_max_speed.F90 +++ b/Inst_eddies/set_max_speed.F90 @@ -18,6 +18,9 @@ contains use, intrinsic:: IEEE_ARITHMETIC, only: IEEE_IS_NAN, ieee_value, & IEEE_QUIET_NAN + ! Libraries: + use jumble, only: new_unit + use ccw_orient_m, only: ccw_orient use complete_ssh_m, only: complete_ssh use derived_types, only: eddy, null_ssh_contour, ssh_contour, missing_speed @@ -63,7 +66,7 @@ contains ! Local: real, allocatable:: speed(:) ! (n_cont) speed on the contour - integer i, i_outer + integer i, i_outer, unit integer sort_ssh(size(cont_list)) ! (n_max_cont) ! Sorts cont_list%ssh in ascending order. Defined only for @@ -95,9 +98,15 @@ contains end do #ifdef DEBUG - print *, "set_max_speed: speed(sort_ssh) = ", speed(sort_ssh(:n_cont)) - print *, "set_max_speed: cont_list%ssh(sort_ssh) = ", & - cont_list(sort_ssh(:n_cont))%ssh + call new_unit(unit) + open(unit, file = "speed.csv", status = "replace", action = "write") + write(unit, fmt = *) "speed(sort_ssh) cont_list%ssh(sort_ssh)" + + do i = 1, n_cont + write(unit, fmt = *) speed(sort_ssh(i)), cont_list(sort_ssh(i))%ssh + end do + + close(unit) #endif i = maxloc(abs(speed), dim = 1, mask = .not. IEEE_IS_NAN(speed))