Back to home page

MITgcm

 
 

    


File indexing completed on 2024-05-25 05:10:37 UTC

view on githubraw file Latest commit 00f81e67 on 2024-05-24 21:00:12 UTC
7bfe6112e8 Jean*0001 #include "CTRL_OPTIONS.h"
cf705a6c8e Mart*0002 #include "AD_CONFIG.h"
                0003 #ifdef ALLOW_ECCO
                0004 # include "ECCO_OPTIONS.h"
                0005 #endif
94a8024bbe Jean*0006 #ifdef ALLOW_GMREDI
                0007 # include "GMREDI_OPTIONS.h"
                0008 #endif
bf759c6109 Gael*0009 #ifdef ALLOW_EXF
                0010 # include "EXF_OPTIONS.h"
                0011 #endif
7b8b86ab99 Timo*0012 #ifdef ALLOW_SHELFICE
                0013 # include "SHELFICE_OPTIONS.h"
                0014 #endif
042be14492 Patr*0015 
698b6992ee Jean*0016 CBOP
                0017 C     !ROUTINE: CTRL_CHECK
                0018 C     !INTERFACE:
042be14492 Patr*0019       SUBROUTINE CTRL_CHECK( myThid )
698b6992ee Jean*0020 
                0021 C     !DESCRIPTION: \bv
                0022 C     *=================================================================
d592a6ea2a Jean*0023 C     | SUBROUTINE CTRK_CHECK
698b6992ee Jean*0024 C     | o Validate basic ctrl package setup and inter-package
d592a6ea2a Jean*0025 C     | dependencies.
698b6992ee Jean*0026 C     *=================================================================
                0027 C     \ev
                0028 
                0029 C     !USES:
042be14492 Patr*0030       IMPLICIT NONE
                0031 
                0032 C     === Global variables ===
                0033 #include "SIZE.h"
                0034 #include "EEPARAMS.h"
                0035 #include "PARAMS.h"
5cf4364659 Mart*0036 #include "CTRL_SIZE.h"
4d72283393 Mart*0037 #include "CTRL.h"
54efc7cf00 Gael*0038 #ifdef ALLOW_EXF
                0039 # include "EXF_PARAM.h"
                0040 #endif
954f010844 Gael*0041 #include "CTRL_GENARR.h"
042be14492 Patr*0042 
698b6992ee Jean*0043 C     !INPUT/OUTPUT PARAMETERS:
6b47d550f4 Mart*0044 C     myThid     :: my Thread Id number
042be14492 Patr*0045       INTEGER myThid
                0046 
698b6992ee Jean*0047 #if (defined (ALLOW_GENARR3D_CONTROL) && defined(ALLOW_PTRACERS))
                0048 C     !FUNCTIONS:
                0049       INTEGER  ILNBLNK
                0050       EXTERNAL ILNBLNK
                0051 #endif
                0052 
                0053 C     !LOCAL VARIABLES:
6b47d550f4 Mart*0054 C     msgBuf     :: Informational/error message buffer
042be14492 Patr*0055       CHARACTER*(MAX_LEN_MBUF) msgBuf
698b6992ee Jean*0056       INTEGER errCount
                0057 #if ( defined ALLOW_GENARR2D_CONTROL || defined ALLOW_GENARR3D_CONTROL || defined ALLOW_GENTIM2D_CONTROL )
9f5240b52a Jean*0058       INTEGER iarr
                0059 #endif
                0060 #if ( defined ALLOW_GENARR2D_CONTROL || defined ALLOW_GENARR3D_CONTROL )
                0061       INTEGER k2
954f010844 Gael*0062 #endif
698b6992ee Jean*0063 #if ( defined ALLOW_GENARR3D_CONTROL && defined ALLOW_PTRACERS )
                0064       INTEGER iLen, iPtr, ascii_1
                0065 #endif
cf705a6c8e Mart*0066 #ifdef ECCO_CTRL_DEPRECATED
                0067       INTEGER ioUnit
                0068       CHARACTER*(16) w_sfx
                0069 #endif
698b6992ee Jean*0070 CEOP
954f010844 Gael*0071 
698b6992ee Jean*0072 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
                0073 
                0074       _BEGIN_MASTER(myThid)
                0075       errCount = 0
                0076 
                0077       WRITE(msgBuf,'(2A)') 'CTRL_CHECK: ',
                0078      &                     ' --> Starts to check CTRL set-up'
042be14492 Patr*0079       CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
d592a6ea2a Jean*0080      &                    SQUEEZE_RIGHT, myThid )
042be14492 Patr*0081 
                0082 #ifdef ALLOW_TANGENTLINEAR_RUN
698b6992ee Jean*0083       IF ( yadmark .NE. 'g_' ) THEN
                0084         WRITE(msgBuf,'(A)')
042be14492 Patr*0085      &        'yadmark very likely wrong in data.ctrl for case '
698b6992ee Jean*0086         CALL PRINT_ERROR( msgBuf, myThid )
                0087         WRITE(msgBuf,'(A)')
042be14492 Patr*0088      &        'ALLOW_TANGENTLINEAR_RUN; should be g_ '
698b6992ee Jean*0089         CALL PRINT_ERROR( msgBuf, myThid )
                0090         errCount = errCount + 1
                0091       ENDIF
d592a6ea2a Jean*0092 #endif
                0093 
6b47d550f4 Mart*0094 #ifdef ALLOW_GENTIM2D_CONTROL
cf705a6c8e Mart*0095       IF ( .NOT.useCAL ) THEN
6b47d550f4 Mart*0096         WRITE(msgBuf,'(2A)') '** WARNING ** CTRL_CHECK: ',
00f81e6785 Ou W*0097      &    'ALLOW_GENTIM2D_CONTROL is unsafe'
                0098      &    //' without pkg/cal (currently: useCAL=F)'
6b47d550f4 Mart*0099         CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
                0100      &                      SQUEEZE_RIGHT, myThid )
                0101       ENDIF
                0102 #endif
                0103 
954f010844 Gael*0104 #ifndef ALLOW_OPENAD
                0105 
                0106 #ifdef ALLOW_GENARR2D_CONTROL
698b6992ee Jean*0107       DO iarr = 1, maxCtrlArr2D
                0108         IF (((xx_genarr2d_weight(iarr).NE.' ').AND.
954f010844 Gael*0109      &         (xx_genarr2d_file(iarr).EQ.' ')).OR.
                0110      &        ((xx_genarr2d_weight(iarr).EQ.' ').AND.
698b6992ee Jean*0111      &         (xx_genarr2d_file(iarr).NE.' '))) THEN
                0112           WRITE(msgBuf,'(3A)') 'CTRL_CHECK: ',
954f010844 Gael*0113      &      'Cannot define xx_genarr2d_weight or xx_genarr2d_file ',
                0114      &      'separately'
698b6992ee Jean*0115           CALL PRINT_ERROR( msgBuf, myThid )
                0116           errCount = errCount + 1
                0117         ENDIF
                0118       ENDDO
                0119 #endif /* ALLOW_GENARR2D_CONTROL */
954f010844 Gael*0120 
                0121 #ifdef ALLOW_GENARR3D_CONTROL
698b6992ee Jean*0122       DO iarr = 1, maxCtrlArr3D
                0123         IF (((xx_genarr3d_weight(iarr).NE.' ').AND.
954f010844 Gael*0124      &         (xx_genarr3d_file(iarr).EQ.' ')).OR.
                0125      &        ((xx_genarr3d_weight(iarr).EQ.' ').AND.
698b6992ee Jean*0126      &         (xx_genarr3d_file(iarr).NE.' '))) THEN
                0127           WRITE(msgBuf,'(3A)') 'CTRL_CHECK: ',
954f010844 Gael*0128      &      'Cannot define xx_genarr3d_weight or xx_genarr3d_file ',
                0129      &      'separately'
698b6992ee Jean*0130           CALL PRINT_ERROR( msgBuf, myThid )
                0131           errCount = errCount + 1
                0132         ENDIF
                0133       ENDDO
                0134 # ifdef ALLOW_PTRACERS
                0135 C     Check for valid gen-ctrl file name that mactch a ptracer index
                0136       IF ( usePTRACERS ) THEN
                0137         DO iarr = 1, maxCtrlArr3D
                0138           iLen = ILNBLNK(xx_genarr3d_file(iarr))
                0139           IF ( iLen.EQ.7 .AND.
                0140      &         xx_genarr3d_file(iarr)(1:6).EQ.'xx_ptr' ) THEN
                0141             ascii_1 = ICHAR( xx_genarr3d_file(iarr)(7:7) )
                0142 C     character 0 to 9 <-> 48 to 57
                0143             IF ( ascii_1.GE.49 .AND. ascii_1.LE.57 ) THEN
                0144               READ(xx_genarr3d_file(iarr)(7:7),*) iPtr
                0145               WRITE(msgBuf,'(2A,I4,A)') 'CTRL_CHECK: ',
                0146      &              'pTracer #', iPtr, ' in Gen-CTRL'
                0147               CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
                0148      &                            SQUEEZE_RIGHT, myThid )
                0149             ELSE
                0150               WRITE(msgBuf,'(4A)') 'CTRL_CHECK: ',
                0151      &          'Gen-CTRL file "', xx_genarr3d_file(iarr)(1:iLen), '"'
                0152               CALL PRINT_ERROR( msgBuf, myThid )
                0153               WRITE(msgBuf,'(2A,I3,A)') 'CTRL_CHECK:  <-- ',
                0154      &             'do not match any pTr number (ascii=', ascii_1, ')'
                0155               CALL PRINT_ERROR( msgBuf, myThid )
                0156               errCount = errCount + 1
                0157             ENDIF
                0158           ENDIF
                0159         ENDDO
                0160       ENDIF
                0161 # endif /* ALLOW_PTRACERS */
                0162 #endif /* ALLOW_GENARR3D_CONTROL */
954f010844 Gael*0163 
                0164 #ifdef ALLOW_GENTIM2D_CONTROL
698b6992ee Jean*0165       DO iarr = 1, maxCtrlTim2D
                0166         IF (((xx_gentim2d_weight(iarr).NE.' ').AND.
954f010844 Gael*0167      &         (xx_gentim2d_file(iarr).EQ.' ')).OR.
                0168      &        ((xx_gentim2d_weight(iarr).EQ.' ').AND.
698b6992ee Jean*0169      &         (xx_gentim2d_file(iarr).NE.' '))) THEN
                0170           WRITE(msgBuf,'(3A)') 'CTRL_CHECK: ',
954f010844 Gael*0171      &      'Cannot define xx_gentim2d_weight or xx_gentim2d_file ',
                0172      &      'separately'
698b6992ee Jean*0173           CALL PRINT_ERROR( msgBuf, myThid )
                0174           errCount = errCount + 1
                0175         ENDIF
                0176       ENDDO
                0177 #endif /* ALLOW_GENTIM2D_CONTROL */
954f010844 Gael*0178 
698b6992ee Jean*0179 #endif /* ndef ALLOW_OPENAD */
954f010844 Gael*0180 
d592a6ea2a Jean*0181 #ifdef ALLOW_DIFFKR_CONTROL
                0182 C-    to use DIFFKR_CONTROL, needs to define ALLOW_3D_DIFFKR in CPP_OPTIONS.h
698b6992ee Jean*0183 # ifndef ALLOW_3D_DIFFKR
                0184       WRITE(msgBuf,'(A)')
d592a6ea2a Jean*0185      &        'Needs to define ALLOW_3D_DIFFKR to use DIFFKR_CONTROL'
698b6992ee Jean*0186       CALL PRINT_ERROR( msgBuf, myThid )
                0187       errCount = errCount + 1
                0188 # endif
d592a6ea2a Jean*0189 #endif /* ALLOW_DIFFKR_CONTROL */
042be14492 Patr*0190 
94a8024bbe Jean*0191 #ifdef ALLOW_KAPGM_CONTROL
                0192 C-    to use KAPGM_CONTROL, needs to define GM_READ_K3D_GM in GMREDI_OPTIONS.h
                0193 # ifndef GM_READ_K3D_GM
                0194       WRITE(msgBuf,'(A)')
                0195      &        'Needs to define GM_READ_K3D_GM to use KAPGM_CONTROL'
                0196       CALL PRINT_ERROR( msgBuf, myThid )
                0197       errCount = errCount + 1
                0198 # endif
                0199 #endif /* ALLOW_KAPGM_CONTROL */
                0200 
                0201 #ifdef ALLOW_KAPREDI_CONTROL
                0202 C-    to use KAPREDI_CONTROL, needs to define GM_READ_K3D_REDI in GMREDI_OPTIONS.h
                0203 # ifndef GM_READ_K3D_REDI
                0204       WRITE(msgBuf,'(A)')
                0205      &        'Needs to define GM_READ_K3D_REDI to use KAPREDI_CONTROL'
                0206       CALL PRINT_ERROR( msgBuf, myThid )
                0207       errCount = errCount + 1
                0208 # endif
                0209 #endif /* ALLOW_KAPREDI_CONTROL */
                0210 
94069ed3c1 Gael*0211 #ifndef ALLOW_PACKUNPACK_METHOD2
                0212 # ifndef EXCLUDE_CTRL_PACK
698b6992ee Jean*0213       IF ( useSingleCpuIO ) THEN
94069ed3c1 Gael*0214         WRITE(msgBuf,'(3A)') '** WARNING ** CTRL_CHECK: ',
                0215      &        'relying on mdsio_gl.F to pack/unpack the control',
                0216      &        'vector is unsafe when useSingleCpuIO is true.'
6b47d550f4 Mart*0217         CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
94069ed3c1 Gael*0218      &  SQUEEZE_RIGHT, myThid )
698b6992ee Jean*0219       ENDIF
94069ed3c1 Gael*0220 # endif
698b6992ee Jean*0221 #endif /* ndef ALLOW_PACKUNPACK_METHOD2 */
94069ed3c1 Gael*0222 
                0223 #ifdef ALLOW_PACKUNPACK_METHOD2
698b6992ee Jean*0224 # ifndef EXCLUDE_CTRL_PACK
cda1c18f72 Jean*0225 #  ifdef ALLOW_OBCS_CONTROL
698b6992ee Jean*0226       WRITE(msgBuf,'(2A)')
94069ed3c1 Gael*0227      &        'ALLOW_PACKUNPACK_METHOD2 does not work with',
                0228      &        'open boundary controls (see verif/obcs_ctrl).'
698b6992ee Jean*0229       CALL PRINT_ERROR( msgBuf, myThid )
                0230       errCount = errCount + 1
                0231 #  endif
                0232 # endif /* ndef EXCLUDE_CTRL_PACK */
                0233 #endif /* ALLOW_PACKUNPACK_METHOD2 */
                0234 
11c3150c71 Mart*0235 #ifdef ALLOW_HFLUXM_CONTROL
                0236       WRITE(msgBuf,'(2A)') 'CTRL_CHECK: ',
                0237      &     'CPP-flag ALLOW_HFLUXM_CONTROL has been retired.'
                0238       CALL PRINT_ERROR( msgBuf, myThid )
                0239       WRITE(msgBuf,'(2A)') 'CTRL_CHECK: ',
                0240      &     'tutorial_global_oce_optim, which was the only experiment'
                0241       CALL PRINT_ERROR( msgBuf, myThid )
                0242       WRITE(msgBuf,'(2A)') 'CTRL_CHECK: ',
                0243      &     'that used this flag, now uses the generic control xx_qnet'
                0244       CALL PRINT_ERROR( msgBuf, myThid )
                0245       WRITE(msgBuf,'(2A)') 'CTRL_CHECK: ',
                0246      &     'to achieve the same thing.'
                0247       CALL PRINT_ERROR( msgBuf, myThid )
cf705a6c8e Mart*0248       errCount = errCount + 1
11c3150c71 Mart*0249 #endif /* ALLOW_HFLUXM_CONTROL */
                0250 
edcd27be69 Mart*0251 #ifdef ALLOW_HFACC_CONTROL
                0252       WRITE(msgBuf,'(2A)') 'CTRL_CHECK: ',
                0253      &     'CPP-flag ALLOW_HFACC_CONTROL has been retired.'
                0254       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0255       errCount = errCount + 1
                0256 #endif
                0257 #ifdef ALLOW_HFACC3D_CONTROL
                0258       WRITE(msgBuf,'(2A)') 'CTRL_CHECK: ',
                0259      &     'CPP-flag ALLOW_HFACC3D_CONTROL has been retired.'
                0260       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0261       errCount = errCount + 1
                0262 #endif
                0263 
7b8b86ab99 Timo*0264 #ifdef ALLOW_GENARR2D_CONTROL
edcd27be69 Mart*0265 C     doscaling must be true to do log10 ctrl
7b8b86ab99 Timo*0266       DO iarr = 1, maxCtrlArr2D
                0267         DO k2 = 1, maxCtrlProc
                0268           IF ( (xx_genarr2d_preproc(k2,iarr).EQ.'noscaling') .AND.
                0269      &       (xx_genarr2d_preproc_c(k2,iarr).EQ.'log10ctrl') ) THEN
                0270             WRITE(msgBuf,'(A)')
                0271      &      'CTRL_CHECK: conflicting preproc_c & preproc flags '
                0272             CALL PRINT_ERROR( msgBuf, myThid )
                0273             WRITE(msgBuf,'(A,I2,A)')
                0274      &      'log10ctrl and noscaling set for xx_genarr2d(',iarr,').'
                0275             CALL PRINT_ERROR( msgBuf, myThid )
cf705a6c8e Mart*0276             errCount = errCount + 1
7b8b86ab99 Timo*0277           ENDIF
                0278         ENDDO
                0279       ENDDO
                0280 # ifdef ALLOW_SHELFICE
                0281 #  ifdef SHI_ALLOW_GAMMAFRICT
                0282 C     Cannot have shiTransCoeffT/S as control variables in gammafrict form
                0283       DO iarr = 1, maxCtrlArr2D
                0284         IF ( (xx_genarr2d_file(iarr)(1:11).EQ.'xx_shicoeff')) THEN
                0285           WRITE(msgBuf,'(2A,I2,A)')
                0286      &    'shiTransCoeffT or S set as control variable for ',
                0287      &    'xx_genarr2d(', iarr,'). '
                0288           CALL PRINT_ERROR( msgBuf, myThid )
                0289           WRITE(msgBuf,'(2A)')
                0290      &    'Cannot use shiTransCoeffT/S when SHI_ALLOW_GAMMAFRICT ',
                0291      &    'is defined'
                0292           CALL PRINT_ERROR( msgBuf, myThid )
cf705a6c8e Mart*0293           errCount = errCount + 1
7b8b86ab99 Timo*0294         ENDIF
                0295       ENDDO
                0296 #  else
                0297 C     Cannot have shiCDrag as control variable without gammafrict form
                0298 C     this could be changed to control cdrag for momentum equation only,
                0299 C     but is probably not what the user wants or expects.
                0300       DO iarr = 1, maxCtrlArr2D
                0301         IF ( (xx_genarr2d_file(iarr)(1:11).EQ.'xx_shicdrag')) THEN
                0302           WRITE(msgBuf,'(2A,I2,A)')
                0303      &    'shiCDrag set as control variable for ',
                0304      &    'xx_genarr2d(', iarr,'). '
                0305           CALL PRINT_ERROR( msgBuf, myThid )
                0306           WRITE(msgBuf,'(2A)')
                0307      &    'Cannot use shiCDrag when SHI_ALLOW_GAMMAFRICT ',
                0308      &    'is NOT defined'
                0309           CALL PRINT_ERROR( msgBuf, myThid )
cf705a6c8e Mart*0310           errCount = errCount + 1
7b8b86ab99 Timo*0311         ENDIF
                0312       ENDDO
                0313 #  endif /* SHI_ALLOW_GAMMAFRICT */
                0314 # endif /* ALLOW_SHELFICE */
                0315 #endif /* ALLOW_GENARR2D_CONTROL */
                0316 
                0317 #ifdef ALLOW_GENARR3D_CONTROL
edcd27be69 Mart*0318 C     doscaling must be true to do log10 ctrl
7b8b86ab99 Timo*0319       DO iarr = 1, maxCtrlArr3D
                0320         DO k2 = 1, maxCtrlProc
                0321           IF ( (xx_genarr3d_preproc(k2,iarr).EQ.'noscaling') .AND.
                0322      &       (xx_genarr3d_preproc_c(k2,iarr).EQ.'log10ctrl') ) THEN
                0323             WRITE(msgBuf,'(A)')
                0324      &      'CTRL_CHECK: conflicting preproc_c & preproc flags '
                0325             CALL PRINT_ERROR( msgBuf, myThid )
                0326             WRITE(msgBuf,'(A,I2,A)')
                0327      &      'log10ctrl and noscaling set for xx_genarr2d(',iarr,'). '
                0328             CALL PRINT_ERROR( msgBuf, myThid )
cf705a6c8e Mart*0329             errCount = errCount + 1
7b8b86ab99 Timo*0330           ENDIF
                0331         ENDDO
                0332       ENDDO
                0333 #endif
                0334 
cf705a6c8e Mart*0335 #ifdef ECCO_CTRL_DEPRECATED
                0336       WRITE(msgBuf,'(2A)') 'CTRL_CHECK: CPP-flag ECCO_CTRL_DEPRECATED',
                0337      &                     ' is no longer available.'
                0338       CALL PRINT_ERROR( msgBuf, myThid )
                0339       ioUnit = errorMessageUnit
                0340       w_sfx = '** WARNING ** : '
                0341       WRITE(msgBuf,'(2A)') '** WARNING ** CTRL_CHECK: ',
                0342      &     'Along with ECCO_CTRL_DEPRECATED a long list'
                0343       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0344       WRITE(msgBuf,'(2A)') '** WARNING ** CTRL_CHECK: ',
                0345      &     ' of CPP-flags have no effect anymore:'
                0346       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0347 C---- long list starts
                0348       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_APRESSURE_CONTROL'
                0349       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0350       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_APRESSURE_COST_CONTRIBUTION'
                0351       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0352       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_AQH_CONTROL'
                0353       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0354       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_ARGO_SALT_COST_CONTRIBUTION'
                0355       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0356       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_ARGO_THETA_COST_CONTRIBUTION'
                0357       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0358       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_ATEMP_CONTROL'
                0359       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0360       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_ATM_MEAN_CONTROL'
                0361       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0362       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_AUTODIFF_INIT_OLD'
                0363       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0364       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_BOTTOMDRAG_CONTROL_NONGENERIC'
                0365       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0366       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_BOTTOMDRAG_COST_CONTRIBUTION'
                0367       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0368       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_BP_COST_CONTRIBUTION'
                0369       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0370       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_CTDS_COST_CONTRIBUTION'
                0371       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0372       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_CTDT_COST_CONTRIBUTION'
                0373       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0374       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_CTRL_SMOOTH'
                0375       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0376       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_DAILYSCAT_COST_CONTRIBUTION'
                0377       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0378       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_DAILYSST_COST_CONTRIBUTION'
                0379       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0380 c     WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_diffkr_COST_CONTRIBUTION'
                0381       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_DIFFKR_COST_CONTRIBUTION'
                0382       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0383       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_DRIFTER_COST_CONTRIBUTION'
                0384       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0385       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_DRIFTW_COST_CONTRIBUTION'
                0386       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0387 c     WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_ECCO_DIAGNOSTIC_RUN'
                0388 c     WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_ECCO_FORWARD_RUN'
                0389       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_EDDYPSI_COST_CONTRIBUTION'
                0390       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0391       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_EFLUXY0_CONTROL'
                0392       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0393 c     WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_EGM96_ERROR_COV'
                0394       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_EGM96_ERROR_DIAG'
                0395       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0396       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_ETAN0_COST_CONTRIBUTION'
                0397       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0398       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_EVAP_CONTROL'
                0399       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0400       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_EVAP_COST_CONTRIBUTION'
                0401       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0402       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_GEN2D_CONTROL'
                0403       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0404       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_GEN3D_CONTROL'
                0405       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0406 c     WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_GRADIENT_CHECK'
                0407       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_HFLUX_COST_CONTRIBUTION'
                0408       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0409       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_IESTAU_COST_CONTRIBUTION'
                0410       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0411       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_KAPGM_COST_CONTRIBUTION'
                0412       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0413       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_KAPREDI_COST_CONTRIBUTION'
                0414       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0415       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_LWDOWN_CONTROL'
                0416       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0417       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_LWDOWN_COST_CONTRIBUTION'
                0418       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0419       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_LWFLUX_CONTROL'
                0420       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0421       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_LWFLUX_COST_CONTRIBUTION'
                0422       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0423       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_MEAN_HFLUX_COST_CONTRIBUTION'
                0424       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0425       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_NEW_SSH_COST'
                0426       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0427 c     WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_NO_DYNAMICS'
                0428       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_PRECIP_CONTROL'
                0429       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0430       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_PRECIP_COST_CONTRIBUTION'
                0431       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0432 c     WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_READ_EGM_DATA'
                0433       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_RELAXSSS_CONTROL'
                0434       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0435       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_RELAXSST_CONTROL'
                0436       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0437       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_RUNOFF_CONTROL'
                0438       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0439       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_RUNOFF_COST_CONTRIBUTION'
                0440       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0441       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_SALT0_COST_CONTRIBUTION'
                0442       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0443       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_SALT_COST_CONTRIBUTION'
                0444       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0445       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_SCAT_COST_CONTRIBUTION'
                0446       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0447       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_SFLUX_COST_CONTRIBUTION'
                0448       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0449       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_SMOOTH_BC_COST_CONTRIBUTION'
                0450       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0451       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_SMOOTH_CTRL3D'
                0452       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0453       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_SNOWPRECIP_CONTROL'
                0454       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0455       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_SNOWPRECIP_COST_CONTRIBUTION'
                0456       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0457 c     WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_SPH_PROJECTION'
                0458       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_SSH_COST_CONTRIBUTION'
                0459       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0460       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_SSH_ERSANOM_COST_CONTRIBUTION'
                0461       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0462       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_SSH_GFOANOM_COST_CONTRIBUTION'
                0463       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0464       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_SSH_MEAN_COST_CONTRIBUTION'
                0465       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0466       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_SSH_TOT'
                0467       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0468       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_SSH_TPANOM_COST_CONTRIBUTION'
                0469       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0470       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_SSHV4_COST'
                0471       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0472       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_SSS_CONTROL'
                0473       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0474       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_SSS_COST_CONTRIBUTION'
                0475       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0476       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_SST_CONTROL'
                0477       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0478       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_SST_COST_CONTRIBUTION'
                0479       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0480 c     WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_STEPPING_CALL'
                0481       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_STRESS_MEAN_COST_CONTRIBUTION'
                0482       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0483       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_SWDOWN_CONTROL'
                0484       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0485       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_SWDOWN_COST_CONTRIBUTION'
                0486       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0487       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_SWFLUX_CONTROL'
                0488       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0489       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_SWFLUX_COST_CONTRIBUTION'
                0490       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0491       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_THETA0_COST_CONTRIBUTION'
                0492       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0493       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_THETA_COST_CONTRIBUTION'
                0494       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0495       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_TMI_SST_COST_CONTRIBUTION'
                0496       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0497       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_TRANSPORT_COST_CONTRIBUTION'
                0498       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0499       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_USTRESS_COST_CONTRIBUTION'
                0500       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0501       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_UVEL0_COST_CONTRIBUTION'
                0502       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0503       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_UWIND_CONTROL'
                0504       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0505       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_UWIND_COST_CONTRIBUTION'
                0506       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0507       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_VSTRESS_COST_CONTRIBUTION'
                0508       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0509       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_VVEL0_COST_CONTRIBUTION'
                0510       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0511       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_VWIND_CONTROL'
                0512       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0513       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_VWIND_COST_CONTRIBUTION'
                0514       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0515       WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_XBT_COST_CONTRIBUTION'
                0516       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0517 c     WRITE(msgBuf,'(2A)') w_sfx, 'ALLOW_YMDS_TREE'
                0518 c     WRITE(msgBuf,'(2A)') w_sfx, 'APPLY_HFLUX_COST_CONTRIBUTION'
                0519 c     WRITE(msgBuf,'(2A)') w_sfx, 'APPLY_SALT_COST_CONTRIBUTION'
                0520 c     WRITE(msgBuf,'(2A)') w_sfx, 'APPLY_SFLUX_COST_CONTRIBUTION'
                0521 c     WRITE(msgBuf,'(2A)') w_sfx, 'APPLY_SSH_COST_CONTRIBUTION'
                0522 c     WRITE(msgBuf,'(2A)') w_sfx, 'APPLY_SST_COST_CONTRIBUTION'
                0523 c     WRITE(msgBuf,'(2A)') w_sfx, 'APPLY_THETA_COST_CONTRIBUTION'
                0524 c     WRITE(msgBuf,'(2A)') w_sfx, 'APPLY_USTRESS_COST_CONTRIBUTION'
                0525 c     WRITE(msgBuf,'(2A)') w_sfx, 'APPLY_VSTRESS_COST_CONTRIBUTION'
                0526       WRITE(msgBuf,'(2A)') w_sfx, 'DISABLE_CTRL_THETA_LIMIT'
                0527       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0528       WRITE(msgBuf,'(2A)') w_sfx, 'GENERIC_BAR_MONTH'
                0529       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0530 C---- long list ends
                0531       WRITE(msgBuf,'(2A)') '** WARNING ** CTRL_CHECK: ',
                0532      &     'end of CPP-flag list that have no effect anymore.'
                0533       CALL PRINT_MESSAGE( msgBuf, ioUnit, SQUEEZE_RIGHT, myThid )
                0534       errCount = errCount + 1
                0535 #endif /* ECCO_CTRL_DEPRECATED */
                0536 
                0537       IF ( errCount.GE.1 ) THEN
                0538         WRITE(msgBuf,'(A,I3,A)')
                0539      &       'CTRL_CHECK: detected', errCount,' fatal error(s)'
                0540         CALL PRINT_ERROR( msgBuf, myThid )
                0541         CALL ALL_PROC_DIE( 0 )
                0542         STOP 'ABNORMAL END: S/R CTRL_CHECK'
                0543       ENDIF
                0544 
                0545       WRITE(msgBuf,'(2A)') 'CTRL_CHECK: ',
                0546      &                     ' <-- Ends Normally'
                0547       CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
                0548      &                    SQUEEZE_RIGHT, myThid )
                0549       WRITE(msgBuf,'(2A)') ' '
                0550       CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
                0551      &                    SQUEEZE_RIGHT, myThid )
                0552       _END_MASTER(myThid)
                0553 
99fb70dae5 Jean*0554       RETURN
                0555       END