File indexing completed on 2024-05-25 05:11:12 UTC
view on githubraw file Latest commit 00f81e67 on 2024-05-24 21:00:12 UTC
00f81e6785 Ou W*0001 #include "STIC_OPTIONS.h"
0002
0003
0004
0005
0006
0007
0008 SUBROUTINE STIC_CHECK( myThid )
0009
0010
0011
0012
0013
0014 IMPLICIT NONE
0015
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
0025
0026 INTEGER myThid
0027
0028
0029
0030 INTEGER ILNBLNK
0031 EXTERNAL ILNBLNK
0032
0033
0034
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
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
0052
0053 IF ( .NOT. useSHELFICE ) THEN
0054 #ifndef ALLOW_SHELFICE
0055 WRITE(msgBuf,'(A)')
0056 & 'pkg/steep_icecavity requires pkg/shelfice,'
0057 CALL PRINT_ERROR( msgBuf, myThid )
0058 WRITE(msgBuf,'(A)')
0059 & 'please add shelfice to packages.conf'
0060 CALL PRINT_ERROR( msgBuf, myThid )
0061 errCount = errCount + 1
0062 #endif
0063 WRITE(msgBuf,'(A)')
0064 & 'pkg/steep_icecavity requires useShelfIce = T, '//
0065 & 'set useShelfIce = .TRUE., in data.pkg'
0066 CALL PRINT_ERROR( msgBuf, myThid )
0067 errCount = errCount + 1
0068 ELSE
0069 #ifdef ALLOW_SHELFICE
0070 IF ( STICdepthFile .NE. SHELFICEtopoFile ) THEN
0071 iL = ILNBLNK(STICdepthFile)
0072 jL = ILNBLNK(SHELFICEtopoFile)
0073 WRITE(msgBuf,'(6A)') '** WARNING ** STIC_CHECK: ',
0074 & 'STICdepthFile = ''', STICdepthFile(1:iL),
0075 & ''' .NE. SHELFICEtopoFile = ''',
0076 & SHELFICEtopoFile(1:jL), ''''
0077 CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
0078 & SQUEEZE_RIGHT, myThid )
0079 ENDIF
0080 IF ( SHELFICEboundaryLayer ) THEN
0081 WRITE(msgBuf,'(A,A)')
0082 & 'pkg/steep_icecavity requires SHELFICEboundaryLayer = F, ',
0083 & 'remove SHELFICEboundaryLayer = .TRUE., in data.shelfice'
0084 CALL PRINT_ERROR( msgBuf, myThid )
0085 errCount = errCount + 1
0086 ENDIF
0087 #endif
0088 ENDIF
0089
0090 #ifndef ALLOW_ADDFLUID
0091 WRITE(msgBuf,'(A,A)')
0092 & 'pkg/steep_icecavity requires'
0093 & 'CPP flag ALLOW_ADDFLUID to be defined'
0094 CALL PRINT_ERROR( msgBuf, myThid )
0095 errCount = errCount + 1
0096 #endif
0097
0098 IF ( errCount.GE.1 ) THEN
0099 WRITE(msgBuf,'(A,I3,A)')
0100 & 'STIC_CHECK: detected', errCount,' fatal error(s)'
0101 CALL PRINT_ERROR( msgBuf, myThid )
0102 CALL ALL_PROC_DIE( 0 )
0103 STOP 'ABNORMAL END: S/R STIC_CHECK'
0104 ENDIF
0105
0106 _END_MASTER(myThid)
0107
0108 RETURN
0109 END