Back to home page

darwin3

 
 

    


File indexing completed on 2024-12-17 18:32:37 UTC

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
7f58e89433 Jean*0001 #include "CPP_OPTIONS.h"
                0002 
885dea980c Jean*0003 CBOP 0
                0004 C !ROUTINE: INITIALISE
                0005 
                0006 C !INTERFACE:
                0007       SUBROUTINE INITIALISE(
                0008      O                       msgUnit )
                0009 
                0010 C !DESCRIPTION:
                0011 C     *==========================================================*
                0012 C     | SUBROUTINE INITIALISE
                0013 C     | o Routine to initialise coupling component.
                0014 C     *==========================================================*
                0015 C     | Initialisation involves starting up MPI and then joining
                0016 C     | the coupled configuration as a component with the special
                0017 C     | name "Coupler". With the present MIT Coupler library
                0018 C     | only one process can register with the name "Coupler".
                0019 C     | This component is the process responsible for
                0020 C     | coordinating the transfer of data between other
                0021 C     | components and for mapping data from one components
                0022 C     | representation to anothers representation as appropriate.
                0023 C     *==========================================================*
                0024 
                0025 C !USES:
7f58e89433 Jean*0026       IMPLICIT NONE
                0027 C     === GLobal variables ==
                0028 #include "CPLIDS.h"
                0029 
885dea980c Jean*0030 C !INPUT/OUTPUT PARAMETERS:
                0031 C     msgUnit          :: log-file I/O unit
                0032       INTEGER msgUnit
7f58e89433 Jean*0033 
885dea980c Jean*0034 C !LOCAL VARIABLES:
                0035 C     iErr             :: Error code
                0036 C     MPI_COMM_Coupler :: Communicatior used by this component.
                0037 C                         Stored internally by the coupling library.
7f58e89433 Jean*0038       INTEGER iErr
                0039       INTEGER MPI_COMM_Coupler
885dea980c Jean*0040 CEOP
7f58e89433 Jean*0041 
                0042       CALL MPI_Init(iErr)
                0043 
                0044 C--   Set the running directory (= rank_0 )
                0045       CALL SETDIR( 0 )
                0046 
                0047 C     Register this process as the "coupler" participant. Currently there can
                0048 C     only be one coupler participant all others are "component" participants.
885dea980c Jean*0049       CALL MITCOUPLER_INIT(
                0050      I                      cplCompName,
                0051      O                      MPI_COMM_Coupler, msgUnit )
7f58e89433 Jean*0052 
885dea980c Jean*0053       CALL CPL_READ_PARAMS( msgUnit )
7f58e89433 Jean*0054 
885dea980c Jean*0055       CALL SET_RUNOFFMAP( msgUnit )
7f58e89433 Jean*0056 
a92f38a442 Jean*0057 C--   Initialise Coupler field arrays
                0058       CALL CPL_INIT_ATM_VARS( msgUnit )
                0059       CALL CPL_INIT_OCN_VARS( msgUnit )
                0060 
7f58e89433 Jean*0061       RETURN
                0062       END