From 5a6ebee50c66b0366d3435d3a49cca9e0ef62434 Mon Sep 17 00:00:00 2001 From: Patrick Date: Tue, 19 Mar 2024 11:57:32 +0100 Subject: [PATCH] fix minor bug --- src/gen_modules_diag.F90 | 26 +++++++++++++------------- src/io_meandata.F90 | 4 ++-- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/gen_modules_diag.F90 b/src/gen_modules_diag.F90 index 0e4473ad1..9fd3d5719 100644 --- a/src/gen_modules_diag.F90 +++ b/src/gen_modules_diag.F90 @@ -25,7 +25,7 @@ module diagnostics std_dens_UVDZ, std_dens_DIV, std_dens_DIV_fer, std_dens_Z, std_dens_H, std_dens_dVdT, std_dens_flux, & dens_flux_e, vorticity, zisotherm, tempzavg, saltzavg, thetao, tuv, suv, & compute_dvd, dvd_KK_tot, dvd_SD_tot, dvd_SD_chi_adv_h, dvd_SD_chi_adv_v, & - dvd_SD_chi_dif_h, dvd_SD_chi_dif_heR, dvd_SD_chi_dif_hbh, & + dvd_SD_chi_dif_he, dvd_SD_chi_dif_heR, dvd_SD_chi_dif_hbh, & dvd_SD_chi_dif_veR, dvd_SD_chi_dif_viR, dvd_SD_chi_dif_vi, & dvd_SD_chi_dif_ve, dvd_xdfac @@ -68,7 +68,7 @@ module diagnostics real(kind=WP), save, allocatable, target :: dvd_KK_tot(:,:,:), dvd_SD_tot(:,:,:), dvd_SD_chi_adv_h(:,:,:), & dvd_SD_chi_adv_v( :,:,:), dvd_SD_chi_dif_heR(:,:,:), dvd_SD_chi_dif_veR(:,:,:), & dvd_SD_chi_dif_viR(:,:,:), dvd_SD_chi_dif_vi(:,:,:), dvd_SD_chi_dif_hbh(:,:,:), & - dvd_SD_chi_dif_ve(:,:,:), dvd_SD_chi_dif_h(:,:,:), trstar(:,:) + dvd_SD_chi_dif_ve(:,:,:), dvd_SD_chi_dif_he(:,:,:), trstar(:,:) real(kind=WP), parameter :: dvd_xdfac=0.5_WP ! Xchi distribution factor, default distribute ! equal amount (50:50) of xchi on both side of face !_____________________________________________________________________________ @@ -1005,17 +1005,17 @@ subroutine compute_dvd(mode, dynamics, tracers, partit, mesh) #include "associate_mesh_ass.h" if (firstcall) then !allocate the stuff at the first call allocate(trstar( nl-1, myDim_nod2D+eDim_nod2D)) - allocate(dvd_KK_tot( nl-1, myDim_nod2D+eDim_nod2D, 2)) - allocate(dvd_SD_tot( nl-1, myDim_nod2D+eDim_nod2D, 2)) - allocate(dvd_SD_chi_adv_h( nl-1, myDim_nod2D+eDim_nod2D, 2)) - allocate(dvd_SD_chi_adv_v( nl-1, myDim_nod2D+eDim_nod2D, 2)) - allocate(dvd_SD_chi_dif_h( nl-1, myDim_nod2D+eDim_nod2D, 2)) - allocate(dvd_SD_chi_dif_vi( nl-1, myDim_nod2D+eDim_nod2D, 2)) + allocate(dvd_KK_tot( nl-1, myDim_nod2D+eDim_nod2D, 2)) + allocate(dvd_SD_tot( nl-1, myDim_nod2D+eDim_nod2D, 2)) + allocate(dvd_SD_chi_adv_h( nl-1, myDim_nod2D+eDim_nod2D, 2)) + allocate(dvd_SD_chi_adv_v( nl-1, myDim_nod2D+eDim_nod2D, 2)) + allocate(dvd_SD_chi_dif_he(nl-1, myDim_nod2D+eDim_nod2D, 2)) + allocate(dvd_SD_chi_dif_vi(nl-1, myDim_nod2D+eDim_nod2D, 2)) if (tracers%data(1)%smooth_bh_tra) then allocate(dvd_SD_chi_dif_hbh(nl-1, myDim_nod2D+eDim_nod2D, 2)) end if if (Redi) then - allocate(dvd_SD_chi_dif_heR( nl-1, myDim_nod2D+eDim_nod2D, 2)) + allocate(dvd_SD_chi_dif_heR(nl-1, myDim_nod2D+eDim_nod2D, 2)) allocate(dvd_SD_chi_dif_veR(nl-1, myDim_nod2D+eDim_nod2D, 2)) allocate(dvd_SD_chi_dif_viR(nl-1, myDim_nod2D+eDim_nod2D, 2)) end if @@ -1033,7 +1033,7 @@ subroutine compute_dvd(mode, dynamics, tracers, partit, mesh) dvd_SD_tot = 0.0_WP ! --> DVD diagnostic after Banjerjee et al. 2023 (Sergeys way!!!) dvd_SD_chi_adv_h = 0.0_WP dvd_SD_chi_adv_v = 0.0_WP - dvd_SD_chi_dif_h = 0.0_WP + dvd_SD_chi_dif_he = 0.0_WP dvd_SD_chi_dif_vi = 0.0_WP ! implicite part if (tracers%data(1)%smooth_bh_tra) then dvd_SD_chi_dif_hbh= 0.0_WP @@ -1146,7 +1146,7 @@ subroutine compute_dvd(mode, dynamics, tracers, partit, mesh) call dvd_add_advflux_ver( .true., tr_num, dvd_SD_chi_adv_v, trflx_v, Wvel, trstar, partit, mesh) ! add contribution from horizontal diffusion - call dvd_add_difflux_horexpl( .true., tr_num, dvd_SD_chi_dif_heR, trstar, Ki, tr_xy, dump, partit, mesh) + call dvd_add_difflux_horexpl( .true., tr_num, dvd_SD_chi_dif_he, trstar, Ki, tr_xy, dump, partit, mesh) ! add contribution from vertical diffusion if (.not. tracers%data(tr_num)%i_vert_diff) then @@ -1168,8 +1168,8 @@ subroutine compute_dvd(mode, dynamics, tracers, partit, mesh) end if ! compute total Xchi - dvd_SD_tot(:,:,tr_num) = dvd_SD_chi_adv_h( :,:,tr_num) + dvd_SD_chi_adv_v( :,:,tr_num) + & - dvd_SD_chi_dif_vi(:,:,tr_num) + dvd_SD_tot(:,:,tr_num) = dvd_SD_chi_adv_h( :,:,tr_num) + dvd_SD_chi_adv_v( :,:,tr_num) + & + dvd_SD_chi_dif_vi(:,:,tr_num) + dvd_SD_chi_dif_he(:,:,tr_num) if (.not. tracers%data(tr_num)%i_vert_diff) then dvd_SD_tot(:,:,tr_num) = dvd_SD_tot(:,:,tr_num) + dvd_SD_chi_dif_ve(:,:,tr_num) end if diff --git a/src/io_meandata.F90 b/src/io_meandata.F90 index 204ba713a..91e2f7987 100644 --- a/src/io_meandata.F90 +++ b/src/io_meandata.F90 @@ -706,7 +706,7 @@ subroutine ini_mean_io(ice, dynamics, tracers, partit, mesh) call def_stream((/nl-1, nod2D/), (/nl-1, myDim_nod2D/), 'dvd_temp_SD_tot' , 'tot. temperature DVD \n (Banerjee et al. 2023)' , 'K^2/s' , dvd_SD_tot( :,:,1), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh) call def_stream((/nl-1, nod2D/), (/nl-1, myDim_nod2D/), 'dvd_temp_SD_advh', 'temperature DVD horiz. adv.' , 'K^2/s' , dvd_SD_chi_adv_h( :,:,1), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh) call def_stream((/nl-1, nod2D/), (/nl-1, myDim_nod2D/), 'dvd_temp_SD_advv', 'temperature DVD vert. adv. ' , 'K^2/s' , dvd_SD_chi_adv_v( :,:,1), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh) - call def_stream((/nl-1, nod2D/), (/nl-1, myDim_nod2D/), 'dvd_temp_SD_difh', 'temperature DVD horiz. diff.' , 'K^2/s' , dvd_SD_chi_dif_h( :,:,1), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh) + call def_stream((/nl-1, nod2D/), (/nl-1, myDim_nod2D/), 'dvd_temp_SD_difh', 'temperature DVD horiz. diff. expl.' , 'K^2/s' , dvd_SD_chi_dif_he( :,:,1), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh) call def_stream((/nl-1, nod2D/), (/nl-1, myDim_nod2D/), 'dvd_temp_SD_difvi', 'temperature DVD vert. diff. impl.' , 'K^2/s' , dvd_SD_chi_dif_vi( :,:,1), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh) if (.not. tracers%data(1)%i_vert_diff) then call def_stream((/nl-1, nod2D/), (/nl-1, myDim_nod2D/), 'dvd_temp_SD_difve', 'temperature DVD vert. diff. expl.' , 'K^2/s' , dvd_SD_chi_dif_ve( :,:,1), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh) @@ -725,7 +725,7 @@ subroutine ini_mean_io(ice, dynamics, tracers, partit, mesh) call def_stream((/nl-1, nod2D/), (/nl-1, myDim_nod2D/), 'dvd_salt_SD_tot' , 'tot. salinity DVD \n (Banerjee et al. 2023)' , 'K^2/s' , dvd_SD_tot( :,:,2), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh) call def_stream((/nl-1, nod2D/), (/nl-1, myDim_nod2D/), 'dvd_salt_SD_advh', 'salinity DVD horiz. adv.' , 'K^2/s' , dvd_SD_chi_adv_h( :,:,2), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh) call def_stream((/nl-1, nod2D/), (/nl-1, myDim_nod2D/), 'dvd_salt_SD_advv', 'salinity DVD vert. adv. ' , 'K^2/s' , dvd_SD_chi_adv_v( :,:,2), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh) - call def_stream((/nl-1, nod2D/), (/nl-1, myDim_nod2D/), 'dvd_salt_SD_difh', 'salinity DVD horiz. diff.' , 'K^2/s' , dvd_SD_chi_dif_h( :,:,2), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh) + call def_stream((/nl-1, nod2D/), (/nl-1, myDim_nod2D/), 'dvd_salt_SD_difh', 'salinity DVD horiz. diff. expl.' , 'K^2/s' , dvd_SD_chi_dif_he( :,:,2), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh) call def_stream((/nl-1, nod2D/), (/nl-1, myDim_nod2D/), 'dvd_salt_SD_difvi', 'salinity DVD vert. diff. impl.' , 'K^2/s' , dvd_SD_chi_dif_vi( :,:,2), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh) if (.not. tracers%data(1)%i_vert_diff) then call def_stream((/nl-1, nod2D/), (/nl-1, myDim_nod2D/), 'dvd_salt_SD_difve', 'salinity DVD vert. diff. expl.' , 'K^2/s' , dvd_SD_chi_dif_ve( :,:,2), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh)