Changeset 2636 for palm/trunk


Ignore:
Timestamp:
Nov 22, 2017 3:22:20 PM (6 years ago)
Author:
raasch
Message:

bugfix for reading required for parrallel random number generator

File:
1 edited

Legend:

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

    r2292 r2636  
    2525! -----------------
    2626! $Id$
     27! bugfix for reading required for parrallel random number generator
     28!
     29! 2292 2017-06-20 09:51:42Z schwenkel
    2730! Implementation of new microphysic scheme: cloud_scheme = 'morrison'
    2831! includes two more prognostic equations for cloud drop concentration (nc) 
     
    226229
    227230    REAL(wp), DIMENSION(:,:), ALLOCATABLE     ::  tmp_2d      !< temporary array for storing 2D data
     231    REAL(wp), DIMENSION(:,:), ALLOCATABLE     ::  tmp_2d_id_random    !< temporary array for storing random generator data
     232    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE   ::  tmp_2d_seq_random   !< temporary array for storing random generator data
    228233    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE   ::  tmp_3d      !< temporary array for storing 3D data
    229234    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE   ::  tmp_3dwul   !<
     
    695700                   IF ( k == 1 )  READ ( 13 )  random_iy
    696701                   
    697                 CASE ( 'seq_random_array' )  ! still unresolved issue
    698                    IF ( k == 1 )  READ ( 13 )  id_random_array
    699                    IF ( k == 1 )  READ ( 13 )  seq_random_array
    700 
     702                CASE ( 'seq_random_array' )
     703                   ALLOCATE( tmp_2d_id_random(nys_on_file:nyn_on_file,         &
     704                                              nxl_on_file:nxr_on_file) )
     705                   ALLOCATE( tmp_2d_seq_random(5,nys_on_file:nyn_on_file,      &
     706                                                 nxl_on_file:nxr_on_file) )
     707                   IF ( .NOT. ALLOCATED( id_random_array ) )  THEN
     708                      ALLOCATE( id_random_array(nys:nyn,nxl:nxr) )
     709                   ENDIF
     710                   IF ( .NOT. ALLOCATED( seq_random_array ) )  THEN
     711                      ALLOCATE( seq_random_array(5,nys:nyn,nxl:nxr) )
     712                   ENDIF
     713                   IF ( k == 1 )  READ ( 13 )  tmp_2d_id_random
     714                   IF ( k == 1 )  READ ( 13 )  tmp_2d_seq_random
     715                   id_random_array(nysc:nync,nxlc:nxrc) =                      &
     716                                          tmp_2d_id_random(nysf:nynf,nxlf:nxrf)
     717                   seq_random_array(:,nysc:nync,nxlc:nxrc) =                   &
     718                                       tmp_2d_seq_random(:,nysf:nynf,nxlf:nxrf)
     719                   DEALLOCATE( tmp_2d_id_random, tmp_2d_seq_random )
    701720                CASE ( 'rho_ocean_av' )
    702721                   IF ( .NOT. ALLOCATED( rho_ocean_av ) )  THEN
Note: See TracChangeset for help on using the changeset viewer.