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 8166 for branches/UKMO/dev_r5518_new_runoff_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/cpl_oasis3.F90 – NEMO

Ignore:
Timestamp:
2017-06-13T17:16:28+02:00 (7 years ago)
Author:
dancopsey
Message:

First attempt at getting the ocean to accept river runoff as a 1D array.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_new_runoff_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/cpl_oasis3.F90

    r8163 r8166  
    6969   INTEGER, PUBLIC, PARAMETER ::   nmaxcpl=5    ! Maximum number of coupling fields 
    7070    
     71   INTEGER :: runoff_id 
     72    
    7173   TYPE, PUBLIC ::   FLD_CPL               !: Type for coupling field information 
    7274      LOGICAL               ::   laction   ! To be coupled or not 
     
    288290         ENDIF 
    289291      END DO 
     292       
     293      ! Define river runoff 
     294      CALL oasis_def_var (runoff_id, 'runoffo', id_part   , (/ 1, 0 /),   & 
     295                     &                OASIS_In           , (/ 10 /) , OASIS_REAL, nerror ) 
     296      IF ( nerror /= OASIS_Ok ) THEN 
     297          WRITE(numout,*) 'Failed to define transient runoffo' 
     298          CALL oasis_abort ( runoff_id, 'cpl_define', 'Failure in oasis_def_var' ) 
     299      ENDIF 
    290300       
    291301      !------------------------------------------------------------------ 
     
    415425      ! 
    416426   END SUBROUTINE cpl_rcv 
     427    
     428   SUBROUTINE runoff_rcv(kstep) 
     429       
     430      INTEGER                   , INTENT(in   ) ::   kstep     ! ocean time-step in seconds 
     431       
     432      INTEGER  ::   kinfo                  ! OASIS3 info argument     
     433      REAL(wp) ::   runoff(10)             ! River runoff. One value per river. 
     434    
     435      ! Get the river runoff sent by the atmosphere 
     436      CALL oasis_get ( runoff_id, kstep, runoff, kinfo ) 
     437      WRITE(numout,*)' River runoff = ', runoff 
     438      WRITE(numout,*)' kinfo = ', kinfo 
     439    
     440    
     441   END SUBROUTINE runoff_rcv 
    417442 
    418443 
Note: See TracChangeset for help on using the changeset viewer.