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

Changeset 10018


Ignore:
Timestamp:
2018-07-31T11:58:30+02:00 (6 years ago)
Author:
frrh
Message:

Corrections for consistency with OASIS3-MCT version 4.0
and backwards compatibility with earlier coupler releases.

File:
1 edited

Legend:

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

    r8280 r10018  
    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      INTEGER :: var_nodims(2)  ! Number of coupling field dimensions. 
     155                                ! var_nodims(1) is redundant with OASIS3-MCT vn4.0 but retained 
     156                                ! for backwards compatibility. var_nodims(2) is the number of 
     157                                ! fields in a bundle or 1 for unbundled fields.  
    154158      INTEGER :: ji,jc,jm       ! local loop indicees 
    155159      CHARACTER(LEN=64) :: zclname 
     
    182186      !     nl* is set to the global values 1 and jp*glo. 
    183187      ! 
    184       ishape(:,1) = (/ 1, nlei-nldi+1 /) 
    185       ishape(:,2) = (/ 1, nlej-nldj+1 /) 
     188      ishape(1) = 1 
     189      ishape(2) = nlei-nldi+1 
     190      ishape(3) = 1 
     191      ishape(4) = nlej-nldj+1 
     192 
     193 
    186194      ! 
    187195      ! ... Allocate memory for data exchange 
     
    243251#endif 
    244252                  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 /),   & 
     253 
     254                  ! 
     255                  ! ... Set the field dimension and bundle count 
     256                  var_nodims(1) = 2 
     257                  var_nodims(2) = 1 ! Make this variable to cater for bundled fields.     
     258 
     259                  CALL oasis_def_var (ssnd(ji)%nid(jc,jm), zclname, id_part   , var_nodims,   & 
    246260                     &                OASIS_Out          , ishape , OASIS_REAL, nerror ) 
    247261                  IF ( nerror /= OASIS_Ok ) THEN 
     
    288302#endif 
    289303                  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 /),   & 
     304 
     305                  ! ... Set the field dimension and bundle count 
     306                  var_nodims(1) = 2 
     307                  var_nodims(2) = 1 ! Make this variable to cater for bundled fields.     
     308 
     309                  CALL oasis_def_var (srcv(ji)%nid(jc,jm), zclname, id_part   , var_nodims,   & 
    291310                     &                OASIS_In           , ishape , OASIS_REAL, nerror ) 
    292311                  IF ( nerror /= OASIS_Ok ) THEN 
Note: See TracChangeset for help on using the changeset viewer.