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 – NEMO

Changeset 3374


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

Location:
branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB
Files:
6 edited

Legend:

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

    r3373 r3374  
    133133                  newpt%lon = glamt(ji,jj)         ! at t-point (centre of the cell) 
    134134                  newpt%lat = gphit(ji,jj) 
    135                   newpt%xi  = REAL( nimpp+ji-1, wp ) 
    136                   newpt%yj  = REAL( njmpp+jj-1, wp ) 
     135                  newpt%xi  = REAL( mig(ji), wp ) 
     136                  newpt%yj  = REAL( mjg(jj), wp ) 
    137137                  ! 
    138138                  newpt%uvel = 0._wp               ! initially at rest 
  • branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB/icbdyn.F90

    r3373 r3374  
    194194      ! 
    195195      ! map into current processor 
    196       ii0 = ii0 - nimpp + 1 
    197       ij0 = ij0 - njmpp + 1 
    198       ii  = ii  - nimpp + 1 
    199       ij  = ij  - njmpp + 1 
     196      ii0 = mi1( ii0 ) 
     197      ij0 = mj1( ij0 ) 
     198      ii  = mi1( ii  ) 
     199      ij  = mj1( ij  ) 
    200200      ! 
    201201      IF(  tmask(ii,ij,1)  /=   0._wp  )   RETURN           ! berg reach a new t-cell, but an ocean one 
  • branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB/icbini.F90

    r3372 r3374  
    106106         DO ji = 1, jpi 
    107107            src_calving_hflx(ji,jj) = narea 
    108             src_calving     (ji,jj) = nicbpack * (njmpp+jj-1) + nimpp+ji-1   !!gm use here mjg(jj) and mig(ji)... 
    109 !!gm        src_calving     (ji,jj) = nicbpack * mjg(jj) + mig(ji) 
     108            src_calving     (ji,jj) = nicbpack * mjg(jj) + mig(ji) 
    110109         END DO 
    111110      END DO 
     
    124123         i1 = i3 - i2*nicbpack 
    125124         i3 = INT( src_calving_hflx(ji,jj) ) 
    126          IF( i1 == nimpp+ji-1 .AND. i3 == narea ) THEN 
     125         IF( i1 == mig(ji) .AND. i3 == narea ) THEN 
    127126            IF( nicbdi < 0 ) THEN   ;   nicbdi = ji 
    128127            ELSE                    ;   nicbei = ji 
     
    140139         i1 = i3 - i2*nicbpack 
    141140         i3 = INT( src_calving_hflx(ji,jj) ) 
    142          IF( i2 == njmpp+jj-1 .AND. i3 == narea ) THEN 
     141         IF( i2 == mjg(jj) .AND. i3 == narea ) THEN 
    143142            IF( nicbdj < 0 ) THEN   ;   nicbdj = jj 
    144143            ELSE                    ;   nicbej = jj 
     
    300299                rn_test_box(3) < gphit(ji,jj) .AND. gphit(ji,jj) < rn_test_box(4) ) THEN 
    301300               localberg%mass_scaling = rn_mass_scaling(iberg) 
    302                localpt%xi = REAL( nimpp+ji-1, wp ) 
    303                localpt%yj = REAL( njmpp+jj-1, wp ) 
     301               localpt%xi = REAL( mig(ji), wp ) 
     302               localpt%yj = REAL( mjg(jj), wp ) 
    304303               localpt%lon = icb_utl_bilin(glamt, localpt%xi, localpt%yj, 'T', 0, 0 ) 
    305304               localpt%lat = icb_utl_bilin(gphit, localpt%xi, localpt%yj, 'T', 0, 0 ) 
  • 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                     ! 
  • branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB/icbthm.F90

    r3373 r3374  
    8282         zxi  = pt%xi                                      ! position in (i,j) referential 
    8383         zyj  = pt%yj 
    84          ii  = INT( zxi + 0.5 ) - nimpp + 1                    ! t-cell of the berg 
    85          ij  = INT( zyj + 0.5 ) - njmpp + 1 
     84         ii  = INT( zxi + 0.5 )                            ! T-cell of the berg 
     85         ii  = mi1( ii ) 
     86         ij  = INT( zyj + 0.5 )               
     87         ij  = mi1( ij ) 
    8688         zVol = zT * zW * zL 
    8789         zdt = berg_dt   ;   z1_dt = 1._wp / zdt 
  • branches/2012/dev_r3337_NOCS10_ICB/NEMOGCM/NEMO/OPA_SRC/ICB/icbutl.F90

    r3373 r3374  
    215215      ! 
    216216      ! find position in this processor 
    217       ii = ii - nimpp + 1 
    218       ij = ij - njmpp + 1 
     217      ii = mi1( ii ) 
     218      ij = mj1( ij ) 
    219219      ! 
    220220      icb_utl_bilin = ( pfld(ii,ij  ) * (1.-zi) + pfld(ii+1,ij  ) * zi ) * (1.-zj)   & 
     
    253253      ! 
    254254      ! find position in this processor          !!gm use here mig, mjg arrays 
    255       ii = ii - nimpp + 1 
    256       ij = ij - njmpp + 1 
     255      ii = mi1( ii ) 
     256      ij = mj1( ij ) 
    257257      z4(1) = pfld(ii  ,ij  ) 
    258258      z4(2) = pfld(ii+1,ij  ) 
     
    303303 
    304304      ! find position in this processor 
    305       ii = ii - nimpp + 1 
    306       ij = ij - njmpp + 1 
     305      ii = mi1( ii ) 
     306      ij = mj1( ij ) 
    307307 
    308308      IF(    0.0_wp <= zi .AND. zi < 0.5_wp   ) THEN 
Note: See TracChangeset for help on using the changeset viewer.