Back to home page

MITgcm

 
 

    


File indexing completed on 2024-11-21 06:10:48 UTC

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