Changeset 1511 for palm/trunk


Ignore:
Timestamp:
Dec 16, 2014 3:54:16 PM (9 years ago)
Author:
suehring
Message:

Bugfix concerning spectra normalization

File:
1 edited

Legend:

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

    r1432 r1511  
    2020! Current revisions:
    2121! -----------------
    22 !
     22! Bugfix concerning spectra normalization
    2323!
    2424! Former revisions:
     
    324324    INTEGER(iwp) ::  pr        !:
    325325
    326     REAL(wp) ::  fac          !:
    327326    REAL(wp) ::  exponent     !:
    328327    REAL(wp) ::  sum_spec_dum !: wavenumber-integrated spectrum
     
    406405!
    407406!--    Sum of spectra for later averaging (see routine data_output_spectra)
    408 !--    Temperton fft results need to be normalized
    409        IF ( fft_method == 'temperton-algorithm' )  THEN
    410           fac = nx + 1.0_wp
    411        ELSE
    412           fac = 1.0_wp
    413        ENDIF
    414407       DO  i = 1, nx/2
    415408          DO k = 1, n
    416              spectrum_x(i,k,m) = spectrum_x(i,k,m) + sums_spectra(i,k) * fac
     409             spectrum_x(i,k,m) = spectrum_x(i,k,m) + sums_spectra(i,k)
    417410          ENDDO
    418411       ENDDO
     
    467460    INTEGER(iwp) ::  pr        !:
    468461
    469     REAL(wp) ::  fac      !:
    470462    REAL(wp) ::  exponent !:
    471463    REAL(wp) ::  sum_spec_dum !: wavenumber-integrated spectrum
     
    551543!
    552544!--    Sum of spectra for later averaging (see routine data_output_spectra)
    553 !--    Temperton fft results need to be normalized
    554        IF ( fft_method == 'temperton-algorithm' )  THEN
    555           fac = ny + 1.0_wp
    556        ELSE
    557           fac = 1.0_wp
    558        ENDIF
    559545       DO  j = 1, ny/2
    560546          DO k = 1, n
    561              spectrum_y(j,k,m) = spectrum_y(j,k,m) + sums_spectra(j,k) * fac
     547             spectrum_y(j,k,m) = spectrum_y(j,k,m) + sums_spectra(j,k)
    562548          ENDDO
    563549       ENDDO
Note: See TracChangeset for help on using the changeset viewer.