From bc3923df3cbebbec1a9ffcd27273a5301f6401d3 Mon Sep 17 00:00:00 2001 From: alperaltuntas Date: Wed, 16 Oct 2024 13:04:37 -0600 Subject: [PATCH] attempt answer change fix --- src/ALE/MOM_ALE.F90 | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/ALE/MOM_ALE.F90 b/src/ALE/MOM_ALE.F90 index 4bbc3d4420..55dd9be913 100644 --- a/src/ALE/MOM_ALE.F90 +++ b/src/ALE/MOM_ALE.F90 @@ -1172,10 +1172,14 @@ subroutine ALE_remap_velocities(CS, G, GV, h_old_u, h_old_v, h_new_u, h_new_v, u ke_c_tgt = ke_c_tgt + h2(k) * (u_tgt(k) - u_bt)**2 enddo ! Next rescale baroclinic component on target grid to conserve ke - if (ke_c_src < 1.5625 * ke_c_tgt) then - rescale_coef = sqrt(ke_c_src / ke_c_tgt) + if (answer_date >= 20241016) then + if (ke_c_src < 1.5625 * ke_c_tgt) then + rescale_coef = sqrt(ke_c_src / ke_c_tgt) + else + rescale_coef = 1.25 + endif else - rescale_coef = 1.25 + rescale_coef = min(1.25, sqrt(ke_c_src / (ke_c_tgt + 1.E-19))) endif do k=1,nz u_tgt(k) = u_bt + rescale_coef * (u_tgt(k) - u_bt) @@ -1244,10 +1248,14 @@ subroutine ALE_remap_velocities(CS, G, GV, h_old_u, h_old_v, h_new_u, h_new_v, u ke_c_tgt = ke_c_tgt + h2(k) * (v_tgt(k) - v_bt)**2 enddo ! Next rescale baroclinic component on target grid to conserve ke - if (ke_c_src < 1.5625 * ke_c_tgt) then - rescale_coef = sqrt(ke_c_src / ke_c_tgt) + if (answer_date >= 20241016) then + if (ke_c_src < 1.5625 * ke_c_tgt) then + rescale_coef = sqrt(ke_c_src / ke_c_tgt) + else + rescale_coef = 1.25 + endif else - rescale_coef = 1.25 + rescale_coef = min(1.25, sqrt(ke_c_src / (ke_c_tgt + 1.E-19))) endif do k=1,nz v_tgt(k) = v_bt + rescale_coef * (v_tgt(k) - v_bt)