- Timestamp:
- Dec 16, 2014 3:54:16 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/calc_spectra.f90
r1432 r1511 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! Bugfix concerning spectra normalization 23 23 ! 24 24 ! Former revisions: … … 324 324 INTEGER(iwp) :: pr !: 325 325 326 REAL(wp) :: fac !:327 326 REAL(wp) :: exponent !: 328 327 REAL(wp) :: sum_spec_dum !: wavenumber-integrated spectrum … … 406 405 ! 407 406 !-- Sum of spectra for later averaging (see routine data_output_spectra) 408 !-- Temperton fft results need to be normalized409 IF ( fft_method == 'temperton-algorithm' ) THEN410 fac = nx + 1.0_wp411 ELSE412 fac = 1.0_wp413 ENDIF414 407 DO i = 1, nx/2 415 408 DO k = 1, n 416 spectrum_x(i,k,m) = spectrum_x(i,k,m) + sums_spectra(i,k) * fac409 spectrum_x(i,k,m) = spectrum_x(i,k,m) + sums_spectra(i,k) 417 410 ENDDO 418 411 ENDDO … … 467 460 INTEGER(iwp) :: pr !: 468 461 469 REAL(wp) :: fac !:470 462 REAL(wp) :: exponent !: 471 463 REAL(wp) :: sum_spec_dum !: wavenumber-integrated spectrum … … 551 543 ! 552 544 !-- Sum of spectra for later averaging (see routine data_output_spectra) 553 !-- Temperton fft results need to be normalized554 IF ( fft_method == 'temperton-algorithm' ) THEN555 fac = ny + 1.0_wp556 ELSE557 fac = 1.0_wp558 ENDIF559 545 DO j = 1, ny/2 560 546 DO k = 1, n 561 spectrum_y(j,k,m) = spectrum_y(j,k,m) + sums_spectra(j,k) * fac547 spectrum_y(j,k,m) = spectrum_y(j,k,m) + sums_spectra(j,k) 562 548 ENDDO 563 549 ENDDO
Note: See TracChangeset
for help on using the changeset viewer.