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 4573 for branches – NEMO

Changeset 4573 for branches


Ignore:
Timestamp:
2014-03-26T09:27:21+01:00 (10 years ago)
Author:
pabouttier
Message:

Fix the case where jpi is odd, in northfold treatment for T-point in div_cur_adj (divcur_tam.F90 module), see Ticket #1270

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2012/dev_v3_4_STABLE_2012/NEMOGCM/NEMO/OPATAM_SRC/DYN/divcur_tam.F90

    r3627 r4573  
    355355      REAL(KIND=wp), POINTER, DIMENSION(:,:) :: & 
    356356         & zwv    ! Workspace 
     357      REAL(wp) :: & 
     358         & ztmp 
    357359      !!---------------------------------------------------------------------- 
    358360      IF( nn_timing == 1 )  CALL timing_start('div_cur_adj') 
     
    451453         ELSEIF( nperio == 5 .OR. nperio == 6 ) THEN 
    452454            ! north fold ( Grid defined with a F-point pivot) ORCA 0.5 degree 
    453             DO ji = jpi+2, jpi/2+1, -1 
     455            DO ji = jpi+2, jpi/2+1, -1 ! if jpi is odd, you can get ji=ijt hence the use of ztmp 
    454456               ijt = jpi - ji + 1 
    455                zwv(ijt,jpjm1) = zwv(ijt,jpjm1) - zwv(ji,jpjm1) 
    456                zwv(ji ,jpjm1) = 0.0_wp 
     457               ztmp = zwv(ji, jpjm1) 
     458               zwv(ji, jpjm1) = 0.0_wp 
     459               zwv(ijt,jpjm1) = zwv(ijt,jpjm1) - ztmp 
    457460            END DO 
    458461            DO ji = jpi+2, -1, -1 
Note: See TracChangeset for help on using the changeset viewer.