Back to home page

MITgcm

 
 

    


File indexing completed on 2022-01-06 06:13:23 UTC

view on githubraw file Latest commit 9f5240b5 on 2022-01-05 15:24:45 UTC
7b8b86ab99 Timo*0001 #include "SMOOTH_OPTIONS.h"
                0002 
                0003 CBOP
                0004 C     !ROUTINE: SMOOTH_CHECK
                0005 C     !INTERFACE:
                0006       SUBROUTINE SMOOTH_CHECK( myThid )
                0007 C     !DESCRIPTION: \bv
                0008 C     *==========================================================*
                0009 C     | S/R SMOOTH_CHECK
                0010 C     | o Checks for inconsistencies in the smooth package
                0011 C     *==========================================================*
                0012 C     \ev
                0013 
                0014 C     !USES:
                0015       IMPLICIT NONE
                0016 C     == global variables ==
                0017 #include "EEPARAMS.h"
                0018 #include "SIZE.h"
                0019 #include "SMOOTH.h"
                0020 
                0021 C     !INPUT/OUTPUT PARAMETERS:
                0022       INTEGER myThid
                0023 
                0024 C     !LOCAL VARIABLES:
                0025 C     msgBuf      :: Informational/error message buffer
                0026       CHARACTER*(MAX_LEN_MBUF) msgBuf
                0027       INTEGER smoothOpNb
                0028 CEOP
                0029 
                0030 C --- Check for legal mask names
                0031       DO smoothOpNb=1,smoothOpNbMax
                0032         IF ( .NOT.(
                0033      &       (smooth2DmaskName(smoothOpNb)(1:5).EQ.'maskC').OR.
                0034      &       (smooth2DmaskName(smoothOpNb)(1:5).EQ.'maskW').OR.
                0035      &       (smooth2DmaskName(smoothOpNb)(1:5).EQ.'maskS').OR.
                0036      &       (smooth2DmaskName(smoothOpNb)(1:5).EQ.'maskI'))) THEN
                0037           WRITE(msgBuf,'(A,A,I2,A,A,A,A)') 'SMOOTH_CHECK: ',
                0038      &      'Unrecognized option for smooth2DmaskName(', smoothOpNb,
                0039      &      '): ', smooth2DmaskName(smoothOpNb), ' - must be: ',
                0040      &      'maskC, maskW, maskS, or maskI'
                0041           CALL PRINT_ERROR( msgBuf, myThid )
                0042           STOP 'ABNORMAL END: S/R SMOOTH_CHECK'
                0043         ENDIF
                0044 
                0045         IF ( .NOT.(
                0046      &       (smooth3DmaskName(smoothOpNb)(1:5).EQ.'maskC').OR.
                0047      &       (smooth3DmaskName(smoothOpNb)(1:5).EQ.'maskW').OR.
                0048      &       (smooth3DmaskName(smoothOpNb)(1:5).EQ.'maskS'))) THEN
                0049           WRITE(msgBuf,'(A,A,I2,A,A,A,A)') 'SMOOTH_CHECK: ',
                0050      &      'Unrecognized option for smooth3DmaskName(', smoothOpNb,
                0051      &      '): ', smooth3DmaskName(smoothOpNb), ' - must be: ',
                0052      &      'maskC, maskW, or maskS'
                0053           CALL PRINT_ERROR( msgBuf, myThid )
                0054           STOP 'ABNORMAL END: S/R SMOOTH_CHECK'
                0055         ENDIF
                0056 
                0057 #ifndef ALLOW_SHELFICE
                0058 C --- make sure proper macros are defined for maskI (iceshelf domain)
                0059         IF (smooth2DmaskName(smoothOpNb)(1:5).EQ.'maskI') THEN
                0060           WRITE(msgBuf,'(A,A,I2,A,A,A,A)') 'SMOOTH_CHECK: ',
                0061      &      'Must compile with shelfice package, ALLOW_SHELFICE'
                0062           CALL PRINT_ERROR( msgBuf, myThid )
                0063           STOP 'ABNORMAL END: S/R SMOOTH_CHECK'
                0064         ENDIF
                0065 #endif
                0066       ENDDO
                0067 
                0068       RETURN
                0069       END