Back to home page

MITgcm

 
 

    


File indexing completed on 2018-03-02 18:41:32 UTC

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
d8d1486ca1 Jean*0001 #include "KL10_OPTIONS.h"
                0002 
                0003       SUBROUTINE KL10_CHECK( myThid )
                0004 C     /==========================================================\
                0005 C     | SUBROUTINE KL10_CHECK                                    |
                0006 C     | o Validate basic package setup and inter-package         |
                0007 C     | dependencies.                                            |
                0008 C     \==========================================================/
                0009       IMPLICIT NONE
                0010 
                0011 C     === Global variables ===
                0012 #include "SIZE.h"
                0013 #include "EEPARAMS.h"
                0014 #include "PARAMS.h"
                0015 
                0016 C     === Routine arguments ===
                0017 C     myThid -  Number of this instance of KL10_CHECK
                0018       INTEGER myThid
                0019 
                0020 #ifdef ALLOW_KL10
                0021 
                0022 C     === Local variables ===
                0023 C     msgBuf      - Informational/error message buffer
                0024       CHARACTER*(MAX_LEN_MBUF) msgBuf
                0025 
                0026       WRITE(msgBuf,'(A)') 'KL10_CHECK: #define ALLOW_KL10'
                0027       CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
                0028      &     SQUEEZE_RIGHT , 1)
                0029 
                0030 C     So far, KL10 works only with oceanic z-coordinates
                0031       IF ( buoyancyRelation .NE. 'OCEANIC' ) THEN
                0032          WRITE(msgBuf,'(A)')
                0033      &      'KL10 works only with buoyancyRelation = ''OCEANIC'''
                0034          CALL PRINT_ERROR( msgBuf , 1)
                0035          STOP 'ABNORMAL END: S/R KL10_CHECK'
                0036       ENDIF
                0037 
                0038 C     KL10 needs convection turned off (will be packaged later)
                0039       IF (cAdjFreq.NE.0.  .OR.
                0040      &     ivdc_kappa.NE.0. ) THEN
                0041          WRITE(msgBuf,'(A)') 'Some form of convection has been enabled'
                0042          CALL PRINT_ERROR( msgBuf , 1)
                0043          STOP 'ABNORMAL END: S/R KL10_CHECK'
                0044       ENDIF
                0045 
                0046 C TODO: JMK: Check if this is really necessary.  I don't see why they can't
                0047 C co-exist
                0048 C      IF ( useKPP ) THEN
                0049 C         WRITE(msgBuf,'(A)')
                0050 C     &      'KL10 and KPP cannot be turned on at the same time'
                0051 C         CALL PRINT_ERROR( msgBuf , 1)
                0052 C         STOP 'ABNORMAL END: S/R KL10_CHECK'
                0053 C      ENDIF
                0054 
                0055 C     KL10 needs implicit vertical diffusion and viscosity
                0056       IF (.NOT.implicitDiffusion ) THEN
                0057          WRITE(msgBuf,'(A)')
                0058      &      'KL10 needs implicitDiffusion to be enabled'
                0059          CALL PRINT_ERROR( msgBuf , 1)
                0060          STOP 'ABNORMAL END: S/R KL10_CHECK'
                0061       ENDIF
                0062       IF (.NOT.implicitViscosity) THEN
                0063          WRITE(msgBuf,'(A)')
                0064      &      'KL10 needs implicitViscosity to be enabled'
                0065          CALL PRINT_ERROR( msgBuf , 1)
                0066          STOP 'ABNORMAL END: S/R KL10_CHECK'
                0067       ENDIF
                0068 
                0069 #endif /* ALLOW_KL10 */
                0070 
                0071       return
                0072       end