Back to home page

MITgcm

 
 

    


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

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