1 |
C $Header: /u/gcmpack/MITgcm/pkg/autodiff/ini_autodiff.F,v 1.8 2005/02/28 17:34:36 heimbach Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "AUTODIFF_OPTIONS.h" |
5 |
|
6 |
CBOP |
7 |
C !ROUTINE: INI_AUTODIFF |
8 |
C !INTERFACE: |
9 |
SUBROUTINE INI_AUTODIFF( myThid ) |
10 |
C !DESCRIPTION: \bv |
11 |
C *==========================================================* |
12 |
C | SUBROUTINE INI_AUTODIFF |
13 |
C | o Initialise to zero some active arrays |
14 |
C | These ini |
15 |
C *==========================================================* |
16 |
C \ev |
17 |
|
18 |
C !USES: |
19 |
IMPLICIT NONE |
20 |
C === Global variables === |
21 |
#include "SIZE.h" |
22 |
#include "EEPARAMS.h" |
23 |
#include "PARAMS.h" |
24 |
#include "FFIELDS.h" |
25 |
#include "SURFACE.h" |
26 |
|
27 |
C !INPUT/OUTPUT PARAMETERS: |
28 |
C == Routine arguments == |
29 |
C myThid - Number of this instance of INI_UVEL |
30 |
INTEGER myThid |
31 |
|
32 |
#ifdef ALLOW_AUTODIFF_TAMC |
33 |
|
34 |
C !LOCAL VARIABLES: |
35 |
C == Local variables == |
36 |
C bi,bj - Loop counters |
37 |
C I,J,K |
38 |
INTEGER bi, bj |
39 |
INTEGER I, J, K |
40 |
CEOP |
41 |
|
42 |
C-- Scalar fields |
43 |
TsurfCor=0. _d 0 |
44 |
SsurfCor=0. _d 0 |
45 |
|
46 |
C-- Over all tiles |
47 |
DO bj = myByLo(myThid), myByHi(myThid) |
48 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
49 |
|
50 |
C- 3D arrays |
51 |
DO K=1,Nr |
52 |
DO J=1-Oly,sNy+Oly |
53 |
DO I=1-Olx,sNx+Olx |
54 |
#ifdef ALLOW_EP_FLUX |
55 |
EfluxY(i,j,k,bi,bj)=0. |
56 |
EfluxP(i,j,k,bi,bj)=0. |
57 |
#endif |
58 |
ENDDO |
59 |
ENDDO |
60 |
ENDDO |
61 |
|
62 |
C- 2D arrays |
63 |
DO J=1-Oly,sNy+Oly |
64 |
DO I=1-Olx,sNx+Olx |
65 |
#ifdef EXACT_CONSERV |
66 |
dEtaHdt(i,j,bi,bj) = 0. _d 0 |
67 |
PmEpR(i,j,bi,bj) = 0. _d 0 |
68 |
cph hDivFlow(I,J,bi,bj)=0. _d 0 |
69 |
#endif |
70 |
#ifdef ALLOW_EXF |
71 |
EmPmR(I,J,bi,bj) = 0. _d 0 |
72 |
#endif |
73 |
ENDDO |
74 |
ENDDO |
75 |
|
76 |
ENDDO |
77 |
ENDDO |
78 |
|
79 |
#endif /* ALLOW_AUTODIFF_TAMC */ |
80 |
|
81 |
END |