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.
#1794 (Duplicated lines in diaar5.F90 module) – NEMO

Opened 8 years ago

Closed 8 years ago

#1794 closed Enhancement (invalid)

Duplicated lines in diaar5.F90 module

Reported by: ctlod Owned by: nemo
Priority: low Milestone:
Component: OCE Version: v3.6
Severity: Keywords:
Cc:

Description

Context

It seems that lines dedicated to the calculation of the bottom pressure (zbotpres) and the steric effect (zssh_steric)
have been duplicated in the diaar5.F90 module.

Analysis

One of the following block should be removed.

zbotpres(:,:) = 0._wp ! no atmospheric surface pressure, levitating sea-ice

DO jk = 1, jpkm1

zbotpres(:,:) = zbotpres(:,:) + fse3t(:,:,jk) * zrhd(:,:,jk)

END DO
IF( .NOT.lk_vvl ) THEN

IF ( ln_isfcav ) THEN

DO ji=1,jpi

DO jj=1,jpj

zbotpres(ji,jj) = zbotpres(ji,jj) + sshn(ji,jj) * zrhd(ji,jj,mikt(ji,jj)) + riceload(ji,jj)

END DO

END DO

ELSE

zbotpres(:,:) = zbotpres(:,:) + sshn(:,:) * zrhd(:,:,1)

END IF

END IF
!
zarho = SUM( area(:,:) * zbotpres(:,:) )
IF( lk_mpp ) CALL mpp_sum( zarho )
zssh_steric = - zarho / area_tot
CALL iom_put( 'sshthster', zssh_steric )

Fix

...

Commit History (0)

(No commits)

Change History (1)

comment:1 Changed 8 years ago by timgraham

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

Hi Claude,

The two loops are slightly different. In one case it calculates the steric sea level and in the other it calculates the thermosteric sea level (look at the difference in the calculation of zrhd before each loop).

zbotpres is only output after the loop calculating the steric sea level but the variable is used again for the thermosteric sea level.

Note: See TracTickets for help on using tickets.