Back to home page

MITgcm

 
 

    


File indexing completed on 2018-03-02 18:37:37 UTC

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
6502611145 Jean*0001 #include "CPP_OPTIONS.h"
                0002 
                0003 CBOP 0
                0004 C !ROUTINE: CPL_SEND_ATM_CPLPARMS
                0005 
                0006 C !INTERFACE:
                0007       SUBROUTINE CPL_SEND_ATM_CPLPARMS( msgUnit )
                0008 
                0009 C !DESCRIPTION:
                0010 C     *==========================================================*
                0011 C     | SUBROUTINE CPL_SEND_ATM_CPLPARMS
                0012 C     | o Routine for sending coupler-parameters
                0013 C     |   to atmos component
                0014 C     *==========================================================*
                0015 C     *==========================================================*
                0016 
                0017 C !USES:
                0018       IMPLICIT NONE
                0019 C     == Global variables ==
                0020 #include "CPL_PARAMS.h"
                0021 #include "ATMIDS.h"
                0022 
                0023 C !INPUT/OUTPUT PARAMETERS:
                0024 C     msgUnit   :: log-file I/O unit
                0025       INTEGER msgUnit
                0026 
                0027 C !LOCAL VARIABLES:
                0028 C     i        :: Loop counter
                0029 C     parBuf   :: local buffer to send coupler-params
                0030       INTEGER i
                0031       INTEGER parBuf(atmParSize)
                0032 CEOP
                0033 
                0034 C-    Initialise buffer
                0035       DO i=1,atmParSize
                0036         parBuf(i) = 0
                0037       ENDDO
                0038 
                0039 C-    Send exchange field selectors (coupler config) to atmos. component
                0040       IF ( atmParSize.EQ.6 ) THEN
                0041         parBuf(1) = cpl_sequential
                0042         parBuf(2) = cpl_exchange_RunOff
                0043         parBuf(3) = cpl_exchange1W_sIce
                0044         parBuf(4) = cpl_exchange2W_sIce
                0045         parBuf(5) = cpl_exchange_SaltPl
                0046         parBuf(6) = cpl_exchange_DIC
                0047       ELSE
                0048 C-    If not using an up-to-date ATMIDS.h with the wrong atmParSize
                0049         cplErrorCount = cplErrorCount + 1
                0050         WRITE(msgUnit,'(2A,I4,A)')
                0051      &       ' *** ERROR *** CPL_SEND_ATM_CPLPARMS: ',
                0052      &       'atmParSize=', atmParSize, ' is wrong (expect 6)'
                0053         WRITE(msgUnit,'(2A,I4,A)')
                0054      &       ' *** ERROR *** CPL_SEND_ATM_CPLPARMS: ',
                0055      &       '==> set ErrorCount=', cplErrorCount, ' (Fatal)'
                0056       ENDIF
                0057 
                0058       CALL COUPSEND_I4VEC(
                0059      I              atmCompName, atmCplParamsName, atmParSize,
                0060      I              parBuf )
                0061 
                0062       RETURN
                0063       END