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

Changeset 10214 for branches


Ignore:
Timestamp:
2018-10-23T16:41:23+02:00 (6 years ago)
Author:
frrh
Message:

Working version with OASIS3-MCT vn3.0 and 4.0

File:
1 edited

Legend:

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

    r10195 r10214  
    163163      INTEGER :: id_part_rnf_1d ! Partition for 1d river outflow fields 
    164164      INTEGER :: id_part_temp   ! Temperary partition used to choose either 0d or 1d partitions 
    165       INTEGER :: vector_length  ! Length of 0d or 1d variables (0d variables will have vector_length=1) 
    166165      INTEGER :: paral(5)       ! OASIS3 box partition 
    167       INTEGER :: ishape(4)      ! Shape of arrays passed to PSMILe.  
     166      INTEGER :: ishape(4)      ! Shape of 2D arrays passed to PSMILe.  
    168167                                ! Redundant from OASIS3-MCT vn4.0 onwards but required 
    169168                                ! to satisfy interface and for backward compatibility.  
     169      INTEGER :: ishape0d1d(2)  ! Shape of 0D or 1D arrays passed to PSMILe.  
    170170      INTEGER :: var_nodims(2)  ! Number of coupling field dimensions. 
    171171                                ! var_nodims(1) is redundant from OASIS3-MCT vn4.0 onwards 
     
    209209      ishape(4) = nlej-nldj+1 
    210210 
     211      ishape0d1d(1) = 0 
     212      ishape0d1d(2) = 0 
    211213 
    212214      ! 
     
    358360                    IF (nproc == 0) THEN                     
    359361                        
     362                       ishape0d1d(1) = 1 
    360363                       IF (srcv(ji)%dimensions == 0) THEN 
    361364                        
    362365                          ! If 0D then set temporary variables to 0D components 
    363366                          id_part_temp = id_part_0d 
    364                           vector_length = 1 
     367                          ishape0d1d(2) = 1 
    365368                       ELSE 
    366369                        
    367370                          ! If 1D then set temporary variables to river outflow components 
    368371                          id_part_temp = id_part_rnf_1d 
    369                           vector_length = nn_cpl_river 
     372                          ishape0d1d(2)= nn_cpl_river 
    370373                           
    371374                       END IF 
    372                         
     375 
    373376                       CALL oasis_def_var (srcv(ji)%nid(jc,jm), zclname, id_part_temp   , var_nodims,   & 
    374                                    OASIS_In           , (/ 1, vector_length /) , OASIS_REAL, nerror ) 
    375                     ELSE 
     377                                   OASIS_In           , ishape0d1d(1:2) , OASIS_REAL, nerror ) 
     378 
     379                    ELSE                        
     380                       ishape0d1d(1) = 0 
     381                       ishape0d1d(2) = 0 
    376382                       ! Dummy call to keep OASIS3-MCT happy.  
    377383                       CALL oasis_def_var (srcv(ji)%nid(jc,jm), zclname, id_part_0d   , var_nodims,   & 
    378                                    OASIS_In           , (/ 0, 0 /) , OASIS_REAL, nerror ) 
    379                     END IF 
     384                                   OASIS_In           , ishape0d1d(1:2) , OASIS_REAL, nerror ) 
     385                     
     386                    ENDIF 
    380387                  ELSE  
    381388                    ! It's a "normal" 2D (or pseudo 3D) coupling field.  
Note: See TracChangeset for help on using the changeset viewer.