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 3374 for branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB/icblbc.F90 – NEMO

Ignore:
Timestamp:
2012-04-30T13:24:25+02:00 (12 years ago)
Author:
sga
Message:

NEMO branch dev_r3337_NOCS10_ICB: adopt mig, mjg, mi1 and mj1 for improved obscurity

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB/icblbc.F90

    r3372 r3374  
    9393            pt => this%current_point 
    9494            iine = INT( pt%xi + 0.5 ) 
    95             IF( iine > nimpp+nicbei-1 ) THEN 
     95            IF( iine > mig(nicbei) ) THEN 
    9696               pt%xi = ricb_right + MOD(pt%xi, 1._wp ) - 1._wp 
    97             ELSE IF( iine < nimpp+nicbdi-1 ) THEN 
     97            ELSE IF( iine < mig(nicbdi) ) THEN 
    9898               pt%xi = ricb_left + MOD(pt%xi, 1._wp ) 
    9999            ENDIF 
     
    129129         pt => this%current_point 
    130130         ijne = INT( pt%yj + 0.5 ) 
    131          IF( ijne .GT. njmpp+nicbej-1 ) THEN 
     131         IF( ijne .GT. mjg(nicbej) ) THEN 
    132132            ! 
    133133            iine = INT( pt%xi + 0.5 ) 
    134             ipts  = nicbfldpts (iine-nimpp+1) 
     134            ipts  = nicbfldpts (mi1(iine)) 
    135135            ! 
    136136            ! moving across the cut line means both position and 
     
    236236            pt => this%current_point 
    237237            iine = INT( pt%xi + 0.5 ) 
    238             IF( ipe_E >= 0 .AND. iine > nimpp+nicbei-1 ) THEN 
     238            IF( ipe_E >= 0 .AND. iine > mig(nicbei) ) THEN 
    239239               tmpberg => this 
    240240               this => this%next 
     
    249249               CALL icb_pack_into_buffer( tmpberg, obuffer_e, ibergs_to_send_e) 
    250250               CALL icb_utl_delete(first_berg, tmpberg) 
    251             ELSE IF( ipe_W >= 0 .AND. iine < nimpp+nicbdi-1 ) THEN 
     251            ELSE IF( ipe_W >= 0 .AND. iine < mig(nicbdi) ) THEN 
    252252               tmpberg => this 
    253253               this => this%next 
     
    374374            pt => this%current_point 
    375375            ijne = INT( pt%yj + 0.5 ) 
    376             IF( ipe_N >= 0 .AND. ijne .GT. njmpp+nicbej-1 ) THEN 
     376            IF( ipe_N >= 0 .AND. ijne .GT. mjg(nicbej) ) THEN 
    377377               tmpberg => this 
    378378               this => this%next 
     
    384384               CALL icb_pack_into_buffer( tmpberg, obuffer_n, ibergs_to_send_n) 
    385385               CALL icb_utl_delete(first_berg, tmpberg) 
    386             ELSE IF( ipe_S >= 0 .AND. ijne .LT. njmpp+nicbdj-1 ) THEN 
     386            ELSE IF( ipe_S >= 0 .AND. ijne .LT. mjg(nicbdj) ) THEN 
    387387               tmpberg => this 
    388388               this => this%next 
     
    542542            iine = INT( pt%xi + 0.5 ) 
    543543            ijne = INT( pt%yj + 0.5 ) 
    544 !           CALL check_position(grd, this, 'exchange (bot)') 
    545             IF( iine .LT. nimpp+nicbdi-1 .OR. & 
    546                 iine .GT. nimpp+nicbei-1 .OR. & 
    547                 ijne .LT. njmpp+nicbdj-1 .OR. & 
    548                 ijne .GT. njmpp+nicbej-1) THEN 
     544            IF( iine .LT. mig(nicbdi) .OR. & 
     545                iine .GT. mig(nicbei) .OR. & 
     546                ijne .LT. mjg(nicbdj) .OR. & 
     547                ijne .GT. mjg(nicbej)) THEN 
    549548               i = i + 1 
    550549               WRITE(numicb,*) 'berg lost in halo: ', this%number(:),iine,ijne 
     
    607606               iine = INT( pt%xi + 0.5 ) 
    608607               ijne = INT( pt%yj + 0.5 ) 
    609                ipts  = nicbfldpts (iine-nimpp+1) 
    610                iproc = nicbflddest(iine-nimpp+1) 
    611                IF( ijne .GT. njmpp+nicbej-1 ) THEN 
     608               ipts  = nicbfldpts (mi1(iine)) 
     609               iproc = nicbflddest(mi1(iine)) 
     610               IF( ijne .GT. mjg(nicbej) ) THEN 
    612611                  IF( iproc == ifldproc ) THEN 
    613612                     ! 
Note: See TracChangeset for help on using the changeset viewer.