1 |
adcroft |
1.3 |
C $Header: /u/gcmpack/models/MITgcmUV/pkg/monitor/mon_set.F,v 1.2 2001/06/18 17:55:55 cnh Exp $ |
2 |
cnh |
1.1 |
C $Name: $ |
3 |
|
|
|
4 |
|
|
#include "CPP_OPTIONS.h" |
5 |
|
|
|
6 |
|
|
SUBROUTINE MON_SET_IOUNIT(unit, myThid ) |
7 |
|
|
C /==========================================================\ |
8 |
|
|
C | SUBROUTINE MON_SET_IOUNIT | |
9 |
|
|
C | o Set default monitor unit for I/O. | |
10 |
|
|
C \==========================================================/ |
11 |
|
|
IMPLICIT NONE |
12 |
|
|
|
13 |
|
|
C === Global data === |
14 |
|
|
#include "SIZE.h" |
15 |
|
|
#include "EEPARAMS.h" |
16 |
|
|
#include "MONITOR.h" |
17 |
|
|
|
18 |
|
|
C === Routine arguments === |
19 |
|
|
C unit - Unit number to use for monitor output |
20 |
|
|
C myThid - Instance number of this call to monitor |
21 |
|
|
INTEGER unit |
22 |
|
|
INTEGER myThid |
23 |
|
|
|
24 |
adcroft |
1.3 |
C Dont change before everyone is ready |
25 |
cnh |
1.1 |
CALL BAR2( myThid ) |
26 |
|
|
|
27 |
|
|
C Set monitor I/O unit |
28 |
|
|
mon_ioUnit = standardMessageUnit |
29 |
|
|
|
30 |
|
|
C Make sure everyone sees the change |
31 |
|
|
CALL BAR2( myThid ) |
32 |
|
|
|
33 |
|
|
RETURN |
34 |
|
|
END |
35 |
|
|
|
36 |
|
|
SUBROUTINE MON_SET_PREF(prefString, myThid ) |
37 |
|
|
C /==========================================================\ |
38 |
|
|
C | SUBROUTINE MON_SET_PREF | |
39 |
|
|
C | o Set default monitor prefix string. | |
40 |
|
|
C \==========================================================/ |
41 |
|
|
IMPLICIT NONE |
42 |
|
|
|
43 |
|
|
C === Global data === |
44 |
|
|
#include "SIZE.h" |
45 |
|
|
#include "EEPARAMS.h" |
46 |
|
|
#include "MONITOR.h" |
47 |
|
|
|
48 |
cnh |
1.2 |
EXTERNAL IFNBLNK, ILNBLNK |
49 |
|
|
INTEGER IFNBLNK, ILNBLNK |
50 |
cnh |
1.1 |
|
51 |
|
|
C === Routine arguments === |
52 |
|
|
C prefString - String to use for prefixing monitor output |
53 |
|
|
C myThid - Instance number of this call to monitor |
54 |
|
|
CHARACTER*(*) prefString |
55 |
|
|
INTEGER myThid |
56 |
|
|
|
57 |
|
|
C === Local variables === |
58 |
|
|
C I0, I1 - String first and last indices |
59 |
|
|
C IL - String length |
60 |
|
|
INTEGER I0, I1 |
61 |
|
|
INTEGER IL |
62 |
|
|
|
63 |
adcroft |
1.3 |
C Dont change before everyone is ready |
64 |
cnh |
1.1 |
CALL BAR2( myThid ) |
65 |
|
|
|
66 |
|
|
C Set monitor I/O unit |
67 |
|
|
I0 = IFNBLNK( prefString ) |
68 |
|
|
I1 = ILNBLNK( prefString ) |
69 |
|
|
IL = I1-I0+1 |
70 |
|
|
IF ( IL .LE. MAX_LEN_MBUF ) THEN |
71 |
|
|
mon_pref = ' ' |
72 |
|
|
mon_prefL = IL |
73 |
|
|
mon_pref(1:IL) = prefString(I0:I1) |
74 |
|
|
ENDIF |
75 |
|
|
|
76 |
|
|
C Make sure everyone sees the change |
77 |
|
|
CALL BAR2( myThid ) |
78 |
|
|
|
79 |
|
|
RETURN |
80 |
|
|
END |