Ignore:
Timestamp:
Apr 10, 2018 11:01:03 AM (3 years ago)
Author:
Giersch
Message:

Bugfix of the allocation of spectrum_x and spectrum_y in case of restart runs, spectrum_x and spectrum_y are now treat as global restart data not local

File:
1 edited

Legend:

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

    r2932 r2956  
    2525! -----------------
    2626! $Id$
     27! spectrum_x and spectrum_y will only be allocated if they are not allocated
     28! before (e.g. in case of restart runs)
     29!
     30! 2932 2018-03-26 09:39:22Z maronga
    2731! renamed spectra_par to spectra_parameters
    2832!
     
    291295
    292296       IF ( dt_dosp /= 9999999.9_wp )  THEN
    293           ALLOCATE( spectrum_x( 1:nx/2, 1:100, 1:10 ),                         &
    294                     spectrum_y( 1:ny/2, 1:100, 1:10 ) )
    295           spectrum_x = 0.0_wp
    296           spectrum_y = 0.0_wp
     297
     298          IF ( .NOT. ALLOCATED( spectrum_x ) )  THEN
     299             ALLOCATE( spectrum_x( 1:nx/2, 1:100, 1:10 ) )
     300             spectrum_x = 0.0_wp
     301          ENDIF
     302
     303          IF ( .NOT. ALLOCATED( spectrum_y ) )  THEN
     304             ALLOCATE( spectrum_y( 1:ny/2, 1:100, 1:10 ) )
     305             spectrum_y = 0.0_wp
     306          ENDIF
    297307
    298308          ALLOCATE( var_d(nzb:nzt+1) )
Note: See TracChangeset for help on using the changeset viewer.