Commit abe17357 authored by Knut's avatar Knut

Merge branch 'STDERR_DIR' into INPUT_DIR

parents 4941b8a7 2464b326
Pipeline #153 failed with stages
...@@ -390,16 +390,18 @@ ...@@ -390,16 +390,18 @@
select case (bdy_2d_type(l)) select case (bdy_2d_type(l))
case (ZERO_GRADIENT,CLAMPED_VEL,FLATHER_VEL) case (ZERO_GRADIENT,CLAMPED_VEL,FLATHER_VEL)
do j = wfj(n),wlj(n) do j = wfj(n),wlj(n)
z(i,j) = z(i+1,j) if ( az(i+1,j) .ne. 0 ) z(i,j) = z(i+1,j)
end do end do
case (SOMMERFELD) case (SOMMERFELD)
do j = wfj(n),wlj(n) do j = wfj(n),wlj(n)
if ( az(i+1,j) .ne. 0 ) then
cfl = sqrt(g*_HALF_*(D(i,j)+D(i+1,j)))*dtm/DXU cfl = sqrt(g*_HALF_*(D(i,j)+D(i+1,j)))*dtm/DXU
z(i,j) = ( & z(i,j) = ( &
(_ONE_ - _TWO_*cfl*(_ONE_-theta))*z (i ,j) & (_ONE_ - _TWO_*cfl*(_ONE_-theta))*z (i ,j) &
+(_ONE_ + _TWO_*cfl*(_ONE_-theta))*zo(i+1,j) & +(_ONE_ + _TWO_*cfl*(_ONE_-theta))*zo(i+1,j) &
-(_ONE_ - _TWO_*cfl*theta )*z (i+1,j) & -(_ONE_ - _TWO_*cfl*theta )*z (i+1,j) &
)/(_ONE_ + _TWO_*cfl*theta ) )/(_ONE_ + _TWO_*cfl*theta )
end if
end do end do
case (CLAMPED_ELEV,CLAMPED) case (CLAMPED_ELEV,CLAMPED)
do j = wfj(n),wlj(n) do j = wfj(n),wlj(n)
...@@ -409,13 +411,16 @@ ...@@ -409,13 +411,16 @@
end do end do
case (FLATHER_ELEV) case (FLATHER_ELEV)
do j = wfj(n),wlj(n) do j = wfj(n),wlj(n)
if ( az(i+1,j) .ne. 0 ) then
! Note (KK): approximate interface depths at vel-time stage ! Note (KK): approximate interface depths at vel-time stage
! by spatial mean at last sse-time stage ! by spatial mean at last sse-time stage
depth = _HALF_*(D(i,j)+D(i+1,j)) depth = _HALF_*(D(i,j)+D(i+1,j))
! Note (KK): note approximation of sse at vel-time stage ! Note (KK): note approximation of sse at vel-time stage
a = ramp*bdy_data(kl) & a = _TWO_/sqrt(g*depth)*(U(i,j)-ramp*bdy_data_u(kl)*depth)
- _TWO_/sqrt(g*depth)*(U(i,j)-ramp*bdy_data_u(kl)*depth) else
z(i,j) = max(a,-H(i,j)+min_depth) a = _ZERO_
end if
z(i,j) = max(ramp*bdy_data(kl)-a,-H(i,j)+min_depth)
k = k+1 k = k+1
kl = kl + 1 kl = kl + 1
end do end do
...@@ -429,16 +434,18 @@ ...@@ -429,16 +434,18 @@
select case (bdy_2d_type(l)) select case (bdy_2d_type(l))
case (ZERO_GRADIENT,CLAMPED_VEL,FLATHER_VEL) case (ZERO_GRADIENT,CLAMPED_VEL,FLATHER_VEL)
do i = nfi(n),nli(n) do i = nfi(n),nli(n)
z(i,j) = z(i,j-1) if ( az(i,j-1) .ne. 0 ) z(i,j) = z(i,j-1)
end do end do
case (SOMMERFELD) case (SOMMERFELD)
do i = nfi(n),nli(n) do i = nfi(n),nli(n)
if ( az(i,j-1) .ne. 0 ) then
cfl = sqrt(g*_HALF_*(D(i,j-1)+D(i,j)))*dtm/DYVJM1 cfl = sqrt(g*_HALF_*(D(i,j-1)+D(i,j)))*dtm/DYVJM1
z(i,j) = ( & z(i,j) = ( &
(_ONE_ - _TWO_*cfl*(_ONE_-theta))*z (i,j ) & (_ONE_ - _TWO_*cfl*(_ONE_-theta))*z (i,j ) &
+(_ONE_ + _TWO_*cfl*(_ONE_-theta))*zo(i,j-1) & +(_ONE_ + _TWO_*cfl*(_ONE_-theta))*zo(i,j-1) &
-(_ONE_ - _TWO_*cfl*theta )*z (i,j-1) & -(_ONE_ - _TWO_*cfl*theta )*z (i,j-1) &
)/(_ONE_ + _TWO_*cfl*theta ) )/(_ONE_ + _TWO_*cfl*theta )
end if
end do end do
case (CLAMPED_ELEV,CLAMPED) case (CLAMPED_ELEV,CLAMPED)
do i = nfi(n),nli(n) do i = nfi(n),nli(n)
...@@ -448,13 +455,16 @@ ...@@ -448,13 +455,16 @@
end do end do
case (FLATHER_ELEV) case (FLATHER_ELEV)
do i = nfi(n),nli(n) do i = nfi(n),nli(n)
if ( az(i,j-1) .ne. 0 ) then
! Note (KK): approximate interface depths at vel-time stage ! Note (KK): approximate interface depths at vel-time stage
! by spatial mean at last sse-time stage ! by spatial mean at last sse-time stage
depth = _HALF_*(D(i,j-1)+D(i,j)) depth = _HALF_*(D(i,j-1)+D(i,j))
! Note (KK): note approximation of sse at vel-time stage ! Note (KK): note approximation of sse at vel-time stage
a = ramp*bdy_data(kl) & a = _TWO_/sqrt(g*depth)*(V(i,j-1)-ramp*bdy_data_v(kl)*depth)
+ _TWO_/sqrt(g*depth)*(V(i,j-1)-ramp*bdy_data_v(kl)*depth) else
z(i,j) = max(a,-H(i,j)+min_depth) a = _ZERO_
end if
z(i,j) = max(ramp*bdy_data(kl)+a,-H(i,j)+min_depth)
k = k+1 k = k+1
kl = kl + 1 kl = kl + 1
end do end do
...@@ -468,16 +478,18 @@ ...@@ -468,16 +478,18 @@
select case (bdy_2d_type(l)) select case (bdy_2d_type(l))
case (ZERO_GRADIENT,CLAMPED_VEL,FLATHER_VEL) case (ZERO_GRADIENT,CLAMPED_VEL,FLATHER_VEL)
do j = efj(n),elj(n) do j = efj(n),elj(n)
z(i,j) = z(i-1,j) if ( az(i-1,j) .ne. 0 ) z(i,j) = z(i-1,j)
end do end do
case (SOMMERFELD) case (SOMMERFELD)
do j = efj(n),elj(n) do j = efj(n),elj(n)
if ( az(i-1,j) .ne. 0 ) then
cfl = sqrt(g*_HALF_*(D(i-1,j)+D(i,j)))*dtm/DXUIM1 cfl = sqrt(g*_HALF_*(D(i-1,j)+D(i,j)))*dtm/DXUIM1
z(i,j) = ( & z(i,j) = ( &
(_ONE_ - _TWO_*cfl*(_ONE_-theta))*z (i ,j) & (_ONE_ - _TWO_*cfl*(_ONE_-theta))*z (i ,j) &
+(_ONE_ + _TWO_*cfl*(_ONE_-theta))*zo(i-1,j) & +(_ONE_ + _TWO_*cfl*(_ONE_-theta))*zo(i-1,j) &
-(_ONE_ - _TWO_*cfl*theta )*z (i-1,j) & -(_ONE_ - _TWO_*cfl*theta )*z (i-1,j) &
)/(_ONE_ + _TWO_*cfl*theta ) )/(_ONE_ + _TWO_*cfl*theta )
end if
end do end do
case (CLAMPED_ELEV,CLAMPED) case (CLAMPED_ELEV,CLAMPED)
do j = efj(n),elj(n) do j = efj(n),elj(n)
...@@ -487,13 +499,16 @@ ...@@ -487,13 +499,16 @@
end do end do
case (FLATHER_ELEV) case (FLATHER_ELEV)
do j = efj(n),elj(n) do j = efj(n),elj(n)
if ( az(i-1,j) .ne. 0 ) then
! Note (KK): approximate interface depths at vel-time stage ! Note (KK): approximate interface depths at vel-time stage
! by spatial mean at last sse-time stage ! by spatial mean at last sse-time stage
depth = _HALF_*(D(i-1,j)+D(i,j)) depth = _HALF_*(D(i-1,j)+D(i,j))
! Note (KK): note approximation of sse at vel-time stage ! Note (KK): note approximation of sse at vel-time stage
a = ramp*bdy_data(kl) & a = _TWO_/sqrt(g*depth)*(U(i-1,j)-ramp*bdy_data_u(kl)*depth)
+ _TWO_/sqrt(g*depth)*(U(i-1,j)-ramp*bdy_data_u(kl)*depth) else
z(i,j) = max(a,-H(i,j)+min_depth) a = _ZERO_
end if
z(i,j) = max(ramp*bdy_data(kl)+a,-H(i,j)+min_depth)
k = k+1 k = k+1
kl = kl + 1 kl = kl + 1
end do end do
...@@ -507,16 +522,18 @@ ...@@ -507,16 +522,18 @@
select case (bdy_2d_type(l)) select case (bdy_2d_type(l))
case (ZERO_GRADIENT,CLAMPED_VEL,FLATHER_VEL) case (ZERO_GRADIENT,CLAMPED_VEL,FLATHER_VEL)
do i = sfi(n),sli(n) do i = sfi(n),sli(n)
z(i,j) = z(i,j+1) if ( az(i,j+1) .ne. 0 ) z(i,j) = z(i,j+1)
end do end do
case (SOMMERFELD) case (SOMMERFELD)
do i = sfi(n),sli(n) do i = sfi(n),sli(n)
if ( az(i,j+1) .ne. 0 ) then
cfl = sqrt(g*_HALF_*(D(i,j)+D(i,j+1)))*dtm/DYV cfl = sqrt(g*_HALF_*(D(i,j)+D(i,j+1)))*dtm/DYV
z(i,j) = ( & z(i,j) = ( &
(_ONE_ - _TWO_*cfl*(_ONE_-theta))*z (i,j ) & (_ONE_ - _TWO_*cfl*(_ONE_-theta))*z (i,j ) &
+(_ONE_ + _TWO_*cfl*(_ONE_-theta))*zo(i,j+1) & +(_ONE_ + _TWO_*cfl*(_ONE_-theta))*zo(i,j+1) &
-(_ONE_ - _TWO_*cfl*theta )*z (i,j+1) & -(_ONE_ - _TWO_*cfl*theta )*z (i,j+1) &
)/(_ONE_ + _TWO_*cfl*theta ) )/(_ONE_ + _TWO_*cfl*theta )
end if
end do end do
case (CLAMPED_ELEV,CLAMPED) case (CLAMPED_ELEV,CLAMPED)
do i = sfi(n),sli(n) do i = sfi(n),sli(n)
...@@ -526,13 +543,16 @@ ...@@ -526,13 +543,16 @@
end do end do
case (FLATHER_ELEV) case (FLATHER_ELEV)
do i = sfi(n),sli(n) do i = sfi(n),sli(n)
if ( az(i,j+1) .ne. 0 ) then
! Note (KK): approximate interface depths at vel-time stage ! Note (KK): approximate interface depths at vel-time stage
! by spatial mean at last sse-time stage ! by spatial mean at last sse-time stage
depth = _HALF_*(D(i,j)+D(i,j+1)) depth = _HALF_*(D(i,j)+D(i,j+1))
! Note (KK): note approximation of sse at vel-time stage ! Note (KK): note approximation of sse at vel-time stage
a = ramp*bdy_data(kl) & a = _TWO_/sqrt(g*depth)*(V(i,j)-ramp*bdy_data_v(kl)*depth)
- _TWO_/sqrt(g*depth)*(V(i,j)-ramp*bdy_data_v(kl)*depth) else
z(i,j) = max(a,-H(i,j)+min_depth) a = _ZERO_
end if
z(i,j) = max(ramp*bdy_data(kl)-a,-H(i,j)+min_depth)
k = k+1 k = k+1
kl = kl + 1 kl = kl + 1
end do end do
...@@ -627,6 +647,7 @@ ...@@ -627,6 +647,7 @@
select case (bdy_2d_type(l)) select case (bdy_2d_type(l))
case (FLATHER_VEL) case (FLATHER_VEL)
do j = wfj(n),wlj(n) do j = wfj(n),wlj(n)
if ( az(i+1,j) .ne. 0 ) then
! Note (KK): approximate interface depths at vel-time stage ! Note (KK): approximate interface depths at vel-time stage
! by spatial mean at last sse-time stage ! by spatial mean at last sse-time stage
depth = _HALF_*(D(i,j)+D(i+1,j)) depth = _HALF_*(D(i,j)+D(i+1,j))
...@@ -636,11 +657,13 @@ ...@@ -636,11 +657,13 @@
if ( waveforcing_method .ne. NO_WAVES ) then if ( waveforcing_method .ne. NO_WAVES ) then
UEuler(i,j) = U(i,j) - UStokes(i,j) UEuler(i,j) = U(i,j) - UStokes(i,j)
end if end if
end if
k = k+1 k = k+1
kl = kl + 1 kl = kl + 1
end do end do
case (CLAMPED_VEL,CLAMPED) case (CLAMPED_VEL,CLAMPED)
do j = wfj(n),wlj(n) do j = wfj(n),wlj(n)
if ( az(i+1,j) .ne. 0 ) then
! Note (KK): approximate interface depths at vel-time stage ! Note (KK): approximate interface depths at vel-time stage
! by spatial mean at last sse-time stage ! by spatial mean at last sse-time stage
depth = _HALF_*(D(i,j)+D(i+1,j)) depth = _HALF_*(D(i,j)+D(i+1,j))
...@@ -648,6 +671,7 @@ ...@@ -648,6 +671,7 @@
if ( waveforcing_method .ne. NO_WAVES ) then if ( waveforcing_method .ne. NO_WAVES ) then
UEuler(i,j) = U(i,j) - UStokes(i,j) UEuler(i,j) = U(i,j) - UStokes(i,j)
end if end if
end if
k = k+1 k = k+1
kl = kl + 1 kl = kl + 1
end do end do
...@@ -662,6 +686,7 @@ ...@@ -662,6 +686,7 @@
select case (bdy_2d_type(l)) select case (bdy_2d_type(l))
case (FLATHER_VEL) case (FLATHER_VEL)
do j = efj(n),elj(n) do j = efj(n),elj(n)
if ( az(i-1,j) .ne. 0 ) then
! Note (KK): approximate interface depths at vel-time stage ! Note (KK): approximate interface depths at vel-time stage
! by spatial mean at last sse-time stage ! by spatial mean at last sse-time stage
depth = _HALF_*(D(i-1,j)+D(i,j)) depth = _HALF_*(D(i-1,j)+D(i,j))
...@@ -671,11 +696,13 @@ ...@@ -671,11 +696,13 @@
if ( waveforcing_method .ne. NO_WAVES ) then if ( waveforcing_method .ne. NO_WAVES ) then
UEuler(i-1,j) = U(i-1,j) - UStokes(i-1,j) UEuler(i-1,j) = U(i-1,j) - UStokes(i-1,j)
end if end if
end if
k = k+1 k = k+1
kl = kl + 1 kl = kl + 1
end do end do
case (CLAMPED_VEL,CLAMPED) case (CLAMPED_VEL,CLAMPED)
do j = efj(n),elj(n) do j = efj(n),elj(n)
if ( az(i-1,j) .ne. 0 ) then
! Note (KK): approximate interface depths at vel-time stage ! Note (KK): approximate interface depths at vel-time stage
! by spatial mean at last sse-time stage ! by spatial mean at last sse-time stage
depth = _HALF_*(D(i-1,j)+D(i,j)) depth = _HALF_*(D(i-1,j)+D(i,j))
...@@ -683,6 +710,7 @@ ...@@ -683,6 +710,7 @@
if ( waveforcing_method .ne. NO_WAVES ) then if ( waveforcing_method .ne. NO_WAVES ) then
UEuler(i-1,j) = U(i-1,j) - UStokes(i-1,j) UEuler(i-1,j) = U(i-1,j) - UStokes(i-1,j)
end if end if
end if
k = k+1 k = k+1
kl = kl + 1 kl = kl + 1
end do end do
...@@ -700,6 +728,7 @@ ...@@ -700,6 +728,7 @@
select case (bdy_2d_type(l)) select case (bdy_2d_type(l))
case (FLATHER_VEL) case (FLATHER_VEL)
do i = nfi(n),nli(n) do i = nfi(n),nli(n)
if ( az(i,j-1) .ne. 0 ) then
! Note (KK): approximate interface depths at vel-time stage ! Note (KK): approximate interface depths at vel-time stage
! by spatial mean at last sse-time stage ! by spatial mean at last sse-time stage
depth = _HALF_*(D(i,j-1)+D(i,j)) depth = _HALF_*(D(i,j-1)+D(i,j))
...@@ -709,11 +738,13 @@ ...@@ -709,11 +738,13 @@
if ( waveforcing_method .ne. NO_WAVES ) then if ( waveforcing_method .ne. NO_WAVES ) then
VEuler(i,j-1) = V(i,j-1) - VStokes(i,j-1) VEuler(i,j-1) = V(i,j-1) - VStokes(i,j-1)
end if end if
end if
k = k+1 k = k+1
kl = kl + 1 kl = kl + 1
end do end do
case (CLAMPED_VEL,CLAMPED) case (CLAMPED_VEL,CLAMPED)
do i = nfi(n),nli(n) do i = nfi(n),nli(n)
if ( az(i,j-1) .ne. 0 ) then
! Note (KK): approximate interface depths at vel-time stage ! Note (KK): approximate interface depths at vel-time stage
! by spatial mean at last sse-time stage ! by spatial mean at last sse-time stage
depth = _HALF_*(D(i,j-1)+D(i,j)) depth = _HALF_*(D(i,j-1)+D(i,j))
...@@ -721,6 +752,7 @@ ...@@ -721,6 +752,7 @@
if ( waveforcing_method .ne. NO_WAVES ) then if ( waveforcing_method .ne. NO_WAVES ) then
VEuler(i,j-1) = V(i,j-1) - VStokes(i,j-1) VEuler(i,j-1) = V(i,j-1) - VStokes(i,j-1)
end if end if
end if
k = k+1 k = k+1
kl = kl + 1 kl = kl + 1
end do end do
...@@ -735,6 +767,7 @@ ...@@ -735,6 +767,7 @@
select case (bdy_2d_type(l)) select case (bdy_2d_type(l))
case (FLATHER_VEL) case (FLATHER_VEL)
do i = sfi(n),sli(n) do i = sfi(n),sli(n)
if ( az(i,j+1) .ne. 0 ) then
! Note (KK): approximate interface depths at vel-time stage ! Note (KK): approximate interface depths at vel-time stage
! by spatial mean at last sse-time stage ! by spatial mean at last sse-time stage
depth = _HALF_*(D(i,j)+D(i,j+1)) depth = _HALF_*(D(i,j)+D(i,j+1))
...@@ -744,11 +777,13 @@ ...@@ -744,11 +777,13 @@
if ( waveforcing_method .ne. NO_WAVES ) then if ( waveforcing_method .ne. NO_WAVES ) then
VEuler(i,j) = V(i,j) - VStokes(i,j) VEuler(i,j) = V(i,j) - VStokes(i,j)
end if end if
end if
k = k+1 k = k+1
kl = kl + 1 kl = kl + 1
end do end do
case (CLAMPED_VEL,CLAMPED) case (CLAMPED_VEL,CLAMPED)
do i = sfi(n),sli(n) do i = sfi(n),sli(n)
if ( az(i,j+1) .ne. 0 ) then
! Note (KK): approximate interface depths at vel-time stage ! Note (KK): approximate interface depths at vel-time stage
! by spatial mean at last sse-time stage ! by spatial mean at last sse-time stage
depth = _HALF_*(D(i,j)+D(i,j+1)) depth = _HALF_*(D(i,j)+D(i,j+1))
...@@ -756,6 +791,7 @@ ...@@ -756,6 +791,7 @@
if ( waveforcing_method .ne. NO_WAVES ) then if ( waveforcing_method .ne. NO_WAVES ) then
VEuler(i,j) = V(i,j) - VStokes(i,j) VEuler(i,j) = V(i,j) - VStokes(i,j)
end if end if
end if
k = k+1 k = k+1
kl = kl + 1 kl = kl + 1
end do end do
......
...@@ -167,7 +167,6 @@ ...@@ -167,7 +167,6 @@
integer :: i,j integer :: i,j
integer :: elev_method=1 integer :: elev_method=1
REALTYPE :: elev_const=_ZERO_ REALTYPE :: elev_const=_ZERO_
integer,parameter :: rk = kind(_ONE_)
character(LEN = PATH_MAX) :: elev_file='elev.nc' character(LEN = PATH_MAX) :: elev_file='elev.nc'
namelist /m2d/ & namelist /m2d/ &
elev_method,elev_const,elev_file, & elev_method,elev_const,elev_file, &
...@@ -434,8 +433,8 @@ ...@@ -434,8 +433,8 @@
! This is only needed for proper flexible output ! This is only needed for proper flexible output
where (az .eq. 0) where (az .eq. 0)
z = -9999.0d0 z = -9999._rk
zo = -9999.0d0 zo = -9999._rk
end where end where
return return
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
IMPLICIT NONE IMPLICIT NONE
! !
! !PUBLIC DATA MEMBERS: ! !PUBLIC DATA MEMBERS:
integer, parameter :: rk = kind(_ONE_)
REALTYPE :: dtm REALTYPE :: dtm
REALTYPE,dimension(:,:),pointer :: zo,z REALTYPE,dimension(:,:),pointer :: zo,z
logical :: deformC=.false. logical :: deformC=.false.
...@@ -121,7 +122,6 @@ ...@@ -121,7 +122,6 @@
! !
! !LOCAL VARIABLES: ! !LOCAL VARIABLES:
integer :: rc integer :: rc
integer,parameter :: rk = kind(_ONE_)
!EOP !EOP
!------------------------------------------------------------------------- !-------------------------------------------------------------------------
!BOC !BOC
...@@ -174,12 +174,12 @@ ...@@ -174,12 +174,12 @@
end if end if
z = -9999*_ONE_; zo =_ZERO_ z = -9999._rk ; zo =_ZERO_
U = _ZERO_; DU = _ZERO_; Uint = _ZERO_; UEx = _ZERO_ U = _ZERO_; DU = _ZERO_; Uint = _ZERO_; UEx = _ZERO_
V = _ZERO_; DV = _ZERO_; Vint = _ZERO_; VEx = _ZERO_ V = _ZERO_; DV = _ZERO_; Vint = _ZERO_; VEx = _ZERO_
velx = -9999.0 ; vely = -9999.0 velx = -9999._rk ; vely = -9999._rk
where (az .gt. 0) where (az .gt. 0)
velx = _ZERO_ ; vely = _ZERO_ velx = _ZERO_ ; vely = _ZERO_
end where end where
...@@ -336,7 +336,6 @@ ...@@ -336,7 +336,6 @@
! !
! !LOCAL VARIABLES: ! !LOCAL VARIABLES:
logical :: used logical :: used
integer,parameter :: rk = kind(_ONE_)
!EOP !EOP
!----------------------------------------------------------------------- !-----------------------------------------------------------------------
!BOC !BOC
......
...@@ -442,8 +442,8 @@ ...@@ -442,8 +442,8 @@
num(i,j,:) = 1.e-15 num(i,j,:) = 1.e-15
nuh(i,j,:) = 1.e-15 nuh(i,j,:) = 1.e-15
#ifndef NO_BAROCLINIC #ifndef NO_BAROCLINIC
S(i,j,:) = -9999.0 S(i,j,:) = -9999._rk
T(i,j,:) = -9999.0 T(i,j,:) = -9999._rk
#endif #endif
end if end if
end do end do
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
use domain, only: imin,jmin,imax,jmax,kmax,H,az,dry_z use domain, only: imin,jmin,imax,jmax,kmax,H,az,dry_z
!KB use get_field, only: get_3d_field !KB use get_field, only: get_3d_field
use variables_2d, only: fwf_int use variables_2d, only: fwf_int
use variables_3d, only: S,hn,kmin use variables_3d, only: rk,S,hn,kmin
use meteo, only: metforcing,met_method,nudge_sss,sss use meteo, only: metforcing,met_method,nudge_sss,sss
use meteo, only: METEO_CONST,METEO_FROMFILE,METEO_FROMEXT use meteo, only: METEO_CONST,METEO_FROMFILE,METEO_FROMEXT
use halo_zones, only: update_3d_halo,wait_halo,D_TAG,H_TAG use halo_zones, only: update_3d_halo,wait_halo,D_TAG,H_TAG
...@@ -305,8 +305,8 @@ ...@@ -305,8 +305,8 @@
stop 'init_salinity' stop 'init_salinity'
end select end select
S(:,:,0) = -9999*_ONE_ S(:,:,0) = -9999._rk
forall(i=imin:imax,j=jmin:jmax, az(i,j).eq.0) S(i,j,:) = -9999*_ONE_ forall(i=imin:imax,j=jmin:jmax, az(i,j).eq.0) S(i,j,:) = -9999._rk
call update_3d_halo(S,S,az,imin,jmin,imax,jmax,kmax,D_TAG)