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

Ignore:
Timestamp:
2018-10-23T17:17:07+02:00 (6 years ago)
Author:
dancopsey
Message:

Apply changes as suggested by reviewer (R. Hill).

File:
1 edited

Legend:

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

    r10195 r10215  
    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 
    169                                 ! to satisfy interface and for backward compatibility.  
     168                                ! 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      ! 
     
    355357                  IF (srcv(ji)%dimensions <= 1) THEN 
    356358                    var_nodims(1) = 1 
    357                     var_nodims(2) = 1 ! Modify this value to cater for bundled fields.   
    358                     IF (nproc == 0) THEN                     
    359                         
     359                    var_nodims(2) = 1 ! Modify this value to cater for bundled fields. 
     360                    IF (nproc == 0) THEN 
     361 
    360362                       IF (srcv(ji)%dimensions == 0) THEN 
    361                         
     363 
    362364                          ! If 0D then set temporary variables to 0D components 
    363365                          id_part_temp = id_part_0d 
    364                           vector_length = 1 
     366                          ishape0d1d(2) = 1 
    365367                       ELSE 
    366                         
     368 
    367369                          ! If 1D then set temporary variables to river outflow components 
    368370                          id_part_temp = id_part_rnf_1d 
    369                           vector_length = nn_cpl_river 
    370                            
     371                          ishape0d1d(2)= nn_cpl_river 
     372 
    371373                       END IF 
    372                         
     374 
    373375                       CALL oasis_def_var (srcv(ji)%nid(jc,jm), zclname, id_part_temp   , var_nodims,   & 
    374                                    OASIS_In           , (/ 1, vector_length /) , OASIS_REAL, nerror ) 
     376                                   OASIS_In           , ishape0d1d(1:2) , OASIS_REAL, nerror ) 
    375377                    ELSE 
    376                        ! Dummy call to keep OASIS3-MCT happy.  
     378                       ! Dummy call to keep OASIS3-MCT happy. 
    377379                       CALL oasis_def_var (srcv(ji)%nid(jc,jm), zclname, id_part_0d   , var_nodims,   & 
    378                                    OASIS_In           , (/ 0, 0 /) , OASIS_REAL, nerror ) 
     380                                   OASIS_In           , ishape0d1d(1:2) , OASIS_REAL, nerror ) 
    379381                    END IF 
    380                   ELSE  
     382                  ELSE 
    381383                    ! It's a "normal" 2D (or pseudo 3D) coupling field.  
    382384                    ! ... Set the field dimension and bundle count 
     
    741743   SUBROUTINE oasis_def_var(k1,cd1,k2,k3,k4,k5,k6,k7) 
    742744      CHARACTER(*), INTENT(in   ) ::  cd1 
    743       INTEGER     , INTENT(in   ) ::  k2,k3(2),k4,k5(2),k6 
     745      INTEGER     , INTENT(in   ) ::  k2,k3(2),k4,k5(*),k6 
    744746      INTEGER     , INTENT(  out) ::  k1,k7 
    745747      k1 = -1 ; k7 = -1 
Note: See TracChangeset for help on using the changeset viewer.