Changeset 13414


Ignore:
Timestamp:
2020-08-19T11:11:15+02:00 (5 months ago)
Author:
smasson
Message:

trunk: add comments in cpl_oasis3 following [13413], see #2513

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/OCE/SBC/cpl_oasis3.F90

    r13413 r13414  
    165165      ENDIF 
    166166      ! 
    167       ! ... Define the shape for the area that excludes the halo 
    168       !     For serial configuration (key_mpp_mpi not being active) 
    169       !     nl* is set to the global values 1 and jp*glo. 
     167      ! ... Define the shape for the area that excludes the halo as we don't want them to be "seen" by oasis 
    170168      ! 
    171169      ishape(1) = 1 
     
    176174      ! ... Allocate memory for data exchange 
    177175      ! 
    178       ALLOCATE(exfld(Ni_0, Nj_0), stat = nerror) 
     176      ALLOCATE(exfld(Ni_0, Nj_0), stat = nerror)        ! allocate only inner domain (without halos) 
    179177      IF( nerror > 0 ) THEN 
    180178         CALL oasis_abort ( ncomp_id, 'cpl_define', 'Failure in allocating exfld')   ;   RETURN 
     
    182180      ! 
    183181      ! ----------------------------------------------------------------- 
    184       ! ... Define the partition  
     182      ! ... Define the partition, excluding halos as we don't want them to be "seen" by oasis     
    185183      ! ----------------------------------------------------------------- 
    186184       
    187       paral(1) = 2                                              ! box partitioning 
    188       paral(2) = Ni0glo * mjg0(nn_hls) + mig0(nn_hls)           ! NEMO lower left corner global offset  
    189       paral(3) = Ni_0                                           ! local extent in i  
    190       paral(4) = Nj_0                                           ! local extent in j 
    191       paral(5) = Ni0glo                                         ! global extent in x 
    192  
     185      paral(1) = 2                                      ! box partitioning 
     186      paral(2) = Ni0glo * mjg0(nn_hls) + mig0(nn_hls)   ! NEMO lower left corner global offset, without halos  
     187      paral(3) = Ni_0                                   ! local extent in i, excluding halos 
     188      paral(4) = Nj_0                                   ! local extent in j, excluding halos 
     189      paral(5) = Ni0glo                                 ! global extent in x, excluding halos 
     190       
    193191      IF( sn_cfctl%l_oasout ) THEN 
    194192         WRITE(numout,*) ' multiexchg: paral (1:5)', paral 
    195          WRITE(numout,*) ' multiexchg: jpi, jpj =', jpi, jpj 
     193         WRITE(numout,*) ' multiexchg: Ni_0, Nj_0 =', Ni_0, Nj_0 
    196194         WRITE(numout,*) ' multiexchg: Nis0, Nie0, nimpp =', Nis0, Nie0, nimpp 
    197195         WRITE(numout,*) ' multiexchg: Njs0, Nje0, njmpp =', Njs0, Nje0, njmpp 
    198196      ENDIF 
    199197    
    200       CALL oasis_def_partition ( id_part, paral, nerror, Ni0glo*Nj0glo ) 
     198      CALL oasis_def_partition ( id_part, paral, nerror, Ni0glo*Nj0glo )   ! global number of points, excluding halos 
    201199      ! 
    202200      ! ... Announce send variables.  
     
    327325         DO jm = 1, ssnd(kid)%ncplmodel 
    328326         
    329             IF( ssnd(kid)%nid(jc,jm) /= -1 ) THEN 
     327            IF( ssnd(kid)%nid(jc,jm) /= -1 ) THEN   ! exclude halos from data sent to oasis 
    330328               CALL oasis_put ( ssnd(kid)%nid(jc,jm), kstep, pdata(Nis0:Nie0, Njs0:Nje0,jc), kinfo ) 
    331329                
     
    386384                  &        kinfo == OASIS_RecvOut .OR. kinfo == OASIS_FromRestOut 
    387385                
    388                IF ( sn_cfctl%l_oasout )   WRITE(numout,*) "llaction, kinfo, kstep, ivarid: " , llaction, kinfo, kstep, srcv(kid)%nid(jc,jm) 
     386               IF ( sn_cfctl%l_oasout )   $ 
     387               &  WRITE(numout,*) "llaction, kinfo, kstep, ivarid: " , llaction, kinfo, kstep, srcv(kid)%nid(jc,jm) 
    389388                
    390                IF( llaction ) THEN 
     389               IF( llaction ) THEN   ! data received from oasis do not include halos 
    391390                   
    392391                  kinfo = OASIS_Rcv 
     
    417416         ENDDO 
    418417 
    419          !--- Fill the overlap areas and extra hallows (mpp) 
    420          !--- check periodicity conditions (all cases) 
     418         !--- we must call lbc_lnk to fill the halos that where not received. 
    421419         IF( .NOT. ll_1st ) THEN 
    422420            CALL lbc_lnk( 'cpl_oasis3', pdata(:,:,jc), srcv(kid)%clgrid, srcv(kid)%nsgn )    
Note: See TracChangeset for help on using the changeset viewer.