1 |
jmc |
1.4 |
C $Header: /u/gcmpack/MITgcm/verification/hs94.1x64x5/code_ad/tamc.h,v 1.3 2008/05/09 18:42:27 dfer Exp $ |
2 |
jmc |
1.2 |
C $Name: $ |
3 |
heimbach |
1.1 |
|
4 |
jmc |
1.4 |
C ================================================================ |
5 |
|
|
C HEADER TAMC |
6 |
|
|
C ================================================================ |
7 |
|
|
C |
8 |
|
|
C o Header for the use of the Tangent Linear and Adjoint Model |
9 |
|
|
C Compiler (TAMC). |
10 |
|
|
C |
11 |
|
|
C started: Christian Eckert eckert@mit.edu 04-Feb-1999 |
12 |
|
|
C changed: Patrick Heimbach heimbach@mit.edu 06-Jun-2000 |
13 |
|
|
C - New parameter nlevchk_0 for dimensionalising |
14 |
|
|
C common blocks in the undef ALLOW_TAMC_CHECKPOINTING case |
15 |
|
|
C - nhreads_chkpt was declared at the wrong place |
16 |
|
|
C - new keys, separate for different packages |
17 |
|
|
|
18 |
|
|
C ================================================================ |
19 |
|
|
C HEADER TAMC |
20 |
|
|
C ================================================================ |
21 |
|
|
#ifdef ALLOW_AUTODIFF_TAMC |
22 |
|
|
|
23 |
|
|
C TAMC checkpointing parameters: |
24 |
|
|
C ============================== |
25 |
|
|
C |
26 |
|
|
C The checkpointing parameters have to be consistent with other model |
27 |
|
|
C parameters and variables. This has to be checked before the model is |
28 |
|
|
C run. |
29 |
|
|
C |
30 |
|
|
C nyears_chkpt :: Number of calendar years affected by the assimilation |
31 |
|
|
C experiment; nyears_chkpt has to be at least equal to |
32 |
|
|
C the result of cal_IntYears(mythid). |
33 |
|
|
C nmonths_chkpt :: Number of months per year; nmonth_chkpt has to be at |
34 |
|
|
C least equal to nmonthyear. |
35 |
|
|
C ndays_chkpt :: Number of days per month; nday_chkpt has to be at least |
36 |
|
|
C equal to nmaxdaymonth. |
37 |
|
|
C nsteps_chkpt :: Number of steps per day; nsteps_chkpt has to be at |
38 |
|
|
C least equal to cal_nStepDay(mythid) |
39 |
|
|
C ncheck_chkpt :: Number of innermost checkpoints. |
40 |
|
|
C |
41 |
|
|
C ngeom_chkpt :: Geometry factor. |
42 |
|
|
C nthreads_chkpt :: Number of threads to be used; nth_chkpt .eq. nTx*nTy |
43 |
heimbach |
1.1 |
|
44 |
|
|
integer nyears_chkpt |
45 |
|
|
integer nmonths_chkpt |
46 |
|
|
integer ndays_chkpt |
47 |
|
|
integer ngeom_chkpt |
48 |
|
|
integer ncheck_chkpt |
49 |
|
|
integer nthreads_chkpt |
50 |
|
|
|
51 |
|
|
parameter (nyears_chkpt = 1 ) |
52 |
|
|
parameter (nmonths_chkpt = 12 ) |
53 |
|
|
parameter (ndays_chkpt = 31 ) |
54 |
|
|
parameter (ngeom_chkpt = nr*nsx*nsy ) |
55 |
|
|
parameter (ncheck_chkpt = 6 ) |
56 |
|
|
parameter ( nthreads_chkpt = 1 ) |
57 |
|
|
|
58 |
|
|
#ifdef ALLOW_TAMC_CHECKPOINTING |
59 |
|
|
|
60 |
|
|
integer nchklev_1 |
61 |
|
|
parameter( nchklev_1 = 36 ) |
62 |
|
|
integer nchklev_2 |
63 |
|
|
parameter( nchklev_2 = 30 ) |
64 |
|
|
integer nchklev_3 |
65 |
|
|
parameter( nchklev_3 = 60 ) |
66 |
|
|
|
67 |
jmc |
1.4 |
C-- Note always check for the correct sizes of the common blocks! |
68 |
heimbach |
1.1 |
|
69 |
|
|
#else /* ALLOW_TAMC_CHECKPOINTING undefined */ |
70 |
|
|
|
71 |
|
|
integer nchklev_0 |
72 |
|
|
parameter( nchklev_0 = 64800 ) |
73 |
|
|
|
74 |
|
|
#endif /* ALLOW_TAMC_CHECKPOINTING */ |
75 |
|
|
|
76 |
|
|
c TAMC keys: |
77 |
|
|
c ========== |
78 |
|
|
c |
79 |
|
|
c The keys are used for storing and reading data of the reference |
80 |
|
|
c trajectory. |
81 |
|
|
c |
82 |
|
|
c The convention used here is: |
83 |
|
|
c ikey_<name> |
84 |
|
|
c |
85 |
|
|
c which means that this key is used in routine <name> for reading |
86 |
|
|
c and writing data. |
87 |
|
|
|
88 |
|
|
common /tamc_keys_i/ |
89 |
|
|
& ikey_dynamics, |
90 |
|
|
& ikey_yearly, |
91 |
|
|
& ikey_daily_1, |
92 |
|
|
& ikey_daily_2, |
93 |
|
|
& iloop_daily |
94 |
|
|
|
95 |
|
|
integer ikey_dynamics |
96 |
|
|
integer ikey_yearly |
97 |
|
|
integer ikey_daily_1 |
98 |
|
|
integer ikey_daily_2 |
99 |
|
|
integer iloop_daily |
100 |
|
|
|
101 |
|
|
INTEGER isbyte |
102 |
dfer |
1.3 |
PARAMETER( isbyte = 8 ) |
103 |
heimbach |
1.1 |
INTEGER maximpl |
104 |
dfer |
1.3 |
PARAMETER( maximpl = 6 ) |
105 |
|
|
#ifndef ALLOW_PTRACERS |
106 |
heimbach |
1.1 |
INTEGER maxpass |
107 |
dfer |
1.3 |
PARAMETER( maxpass = 2 ) |
108 |
heimbach |
1.1 |
#endif |
109 |
|
|
INTEGER maxcube |
110 |
|
|
PARAMETER( maxcube = 1 ) |
111 |
|
|
|
112 |
|
|
INTEGER act0, act1, act2, act3, act4 |
113 |
|
|
INTEGER max0, max1, max2, max3 |
114 |
jmc |
1.4 |
INTEGER iikey, kkey, passkey, igadkey, |
115 |
dfer |
1.3 |
& itdkey, idynkey, igmkey, ikppkey, iptrkey |
116 |
heimbach |
1.1 |
|
117 |
jmc |
1.4 |
#ifdef ALLOW_CG2D_NSA |
118 |
|
|
C Parameter that is needed for the tape complev_cg2d_iter |
119 |
|
|
C cannot be smaller than the allowed number of iterations in cg2d |
120 |
|
|
C (numItersMax >= cg2dMaxIters in data-file) |
121 |
|
|
INTEGER numItersMax |
122 |
|
|
PARAMETER ( numItersMax = 100 ) |
123 |
|
|
#endif |
124 |
heimbach |
1.1 |
|
125 |
jmc |
1.4 |
#endif /* ALLOW_AUTODIFF_TAMC */ |
126 |
|
|
C ================================================================ |
127 |
|
|
C END OF HEADER TAMC |
128 |
|
|
C ================================================================ |