Index: palm/trunk/SOURCE/lagrangian_particle_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/lagrangian_particle_model_mod.f90	(revision 4471)
+++ palm/trunk/SOURCE/lagrangian_particle_model_mod.f90	(revision 4495)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! restart data handling with MPI-IO added
+! 
+! 4471 2020-03-24 12:08:06Z schwenkel
 ! Bugfix in lpm_droplet_interactions_ptq
 ! 
@@ -164,5 +167,5 @@
                intermediate_timestep_count, intermediate_timestep_count_max,   &
                message_string, molecular_viscosity, ocean_mode,                &
-               particle_maximum_age, iran,                                     & 
+               particle_maximum_age, iran, restart_data_format_output,         &
                simulated_time, topography, dopts_time_count,                   &
                time_since_reference_point, rho_surface, u_gtrans, v_gtrans,    &
@@ -205,4 +208,7 @@
     USE random_function_mod,                                                   &
         ONLY:  random_function
+
+    USE restart_data_mpi_io_mod,                                                                   &
+        ONLY:  rrd_mpi_io, wrd_mpi_io
 
     USE statistics,                                                            &
@@ -402,5 +408,6 @@
 
     INTERFACE lpm_rrd_global
-       MODULE PROCEDURE lpm_rrd_global
+       MODULE PROCEDURE lpm_rrd_global_ftn
+       MODULE PROCEDURE lpm_rrd_global_mpi
     END INTERFACE lpm_rrd_global
 
@@ -3175,15 +3182,26 @@
  SUBROUTINE lpm_wrd_global
  
-    CALL wrd_write_string( 'curvature_solution_effects' ) 
-    WRITE ( 14 )  curvature_solution_effects
-
-    CALL wrd_write_string( 'interpolation_simple_corrector' )
-    WRITE ( 14 )  interpolation_simple_corrector
-
-    CALL wrd_write_string( 'interpolation_simple_predictor' )
-    WRITE ( 14 )  interpolation_simple_predictor
-
-    CALL wrd_write_string( 'interpolation_trilinear' )
-    WRITE ( 14 )  interpolation_trilinear
+    IF ( TRIM( restart_data_format_output ) == 'fortran_binary' )  THEN
+
+       CALL wrd_write_string( 'curvature_solution_effects' )
+       WRITE ( 14 )  curvature_solution_effects
+
+       CALL wrd_write_string( 'interpolation_simple_corrector' )
+       WRITE ( 14 )  interpolation_simple_corrector
+
+       CALL wrd_write_string( 'interpolation_simple_predictor' )
+       WRITE ( 14 )  interpolation_simple_predictor
+
+       CALL wrd_write_string( 'interpolation_trilinear' )
+       WRITE ( 14 )  interpolation_trilinear
+
+    ELSEIF ( TRIM( restart_data_format_output ) == 'mpi' )  THEN
+
+       CALL wrd_mpi_io( 'curvature_solution_effects', curvature_solution_effects )
+       CALL wrd_mpi_io( 'interpolation_simple_corrector', interpolation_simple_corrector )
+       CALL wrd_mpi_io( 'interpolation_simple_predictor', interpolation_simple_predictor )
+       CALL wrd_mpi_io( 'interpolation_trilinear', interpolation_trilinear )
+
+    ENDIF
 
  END SUBROUTINE lpm_wrd_global
@@ -3193,7 +3211,7 @@
 ! Description:
 ! ------------
-!> This routine writes the respective restart data for the lpm.
+!> Read module-specific global restart data (Fortran binary format).
 !------------------------------------------------------------------------------! 
- SUBROUTINE lpm_rrd_global( found )
+ SUBROUTINE lpm_rrd_global_ftn( found )
  
     USE control_parameters,                            &
@@ -3218,10 +3236,4 @@
           READ ( 13 )  interpolation_trilinear
 
-!          CASE ( 'global_paramter' )
-!             READ ( 13 )  global_parameter
-!          CASE ( 'global_array' )
-!             IF ( .NOT. ALLOCATED( global_array ) )  ALLOCATE( global_array(1:10) )
-!             READ ( 13 )  global_array
-
        CASE DEFAULT
 
@@ -3230,5 +3242,20 @@
     END SELECT 
     
- END SUBROUTINE lpm_rrd_global
+ END SUBROUTINE lpm_rrd_global_ftn
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Read module-specific global restart data (MPI-IO).
+!------------------------------------------------------------------------------!
+ SUBROUTINE lpm_rrd_global_mpi
+
+    CALL rrd_mpi_io( 'curvature_solution_effects', curvature_solution_effects )
+    CALL rrd_mpi_io( 'interpolation_simple_corrector', interpolation_simple_corrector )
+    CALL rrd_mpi_io( 'interpolation_simple_predictor', interpolation_simple_predictor )
+    CALL rrd_mpi_io( 'interpolation_trilinear', interpolation_trilinear )
+
+ END SUBROUTINE lpm_rrd_global_mpi
 
 
