Back to home page

MITgcm

 
 

    


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

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
e6751e3c9f Jean*0001 #include "OFFLINE_OPTIONS.h"
                0002 #ifdef ALLOW_DIC
                0003 #include "DIC_OPTIONS.h"
                0004 #endif
                0005 #ifdef ALLOW_DARWIN
                0006 #include "DARWIN_OPTIONS.h"
                0007 #endif
                0008 
                0009 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
                0010 CBOP 0
                0011 C !ROUTINE: OFFLINE_CHECK
                0012 
                0013 C !INTERFACE:
                0014       SUBROUTINE OFFLINE_CHECK( myThid )
                0015 
                0016 C     !DESCRIPTION:
                0017 C     Check dependances with other packages
                0018 
                0019 C     !USES:
                0020       IMPLICIT NONE
                0021 #include "SIZE.h"
                0022 #include "EEPARAMS.h"
                0023 #include "PARAMS.h"
                0024 #include "OFFLINE.h"
                0025 #include "OFFLINE_SWITCH.h"
                0026 
                0027 C     !INPUT PARAMETERS:
                0028 C     myThid   :: my Thread Id number
                0029       INTEGER myThid
                0030 CEOP
                0031 
                0032 #ifdef ALLOW_OFFLINE
                0033 C     !LOCAL VARIABLES:
                0034 C     msgBuf   :: Informational/error message buffer
                0035       CHARACTER*(MAX_LEN_MBUF) msgBuf
                0036       INTEGER errCount
                0037 
                0038       _BEGIN_MASTER(myThid)
                0039 
                0040        WRITE(msgBuf,'(A)') 'OFFLINE_CHECK: #define OFFLINE'
                0041        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
                0042      &                     SQUEEZE_RIGHT, myThid )
                0043 
                0044 C--   Print out some kee parameters :
                0045        CALL WRITE_0D_L( offlineLoadGMRedi, INDEX_NONE,
                0046      & 'offlineLoadGMRedi=', ' /* load (not compute) GMRedi tensor */')
                0047        CALL WRITE_0D_L( offlineLoadKPP, INDEX_NONE,
                0048      & 'offlineLoadKPP=', ' /* load (not compute) KPP mixing coeff */')
                0049        CALL WRITE_0D_L( offlineLoadConvec, INDEX_NONE,
                0050      & 'offlineLoadConvec=', ' /* load (not compute) Convect Mix */')
                0051        CALL WRITE_0D_I( offlineIter0, INDEX_NONE,
                0052      &   'offlineIter0 =', ' /* initial offline field timestep */')
bdc15dcb10 Jean*0053        CALL WRITE_0D_RL( offlineTimeOffset, INDEX_NONE,
                0054      &   'offlineTimeOffset =', ' /* time offset [s] */')
e6751e3c9f Jean*0055        CALL WRITE_0D_I( offlineLoadPrec, INDEX_NONE,
                0056      &   'offlineLoadPrec =',
                0057      &   ' /* precision (32,64) of offline files */')
                0058        CALL WRITE_0D_RL( deltaToffline, INDEX_NONE,
                0059      &   'deltaToffline =', ' /* time-step to load offline files */')
                0060        CALL WRITE_0D_RL( offlineForcingPeriod, INDEX_NONE,
                0061      &   'offlineForcingPeriod=',
                0062      &   ' /* time interval between reccords [s] */')
                0063        CALL WRITE_0D_RL( offlineForcingCycle, INDEX_NONE,
                0064      &   'offlineForcingCycle =', ' /* length of 1 cycle [s] */')
                0065        CALL WRITE_0D_C( UvelFile, -1, INDEX_NONE, 'UvelFile =',
                0066      &  ' /* file name of loaded uVel field */')
                0067 
                0068 C--   Check parameters:
                0069        errCount = 0
                0070 
                0071 C-    Put stops here if some flags are wrongly chosen.
                0072 
                0073 C-    better not to modify temperature that was loaded from file:
                0074 C     => disable allowFreezing
                0075        IF ( allowFreezing ) THEN
                0076         WRITE(msgBuf,'(A)') 'allowFreezing=T not allowed if useOffLine'
                0077         CALL PRINT_ERROR( msgBuf, myThid )
                0078         errCount =  errCount + 1
                0079        ENDIF
                0080 
                0081 C-    stop if files are specified but not used.
                0082        IF ( HFluxFile.NE.' ' ) THEN
                0083         WRITE(msgBuf,'(A)') 'HFluxFile is set but not used'
                0084         CALL PRINT_ERROR( msgBuf, myThid )
                0085         errCount =  errCount + 1
                0086        ENDIF
                0087 #ifndef ALLOW_OLD_VIRTUALFLUX
                0088        IF ( SFluxFile.NE.' ' ) THEN
                0089         WRITE(msgBuf,'(A)') 'SFluxFile is set but not used'
                0090         CALL PRINT_ERROR( msgBuf, myThid )
                0091         errCount =  errCount + 1
                0092        ENDIF
                0093 #endif /* ndef ALLOW_OLD_VIRTUALFLUX */
                0094        IF ( IceFile.NE.' ' ) THEN
                0095         WRITE(msgBuf,'(A)') 'IceFile is set but not used'
                0096         CALL PRINT_ERROR( msgBuf, myThid )
                0097         errCount =  errCount + 1
                0098        ENDIF
                0099        IF ( offlineLoadGMRedi .AND. .NOT.useGMRedi ) THEN
                0100         WRITE(msgBuf,'(A)') 'some GMxxFile are set but not used'
                0101         CALL PRINT_ERROR( msgBuf, myThid )
                0102         errCount =  errCount + 1
                0103        ENDIF
                0104        IF ( offlineLoadKPP .AND. .NOT.useKPP ) THEN
                0105         WRITE(msgBuf,'(A)') 'some KPP_xxxxxFile are set but not used'
                0106         CALL PRINT_ERROR( msgBuf, myThid )
                0107         errCount =  errCount + 1
                0108        ENDIF
                0109        IF ( offlineLoadConvec .AND. ivdc_kappa.EQ.0. ) THEN
                0110         WRITE(msgBuf,'(A)') 'ConvFile is set but not used'
                0111         CALL PRINT_ERROR( msgBuf, myThid )
                0112         errCount =  errCount + 1
                0113        ENDIF
                0114 
                0115        IF ( errCount.GE.1 ) THEN
                0116         WRITE(msgBuf,'(A,I3,A)')
                0117      &       'OFFLINE_CHECK: detected', errCount,' fatal error(s)'
                0118         CALL PRINT_ERROR( msgBuf, myThid )
                0119         CALL ALL_PROC_DIE( 0 )
                0120         STOP 'ABNORMAL END: S/R OFFLINE_CHECK'
                0121        ENDIF
                0122 
                0123        WRITE(msgBuf,'(A)') 'OFFLINE_CHECK: done'
                0124        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
                0125      &                     SQUEEZE_RIGHT, myThid )
                0126 
                0127       _END_MASTER(myThid)
                0128 
                0129 #endif /* ALLOW_OFFLINE */
                0130 
                0131       RETURN
                0132       END