Back to home page

MITgcm

 
 

    


File indexing completed on 2026-03-19 05:08:29 UTC

view on githubraw file Latest commit 69361556 on 2026-03-18 21:20:20 UTC
5ed655852f Jean*0001 #include "COST_OPTIONS.h"
042be14492 Patr*0002 
                0003       SUBROUTINE COST_CHECK( myThid )
93486f2c0a Jean*0004 C     *==========================================================*
042be14492 Patr*0005 C     | SUBROUTINE CTRK_CHECK                                    |
                0006 C     | o Validate basic package setup and inter-package         |
                0007 C     | dependencies.                                            |
93486f2c0a Jean*0008 C     *==========================================================*
042be14492 Patr*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 ===
f40bb882f5 Jean*0017 C     myThid  :: my Thread Id number
042be14492 Patr*0018       INTEGER myThid
                0019 
                0020 C     === Local variables ===
f40bb882f5 Jean*0021 C     nRetired :: Counter used to trap gracefully "retired" option & parameters
                0022 C     msgBuf   :: Informational/error message buffer
                0023       INTEGER nRetired
042be14492 Patr*0024       CHARACTER*(MAX_LEN_MBUF) msgBuf
                0025 
f40bb882f5 Jean*0026       _BEGIN_MASTER(myThid)
                0027       nRetired = 0
                0028 
f2680b33e6 Gael*0029       WRITE(msgBuf,'(A)') 'COST_CHECK: #define ALLOW_COST'
042be14492 Patr*0030       CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
93486f2c0a Jean*0031      &                    SQUEEZE_RIGHT, myThid )
                0032 
f40bb882f5 Jean*0033 #ifdef ALLOW_COST_TRANSPORT
                0034         WRITE(msgBuf,'(2A)') 'COST_CHECK: ',
                0035      &    'ALLOW_COST_TRANSPORT not allowed anymore in COST_OPTIONS.h'
                0036         CALL PRINT_ERROR( msgBuf, myThid )
                0037         nRetired = nRetired + 1
                0038 #endif
                0039 #ifdef ALLOW_COST_ATLANTIC
                0040         WRITE(msgBuf,'(2A)') 'COST_CHECK: ',
                0041      &    'ALLOW_COST_ATLANTIC not allowed anymore in COST_OPTIONS.h'
                0042         CALL PRINT_ERROR( msgBuf, myThid )
                0043         nRetired = nRetired + 1
                0044 #endif
69361556c2 Mart*0045 #ifdef ALLOW_COST_DEPTH
                0046         WRITE(msgBuf,'(2A)') 'COST_CHECK: ',
                0047      &    'ALLOW_COST_DEPTH not allowed anymore in COST_OPTIONS.h'
                0048         CALL PRINT_ERROR( msgBuf, myThid )
                0049         nRetired = nRetired + 1
                0050 #endif
f40bb882f5 Jean*0051 
                0052       IF ( nRetired .GT. 0 ) THEN
                0053         WRITE(msgBuf,'(2A)') 'S/R COST_CHECK: ',
                0054      &   'retired compile-time options need to be undefined'
                0055         CALL PRINT_ERROR( msgBuf, myThid )
                0056         CALL ALL_PROC_DIE( 0 )
                0057         STOP 'ABNORMAL END: S/R COST_CHECK'
                0058       ENDIF
                0059 
                0060       _END_MASTER(myThid)
e20b49665f Mart*0061 
93486f2c0a Jean*0062       RETURN
                0063       END