New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 1226 for trunk/NEMO/OPA_SRC/SBC/cpl_oasis3.F90 – NEMO

Ignore:
Timestamp:
2008-11-27T18:41:45+01:00 (15 years ago)
Author:
smasson
Message:

bugfix of the coupling interface (commited during changeset:1218), see ticket:155

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/OPA_SRC/SBC/cpl_oasis3.F90

    r1218 r1226  
    4444   INTEGER                    :: nerror            ! return error code 
    4545 
    46    INTEGER, PUBLIC :: nrcv, nsnd    ! Number of received and sent coupling fields 
    47  
    4846   INTEGER, PARAMETER :: nmaxfld=40    ! Maximum number of coupling fields 
    4947    
     
    7573CONTAINS 
    7674 
    77    SUBROUTINE cpl_prism_init 
     75   SUBROUTINE cpl_prism_init (kl_comm)  
    7876 
    7977      !!------------------------------------------------------------------- 
     
    8583      !! ** Method  :   OASIS3 MPI communication  
    8684      !!-------------------------------------------------------------------- 
    87       !! 
     85      INTEGER, INTENT(   OUT )   :: kl_comm       ! local communicator of the model 
     86      !!-------------------------------------------------------------------- 
    8887 
    8988      IF(lwp) WRITE(numout,*) 'cpl_prism_init : initialization in coupled ocean/atmosphere case' 
     
    101100      !------------------------------------------------------------------ 
    102101 
    103       CALL prism_get_localcomm_proto ( nlocalComm, nerror ) 
     102      CALL prism_get_localcomm_proto ( kl_comm, nerror ) 
    104103      IF ( nerror /= PRISM_Ok ) & 
    105104         CALL prism_abort_proto (ncomp_id, 'cpl_prism_init','Failure in prism_get_localcomm_proto' ) 
     
    108107 
    109108 
    110    SUBROUTINE cpl_prism_define () 
     109   SUBROUTINE cpl_prism_define (krcv, ksnd) 
    111110 
    112111      !!------------------------------------------------------------------- 
     
    118117      !! ** Method  :   OASIS3 MPI communication  
    119118      !!-------------------------------------------------------------------- 
    120       !! * Arguments 
    121       !! 
    122       !! * Local declarations 
    123       !! 
     119      INTEGER, INTENT( IN    )   :: krcv, ksnd     ! Number of received and sent coupling fields 
     120      ! 
    124121      INTEGER                    :: id_part 
    125122      INTEGER                    :: paral(5)       ! OASIS3 box partition 
     
    171168      ! ... Announce send variables.  
    172169      ! 
    173       DO ji = 1, nsnd 
     170      DO ji = 1, ksnd 
    174171         IF ( ssnd(ji)%laction ) THEN  
    175172            CALL prism_def_var_proto (ssnd(ji)%nid, ssnd(ji)%clname, id_part, (/ 2, 0/),  & 
     
    184181      ! ... Announce received variables.  
    185182      ! 
    186       DO ji = 1, nrcv 
     183      DO ji = 1, krcv 
    187184         IF ( srcv(ji)%laction ) THEN  
    188185            CALL prism_def_var_proto ( srcv(ji)%nid, srcv(ji)%clname, id_part, (/ 2, 0/),   & 
     
    292289            WRITE(numout,*) '     -     Sum value is ', SUM(pdata) 
    293290            WRITE(numout,*) '****************' 
    294             call flush(numout) 
    295291         ENDIF 
    296292       
     
    329325CONTAINS 
    330326 
    331    SUBROUTINE cpl_prism_init 
     327   SUBROUTINE cpl_prism_init (kl_comm)  
     328      INTEGER, INTENT(   OUT )   :: kl_comm       ! local communicator of the model 
     329      kl_comm = -1 
    332330      WRITE(numout,*) 'cpl_prism_init: Error you sould not be there...' 
    333331   END SUBROUTINE cpl_prism_init 
Note: See TracChangeset for help on using the changeset viewer.