Ignore:
Timestamp:
May 3, 2020 2:29:30 PM (14 months ago)
Author:
raasch
Message:

added restart with MPI-IO for reading local arrays

File:
1 edited

Legend:

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

    r4495 r4517  
    210210
    211211    USE restart_data_mpi_io_mod,                                                                   &
    212         ONLY:  rrd_mpi_io, wrd_mpi_io
     212        ONLY:  rd_mpi_io_check_array, rrd_mpi_io, wrd_mpi_io
    213213
    214214    USE statistics,                                                            &
     
    413413
    414414    INTERFACE lpm_rrd_local
    415        MODULE PROCEDURE lpm_rrd_local
     415       MODULE PROCEDURE lpm_rrd_local_ftn
     416       MODULE PROCEDURE lpm_rrd_local_mpi
    416417    END INTERFACE lpm_rrd_local
    417418
     
    30213022 
    30223023 
    3023  SUBROUTINE lpm_rrd_local( k, nxlf, nxlc, nxl_on_file, nxrf, nxrc,          &
    3024                               nxr_on_file, nynf, nync, nyn_on_file, nysf,  &
    3025                               nysc, nys_on_file, tmp_3d, found )
     3024!------------------------------------------------------------------------------!
     3025! Description:
     3026! ------------
     3027!> Read module-specific local restart data arrays (Fortran binary format).
     3028!------------------------------------------------------------------------------!
     3029 SUBROUTINE lpm_rrd_local_ftn( k, nxlf, nxlc, nxl_on_file, nxrf, nxrc,          &
     3030                               nxr_on_file, nynf, nync, nyn_on_file, nysf,  &
     3031                               nysc, nys_on_file, tmp_3d, found )
    30263032
    30273033
     
    31013107       END SELECT
    31023108
    3103 
    3104  END SUBROUTINE lpm_rrd_local
     3109 END SUBROUTINE lpm_rrd_local_ftn
     3110
    31053111 
     3112!------------------------------------------------------------------------------!
     3113! Description:
     3114! ------------
     3115!> Read module-specific local restart data arrays (MPI-IO).
     3116!------------------------------------------------------------------------------!
     3117 SUBROUTINE lpm_rrd_local_mpi
     3118
     3119    IMPLICIT NONE
     3120
     3121    LOGICAL ::  array_found  !<
     3122
     3123    CALL rrd_mpi_io( 'iran', iran ) ! matching random numbers is still unresolved issue
     3124    CALL rrd_mpi_io( 'iran_part', iran_part )
     3125
     3126    CALL rd_mpi_io_check_array( 'pc_av' , found = array_found )
     3127    IF ( array_found )  THEN
     3128       IF ( .NOT. ALLOCATED( pc_av ) )  ALLOCATE( pc_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
     3129       CALL rrd_mpi_io( 'pc_av', pc_av )
     3130    ENDIF
     3131
     3132    CALL rd_mpi_io_check_array( 'pr_av' , found = array_found )
     3133    IF ( array_found )  THEN
     3134       IF ( .NOT. ALLOCATED( pr_av ) )  ALLOCATE( pr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
     3135       CALL rrd_mpi_io( 'pr_av', pr_av )
     3136    ENDIF
     3137
     3138    CALL rd_mpi_io_check_array( 'ql_c_av' , found = array_found )
     3139    IF ( array_found )  THEN
     3140       IF ( .NOT. ALLOCATED( ql_c_av ) )  ALLOCATE( ql_c_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
     3141       CALL rrd_mpi_io( 'ql_c_av', ql_c_av )
     3142    ENDIF
     3143
     3144    CALL rd_mpi_io_check_array( 'ql_v_av' , found = array_found )
     3145    IF ( array_found )  THEN
     3146       IF ( .NOT. ALLOCATED( ql_v_av ) )  ALLOCATE( ql_v_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
     3147       CALL rrd_mpi_io( 'ql_v_av', ql_v_av )
     3148    ENDIF
     3149
     3150    CALL rd_mpi_io_check_array( 'ql_vp_av' , found = array_found )
     3151    IF ( array_found )  THEN
     3152       IF ( .NOT. ALLOCATED( ql_vp_av ) )  ALLOCATE( ql_vp_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
     3153       CALL rrd_mpi_io( 'ql_vp_av', ql_vp_av )
     3154    ENDIF
     3155
     3156 END SUBROUTINE lpm_rrd_local_mpi
     3157
     3158
    31063159!------------------------------------------------------------------------------!
    31073160! Description:
     
    31683221#endif
    31693222
    3170     CALL wrd_write_string( 'iran' )
    3171     WRITE ( 14 )  iran, iran_part
    3172 
     3223    IF ( TRIM( restart_data_format_output ) == 'fortran_binary' )  THEN
     3224
     3225       CALL wrd_write_string( 'iran' )  ! matching random numbers is still unresolved issue
     3226       WRITE ( 14 )  iran, iran_part
     3227
     3228    ELSEIF ( TRIM( restart_data_format_output ) == 'mpi' )  THEN
     3229
     3230       CALL wrd_mpi_io( 'iran', iran )  ! matching random numbers is still unresolved issue
     3231       CALL wrd_mpi_io( 'iran_part', iran_part )
     3232
     3233    ENDIF
    31733234
    31743235 END SUBROUTINE lpm_wrd_local
Note: See TracChangeset for help on using the changeset viewer.