source: palm/trunk/SOURCE/local_tremain.f90 @ 4504

Last change on this file since 4504 was 4360, checked in by suehring, 5 years ago

Bugfix in output of time-averaged plant-canopy quanities; Output of plant-canopy data only where tall canopy is defined; land-surface model: fix wrong location strings; tests: update urban test case; all source code files: copyright update

  • Property svn:keywords set to Id
File size: 2.1 KB
Line 
1!> @file local_tremain.f90
2!------------------------------------------------------------------------------!
3! This file is part of the PALM model system.
4!
5! PALM is free software: you can redistribute it and/or modify it under the
6! terms of the GNU General Public License as published by the Free Software
7! Foundation, either version 3 of the License, or (at your option) any later
8! version.
9!
10! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
11! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
13!
14! You should have received a copy of the GNU General Public License along with
15! PALM. If not, see <http://www.gnu.org/licenses/>.
16!
17! Copyright 1997-2020 Leibniz Universitaet Hannover
18!------------------------------------------------------------------------------!
19!
20! Current revisions:
21! -----------------
22!
23!
24! Former revisions:
25! -----------------
26! $Id: local_tremain.f90 4360 2020-01-07 11:25:50Z raasch $
27! Corrected "Former revisions" section
28!
29! 3655 2019-01-07 16:51:22Z knoop
30! Corrected "Former revisions" section
31!
32! Revision 1.1  1998/03/18 20:14:47  raasch
33! Initial revision
34!
35!
36! Description:
37! ------------
38!> For different operating systems get the remaining cpu-time of the job
39!------------------------------------------------------------------------------!
40 SUBROUTINE local_tremain( remaining_time )
41 
42
43    USE control_parameters,                                                    &
44        ONLY:  maximum_cpu_time_allowed
45
46    USE cpulog,                                                                &
47        ONLY:  initial_wallclock_time
48
49    USE kinds
50
51    USE pegrid
52
53    IMPLICIT NONE
54
55    INTEGER(idp) ::  count                 !<
56    INTEGER(idp) ::  count_rate            !<
57
58    REAL(wp)     ::  actual_wallclock_time !<
59    REAL(wp)     ::  remaining_time        !<
60
61    CALL SYSTEM_CLOCK( count, count_rate )
62    actual_wallclock_time = REAL( count, KIND=wp ) / REAL( count_rate, KIND=wp )
63    remaining_time = maximum_cpu_time_allowed - &
64                     ( actual_wallclock_time - initial_wallclock_time )
65
66 END SUBROUTINE local_tremain
Note: See TracBrowser for help on using the repository browser.