- Timestamp:
- Apr 10, 2018 11:01:03 AM (7 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/read_restart_data_mod.f90
r2921 r2956 25 25 ! ----------------- 26 26 ! $Id$ 27 ! spectrum_x and spectrum_y have been moved to global data 28 ! 29 ! 2921 2018-03-22 15:05:23Z Giersch 27 30 ! spinup_time, day_of_year_init and time_utc_init are also read now 28 31 ! … … 117 120 118 121 USE spectra_mod, & 119 ONLY: average_count_sp 122 ONLY: average_count_sp, spectrum_x, spectrum_y 120 123 121 124 USE statistics, & … … 569 572 CASE ( 'simulated_time' ) 570 573 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 571 584 CASE ( 'spinup_time' ) 572 585 READ ( 13 ) spinup_time … … 1052 1065 ONLY: id_random_array, seq_random_array 1053 1066 1054 USE spectra_mod, &1055 ONLY: spectrum_x, spectrum_y1056 1057 1067 USE surface_mod, & 1058 1068 ONLY : surface_rrd_local … … 1690 1700 shf_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 1691 1701 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 1692 1693 CASE ( 'spectrum_x' )1694 IF ( k == 1 ) THEN1695 IF ( nx_on_file /= nx ) THEN1696 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 ) rdummy1703 ELSE1704 READ ( 13 ) spectrum_x1705 ENDIF1706 ENDIF1707 1708 CASE ( 'spectrum_y' )1709 IF ( k == 1 ) THEN1710 IF ( ny_on_file /= ny ) THEN1711 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 ) rdummy1718 ELSE1719 READ ( 13 ) spectrum_y1720 ENDIF1721 ENDIF1722 1702 1723 1703 CASE ( 'ssws_av' ) -
palm/trunk/SOURCE/spectra_mod.f90
r2932 r2956 25 25 ! ----------------- 26 26 ! $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 27 31 ! renamed spectra_par to spectra_parameters 28 32 ! … … 291 295 292 296 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 297 307 298 308 ALLOCATE( var_d(nzb:nzt+1) ) -
palm/trunk/SOURCE/write_restart_data_mod.f90
r2921 r2956 25 25 ! ----------------- 26 26 ! $Id$ 27 ! spectrum_x and spectrum_y have been moved to global data 28 ! 29 ! 2921 2018-03-22 15:05:23Z Giersch 27 30 ! spinup_time, day_of_year_init and time_utc_init are also written out now 28 31 ! … … 93 96 94 97 USE indices, & 95 ONLY: n z, nx, ny98 ONLY: nx, ny, nz 96 99 97 100 USE microphysics_mod, & … … 116 119 117 120 USE spectra_mod, & 118 ONLY: average_count_sp 121 ONLY: average_count_sp, spectrum_x, spectrum_y 119 122 120 123 USE synthetic_turbulence_generator_mod, & … … 640 643 CALL wrd_write_string( 'simulated_time' ) 641 644 WRITE ( 14 ) simulated_time 645 646 IF ( ALLOCATED( spectrum_x ) ) THEN 647 CALL wrd_write_string( 'spectrum_x' ) 648 WRITE ( 14 ) spectrum_x 649 CALL wrd_write_string( 'spectrum_y' ) 650 WRITE ( 14 ) spectrum_y 651 ENDIF 642 652 643 653 CALL wrd_write_string( 'spinup_time ' ) … … 958 968 USE random_generator_parallel, & 959 969 ONLY: id_random_array, seq_random_array 960 961 USE spectra_mod, &962 ONLY: spectrum_x, spectrum_y963 970 964 971 USE surface_mod, & … … 1220 1227 ENDIF 1221 1228 1222 IF ( ALLOCATED( spectrum_x ) ) THEN1223 CALL wrd_write_string( 'spectrum_x' )1224 WRITE ( 14 ) spectrum_x1225 CALL wrd_write_string( 'spectrum_y' )1226 WRITE ( 14 ) spectrum_y1227 ENDIF1228 1229 1229 IF ( ALLOCATED( ts_av ) ) THEN 1230 1230 CALL wrd_write_string( 'ts_av' )
Note: See TracChangeset
for help on using the changeset viewer.