subroutine stats_ncdescription_tavg_scalar implicit none integer :: n character(2) :: sid allocate(svtname(nsv)) allocate(upsvptname(nsv)) allocate(vpsvptname(nsv)) allocate(wpsvptname(nsv)) allocate(svpsvptname(nsv)) allocate(svsgsname(nsv)) do n = 1, nsv write (sid, '(I0)') n svtname(n) = 's'//trim(sid) ! s1 at n = 1 upsvptname(n) = 'ups'//trim(sid)//'p' ! ups1p at n = 1 vpsvptname(n) = 'vps'//trim(sid)//'p' ! vps1p at n = 1 wpsvptname(n) = 'wps'//trim(sid)//'p' ! wps1p at n = 1 svpsvptname(n) = 's'//trim(sid)//'ps'//trim(sid)//'p' ! s1ps1p at n = 1 svsgsname(n) = 's'//trim(sid)//'sgs' ! s1sgs at n = 1 call ncinfo(tVars(ctrt+n,:) , trim(svtname(n)) , 'Concentration field '//trim(sid) , 'g/m^3' , 'tttt' ) call ncinfo(tVars(ctrt+nsv+n,:) , trim(upsvptname(n)) , 'Turbulent scalar flux along x for scalar_'//trim(sid), 'g/m^2s' , 'mttt' ) call ncinfo(tVars(ctrt+2*nsv+n,:), trim(vpsvptname(n)) , 'Turbulent scalar flux along y for scalar_'//trim(sid), 'g/m^2s' , 'tmtt' ) call ncinfo(tVars(ctrt+3*nsv+n,:), trim(wpsvptname(n)) , 'Turbulent scalar flux along z for scalar_'//trim(sid), 'g/m^2s' , 'ttmt' ) call ncinfo(tVars(ctrt+4*nsv+n,:), trim(svpsvptname(n)), 'Concentration variance '//trim(sid) , 'g^2/m^6', 'tttt' ) call ncinfo(tVars(ctrt+5*nsv+n,:), trim(svsgsname(n)) , 'SGS scalar flux along z for scalar_'//trim(sid) , 'g/m^2s' , 'ttmt' ) end do ctrt = ctrt+6*nsv end subroutine stats_ncdescription_tavg_scalar