diff --git a/src/gen_modules_diag.F90 b/src/gen_modules_diag.F90 index c5dd32880..ae9f07957 100644 --- a/src/gen_modules_diag.F90 +++ b/src/gen_modules_diag.F90 @@ -943,7 +943,7 @@ subroutine compute_destinE(mode, dynamics, tracers, partit, mesh) #include "associate_part_ass.h" #include "associate_mesh_ass.h" if (firstcall) then !allocate the stuff at the first call - allocate(heatcontent(ndepths, myDim_nod2D+eDim_nod2D)) + allocate(heatcontent(myDim_nod2D+eDim_nod2D, ndepths)) heatcontent =0.0_WP firstcall=.false. if (mode==0) return @@ -952,21 +952,21 @@ subroutine compute_destinE(mode, dynamics, tracers, partit, mesh) !$OMP PARALLEL DO DEFAULT(SHARED) PRIVATE(n, nz, nzmin, nzmax, zint) DO n=1, myDim_nod2D - heatcontent(:, n) =0.0_WP + heatcontent(n, :) =0.0_WP nzmax=nlevels_nod2D(n) nzmin=ulevels_nod2D(n) zint=0.0_WP do nz=nzmin, nzmax-1 zint=zint+hnode(nz, n) where (whichdepth>zint) - heatcontent(:,n)=heatcontent(:,n)+temp(nz,n)*hnode(nz,n) + heatcontent(n,:)=heatcontent(n,:)+temp(nz,n)*hnode(nz,n) end where end do - heatcontent(:,n)=1025.*3990.*heatcontent(:,n) + heatcontent(n,:)=1025.*3990.*heatcontent(n,:) END DO !$OMP END PARALLEL DO do n=1, size(whichdepth) - call exchange_nod(heatcontent(n,:), partit) + call exchange_nod(heatcontent(:,n), partit) end do end subroutine compute_destinE !_______________________________________________________________________________ @@ -3577,4 +3577,4 @@ subroutine dvd_add_clim_relax(do_SDdvd, tr_num, dvd_tot, tr, partit, mesh) end do end subroutine dvd_add_clim_relax -end module diagnostics \ No newline at end of file +end module diagnostics diff --git a/src/io_meandata.F90 b/src/io_meandata.F90 index b96b963ff..9e71a349d 100644 --- a/src/io_meandata.F90 +++ b/src/io_meandata.F90 @@ -366,15 +366,15 @@ subroutine ini_mean_io(ice, dynamics, tracers, partit, mesh) ! output heat content (for destine) CASE ('hc300m') if (ldiag_destinE) then - call def_stream(nod2D, myDim_nod2D, 'hc300m', 'Vertically integrated heat content upper 300m', 'J m**-2', heatcontent(1,1:myDim_nod2D), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh) + call def_stream(nod2D, myDim_nod2D, 'hc300m', 'Vertically integrated heat content upper 300m', 'J m**-2', heatcontent(1:myDim_nod2D,1), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh) end if CASE ('hc700m') if (ldiag_destinE) then - call def_stream(nod2D, myDim_nod2D, 'hc700m', 'Vertically integrated heat content upper 700m', 'J m**-2', heatcontent(2,1:myDim_nod2D), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh) + call def_stream(nod2D, myDim_nod2D, 'hc700m', 'Vertically integrated heat content upper 700m', 'J m**-2', heatcontent(1:myDim_nod2D,2), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh) end if CASE ('hc') if (ldiag_destinE) then - call def_stream(nod2D, myDim_nod2D, 'hc', 'Vertically integrated heat content total column', 'J m**-2', heatcontent(3,1:myDim_nod2D), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh) + call def_stream(nod2D, myDim_nod2D, 'hc', 'Vertically integrated heat content total column', 'J m**-2', heatcontent(1:myDim_nod2D,3), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh) end if !_______________________________________________________________________________ !---wiso-code @@ -2523,4 +2523,4 @@ SUBROUTINE send_data_to_multio(entry) END DO END SUBROUTINE #endif -end module \ No newline at end of file +end module