Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/gen_modules_diag.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
!_______________________________________________________________________________
Expand Down Expand Up @@ -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
end module diagnostics
8 changes: 4 additions & 4 deletions src/io_meandata.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -2523,4 +2523,4 @@ SUBROUTINE send_data_to_multio(entry)
END DO
END SUBROUTINE
#endif
end module
end module
Loading