Changeset 1646 for palm


Ignore:
Timestamp:
Sep 2, 2015 4:00:10 PM (9 years ago)
Author:
hoffmann
Message:

bugfix: wrong calculation of d_mean in microphysics

File:
1 edited

Legend:

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

    r1362 r1646  
    2020! Current revisions:
    2121! ------------------
    22 !
     22! Bugfix: Wrong computation of d_mean.
    2323!
    2424! Former revisions:
     
    877877
    878878                DO k = nzb_s_inner(j,i)+1, nzt
    879                    d_mean = 0.5_wp * ( qr(k+1,j,i) + qr(k-1,j,i) )
     879                   d_mean = 0.5_wp * ( qr(k+1,j,i) - qr(k-1,j,i) )
    880880                   d_min  = qr(k,j,i) - MIN( qr(k+1,j,i), qr(k,j,i), qr(k-1,j,i) )
    881881                   d_max  = MAX( qr(k+1,j,i), qr(k,j,i), qr(k-1,j,i) ) - qr(k,j,i)
     
    885885                                                              ABS( d_mean ) )
    886886
    887                    d_mean = 0.5_wp * ( nr(k+1,j,i) + nr(k-1,j,i) )
     887                   d_mean = 0.5_wp * ( nr(k+1,j,i) - nr(k-1,j,i) )
    888888                   d_min  = nr(k,j,i) - MIN( nr(k+1,j,i), nr(k,j,i), nr(k-1,j,i) )
    889889                   d_max  = MAX( nr(k+1,j,i), nr(k,j,i), nr(k-1,j,i) ) - nr(k,j,i)
     
    16851685
    16861686          DO k = nzb_s_inner(j,i)+1, nzt
    1687              d_mean = 0.5_wp * ( qr_1d(k+1) + qr_1d(k-1) )
     1687             d_mean = 0.5_wp * ( qr_1d(k+1) - qr_1d(k-1) )
    16881688             d_min  = qr_1d(k) - MIN( qr_1d(k+1), qr_1d(k), qr_1d(k-1) )
    16891689             d_max  = MAX( qr_1d(k+1), qr_1d(k), qr_1d(k-1) ) - qr_1d(k)
     
    16931693                                                        ABS( d_mean ) )
    16941694
    1695              d_mean = 0.5_wp * ( nr_1d(k+1) + nr_1d(k-1) )
     1695             d_mean = 0.5_wp * ( nr_1d(k+1) - nr_1d(k-1) )
    16961696             d_min  = nr_1d(k) - MIN( nr_1d(k+1), nr_1d(k), nr_1d(k-1) )
    16971697             d_max  = MAX( nr_1d(k+1), nr_1d(k), nr_1d(k-1) ) - nr_1d(k)
Note: See TracChangeset for help on using the changeset viewer.