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 10159 – NEMO

Changeset 10159


Ignore:
Timestamp:
2018-09-26T13:14:48+02:00 (6 years ago)
Author:
marc
Message:

GMED ticket 408. Richard's fix so that code is compatiable with OASIS3-MCT vn4.0

File:
1 edited

Legend:

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

    r8280 r10159  
    151151      INTEGER :: id_part 
    152152      INTEGER :: paral(5)       ! OASIS3 box partition 
    153       INTEGER :: ishape(2,2)    ! shape of arrays passed to PSMILe 
     153      INTEGER :: ishape(4)      ! Shape of arrays passed to PSMILe.  
     154                                ! Redundant from OASIS3-MCT vn4.0 onwards but required 
     155                                ! to satisfy interface and for backward compatibility.  
     156      INTEGER :: var_nodims(2)  ! Number of coupling field dimensions. 
     157                                ! var_nodims(1) is redundant from OASIS3-MCT vn4.0 onwards 
     158                                ! but retained for backward compatibility.  
     159                                ! var_nodims(2) is the number of fields in a bundle  
     160                                ! or 1 for unbundled fields (bundles are not yet catered for 
     161                                ! in NEMO hence we default to 1).   
    154162      INTEGER :: ji,jc,jm       ! local loop indicees 
    155163      CHARACTER(LEN=64) :: zclname 
     
    182190      !     nl* is set to the global values 1 and jp*glo. 
    183191      ! 
    184       ishape(:,1) = (/ 1, nlei-nldi+1 /) 
    185       ishape(:,2) = (/ 1, nlej-nldj+1 /) 
     192      ishape(1) = 1 
     193      ishape(2) = nlei-nldi+1 
     194      ishape(3) = 1 
     195      ishape(4) = nlej-nldj+1 
     196 
     197 
    186198      ! 
    187199      ! ... Allocate memory for data exchange 
     
    243255#endif 
    244256                  IF( ln_ctl ) WRITE(numout,*) "Define", ji, jc, jm, " "//TRIM(zclname), " for ", OASIS_Out 
    245                   CALL oasis_def_var (ssnd(ji)%nid(jc,jm), zclname, id_part   , (/ 2, 0 /),   & 
     257 
     258                  ! 
     259                  ! ... Set the field dimension and bundle count 
     260                  var_nodims(1) = 2 
     261                  var_nodims(2) = 1 ! Modify this value to cater for bundled fields.     
     262 
     263                  CALL oasis_def_var (ssnd(ji)%nid(jc,jm), zclname, id_part   , var_nodims,   & 
    246264                     &                OASIS_Out          , ishape , OASIS_REAL, nerror ) 
    247265                  IF ( nerror /= OASIS_Ok ) THEN 
     
    288306#endif 
    289307                  IF( ln_ctl ) WRITE(numout,*) "Define", ji, jc, jm, " "//TRIM(zclname), " for ", OASIS_In 
    290                   CALL oasis_def_var (srcv(ji)%nid(jc,jm), zclname, id_part   , (/ 2, 0 /),   & 
     308 
     309                  ! ... Set the field dimension and bundle count 
     310                  var_nodims(1) = 2 
     311                  var_nodims(2) = 1 ! Modify this value to cater for bundled fields.     
     312 
     313                  CALL oasis_def_var (srcv(ji)%nid(jc,jm), zclname, id_part   , var_nodims,   & 
    291314                     &                OASIS_In           , ishape , OASIS_REAL, nerror ) 
    292315                  IF ( nerror /= OASIS_Ok ) THEN 
Note: See TracChangeset for help on using the changeset viewer.