Back to home page

MITgcm

 
 

    


File indexing completed on 2026-11-05 06:08:48 UTC

view on githubraw file Latest commit 501756fd on 2026-11-04 20:50:32 UTC
00f81e6785 Ou W*0001 #include "STIC_OPTIONS.h"
                0002 
                0003 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
                0004 CBOP
                0005 C !ROUTINE: STIC_CHECK
                0006 
                0007 C !INTERFACE:
                0008       SUBROUTINE STIC_CHECK( myThid )
                0009 
                0010 C     !DESCRIPTION:
                0011 C     Check dependances with other packages
                0012 
                0013 C     !USES:
                0014       IMPLICIT NONE
                0015 C     == Global variables ===
                0016 #include "SIZE.h"
                0017 #include "EEPARAMS.h"
                0018 #include "PARAMS.h"
                0019 #include "STIC.h"
                0020 #ifdef ALLOW_SHELFICE
                0021 # include "SHELFICE.h"
                0022 #endif
                0023 
                0024 C     !INPUT PARAMETERS:
                0025 C     myThid   :: my Thread Id number
                0026       INTEGER myThid
                0027 CEOP
                0028 
                0029 C     !FUNCTIONS:
                0030       INTEGER  ILNBLNK
                0031       EXTERNAL ILNBLNK
                0032 
                0033 C     !LOCAL VARIABLES:
                0034 C     msgBuf   :: Informational/error message buffer
                0035       CHARACTER*(MAX_LEN_MBUF) msgBuf
                0036       INTEGER errCount, iL, jL
                0037 
                0038       _BEGIN_MASTER(myThid)
                0039       errCount = 0
                0040 
                0041        WRITE(msgBuf,'(A)') 'STIC_CHECK: #define STEEP_ICECAVITY'
                0042        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
                0043      &                     SQUEEZE_RIGHT, myThid )
                0044 
                0045 C--  Print out some kee parameters :
                0046        CALL WRITE_0D_C( STIClengthFile,-1,INDEX_NONE,'STIClengthFile =',
                0047      &  ' /* file name of ice front lengths */')
                0048        CALL WRITE_0D_C( STICdepthFile,-1,INDEX_NONE,'STICdepthFile =',
                0049      &  ' /* file name of ice front depths */')
                0050 
                0051 C--  Check parameters:
                0052 
                0053        IF ( .NOT. useSHELFICE ) THEN
501756fde4 Ou W*0054         WRITE(msgBuf,'(2A)')
                0055      &       'pkg/steep_icecavity requires useShelfIce = T, ',
00f81e6785 Ou W*0056      &       'set useShelfIce = .TRUE., in data.pkg'
                0057         CALL PRINT_ERROR( msgBuf, myThid )
                0058         errCount = errCount + 1
                0059        ELSE
                0060         IF ( STICdepthFile .NE. SHELFICEtopoFile ) THEN
                0061          iL = ILNBLNK(STICdepthFile)
                0062          jL = ILNBLNK(SHELFICEtopoFile)
                0063          WRITE(msgBuf,'(6A)') '** WARNING ** STIC_CHECK: ',
                0064      &        'STICdepthFile = ''', STICdepthFile(1:iL),
                0065      &        ''' .NE. SHELFICEtopoFile = ''',
                0066      &        SHELFICEtopoFile(1:jL), ''''
                0067          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
                0068      &                       SQUEEZE_RIGHT, myThid )
                0069         ENDIF
                0070         IF ( SHELFICEboundaryLayer ) THEN
                0071          WRITE(msgBuf,'(A,A)')
                0072      &     'pkg/steep_icecavity requires SHELFICEboundaryLayer = F, ',
                0073      &     'remove SHELFICEboundaryLayer = .TRUE., in data.shelfice'
                0074          CALL PRINT_ERROR( msgBuf, myThid )
                0075          errCount = errCount + 1
                0076         ENDIF
                0077        ENDIF
                0078 
                0079 #ifndef ALLOW_ADDFLUID
501756fde4 Ou W*0080        WRITE(msgBuf,'(2A)')
                0081      &      'pkg/steep_icecavity requires ',
00f81e6785 Ou W*0082      &      'CPP flag ALLOW_ADDFLUID to be defined'
                0083        CALL PRINT_ERROR( msgBuf, myThid )
                0084        errCount = errCount + 1
                0085 #endif
                0086 
                0087       IF ( errCount.GE.1 ) THEN
                0088         WRITE(msgBuf,'(A,I3,A)')
                0089      &       'STIC_CHECK: detected', errCount,' fatal error(s)'
                0090         CALL PRINT_ERROR( msgBuf, myThid )
                0091         CALL ALL_PROC_DIE( 0 )
                0092         STOP 'ABNORMAL END: S/R STIC_CHECK'
                0093       ENDIF
                0094 
                0095       _END_MASTER(myThid)
                0096 
                0097       RETURN
                0098       END