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 14789 for NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/src/OCE/SBC/cpl_oasis3.F90 – NEMO

Ignore:
Timestamp:
2021-05-05T13:18:04+02:00 (3 years ago)
Author:
mcastril
Message:

[2021/HPC-11_mcastril_HPDAonline_DiagGPU] Update externals

Location:
NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU

    • Property svn:externals
      •  

        old new  
        33^/utils/build/mk@HEAD         mk 
        44^/utils/tools@HEAD            tools 
        5 ^/vendors/AGRIF/dev_r12970_AGRIF_CMEMS      ext/AGRIF 
         5^/vendors/AGRIF/dev@HEAD      ext/AGRIF 
        66^/vendors/FCM@HEAD            ext/FCM 
        77^/vendors/IOIPSL@HEAD         ext/IOIPSL 
         8^/vendors/PPR@HEAD            ext/PPR 
        89 
        910# SETTE 
        10 ^/utils/CI/sette@13559        sette 
         11^/utils/CI/sette@14244        sette 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/src/OCE/SBC/cpl_oasis3.F90

    r13415 r14789  
    1414   !!            3.6  !  2014-11  (S. Masson) OASIS3-MCT 
    1515   !!---------------------------------------------------------------------- 
    16     
     16 
    1717   !!---------------------------------------------------------------------- 
    1818   !!   'key_oasis3'                    coupled Ocean/Atmosphere via OASIS3-MCT 
     
    6363#endif 
    6464 
    65    INTEGER                    ::   nrcv         ! total number of fields received  
    66    INTEGER                    ::   nsnd         ! total number of fields sent  
     65   INTEGER                    ::   nrcv         ! total number of fields received 
     66   INTEGER                    ::   nsnd         ! total number of fields sent 
    6767   INTEGER                    ::   ncplmodel    ! Maximum number of models to/from which NEMO is potentialy sending/receiving data 
    68    INTEGER, PUBLIC, PARAMETER ::   nmaxfld=60   ! Maximum number of coupling fields 
     68   INTEGER, PUBLIC, PARAMETER ::   nmaxfld=62   ! Maximum number of coupling fields 
    6969   INTEGER, PUBLIC, PARAMETER ::   nmaxcat=5    ! Maximum number of coupling fields 
    7070   INTEGER, PUBLIC, PARAMETER ::   nmaxcpl=5    ! Maximum number of coupling fields 
    71     
     71 
    7272   TYPE, PUBLIC ::   FLD_CPL               !: Type for coupling field information 
    7373      LOGICAL               ::   laction   ! To be coupled or not 
    74       CHARACTER(len = 8)    ::   clname    ! Name of the coupling field    
    75       CHARACTER(len = 1)    ::   clgrid    ! Grid type   
     74      CHARACTER(len = 8)    ::   clname    ! Name of the coupling field 
     75      CHARACTER(len = 1)    ::   clgrid    ! Grid type 
    7676      REAL(wp)              ::   nsgn      ! Control of the sign change 
    7777      INTEGER, DIMENSION(nmaxcat,nmaxcpl) ::   nid   ! Id of the field (no more than 9 categories and 9 extrena models) 
     
    9898      !!    exchange between AGCM, OGCM and COUPLER. (OASIS3 software) 
    9999      !! 
    100       !! ** Method  :   OASIS3 MPI communication  
     100      !! ** Method  :   OASIS3 MPI communication 
    101101      !!-------------------------------------------------------------------- 
    102102      CHARACTER(len = *), INTENT(in   ) ::   cd_modname   ! model name as set in namcouple file 
     
    115115 
    116116      !------------------------------------------------------------------ 
    117       ! 3rd Get an MPI communicator for OPA local communication 
     117      ! 3rd Get an MPI communicator for OCE local communication 
    118118      !------------------------------------------------------------------ 
    119119 
     
    132132      !!    exchange between AGCM, OGCM and COUPLER. (OASIS3 software) 
    133133      !! 
    134       !! ** Method  :   OASIS3 MPI communication  
     134      !! ** Method  :   OASIS3 MPI communication 
    135135      !!-------------------------------------------------------------------- 
    136136      INTEGER, INTENT(in) ::   krcv, ksnd     ! Number of received and sent coupling fields 
     
    180180      ! 
    181181      ! ----------------------------------------------------------------- 
    182       ! ... Define the partition, excluding halos as we don't want them to be "seen" by oasis     
     182      ! ... Define the partition, excluding halos as we don't want them to be "seen" by oasis 
    183183      ! ----------------------------------------------------------------- 
    184        
     184 
    185185      paral(1) = 2                                      ! box partitioning 
    186       paral(2) = Ni0glo * mjg0(nn_hls) + mig0(nn_hls)   ! NEMO lower left corner global offset, without halos  
     186      paral(2) = Ni0glo * mjg0(nn_hls) + mig0(nn_hls)   ! NEMO lower left corner global offset, without halos 
    187187      paral(3) = Ni_0                                   ! local extent in i, excluding halos 
    188188      paral(4) = Nj_0                                   ! local extent in j, excluding halos 
    189189      paral(5) = Ni0glo                                 ! global extent in x, excluding halos 
    190        
     190 
    191191      IF( sn_cfctl%l_oasout ) THEN 
    192192         WRITE(numout,*) ' multiexchg: paral (1:5)', paral 
     
    195195         WRITE(numout,*) ' multiexchg: Njs0, Nje0, njmpp =', Njs0, Nje0, njmpp 
    196196      ENDIF 
    197     
     197 
    198198      CALL oasis_def_partition ( id_part, paral, nerror, Ni0glo*Nj0glo )   ! global number of points, excluding halos 
    199199      ! 
    200       ! ... Announce send variables.  
     200      ! ... Announce send variables. 
    201201      ! 
    202202      ssnd(:)%ncplmodel = kcplmodel 
     
    210210               RETURN 
    211211            ENDIF 
    212              
     212 
    213213            DO jc = 1, ssnd(ji)%nct 
    214214               DO jm = 1, kcplmodel 
     
    225225                  ENDIF 
    226226#if defined key_agrif 
    227                   IF( agrif_fixed() /= 0 ) THEN  
     227                  IF( agrif_fixed() /= 0 ) THEN 
    228228                     zclname=TRIM(Agrif_CFixed())//'_'//TRIM(zclname) 
    229229                  ENDIF 
     
    243243      END DO 
    244244      ! 
    245       ! ... Announce received variables.  
     245      ! ... Announce received variables. 
    246246      ! 
    247247      srcv(:)%ncplmodel = kcplmodel 
    248248      ! 
    249249      DO ji = 1, krcv 
    250          IF( srcv(ji)%laction ) THEN  
    251              
     250         IF( srcv(ji)%laction ) THEN 
     251 
    252252            IF( srcv(ji)%nct > nmaxcat ) THEN 
    253253               CALL oasis_abort ( ncomp_id, 'cpl_define', 'Number of categories of '//   & 
     
    255255               RETURN 
    256256            ENDIF 
    257              
     257 
    258258            DO jc = 1, srcv(ji)%nct 
    259259               DO jm = 1, kcplmodel 
    260                    
     260 
    261261                  IF( srcv(ji)%nct .GT. 1 ) THEN 
    262262                     WRITE(cli2,'(i2.2)') jc 
     
    270270                  ENDIF 
    271271#if defined key_agrif 
    272                   IF( agrif_fixed() /= 0 ) THEN  
     272                  IF( agrif_fixed() /= 0 ) THEN 
    273273                     zclname=TRIM(Agrif_CFixed())//'_'//TRIM(zclname) 
    274274                  ENDIF 
     
    288288         ENDIF 
    289289      END DO 
    290        
     290 
    291291      !------------------------------------------------------------------ 
    292292      ! End of definition phase 
    293293      !------------------------------------------------------------------ 
    294       !      
     294      ! 
    295295#if defined key_agrif 
    296       IF( agrif_fixed() == Agrif_Nb_Fine_Grids() ) THEN 
     296      ! Warning: Agrif_Nb_Fine_Grids not yet defined at this stage for Agrif_Root -> must use Agrif_Root_Only() 
     297      IF( Agrif_Root_Only() .OR. agrif_fixed() == Agrif_Nb_Fine_Grids() ) THEN 
    297298#endif 
    298299      CALL oasis_enddef(nerror) 
     
    303304      ! 
    304305   END SUBROUTINE cpl_define 
    305     
    306     
     306 
     307 
    307308   SUBROUTINE cpl_snd( kid, kstep, pdata, kinfo ) 
    308309      !!--------------------------------------------------------------------- 
     
    324325      DO jc = 1, ssnd(kid)%nct 
    325326         DO jm = 1, ssnd(kid)%ncplmodel 
    326          
     327 
    327328            IF( ssnd(kid)%nid(jc,jm) /= -1 ) THEN   ! exclude halos from data sent to oasis 
    328329               CALL oasis_put ( ssnd(kid)%nid(jc,jm), kstep, pdata(Nis0:Nie0, Njs0:Nje0,jc), kinfo ) 
    329                 
    330                IF ( sn_cfctl%l_oasout ) THEN         
     330 
     331               IF ( sn_cfctl%l_oasout ) THEN 
    331332                  IF ( kinfo == OASIS_Sent     .OR. kinfo == OASIS_ToRest .OR.   & 
    332333                     & kinfo == OASIS_SentOut  .OR. kinfo == OASIS_ToRestOut ) THEN 
     
    342343                  ENDIF 
    343344               ENDIF 
    344                 
     345 
    345346            ENDIF 
    346              
     347 
    347348         ENDDO 
    348349      ENDDO 
     
    379380            IF( srcv(kid)%nid(jc,jm) /= -1 ) THEN 
    380381 
    381                CALL oasis_get ( srcv(kid)%nid(jc,jm), kstep, exfld, kinfo )          
    382                 
     382               CALL oasis_get ( srcv(kid)%nid(jc,jm), kstep, exfld, kinfo ) 
     383 
    383384               llaction =  kinfo == OASIS_Recvd   .OR. kinfo == OASIS_FromRest .OR.   & 
    384385                  &        kinfo == OASIS_RecvOut .OR. kinfo == OASIS_FromRestOut 
    385                 
     386 
    386387               IF ( sn_cfctl%l_oasout )   & 
    387388                  &  WRITE(numout,*) "llaction, kinfo, kstep, ivarid: " , llaction, kinfo, kstep, srcv(kid)%nid(jc,jm) 
    388                 
     389 
    389390               IF( llaction ) THEN   ! data received from oasis do not include halos 
    390                    
     391 
    391392                  kinfo = OASIS_Rcv 
    392                   IF( ll_1st ) THEN  
     393                  IF( ll_1st ) THEN 
    393394                     pdata(Nis0:Nie0,Njs0:Nje0,jc) =   exfld(:,:) * pmask(Nis0:Nie0,Njs0:Nje0,jm) 
    394395                     ll_1st = .FALSE. 
     
    397398                        &                                + exfld(:,:) * pmask(Nis0:Nie0,Njs0:Nje0,jm) 
    398399                  ENDIF 
    399                    
    400                   IF ( sn_cfctl%l_oasout ) THEN         
     400 
     401                  IF ( sn_cfctl%l_oasout ) THEN 
    401402                     WRITE(numout,*) '****************' 
    402403                     WRITE(numout,*) 'oasis_get: Incoming ', srcv(kid)%clname 
     
    409410                     WRITE(numout,*) '****************' 
    410411                  ENDIF 
    411                    
     412 
    412413               ENDIF 
    413                 
     414 
    414415            ENDIF 
    415              
     416 
    416417         ENDDO 
    417418 
    418419         !--- we must call lbc_lnk to fill the halos that where not received. 
    419420         IF( .NOT. ll_1st ) THEN 
    420             CALL lbc_lnk( 'cpl_oasis3', pdata(:,:,jc), srcv(kid)%clgrid, srcv(kid)%nsgn )    
     421            CALL lbc_lnk( 'cpl_oasis3', pdata(:,:,jc), srcv(kid)%clgrid, srcv(kid)%nsgn ) 
    421422         ENDIF 
    422   
     423 
    423424      ENDDO 
    424425      ! 
     
    426427 
    427428 
    428    INTEGER FUNCTION cpl_freq( cdfieldname )   
     429   INTEGER FUNCTION cpl_freq( cdfieldname ) 
    429430      !!--------------------------------------------------------------------- 
    430431      !!              ***  ROUTINE cpl_freq  *** 
     
    491492      DEALLOCATE( exfld ) 
    492493      IF(nstop == 0) THEN 
    493          CALL oasis_terminate( nerror )          
     494         CALL oasis_terminate( nerror ) 
    494495      ELSE 
    495496         CALL oasis_abort( ncomp_id, "cpl_finalize", "NEMO ABORT STOP" ) 
    496       ENDIF        
     497      ENDIF 
    497498      ! 
    498499   END SUBROUTINE cpl_finalize 
     
    544545      WRITE(numout,*) 'oasis_enddef: Error you sould not be there...' 
    545546   END SUBROUTINE oasis_enddef 
    546    
     547 
    547548   SUBROUTINE oasis_put(k1,k2,p1,k3) 
    548549      REAL(wp), DIMENSION(:,:), INTENT(in   ) ::  p1 
     
    574575      WRITE(numout,*) 'oasis_terminate: Error you sould not be there...' 
    575576   END SUBROUTINE oasis_terminate 
    576     
     577 
    577578#endif 
    578579 
Note: See TracChangeset for help on using the changeset viewer.