File indexing completed on 2024-05-11 05:10:13 UTC
view on githubraw file Latest commit 41c4545f on 2024-05-10 15:00:41 UTC
2f0f89f640 Patr*0001 #include "AUTODIFF_OPTIONS.h"
e7c6a35452 Jean*0002 #ifdef ALLOW_CTRL
0003 # include "CTRL_OPTIONS.h"
0004 #endif
2f0f89f640 Patr*0005
018c28d301 Jean*0006
0007
0008
0009
a10c595eb6 Timo*0010 SUBROUTINE ADAUTODIFF_INADMODE_SET( myTime, myIter, myThid )
018c28d301 Jean*0011
0012
52cd6fcfc8 Jean*0013
0014
0015
0016
c59dd234b1 Jean*0017
2f0f89f640 Patr*0018 IMPLICIT NONE
0019
0020 #include "SIZE.h"
0021 #include "EEPARAMS.h"
0022 #include "PARAMS.h"
5127d1d91b Jean*0023 #include "AUTODIFF_PARAMS.h"
8cbe658cd1 Jean*0024 #ifdef ALLOW_SEAICE
018c28d301 Jean*0025 # include "SEAICE_SIZE.h"
0026 # include "SEAICE_PARAMS.h"
8cbe658cd1 Jean*0027 #endif
8efbdea137 Gael*0028 #ifdef ALLOW_CTRL
5cf4364659 Mart*0029 # include "CTRL_SIZE.h"
018c28d301 Jean*0030 # include "CTRL.h"
8efbdea137 Gael*0031 #endif
018c28d301 Jean*0032 #ifdef ALLOW_DIAGNOSTICS
41c4545f8f Jean*0033 # include "DIAGNOSTICS_P2SHARE.h"
018c28d301 Jean*0034 #endif /* ALLOW_DIAGNOSTICS */
2f0f89f640 Patr*0035
c59dd234b1 Jean*0036
0037
0038
0039
0040 _RL myTime
a10c595eb6 Timo*0041 INTEGER myIter
c59dd234b1 Jean*0042 INTEGER myThid
0043
0044
5127d1d91b Jean*0045 CHARACTER*(MAX_LEN_MBUF) msgBuf
018c28d301 Jean*0046 #ifdef ALLOW_DIAGNOSTICS
0047 _RL wrTime
0048 INTEGER wrIter
0049 #endif /* ALLOW_DIAGNOSTICS */
0050
0051
0052
0053 inAdMode = .TRUE.
2f0f89f640 Patr*0054
018c28d301 Jean*0055 #ifdef ALLOW_DIAGNOSTICS
a10c595eb6 Timo*0056 IF ( useDiag4AdjOutp ) THEN
018c28d301 Jean*0057
0058 wrIter = myIter - 1
0059 wrTime = myTime - deltaTClock
41c4545f8f Jean*0060 CALL DIAGNOSTICS_SWITCH_ONOFF( -1, wrTime, wrIter, myThid )
a10c595eb6 Timo*0061 ENDIF
018c28d301 Jean*0062 #endif /* ALLOW_DIAGNOSTICS */
2f0f89f640 Patr*0063
018c28d301 Jean*0064
562c7efd9e Mart*0065 useKPP = useKPPinAdMode
5127d1d91b Jean*0066 useGMRedi = useGMRediInAdMode
562c7efd9e Mart*0067 useSEAICE = useSEAICEinAdMode
6b07e0a584 Jean*0068 useGGL90 = useGGL90inAdMode
0069 useSALT_PLUME = useSALT_PLUMEinAdMode
0070 #ifdef ALLOW_SEAICE
0071 IF ( SEAICEuseFREEDRIFTswitchInAd ) THEN
0072 SEAICEuseFREEDRIFT = .NOT.SEAICEuseFREEDRIFTinFwdMode
e5d920b361 Mart*0073 SEAICEuseLSR = .NOT.SEAICEuseFREEDRIFT
6b07e0a584 Jean*0074 ENDIF
0075 IF ( SEAICEuseDYNAMICSswitchInAd ) THEN
0076 SEAICEuseDYNAMICS = .NOT.SEAICEuseDYNAMICSinFwdMode
0077 ENDIF
a661e4ae05 Gael*0078 SEAICEadjMODE=SEAICEapproxLevInAd
4dd39c50d9 Mart*0079
0080 IF ( SIregFacInAd .NE. UNSET_RL ) SINegFac = SIregFacInAd
6b07e0a584 Jean*0081 #endif /* ALLOW_SEAICE */
a661e4ae05 Gael*0082 viscFacAdj=viscFacInAd
5127d1d91b Jean*0083
0084 IF ( debugLevel.GE.debLevC ) THEN
018c28d301 Jean*0085
6b07e0a584 Jean*0086
5127d1d91b Jean*0087 WRITE(msgBuf,'(A,L5)')
0088 & 'S/R ADAUTODIFF_INADMODE_SET: useKPP =', useKPP
0089 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
0090 & SQUEEZE_RIGHT, myThid )
0091 WRITE(msgBuf,'(A,L5)')
0092 & 'S/R ADAUTODIFF_INADMODE_SET: useGMRedi =', useGMRedi
0093 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
0094 & SQUEEZE_RIGHT, myThid )
0095 WRITE(msgBuf,'(A,L5)')
0096 & 'S/R ADAUTODIFF_INADMODE_SET: useSEAICE =', useSEAICE
0097 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
0098 & SQUEEZE_RIGHT, myThid )
b5f6e47484 Gael*0099 WRITE(msgBuf,'(A,L5)')
0100 & 'S/R ADAUTODIFF_INADMODE_SET: useGGL90 =', useGGL90
0101 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
0102 & SQUEEZE_RIGHT, myThid )
0103 WRITE(msgBuf,'(A,L5)')
6b07e0a584 Jean*0104 & 'S/R ADAUTODIFF_INADMODE_SET: useSALT_PLUME =',
b5f6e47484 Gael*0105 & useSALT_PLUME
0106 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
0107 & SQUEEZE_RIGHT, myThid )
8cbe658cd1 Jean*0108
a661e4ae05 Gael*0109 WRITE(msgBuf,'(A,1PE21.14)')
0110 & 'S/R ADAUTODIFF_INADMODE_SET: viscFacAdj =',viscFacAdj
0111 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
0112 & SQUEEZE_RIGHT, myThid )
0113
8cbe658cd1 Jean*0114 #ifdef ALLOW_SEAICE
6b07e0a584 Jean*0115 IF ( SEAICEuseFREEDRIFTswitchInAd ) THEN
0116 WRITE(msgBuf,'(2A,L5)') 'S/R ADAUTODIFF_INADMODE_SET: ',
0117 & 'SEAICEuseFREEDRIFT =', SEAICEuseFREEDRIFT
0118 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
0119 & SQUEEZE_RIGHT, myThid )
e5d920b361 Mart*0120 WRITE(msgBuf,'(2A,L5)') 'S/R ADAUTODIFF_INADMODE_SET: ',
0121 & 'SEAICEuseLSR =', SEAICEuseLSR
0122 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
0123 & SQUEEZE_RIGHT, myThid )
6b07e0a584 Jean*0124 ENDIF
0125 IF ( SEAICEuseDYNAMICSswitchInAd ) THEN
0126 WRITE(msgBuf,'(2A,L5)') 'S/R ADAUTODIFF_INADMODE_SET: ',
0127 & 'SEAICEuseDYNAMICS =', SEAICEuseDYNAMICS
0128 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
0129 & SQUEEZE_RIGHT, myThid )
8cbe658cd1 Jean*0130 ENDIF
a661e4ae05 Gael*0131 IF ( SEAICEapproxLevInAd.NE.0 ) THEN
0132 WRITE(msgBuf,'(2A,I2)') 'S/R ADAUTODIFF_INADMODE_SET: ',
0133 & 'SEAICEadjMODE =', SEAICEadjMODE
0134 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
0135 & SQUEEZE_RIGHT, myThid )
0136 ENDIF
8cbe658cd1 Jean*0137 #endif /* ALLOW_SEAICE */
562c7efd9e Mart*0138
018c28d301 Jean*0139
6b07e0a584 Jean*0140 ENDIF
0141
5127d1d91b Jean*0142 RETURN
0143 END