Index: palm/trunk/SOURCE/local_tremain_ini.f90
===================================================================
--- palm/trunk/SOURCE/local_tremain_ini.f90	(revision 4901)
+++ palm/trunk/SOURCE/local_tremain_ini.f90	(revision 1)
@@ -1,34 +1,46 @@
-!> @file local_tremain_ini.f90
-!--------------------------------------------------------------------------------------------------!
-! This file is part of the PALM model system.
-!
-! PALM is free software: you can redistribute it and/or modify it under the terms of the GNU General
-! Public License as published by the Free Software Foundation, either version 3 of the License, or
-! (at your option) any later version.
-!
-! PALM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
-! implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-! Public License for more details.
-!
-! You should have received a copy of the GNU General Public License along with PALM. If not, see
-! <http://www.gnu.org/licenses/>.
-!
-! Copyright 1997-2021 Leibniz Universitaet Hannover
-!--------------------------------------------------------------------------------------------------!
-!
-! Current revisions:
+ SUBROUTINE local_tremain_ini
+
+!------------------------------------------------------------------------------!
+! Actual revisions:
 ! -----------------
-!
+! 
 !
 ! Former revisions:
 ! -----------------
-! $Id$
-! file re-formatted to follow the PALM coding standard
+! $Log: local_tremain_ini.f90,v $
+! Revision 1.13  2007/02/11 13:07:03  raasch
+! Allowed cpu limit is now read from file instead of reading the value from
+! environment variable (see routine parin)
 !
-! 4360 2020-01-07 11:25:50Z suehring
-! Corrected "Former revisions" section
+! Revision 1.12  2006/06/02 15:21:09  raasch
+! Extended to TIT Sun Fire X4600 System (lctit)
 !
-! 3655 2019-01-07 16:51:22Z knoop
-! Corrected "Former revisions" section
+! Revision 1.11  2003/05/09 14:40:20  raasch
+! Time measurement on IBM is now done using function irtc, which allows correct
+! measurements for jobs running over the 24:00 timeline
+!
+! Revision 1.10  2003/03/16 09:42:01  raasch
+! Two underscores (_) are placed in front of all define-strings
+!
+! Revision 1.9  2002/12/19 15:50:31  raasch
+! Measurements extended for IBM
+!
+! Revision 1.8  2001/03/30 07:35:16  raasch
+! Translation of remaining German identifiers (variables, subroutines, etc.)
+!
+! Revision 1.7  2001/01/22 08:35:38  raasch
+! Module test_variables removed
+!
+! Revision 1.5  1998/07/16 06:52:11  raasch
+! cpp-Direktiven fuer t3ej2 und t3ej5 erweitert
+!
+! Revision 1.4  1998/07/06 12:19:21  raasch
+! + USE test_variables
+!
+! Revision 1.3  1998/03/24 15:27:38  raasch
+! Initialisierung auf t3eh ergaenzt
+!
+! Revision 1.2  1998/03/23 08:40:23  raasch
+! Initialisierung auf vpp ergaenzt
 !
 ! Revision 1.1  1998/03/18 20:15:05  raasch
@@ -38,23 +50,39 @@
 ! Description:
 ! ------------
-!> Initialization of CPU-time measurements for different operating systems
-!--------------------------------------------------------------------------------------------------!
- SUBROUTINE local_tremain_ini
+! Initialization of CPU-time measurements for different operating systems
+!------------------------------------------------------------------------------!
 
-
-    USE cpulog,                                                                                    &
-        ONLY:  initial_wallclock_time
-
-    USE kinds
+    USE control_parameters
+    USE cpulog
 
     IMPLICIT NONE
 
-    INTEGER(idp)     ::  count      !<
-    INTEGER(idp)     ::  count_rate !<
+#if defined( __ibm )
+    CHARACTER (LEN=10) ::  value_chr
+    INTEGER            ::  idum
+    INTEGER(8)         ::  IRTC
+#elif defined( __lctit )
+    CHARACTER (LEN=10) ::  value_chr
+    INTEGER            ::  idum
+    INTEGER            ::  count, count_rate
+#endif
+
 
 !
 !-- Get initial wall clock time
+#if defined( __ibm )
+
+    initial_wallclock_time = IRTC( ) * 1E-9
+
+#elif defined( __lctit )
+
     CALL SYSTEM_CLOCK( count, count_rate )
-    initial_wallclock_time = REAL( count, KIND=wp ) / REAL( count_rate, KIND=wp )
+    initial_wallclock_time = REAL( count ) / REAL( count_rate )
+
+#else
+!
+!-- So far, nothing is done on these machines
+#endif
+
 
  END SUBROUTINE local_tremain_ini
