Index: /palm/trunk/UTIL/read_prt_data.f90
===================================================================
--- /palm/trunk/UTIL/read_prt_data.f90	(revision 4261)
+++ /palm/trunk/UTIL/read_prt_data.f90	(revision 4262)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id: read_prt_data.f90 2696 2017-12-14 17:12:51Z kanani $
+! Added BIND attribute and C datatypes
+! 
+! 2696 2017-12-14 17:12:51Z kanani
 ! Adapted for changed particle attributes
 ! 
@@ -47,4 +50,6 @@
 !------------------------------------------------------------------------------!
 
+    USE, INTRINSIC ::  ISO_C_BINDING
+
     IMPLICIT NONE
 
@@ -61,32 +66,39 @@
     INTEGER, DIMENSION(:,:,:), ALLOCATABLE ::  prt_count
 
-    TYPE particle_type
-        SEQUENCE
-        REAL(KIND=8)     ::  aux1          !< auxiliary multi-purpose feature
-        REAL(KIND=8)     ::  aux2          !< auxiliary multi-purpose feature
-        REAL(KIND=8)     ::  radius        !< radius of particle
-        REAL(KIND=8)     ::  age           !< age of particle
-        REAL(KIND=8)     ::  age_m         !<
-        REAL(KIND=8)     ::  dt_sum        !<
-        REAL(KIND=8)     ::  e_m           !< interpolated sgs tke
-        REAL(KIND=8)     ::  origin_x      !< origin x-position of particle (changed cyclic bc)
-        REAL(KIND=8)     ::  origin_y      !< origin y-position of particle (changed cyclic bc)
-        REAL(KIND=8)     ::  origin_z      !< origin z-position of particle (changed cyclic bc)
-        REAL(KIND=8)     ::  rvar1         !<
-        REAL(KIND=8)     ::  rvar2         !<
-        REAL(KIND=8)     ::  rvar3         !<
-        REAL(KIND=8)     ::  speed_x       !< speed of particle in x
-        REAL(KIND=8)     ::  speed_y       !< speed of particle in y
-        REAL(KIND=8)     ::  speed_z       !< speed of particle in z
-        REAL(KIND=8)     ::  weight_factor !< weighting factor
-        REAL(KIND=8)     ::  x             !< x-position
-        REAL(KIND=8)     ::  y             !< y-position
-        REAL(KIND=8)     ::  z             !< z-position
-        INTEGER(KIND=4) ::  class         !< radius class needed for collision
-        INTEGER(KIND=4) ::  group         !< number of particle group
-        INTEGER(KIND=8) ::  id            !< particle ID (64 bit integer)
-        LOGICAL         ::  particle_mask !< if this parameter is set to false the particle will be deleted
-        INTEGER(KIND=4) ::  block_nr      !< number for sorting (removable?)
+!
+!-- WARNING: For compatibility of derived types, the BIND attribute is required, and interoperable C
+!-- datatypes must be used. These type are hard wired here! So changes in working precision (wp, iwp)
+!-- will not affect the particle_type!
+!-- The main reason for introducing the interoperable datatypes was to avoid compiler warnings of
+!-- the gfortran compiler.
+!-- The BIND attribite is required because of C_F_POINTER usage in the pmc particle interface.
+    TYPE, BIND(C) ::  particle_type
+        REAL(C_DOUBLE) ::  aux1          !< auxiliary multi-purpose feature
+        REAL(C_DOUBLE) ::  aux2          !< auxiliary multi-purpose feature
+        REAL(C_DOUBLE) ::  radius        !< radius of particle
+        REAL(C_DOUBLE) ::  age           !< age of particle
+        REAL(C_DOUBLE) ::  age_m         !<
+        REAL(C_DOUBLE) ::  dt_sum        !<
+        REAL(C_DOUBLE) ::  e_m           !< interpolated sgs tke
+        REAL(C_DOUBLE) ::  origin_x      !< origin x-position of particle (changed cyclic bc)
+        REAL(C_DOUBLE) ::  origin_y      !< origin y-position of particle (changed cyclic bc)
+        REAL(C_DOUBLE) ::  origin_z      !< origin z-position of particle (changed cyclic bc)
+        REAL(C_DOUBLE) ::  rvar1         !<
+        REAL(C_DOUBLE) ::  rvar2         !<
+        REAL(C_DOUBLE) ::  rvar3         !<
+        REAL(C_DOUBLE) ::  speed_x       !< speed of particle in x
+        REAL(C_DOUBLE) ::  speed_y       !< speed of particle in y
+        REAL(C_DOUBLE) ::  speed_z       !< speed of particle in z
+        REAL(C_DOUBLE) ::  weight_factor !< weighting factor
+        REAL(C_DOUBLE) ::  x             !< x-position
+        REAL(C_DOUBLE) ::  y             !< y-position
+        REAL(C_DOUBLE) ::  z             !< z-position
+        INTEGER(C_INT) ::  class         !< radius class needed for collision
+        INTEGER(C_INT) ::  group         !< number of particle group
+        INTEGER(C_LONG_LONG) ::  id            !< particle ID (64 bit integer)
+        LOGICAL(C_BOOL) ::  particle_mask !< if this parameter is set to false the particle will be deleted
+        INTEGER(C_INT) ::  block_nr      !< number for sorting (removable?)
     END TYPE particle_type
+
 
 
