1 |
C $Header: /u/gcmpack/MITgcm/pkg/mnc/mnc_init.F,v 1.25 2008/05/22 12:21:19 mlosch Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "MNC_OPTIONS.h" |
5 |
|
6 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
7 |
CBOP 0 |
8 |
C !ROUTINE: MNC_UPDATE_TIME |
9 |
|
10 |
C !INTERFACE: |
11 |
SUBROUTINE MNC_UPDATE_TIME( |
12 |
I myTime, myIter, myThid ) |
13 |
|
14 |
C !DESCRIPTION: |
15 |
C Update MNC time and iteration information |
16 |
|
17 |
C !USES: |
18 |
#include "SIZE.h" |
19 |
#include "EEPARAMS.h" |
20 |
#include "PARAMS.h" |
21 |
#include "MNC_PARAMS.h" |
22 |
|
23 |
C !INPUT PARAMETERS: |
24 |
C myTime :: my current time in simulation |
25 |
C myIter :: my current iteration number in simulation |
26 |
C myThid :: my Thread Id. number |
27 |
_RL myTime |
28 |
INTEGER myIter |
29 |
INTEGER myThid |
30 |
CEOP |
31 |
|
32 |
#ifdef ALLOW_MNC |
33 |
C !FUNCTIONS: |
34 |
EXTERNAL DIFFERENT_MULTIPLE |
35 |
LOGICAL DIFFERENT_MULTIPLE |
36 |
|
37 |
C !LOCAL VARIABLES: |
38 |
|
39 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
40 |
|
41 |
c IF ( useMNC ) THEN |
42 |
|
43 |
C Update the default next iter for MNC |
44 |
CALL MNC_CW_CITER_SETG( 1, 1, -1, myIter , myThid ) |
45 |
|
46 |
C TODO: Logic should be added here so that users can specify, on |
47 |
C a per-citer-group basis, when it is time to update the |
48 |
C "current" (and not just the "next") iteration |
49 |
|
50 |
C TODO: the following is just a temporary band-aid (mostly, for |
51 |
C Baylor) until someone writes a routine that better handles time |
52 |
C boundaries such as weeks, months, years, etc. |
53 |
IF ( mnc_filefreq .GT. 0 ) THEN |
54 |
IF (DIFFERENT_MULTIPLE(mnc_filefreq,myTime,deltaTClock)) |
55 |
& THEN |
56 |
CALL MNC_CW_CITER_SETG( 1, 1, myIter, -1 , myThid ) |
57 |
ENDIF |
58 |
ENDIF |
59 |
|
60 |
c ENDIF |
61 |
#endif /* ALLOW_MNC */ |
62 |
|
63 |
RETURN |
64 |
END |