From a253d3797c6e722e8107fb39014a2137069d0a4f Mon Sep 17 00:00:00 2001 From: Raphael Dussin Date: Fri, 27 Aug 2021 09:37:34 -0400 Subject: [PATCH] init local arrays, fix to axes and logging --- .../lateral/MOM_internal_tides.F90 | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/parameterizations/lateral/MOM_internal_tides.F90 b/src/parameterizations/lateral/MOM_internal_tides.F90 index 4d66471408..71b5dd8999 100644 --- a/src/parameterizations/lateral/MOM_internal_tides.F90 +++ b/src/parameterizations/lateral/MOM_internal_tides.F90 @@ -212,6 +212,10 @@ subroutine propagate_int_tide(h, tv, cn, TKE_itidal_input, vel_btTide, Nb, dt, & I_rho0 = 1.0 / GV%Rho0 cn_subRO = 1e-100*US%m_s_to_L_T ! The hard-coded value here might need to increase. + ! init local arrays + drag_scale(:,:) = 0. + Ub(:,:,:,:) = 0. + ! Set the wave speeds for the modes, using cg(n) ~ cg(1)/n.********************** ! This is wrong, of course, but it works reasonably in some cases. ! Uncomment if wave_speed is not used to calculate the true values (BDM). @@ -2206,7 +2210,10 @@ subroutine internal_tides_init(Time, G, GV, US, param_file, diag, CS) ! Allocate and populate frequency array (each a multiple of first for now) allocate(CS%frequency(num_freq)) - call get_param(param_file, mdl, "FIRST_MODE_PERIOD", period_1, units="s", scale=US%s_to_T) + call get_param(param_file, mdl, "FIRST_MODE_PERIOD", period_1, & + "The period of the first mode for internal tides", default=44567., & + units="s", scale=US%s_to_T) + do fr=1,num_freq CS%frequency(fr) = (8.0*atan(1.0) * (real(fr)) / period_1) ! ADDED BDM enddo @@ -2513,8 +2520,8 @@ subroutine internal_tides_init(Time, G, GV, US, param_file, diag, CS) do a=1,num_angle ; angles(a) = (real(a) - 1) * Angle_size ; enddo id_ang = diag_axis_init("angle", angles, "Radians", "N", "Angular Orienation of Fluxes") - call define_axes_group(diag, (/ diag%axesT1%handles(1), diag%axesT1%handles(2), id_ang /), axes_ang) - + call define_axes_group(diag, (/ diag%axesT1%handles(1), diag%axesT1%handles(2), id_ang /), & + axes_ang, is_h_point=.true.) do fr=1,CS%nFreq ; write(freq_name(fr), '("freq",i1)') fr ; enddo do m=1,CS%nMode ; do fr=1,CS%nFreq ! Register 2-D energy density (summed over angles) for each freq and mode