- Timestamp:
- Apr 28, 2017 12:49:49 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/spectra_mod.f90
r2193 r2215 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! Normalization of spectra output adjusted 23 23 ! 24 24 ! Former revisions: … … 559 559 ! 560 560 !-- Subtract horizontal mean from the array, for which spectra have to be 561 !-- calculated 561 !-- calculated. Moreover, calculate variance of the respective quantitiy, 562 !-- later used for normalizing spectra output. 562 563 var_d_l(:) = 0.0_wp 563 564 DO i = nxl, nxr … … 698 699 ! 699 700 !-- Normalize spectra by variance 700 sum_spec_dum = SUM( sums_spectra(:,n) ) 701 sum_spec_dum = SUM( sums_spectra(1:nx/2,n) ) 702 701 703 IF ( sum_spec_dum /= 0.0_wp ) THEN 702 sums_spectra(:,n) = sums_spectra(:,n) * var_d(k) / sum_spec_dum 704 sums_spectra(1:nx/2,n) = sums_spectra(1:nx/2,n) * & 705 var_d(k) / sum_spec_dum 703 706 ENDIF 704 707 n = n + 1 … … 839 842 ! 840 843 !-- Normalize spectra by variance 841 sum_spec_dum = SUM( sums_spectra( :,n) )842 IF ( SUM(sums_spectra(:,n))/= 0.0_wp ) THEN843 sums_spectra( :,n) = sums_spectra(:,n) *&844 var_d(k) / SUM(sums_spectra(:,n))844 sum_spec_dum = SUM( sums_spectra(1:ny/2,n) ) 845 IF ( sum_spec_dum /= 0.0_wp ) THEN 846 sums_spectra(1:ny/2,n) = sums_spectra(1:ny/2,n) * & 847 var_d(k) / sum_spec_dum 845 848 ENDIF 846 849 n = n + 1
Note: See TracChangeset
for help on using the changeset viewer.