Skip to content
Snippets Groups Projects
Commit b2e55e4b authored by Sebastien Masson's avatar Sebastien Masson
Browse files

Merge branch 'cherry-pick-f5df5f58' into 'branch_4.2'

nice bugfix in diaar5, #39

See merge request nemo/nemo!74
parents 3d81d68e 08d23dcb
No related branches found
No related tags found
No related merge requests found
...@@ -79,7 +79,6 @@ CONTAINS ...@@ -79,7 +79,6 @@ CONTAINS
REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: z2d, zpe ! 2D workspace REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: z2d, zpe ! 2D workspace
REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: z3d, zrhd, ztpot, zgdept ! 3D workspace (zgdept: needed to use the substitute) REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: z3d, zrhd, ztpot, zgdept ! 3D workspace (zgdept: needed to use the substitute)
REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:) :: ztsn ! 4D workspace REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:) :: ztsn ! 4D workspace
!!-------------------------------------------------------------------- !!--------------------------------------------------------------------
IF( ln_timing ) CALL timing_start('dia_ar5') IF( ln_timing ) CALL timing_start('dia_ar5')
...@@ -318,6 +317,7 @@ CONTAINS ...@@ -318,6 +317,7 @@ CONTAINS
! !
INTEGER :: ji, jj, jk INTEGER :: ji, jj, jk
REAL(wp), DIMENSION(A2D(nn_hls)) :: z2d REAL(wp), DIMENSION(A2D(nn_hls)) :: z2d
!!----------------------------------------------------------------------
z2d(:,:) = puflx(:,:,1) z2d(:,:) = puflx(:,:,1)
DO_3D( 0, 0, 0, 0, 1, jpkm1 ) DO_3D( 0, 0, 0, 0, 1, jpkm1 )
...@@ -355,7 +355,7 @@ CONTAINS ...@@ -355,7 +355,7 @@ CONTAINS
!! ** Purpose : initialization for AR5 diagnostic computation !! ** Purpose : initialization for AR5 diagnostic computation
!!---------------------------------------------------------------------- !!----------------------------------------------------------------------
INTEGER :: inum INTEGER :: inum
INTEGER :: ik, idep INTEGER :: ik
INTEGER :: ji, jj, jk ! dummy loop indices INTEGER :: ji, jj, jk ! dummy loop indices
REAL(wp) :: zztmp REAL(wp) :: zztmp
REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:) :: zsaldta ! Jan/Dec levitus salinity REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:) :: zsaldta ! Jan/Dec levitus salinity
...@@ -384,9 +384,9 @@ CONTAINS ...@@ -384,9 +384,9 @@ CONTAINS
zvol0 (:,:) = 0._wp zvol0 (:,:) = 0._wp
thick0(:,:) = 0._wp thick0(:,:) = 0._wp
DO_3D( 1, 1, 1, 1, 1, jpkm1 ) ! interpolation of salinity at the last ocean level (i.e. the partial step) DO_3D( 1, 1, 1, 1, 1, jpkm1 ) ! interpolation of salinity at the last ocean level (i.e. the partial step)
idep = tmask(ji,jj,jk) * e3t_0(ji,jj,jk) zztmp = tmask(ji,jj,jk) * e3t_0(ji,jj,jk)
zvol0 (ji,jj) = zvol0 (ji,jj) + idep * e1e2t(ji,jj) zvol0 (ji,jj) = zvol0 (ji,jj) + zztmp * e1e2t(ji,jj)
thick0(ji,jj) = thick0(ji,jj) + idep thick0(ji,jj) = thick0(ji,jj) + zztmp
END_3D END_3D
vol0 = glob_sum( 'diaar5', zvol0 ) vol0 = glob_sum( 'diaar5', zvol0 )
DEALLOCATE( zvol0 ) DEALLOCATE( zvol0 )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment