Skip to content

Commit

Permalink
Output change
Browse files Browse the repository at this point in the history
  • Loading branch information
schumakov committed Jun 10, 2009
1 parent d6ca12b commit a6c8a2c
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions m_les.f90
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
! The behaviour of the module is governed by the variable "les_mode" from the
! module m_parameters.f90
!
! Time-stamp: <2009-06-05 17:50:16 (chumakov)>
! Time-stamp: <2009-06-10 11:08:51 (chumakov)>
!================================================================================
module m_les

Expand Down Expand Up @@ -512,6 +512,9 @@ subroutine les_rhs_scalars
if (n_les>0) energy = fields(1,1,1,3+n_scalars+1) / real(nxyz_all)
write(999,"(i6,x,10e15.6)") itime, time, energy, production, B, dissipation
close(999)
production = zip
B = zip
dissipation = zip
end if

! note that the turbulent viscosity itself is computed in rhs_scalars.f90
Expand Down Expand Up @@ -602,6 +605,8 @@ subroutine les_rhs_scalars
! The fraction is given by the constant C_mixed, which is read from the file
! This is taken care of in les_get_turb_visc

! Dissipation is via lag model

! First taking care of the passive scalars (don't have them for now)
if (n_scalars .gt. 0) then
write(out,*) "*** Current version of the code cannot transport scalars"
Expand Down Expand Up @@ -1210,9 +1215,8 @@ subroutine m_les_k_src_dlm
! the RHS for k_sgs is supposed to be in wrk(3+n_scalars+1)
k_n = 3 + n_scalars + 1

! saving the mean energy transfer to be output later
if (iammaster) energy = fields(1,1,1,k_n) / real(nxyz_all)
if (iammaster) production = wrk(1,1,1,n1) / real(nxyz_all)
! saving the energy transfer to be output later
if (iammaster) production = production + wrk(1,1,1,n1) / real(nxyz_all)

! adding the source for k_sgs
do k = 1, nz
Expand Down Expand Up @@ -1293,7 +1297,7 @@ subroutine m_les_k_diss_algebraic
!!$ wrk(:,:,:,n_k) = wrk(:,:,:,n_k) - wrk(:,:,:,0)

! saving dissipation for output
if (iammaster) dissipation = wrk(1,1,1,0) / real(nxyz_all)
if (iammaster) dissipation = dissipation + wrk(1,1,1,0) / real(nxyz_all)


return
Expand Down Expand Up @@ -1341,8 +1345,8 @@ subroutine m_les_lag_model_sources
call xFFT3d(1,n2)

! saving the mean energy, B and dissipation for output later
if (iammaster) B = wrk(1,1,1,n1) / real(nxyz_all)
if (iammaster) dissipation = wrk(1,1,1,n2) / real(nxyz_all)
if (iammaster) B = B + wrk(1,1,1,n1) / real(nxyz_all)
if (iammaster) dissipation = dissipation + wrk(1,1,1,n2) / real(nxyz_all)


! Now we have B and epsilon, so we can update the RHS for k, B and epsilon
Expand Down Expand Up @@ -1496,9 +1500,6 @@ subroutine m_les_dstm_vel_k_sources

k_source = zip

! production for output
if (iammaster) production = zip

! forward/backward scatter
fs = zip
fs1 = zip
Expand Down Expand Up @@ -1646,14 +1647,14 @@ subroutine m_les_dstm_vel_k_sources
end do direction_j
end do direction_i

! writing out int he file fort.698 forward scatter, back scatter and total production of K
! writing out int he file fort.698 forward scatter, back scatter produced by the DSTM
count = 1
call MPI_REDUCE(fs1,fs,count,MPI_REAL8,MPI_SUM,0,MPI_COMM_TASK,mpi_err)
call MPI_REDUCE(bs1,bs,count,MPI_REAL8,MPI_SUM,0,MPI_COMM_TASK,mpi_err)
if (myid.eq.0 .and. mod(itime,iprint1).eq.0) then
fs = fs / real(nxyz_all,8)
bs = bs / real(nxyz_all,8)
write(698,"(i6,x,3e15.6)") itime, fs, bs, production
write(698,"(i6,x,3e15.6)") itime, fs, bs
call flush(698)
end if

Expand Down

0 comments on commit a6c8a2c

Please sign in to comment.