Opened 8 years ago

Closed 8 years ago

#1049 closed Bug (fixed)

Correct ei factors in traadv_eiv

Reported by: smasson Owned by: nemo
Priority: low Milestone:
Component: OCE Version: release-3.4
Severity: Keywords:
Cc:

Description

bugfix sent by Sophie Valcke:
in traadv_eiv.F90,

e1u(ji,jj) * fse3u(ji,jj,jk) 

should be

e2u(ji,jj) * fse3u(ji,jj,jk) 

and

e2v(ji,jj) * fse3v(ji,jj,jk)

should be

e1v(ji,jj) * fse3v(ji,jj,jk)

note that similar bugfix was found in diawri.F90, see r3389 and r3395

I guess this bug affect all versions…

Commit History (3)

ChangesetAuthorTimeChangeLog
3788gm2013-02-10T13:14:59+01:00

dev_v3_4_STABLE_2012: #1049 & #1053 : bug corrections in traadv_eiv.F90 (AR5 diag) and in traadv_ubs.F90 (UBS scheme), resp.

3787gm2013-02-10T13:06:34+01:00

dev_MERGE_2012: #1049 & #1053 : bug corrections in traadv_eiv.F90 (AR5 diag) and in traadv_ubs.F90 (UBS scheme), resp.

3786gm2013-02-10T12:57:04+01:00

CMIP_IPSL branch: #1049 : bug correction (traadv_eiv.F90): diagnostic of the 2D i- & j-heat transports

Change History (2)

comment:1 Changed 8 years ago by smasson

Simular syntaxe is also found in NST_SRC/agrif_opa_sponge.F90, OPA_SRC/TRA/traldf_lap.F90 and OPA_SRC/TRD/trdvor.F90…
A careful check is needed…

bash-3.2$ grep -ir "e1u.*e3u" * | grep -v e2u
NST_SRC/agrif_opa_sponge.F90:                  zabe1 = umask(ji,jj,jk) * spe1ur(ji,jj) * fse3u(ji,jj,jk)
NST_SRC/agrif_top_sponge.F90:               zabe1 = umask(ji,jj,jk) * spe1ur(ji,jj) * fse3u(ji,jj,jk)
OPA_SRC/TRA/traadv_eiv.F90:                       &         * (tsn(ji,jj,jk,jp_tem)+tsn(ji+1,jj,jk,jp_tem)) * e1u(ji,jj) * fse3u(ji,jj,jk) 
OPA_SRC/TRA/traadv_ubs.F90:      !!                !  e1u e3u un ( mi(Tn) - zltu(i  ) )   if un(i) >= 0
OPA_SRC/TRA/traadv_ubs.F90:      !!                !  e1u e3u un ( mi(Tn) - zltu(i+1) )   if un(i) < 0
OPA_SRC/TRA/traldf_lap.F90:                  zabe1 = fsahtu(ji,jj,jk) * umask(ji,jj,jk) * e1ur(ji,jj) * fse3u(ji,jj,jk)
OPA_SRC/TRA/traldf_lap.F90:                        zabe1 = fsahtu(ji,jj,iku) * umask(ji,jj,iku) * e1ur(ji,jj) * fse3u(ji,jj,iku)
OPA_SRC/TRD/trdvor.F90:         zun(:,:) = zun(:,:) + e1u(:,:) * un(:,:,jk) * fse3u(:,:,jk)
bash-3.2$ 
bash-3.2$ 
bash-3.2$ grep -ir "e2v.*e3v" * | grep -v e1v
NST_SRC/agrif_opa_sponge.F90:                  zabe2 = vmask(ji,jj,jk) * spe2vr(ji,jj) * fse3v(ji,jj,jk)
NST_SRC/agrif_top_sponge.F90:               zabe2 = vmask(ji,jj,jk) * spe2vr(ji,jj) * fse3v(ji,jj,jk)
OPA_SRC/TRA/traadv_eiv.F90:                     &           * (tsn(ji,jj,jk,jp_tem)+tsn(ji,jj+1,jk,jp_tem)) * e2v(ji,jj) * fse3v(ji,jj,jk) 
OPA_SRC/TRA/traldf_lap.F90:                  zabe2 = fsahtv(ji,jj,jk) * vmask(ji,jj,jk) * e2vr(ji,jj) * fse3v(ji,jj,jk)
OPA_SRC/TRA/traldf_lap.F90:                        zabe2 = fsahtv(ji,jj,ikv) * vmask(ji,jj,ikv) * e2vr(ji,jj) * fse3v(ji,jj,ikv)
OPA_SRC/TRD/trdvor.F90:         zvn(:,:) = zvn(:,:) + e2v(:,:) * vn(:,:,jk) * fse3v(:,:,jk)

comment:2 Changed 8 years ago by gm

  • Resolution set to fixed
  • Status changed from new to closed

Thanks Sophie !

The bug concerns on-line diagnostics only. It has been introduced together with the AR5 diagnostics (key_diaar5). It has been corrected in diawri.F90 (both trunk and CMIP5_IPSL branch) as well as in traldf_iso_grif.F90. Unfortunately, the correction has been forgotten for traadv_eiv.F90. It concerns the v3.4.1 stable, the v3.5alpha and the CMIP5_IPSL branch.

change done :  

see  Changeset 3786 for branches/CMIP5_IPSL

see Changeset 3788 for branches/2012/dev_v3_4_STABLE_2012 (v3.4.1 stable)

see Changeset 3787 for branches/2012/dev_MERGE_2012 (v3.5 alpha)

Note that the later two change set also contain a bug fix on UBS scheme (see ticket #1053)

For the other potential issues (Sebastian comment) : I found no problem except in comments for UBS:

  • in NST_SRC/agrif_opa_sponge.F90 : no error found as spe1ur and spe2vr are properly defined (=e2u/e1u, =e1v/e2v, resp.)
  • in OPA_SRC/TRA/traadv_ubs.F90 : the error is the header of the routine (i.e. comments), not in the compuation
  • in OPA_SRC/TRA/traldf_lap.F90 : OK same remark as for agrif_opa_sponge.F90 but here for e1ur(=e2u/e1u) and e2vr(=e1v/e2v) which are properly defined.
  • in OPA_SRC/TRD/trdvor.F90 : no error. zun, zvn are used to compute the curl, so it is the contravariant velocity which is used (i.e. e1*u, e2*v) not the covariant one (i.e. e2*u, e1*v)

Gurvan

Note: See TracTickets for help on using tickets.