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 11484 for branches – NEMO

Changeset 11484 for branches


Ignore:
Timestamp:
2019-08-29T14:58:24+02:00 (5 years ago)
Author:
timgraham
Message:

Merge in changes from GMED ticket 408 - Richard's fix for compatibility with OASIS-MCT v4.0

File:
1 edited

Legend:

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

    r8280 r11484  
    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 2D arrays passed to PSMILe.  
     154                                ! Redundant from OASIS3-MCT vn4.0 onwards but required 
     155                                ! to satisfy interface and for backward compatibility. 
     156      INTEGER :: ishape0d1d(2)  ! Shape of 0D or 1D arrays passed to PSMILe. 
     157      INTEGER :: var_nodims(2)  ! Number of coupling field dimensions. 
     158                                ! var_nodims(1) is redundant from OASIS3-MCT vn4.0 onwards 
     159                                ! but retained for backward compatibility.  
     160                                ! var_nodims(2) is the number of fields in a bundle  
     161                                ! or 1 for unbundled fields (bundles are not yet catered for 
     162                                ! in NEMO hence we default to 1).   
    154163      INTEGER :: ji,jc,jm       ! local loop indicees 
    155164      CHARACTER(LEN=64) :: zclname 
     
    182191      !     nl* is set to the global values 1 and jp*glo. 
    183192      ! 
    184       ishape(:,1) = (/ 1, nlei-nldi+1 /) 
    185       ishape(:,2) = (/ 1, nlej-nldj+1 /) 
     193      ishape(1) = 1 
     194      ishape(2) = nlei-nldi+1 
     195      ishape(3) = 1 
     196      ishape(4) = nlej-nldj+1 
     197 
     198      ishape0d1d(1) = 0 
     199      ishape0d1d(2) = 0 
     200 
    186201      ! 
    187202      ! ... Allocate memory for data exchange 
     
    243258#endif 
    244259                  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 /),   & 
     260 
     261                  ! 
     262                  ! ... Set the field dimension and bundle count 
     263                  var_nodims(1) = 2 
     264                  var_nodims(2) = 1 ! Modify this value to cater for bundled fields.     
     265 
     266                  CALL oasis_def_var (ssnd(ji)%nid(jc,jm), zclname, id_part   , var_nodims,   & 
    246267                     &                OASIS_Out          , ishape , OASIS_REAL, nerror ) 
    247268                  IF ( nerror /= OASIS_Ok ) THEN 
     
    288309#endif 
    289310                  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 /),   & 
    291                      &                OASIS_In           , ishape , OASIS_REAL, nerror ) 
     311 
     312                  var_nodims(1) = 2 
     313                  var_nodims(2) = 1 ! Modify this value to cater for bundled fields.      
     314 
     315                  CALL oasis_def_var (srcv(ji)%nid(jc,jm), zclname, id_part   , var_nodims,   & 
     316                                      OASIS_In           , ishape , OASIS_REAL, nerror ) 
    292317                  IF ( nerror /= OASIS_Ok ) THEN 
    293318                     WRITE(numout,*) 'Failed to define transient ', ji, jc, jm, " "//TRIM(zclname) 
Note: See TracChangeset for help on using the changeset viewer.