Back to home page

MITgcm

 
 

    


File indexing completed on 2018-03-02 18:42:24 UTC

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
08be60903a Mart*0001 #include "MY82_OPTIONS.h"
                0002 
                0003       SUBROUTINE MY82_CHECK( myThid )
                0004 C     /==========================================================\
                0005 C     | SUBROUTINE MY82_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 MY82_CHECK
                0018       INTEGER myThid
                0019 
                0020 #ifdef ALLOW_MY82
                0021 
                0022 C     === Local variables ===
                0023 C     msgBuf      - Informational/error meesage buffer
                0024       CHARACTER*(MAX_LEN_MBUF) msgBuf
                0025 
                0026       WRITE(msgBuf,'(A)') 'MY82_CHECK: #define ALLOW_MY82'
                0027       CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
                0028      &     SQUEEZE_RIGHT , 1)
                0029 
c03c7c94fb Mart*0030 C     So far, MY82 works only with oceanic z-coordinates
                0031       IF ( buoyancyRelation .NE. 'OCEANIC' ) THEN
                0032          WRITE(msgBuf,'(A)')
                0033      &      'MY82 works only with buoyancyRelation = ''OCEANIC'''
                0034          CALL PRINT_ERROR( msgBuf , 1)
                0035          STOP 'ABNORMAL END: S/R MY82_CHECK'
                0036       ENDIF
                0037 
08be60903a Mart*0038 C     MY82 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 MY82_CHECK'
                0044       ENDIF
                0045 
                0046       IF ( useKPP ) THEN
                0047          WRITE(msgBuf,'(A)')
                0048      &      'MY82 and KPP cannot be turned on at the same time'
                0049          CALL PRINT_ERROR( msgBuf , 1)
                0050          STOP 'ABNORMAL END: S/R MY82_CHECK'
                0051       ENDIF
                0052 
                0053       IF ( usePP81 ) THEN
                0054          WRITE(msgBuf,'(A)') 
                0055      &      'MY82 and PP81 cannot be turned on at the same time'
                0056          CALL PRINT_ERROR( msgBuf , 1)
                0057          STOP 'ABNORMAL END: S/R MY82_CHECK'
                0058       ENDIF
                0059 
                0060 C     MY82 needs implicit vertical diffusion and viscosity
                0061       IF (.NOT.implicitDiffusion ) THEN
                0062          WRITE(msgBuf,'(A)') 
                0063      &      'MY82 needs implicitDiffusion to be enabled'
                0064          CALL PRINT_ERROR( msgBuf , 1)
                0065          STOP 'ABNORMAL END: S/R MY82_CHECK'
                0066       ENDIF
                0067       IF (.NOT.implicitViscosity) THEN
                0068          WRITE(msgBuf,'(A)') 
                0069      &      'MY82 needs implicitViscosity to be enabled'
                0070          CALL PRINT_ERROR( msgBuf , 1)
                0071          STOP 'ABNORMAL END: S/R MY82_CHECK'
                0072       ENDIF
                0073 
                0074 #endif /* ALLOW_MY82 */
                0075 
                0076       return
                0077       end