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 9456 for branches/2017 – NEMO

Changeset 9456 for branches/2017


Ignore:
Timestamp:
2018-04-04T09:24:34+02:00 (6 years ago)
Author:
cetlod
Message:

dev_merge : Bugfix to avoid out-of-bounds in CFC model, see ticket #2073

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/CFC/trcsms_cfc.F90

    r9124 r9456  
    7272      INTEGER, INTENT(in) ::   kt    ! ocean time-step index 
    7373      ! 
    74       INTEGER  ::   ji, jj, jn, jl, jm, js 
     74      INTEGER  ::   ji, jj, jn, jl, jm 
    7575      INTEGER  ::   iyear_beg, iyear_end 
    7676      INTEGER  ::   im1, im2, ierr 
     
    173173            &                    'at it= ', kt,' date= ', ndastp 
    174174         IF(lwp) WRITE(numout,*) '~~~~' 
     175         jl = 0 
    175176         DO jn = jp_cfc0, jp_cfc1 
    176             CALL iom_rstput( kt, nitrst, numrtw, 'qint_'//ctrcnm(jn), qint_cfc(:,:,jn) ) 
     177             jl = jl + 1 
     178            CALL iom_rstput( kt, nitrst, numrtw, 'qint_'//ctrcnm(jn), qint_cfc(:,:,jl) ) 
    177179         END DO 
    178180      ENDIF                                             
     
    204206      !! ** Purpose : sets constants for CFC model 
    205207      !!--------------------------------------------------------------------- 
    206       INTEGER ::   jn   ! 
     208      INTEGER ::   jn, jl   ! 
    207209      !!---------------------------------------------------------------------- 
    208210      ! 
     
    288290         IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~' 
    289291         ! 
     292         jl = 0 
    290293         DO jn = jp_cfc0, jp_cfc1 
    291             CALL iom_get( numrtr, jpdom_autoglo, 'qint_'//ctrcnm(jn), qint_cfc(:,:,jn) )  
     294            jl = jl + 1 
     295            CALL iom_get( numrtr, jpdom_autoglo, 'qint_'//ctrcnm(jn), qint_cfc(:,:,jl) )  
    292296         END DO 
    293297      ENDIF 
Note: See TracChangeset for help on using the changeset viewer.