1 |
C $Header: /u/gcmpack/MITgcm/pkg/autodiff/autodiff_inadmode_unset_ad.F,v 1.13 2015/06/18 16:58:51 gforget Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "AUTODIFF_OPTIONS.h" |
5 |
#ifdef ALLOW_CTRL |
6 |
# include "CTRL_OPTIONS.h" |
7 |
#endif |
8 |
|
9 |
SUBROUTINE ADAUTODIFF_INADMODE_UNSET( myThid ) |
10 |
C *==========================================================* |
11 |
C | SUBROUTINE ADAUTODIFF_INADMODE_UNSET |
12 |
C *==========================================================* |
13 |
|
14 |
IMPLICIT NONE |
15 |
C == Global variables === |
16 |
#include "SIZE.h" |
17 |
#include "EEPARAMS.h" |
18 |
#include "PARAMS.h" |
19 |
#include "AUTODIFF_PARAMS.h" |
20 |
#ifdef ALLOW_SEAICE |
21 |
#include "SEAICE_SIZE.h" |
22 |
#include "SEAICE_PARAMS.h" |
23 |
#endif |
24 |
#ifdef ALLOW_CTRL |
25 |
#include "ctrl.h" |
26 |
#endif |
27 |
|
28 |
C == Routine arguments == |
29 |
C myThid :: my Thread Id number |
30 |
INTEGER myThid |
31 |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
32 |
|
33 |
inAdMode = inAdFalse |
34 |
|
35 |
useKPP = useKPPinFwdMode |
36 |
useGMRedi = useGMRediInFwdMode |
37 |
useSEAICE = useSEAICEinFwdMode |
38 |
useGGL90 = useGGL90inFwdMode |
39 |
useSALT_PLUME = useSALT_PLUMEinFwdMode |
40 |
#if (defined (ALLOW_CTRL) && defined (ECCO_CTRL_DEPRECATED)) |
41 |
ctrlSmoothCorrel2D = useSmoothCorrel2DinFwdMode |
42 |
#endif |
43 |
#ifdef ALLOW_SEAICE |
44 |
IF ( SEAICEuseFREEDRIFTswitchInAd ) THEN |
45 |
SEAICEuseFREEDRIFT = SEAICEuseFREEDRIFTinFwdMode |
46 |
SEAICEuseLSR = .NOT.SEAICEuseFREEDRIFT |
47 |
ENDIF |
48 |
IF ( SEAICEuseDYNAMICSswitchInAd ) THEN |
49 |
SEAICEuseDYNAMICS = SEAICEuseDYNAMICSinFwdMode |
50 |
ENDIF |
51 |
SEAICEadjMODE=0 |
52 |
#endif /* ALLOW_SEAICE */ |
53 |
viscFacAdj=1. _d 0 |
54 |
|
55 |
IF ( debugLevel.GE.debLevC ) THEN |
56 |
WRITE(msgBuf,'(A,L5)') |
57 |
& 'S/R ADAUTODIFF_INADMODE_UNSET: useKPP =', useKPP |
58 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
59 |
& SQUEEZE_RIGHT, myThid ) |
60 |
WRITE(msgBuf,'(A,L5)') |
61 |
& 'S/R ADAUTODIFF_INADMODE_UNSET: useGMRedi =', useGMRedi |
62 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
63 |
& SQUEEZE_RIGHT, myThid ) |
64 |
WRITE(msgBuf,'(A,L5)') |
65 |
& 'S/R ADAUTODIFF_INADMODE_UNSET: useSEAICE =', useSEAICE |
66 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
67 |
& SQUEEZE_RIGHT, myThid ) |
68 |
WRITE(msgBuf,'(A,L5)') |
69 |
& 'S/R ADAUTODIFF_INADMODE_UNSET: useGGL90 =', useGGL90 |
70 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
71 |
& SQUEEZE_RIGHT, myThid ) |
72 |
WRITE(msgBuf,'(A,L5)') |
73 |
& 'S/R ADAUTODIFF_INADMODE_UNSET: useSALT_PLUME =', |
74 |
& useSALT_PLUME |
75 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
76 |
& SQUEEZE_RIGHT, myThid ) |
77 |
|
78 |
WRITE(msgBuf,'(A,1PE21.14)') |
79 |
& 'S/R ADAUTODIFF_INADMODE_UNSET: viscFacAdj =',viscFacAdj |
80 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
81 |
& SQUEEZE_RIGHT, myThid ) |
82 |
|
83 |
#if (defined (ALLOW_CTRL) && defined (ECCO_CTRL_DEPRECATED)) |
84 |
WRITE(msgBuf,'(A,L5)') |
85 |
& 'S/R ADAUTODIFF_INADMODE_UNSET: ctrlSmoothCorrel2D =', |
86 |
& ctrlSmoothCorrel2D |
87 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
88 |
& SQUEEZE_RIGHT, myThid ) |
89 |
#endif |
90 |
|
91 |
#ifdef ALLOW_SEAICE |
92 |
IF ( SEAICEuseFREEDRIFTswitchInAd ) THEN |
93 |
WRITE(msgBuf,'(2A,L5)') 'S/R ADAUTODIFF_INADMODE_UNSET: ', |
94 |
& 'SEAICEuseFREEDRIFT =', SEAICEuseFREEDRIFT |
95 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
96 |
& SQUEEZE_RIGHT, myThid ) |
97 |
WRITE(msgBuf,'(2A,L5)') 'S/R ADAUTODIFF_INADMODE_UNSET: ', |
98 |
& 'SEAICEuseLSR =', SEAICEuseLSR |
99 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
100 |
& SQUEEZE_RIGHT, myThid ) |
101 |
ENDIF |
102 |
IF ( SEAICEuseDYNAMICSswitchInAd ) THEN |
103 |
WRITE(msgBuf,'(2A,L5)') 'S/R ADAUTODIFF_INADMODE_UNSET: ', |
104 |
& 'SEAICEuseDYNAMICS =', SEAICEuseDYNAMICS |
105 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
106 |
& SQUEEZE_RIGHT, myThid ) |
107 |
ENDIF |
108 |
IF ( SEAICEapproxLevInAd.NE.0 ) THEN |
109 |
WRITE(msgBuf,'(2A,I2)') 'S/R ADAUTODIFF_INADMODE_UNSET: ', |
110 |
& 'SEAICEadjMODE =', SEAICEadjMODE |
111 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
112 |
& SQUEEZE_RIGHT, myThid ) |
113 |
ENDIF |
114 |
#endif /* ALLOW_SEAICE */ |
115 |
|
116 |
ENDIF |
117 |
|
118 |
RETURN |
119 |
END |