Opened 9 years ago
Closed 7 years ago
#1641 closed Bug (fixed)
Small Bug in AGRIF (agrif_opa_interp.F90)
Reported by: | gm | Owned by: | jchanut |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | AGRIF | Version: | v3.6 |
Severity: | minor | Keywords: | |
Cc: |
Description
In agrif_opa_interp, I think the subroutine interpun and interpvn has 2 small bugs (small as interpun, & vn are probably always call with k2=jpk).
This concerns both the trunk and the v3.6 stable
Two external do loops (jk-loop) have a wrong bound for example in interpvn:
SUBROUTINE interpvn(ptab,i1,i2,j1,j2,k1,k2, before) !!--------------------------------------------- !! *** ROUTINE interpvn *** !!--------------------------------------------- ! INTEGER, INTENT(in) :: i1,i2,j1,j2,k1,k2 REAL(wp), DIMENSION(i1:i2,j1:j2,k1:k2), INTENT(inout) :: ptab LOGICAL, INTENT(in) :: before ! INTEGER :: ji,jj,jk REAL(wp) :: zrhox !!--------------------------------------------- ! IF (before) THEN !interpv entre 1 et k2 et interpv2d en jpkp1 DO jk=k1,jpk DO jj=j1,j2 DO ji=i1,i2 ptab(ji,jj,jk) = e1v(ji,jj) * vn(ji,jj,jk) ptab(ji,jj,jk) = ptab(ji,jj,jk) * fse3v(ji,jj,jk) END DO END DO END DO ELSE zrhox= Agrif_Rhox() DO jk=1,jpkm1 DO jj=j1,j2 va(i1:i2,jj,jk) = (ptab(i1:i2,jj,jk)/(zrhox*e1v(i1:i2,jj))) va(i1:i2,jj,jk) = va(i1:i2,jj,jk) / fse3v(i1:i2,jj,jk) END DO END DO ENDIF ! END SUBROUTINE interpvn
DO jk=k1,k2 and DO jk=1,k2-1 should be used ?
Commit History (1)
Changeset | Author | Time | ChangeLog |
---|---|---|---|
8633 | jchanut | 2017-10-18T16:40:42+02:00 | Fix for ticket #1641 |
Change History (3)
comment:1 Changed 9 years ago by clevy
- Owner changed from NEMO team to jchanut
comment:2 Changed 7 years ago by lovato
- Component changed from OPA to AGRIF
comment:3 Changed 7 years ago by jchanut
- Resolution set to fixed
- Severity set to minor
- Status changed from new to closed
- Version changed from trunk to v3.6
Note: See
TracTickets for help on using
tickets.
k1=1 in fact since vertical refinement is not allowed, so there is no consequence. For consistency with the rest of the code, let's replace k1 by 1 and restrict vertical loops to jpkm1 at the same time.
Done at revision 8633