Ignore:
Timestamp:
Apr 10, 2018 11:01:03 AM (6 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/read_restart_data_mod.f90

    r2921 r2956  
    2525! -----------------
    2626! $Id$
     27! spectrum_x and spectrum_y have been moved to global data
     28!
     29! 2921 2018-03-22 15:05:23Z Giersch
    2730! spinup_time, day_of_year_init and time_utc_init are also read now
    2831!
     
    117120
    118121       USE spectra_mod,                                                        &
    119            ONLY:  average_count_sp
     122           ONLY:  average_count_sp, spectrum_x, spectrum_y
    120123
    121124       USE statistics,                                                         &
     
    569572             CASE ( 'simulated_time' )
    570573                READ ( 13 )  simulated_time
     574             CASE ( 'spectrum_x' )
     575                IF ( .NOT. ALLOCATED( spectrum_x ) )  THEN
     576                   ALLOCATE( spectrum_x( 1:nx/2, 1:100, 1:10 ) )
     577                ENDIF
     578                READ ( 13 )  spectrum_x
     579             CASE ( 'spectrum_y' )
     580                IF ( .NOT. ALLOCATED( spectrum_y ) )  THEN
     581                   ALLOCATE( spectrum_y( 1:ny/2, 1:100, 1:10 ) )
     582                ENDIF
     583                READ ( 13 )  spectrum_y
    571584             CASE ( 'spinup_time' )
    572585                READ ( 13 )  spinup_time
     
    10521065        ONLY:  id_random_array, seq_random_array
    10531066
    1054     USE spectra_mod,                                                           &
    1055         ONLY:  spectrum_x, spectrum_y
    1056 
    10571067    USE surface_mod,                                                           &
    10581068        ONLY :  surface_rrd_local
     
    16901700                   shf_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp)  =          &
    16911701                      tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
    1692 
    1693                 CASE ( 'spectrum_x' )
    1694                    IF ( k == 1 )  THEN
    1695                       IF ( nx_on_file /= nx )  THEN
    1696                          message_string = 'rrd_local: spectrum_x ' //          &
    1697                                      'on restart file ignored because' //      &
    1698                                      '&total numbers of grid points (nx) ' //  &
    1699                                      'do not match'
    1700                          CALL message( 'rrd_local', 'PA0293',                  &
    1701                                        0, 1, 0, 6, 0 )
    1702                          READ ( 13 )  rdummy
    1703                       ELSE
    1704                          READ ( 13 )  spectrum_x
    1705                       ENDIF
    1706                    ENDIF
    1707 
    1708                 CASE ( 'spectrum_y' )
    1709                    IF ( k == 1 )  THEN
    1710                       IF ( ny_on_file /= ny )  THEN
    1711                          message_string = 'rrd_local: spectrum_y ' //          &
    1712                                      'on restart file ignored because' //      &
    1713                                      '&total numbers of grid points (ny) '//   &
    1714                                      'do not match'
    1715                          CALL message( 'rrd_local', 'PA0294',                  &
    1716                                        0, 1, 0, 6, 0 )
    1717                          READ ( 13 )  rdummy
    1718                       ELSE
    1719                          READ ( 13 )  spectrum_y
    1720                       ENDIF
    1721                    ENDIF
    17221702                   
    17231703                CASE ( 'ssws_av' )
Note: See TracChangeset for help on using the changeset viewer.