Changeset 699 for palm


Ignore:
Timestamp:
Mar 22, 2011 5:52:22 PM (14 years ago)
Author:
suehring
Message:

Bugfix in calculation of vertical velocity skewness.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/flow_statistics.f90

    r697 r699  
    44! Current revisions:
    55! -----------------
    6 !
     6! Bugfix in calculation of vertical velocity skewness. The added absolute value
     7! avoid negative values in the root. Negative values of w'w' can occur at the
     8! top or bottom of the model domain due to degrading the order of advection
     9! scheme. Furthermore the calculation will be the same for all advection
     10! schemes.
    711!
    812! Former revisions:
     
    437441                                  ( q(k,j,i)-hom(k,1,41,sr) )**2 * rmask(j,i,sr)
    438442                ENDIF
     443               
     444!
     445!--             Higher moments
     446!--             (Computation of the skewness of w further below)
     447                sums_l(k,38,tn) = sums_l(k,38,tn) + w(k,j,i)**3 * rmask(j,i,sr)
    439448
    440449                sums_l_etot  = sums_l_etot + &
     
    484493                   sums_l(k,32,tn) = sums_l(k,32,tn) + w2   * rmask(j,i,sr)
    485494!
    486 !--   Higher moments
    487 !--  (Computation of the skewness of w further below)
    488                    sums_l(k,38,tn) = sums_l(k,38,tn) + w(k,j,i) * w2 * &
    489                                                     rmask(j,i,sr)
    490 !
    491495!--             Perturbation energy
    492496
     
    501505             ENDDO
    502506          ENDDO
    503        ELSE
    504           !$OMP DO
    505           DO  i = nxl, nxr
    506              DO  j =  nys, nyn
    507                 DO  k = nzb_s_inner(j,i), nzt + 1
    508                    w2   = w(k,j,i)**2
    509 !
    510 !--                Higher moments
    511 !--                (Computation of the skewness of w further below)
    512                    sums_l(k,38,tn) = sums_l(k,38,tn) + w(k,j,i) * w2 * &
    513                                                     rmask(j,i,sr)
    514                 ENDDO
    515              ENDDO
    516           ENDDO
    517        ENDIF
    518 
     507       ENDIF
    519508!
    520509!--    Horizontally averaged profiles of the vertical fluxes
     
    10311020       hom(:,1,37,sr) = sums(:,37)     ! w*e*
    10321021       hom(:,1,38,sr) = sums(:,38)     ! w*3
    1033        hom(:,1,39,sr) = sums(:,38) / ( sums(:,32) + 1E-20 )**1.5    ! Sw
     1022       hom(:,1,39,sr) = sums(:,38) / ( abs( sums(:,32) ) + 1E-20 )**1.5   ! Sw
    10341023       hom(:,1,40,sr) = sums(:,40)     ! p
    10351024       hom(:,1,45,sr) = sums(:,45)     ! w"vpt"
Note: See TracChangeset for help on using the changeset viewer.