1 |
molod |
1.3 |
C $Header: /u/gcmpack/MITgcm/pkg/fizhi/fizhi_diagalarms.F,v 1.2 2005/05/21 22:39:32 jmc Exp $ |
2 |
molod |
1.1 |
C $Name: $ |
3 |
|
|
|
4 |
|
|
#include "FIZHI_OPTIONS.h" |
5 |
molod |
1.3 |
subroutine fizhi_diagalarms (myThid) |
6 |
molod |
1.1 |
|
7 |
|
|
C*********************************************************************** |
8 |
|
|
C Purpose |
9 |
|
|
C ------- |
10 |
|
|
C Routine to Set Alarms for diagnostic output |
11 |
|
|
C |
12 |
|
|
C Argument Description |
13 |
|
|
C -------------------- |
14 |
|
|
C myThid .... Process ID |
15 |
|
|
C |
16 |
molod |
1.3 |
C NOTE: This routine ASSUMES that fizhi_init_fixed has been called |
17 |
|
|
C IT WILL NOT WORK OTHERWISE |
18 |
molod |
1.1 |
C*********************************************************************** |
19 |
|
|
implicit none |
20 |
|
|
#include "SIZE.h" |
21 |
|
|
#include "EEPARAMS.h" |
22 |
|
|
#include "PARAMS.h" |
23 |
|
|
#include "DIAGNOSTICS_SIZE.h" |
24 |
|
|
#include "DIAGNOSTICS.h" |
25 |
|
|
#include "chronos.h" |
26 |
|
|
|
27 |
|
|
c Input Parameters |
28 |
|
|
c ---------------- |
29 |
molod |
1.3 |
integer myThid |
30 |
molod |
1.1 |
|
31 |
molod |
1.3 |
c Local variables |
32 |
molod |
1.1 |
c ------------------- |
33 |
|
|
integer nhmsf, n, nincr |
34 |
|
|
integer mmdd,hhmmss,nsecf2 |
35 |
|
|
character *9 tagname |
36 |
molod |
1.3 |
integer nymdb,nhmsb |
37 |
|
|
|
38 |
molod |
1.1 |
c Set Alarm Clocks |
39 |
|
|
c ---------------- |
40 |
molod |
1.3 |
c To Set Begin Time for Alarm Clocks: |
41 |
|
|
c Increment < 1 month - counting starts at model start time |
42 |
|
|
c Increment >= 1 month - counting starts at beginning of start month |
43 |
|
|
c ---------------------------------------------------------------------- |
44 |
molod |
1.1 |
|
45 |
jmc |
1.2 |
C- 2D/3D field diagnostics: |
46 |
molod |
1.1 |
do n = 1,nlists |
47 |
molod |
1.3 |
if(freq(n).lt.100.) then |
48 |
|
|
nymdb = nymd |
49 |
|
|
nhmsb = nhms |
50 |
|
|
else |
51 |
|
|
nymdb = int(nymd/100) * 100 + 1 |
52 |
|
|
nhmsb = 0 |
53 |
|
|
endif |
54 |
molod |
1.1 |
write(tagname,'(A,I2.2)')'diagtag',n |
55 |
|
|
mmdd = int(freq(n)) |
56 |
|
|
hhmmss = int((freq(n) - int(freq(n)))*1.e6) |
57 |
jmc |
1.2 |
nincr = mmdd * 1.e6 + hhmmss |
58 |
|
|
call set_alarm(tagname,nymdb,nhmsb,nincr) |
59 |
|
|
enddo |
60 |
|
|
|
61 |
|
|
C- Global/Regional statistics diagnostics: |
62 |
|
|
do n = 1,diagSt_nbLists |
63 |
molod |
1.3 |
if(freq(n).lt.100.) then |
64 |
|
|
nymdb = nymd |
65 |
|
|
nhmsb = nhms |
66 |
|
|
else |
67 |
|
|
nymdb = int(nymd/100) * 100 + 1 |
68 |
|
|
nhmsb = 0 |
69 |
|
|
endif |
70 |
jmc |
1.2 |
write(tagname,'(A,I2.2)')'diagStg',n |
71 |
|
|
mmdd = int(diagSt_freq(n)) |
72 |
|
|
hhmmss = int((diagSt_freq(n) - int(diagSt_freq(n)))*1.e6) |
73 |
|
|
nincr = mmdd * 1.e6 + hhmmss |
74 |
molod |
1.1 |
call set_alarm(tagname,nymdb,nhmsb,nincr) |
75 |
|
|
enddo |
76 |
|
|
|
77 |
|
|
return |
78 |
|
|
end |