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.
#771 (Bug in traldf_iso.F90 in the AR5 diagnostics) – NEMO

Opened 13 years ago

Closed 13 years ago

Last modified 8 years ago

#771 closed Bug (fixed)

Bug in traldf_iso.F90 in the AR5 diagnostics

Reported by: gm Owned by: nemo
Priority: low Milestone:
Component: OCE Version: v3.2
Severity: Keywords: DIA TRA
Cc:

Description

An error has been introduced in the AR5 diagnostic of the diffusive heat flux associated with the isoneutral diffusion (traldf_iso.F90 module). Apparently a copy/past has been made from the traldf_eiv.F90. Unfortunately it is not the same diagnostics. In traldf_eiv, the bolus velocity is computed, so the bolus induced heat transport is obtained by multiplying the bolus velocity by the temperature and the surface of the lateral cell. In traldf_iso, the horizontal component of the isoneutral fluxes is computed (zftu,zftv), so only a vertical sum is needed.

CAUTION : the bug all concern the CMIP5_IPSL branch as well as V3.3beta. In the v3.3beta, both traldf_iso.F90 and traldf_iso_grif.F90 are affected.

Note that the correction has already been made in v3.3beta (see changeset:2450)

The following lines:

#if defined key_diaar5
      zztmp = 0.5 * rau0 * rcp 
      z2d(:,:) = 0.e0 
      DO jk = 1, jpkm1
         DO jj = 2, jpjm1
            DO ji = fs_2, fs_jpim1   ! vector opt.
               z2d(ji,jj) = z2d(ji,jj) + zztmp * zftu(ji,jj,jk) * ( tn(ji,jj,jk) + tn(ji+1,jj,jk) ) * e1u(ji,jj) * fse3u(ji,jj,jk) 
            END DO
         END DO
      END DO
      CALL lbc_lnk( z2d, 'U', -1. )
      CALL iom_put( "udiff_heattr", z2d )                  ! heat transport in i-direction
      z2d(:,:) = 0.e0 
      DO jk = 1, jpkm1
         DO jj = 2, jpjm1
            DO ji = fs_2, fs_jpim1   ! vector opt.
               z2d(ji,jj) = z2d(ji,jj) + zztmp * zftv(ji,jj,jk) * ( tn(ji,jj,jk) + tn(ji,jj+1,jk) ) * e2v(ji,jj) * fse3v(ji,jj,jk) 
            END DO
         END DO
      END DO
      CALL lbc_lnk( z2d, 'V', -1. )
      CALL iom_put( "vdiff_heattr", z2d )                  !  heat transport in i-direction
#endif

should be replaced by:

#if defined key_diaar5
      zztmp = rau0 * rcp 
      z2d(:,:) = 0.e0 
      DO jk = 1, jpkm1
         DO jj = 2, jpjm1
            DO ji = fs_2, fs_jpim1   ! vector opt.
               z2d(ji,jj) = z2d(ji,jj) + zftu(ji,jj,jk)
            END DO
         END DO
      END DO
      z2d(:,:) = z2d(:,:) * zztmp
      CALL lbc_lnk( z2d, 'U', -1. )
      CALL iom_put( "udiff_heattr", z2d )                  ! heat transport in i-direction
      DO jk = 1, jpkm1
         DO jj = 2, jpjm1
            DO ji = fs_2, fs_jpim1   ! vector opt.
               z2d(ji,jj) = z2d(ji,jj) + zftv(ji,jj,jk) 
            END DO
         END DO
      END DO
      z2d(:,:) = z2d(:,:) * zztmp
      CALL lbc_lnk( z2d, 'V', -1. )
      CALL iom_put( "vdiff_heattr", z2d )                  !  heat transport in i-direction
#endif

Commit History (2)

ChangesetAuthorTimeChangeLog
2469cetlod2010-12-08T15:44:11+01:00

v3.3beta : minor bug correction on traldf_iso(*), see ticket #771

2468cetlod2010-12-08T15:42:16+01:00

v3.2:bug correction on diffusive heat flux for AR5 diag. see ticket #771

Change History (4)

comment:1 Changed 13 years ago by cetlod

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

(*) array z2d(:,:) must be reset to zero before compute the heat transport in j-direction

comment:2 Changed 8 years ago by nicolasmartin

  • Milestone 2010 Stream 1: User Interfaces deleted

Milestone 2010 Stream 1: User Interfaces deleted

comment:3 Changed 8 years ago by nicolasmartin

  • Keywords TRA added; traldf_iso removed

comment:4 Changed 8 years ago by nicolasmartin

  • Keywords DIA added; key_diaar5 removed
Note: See TracTickets for help on using tickets.