```
IF (tidal_update .eq. 1) THEN
CALL wrf_debug( 100, 'TIDAL_UPDATE is on' )
DO ij = 1 , num_tiles
DO j=j_start(ij),j_end(ij)
DO i=i_start(ij),i_end(ij)
if(tidal_mask(i,j) .eq. 1) then
if(ssh(i,j) .gt. 0) then
! turn into ocean pixel
LANDMASK(i,j) = 0
XLAND(i,j) = 2
LU_INDEX(i,j) = iswater
IVGTYP(i,j) = iswater
VEGFRA(i,j) = 0
ISLTYP(i,j) = 14
ALBEDO(i,j) = 0.08
ALBBCK(i,j) = 0.08
EMISS(i,j) = 0.98
EMBCK(i,j) = 0.98
Z0(i,j) = 1.e-4
MAVAIL(i,j) = 1
DO nk = 1, num_soil_layers
TSLB(i,nk,j) = SST(i,j)
SMOIS(i,nk,j) = 1
SH2O(i,nk,j) = 1
ENDDO
TMN(i,j) = SST(i,j)
TSK(i,j) = SST(i,j)
else if(ssh(i,j) .lt. 0) then
! turn into land pixel
LANDMASK(i,j) = 1
XLAND(i,j) = 1
LU_INDEX(i,j) = iswetland
IVGTYP(i,j) = iswetland
VEGFRA(i,j) = 81.58
ISLTYP(i,j) = 9
ALBEDO(i,j) = 0.14
ALBBCK(i,j) = 0.17
EMISS(i,j) = 0.95
EMBCK(i,j) = 0.95
Z0(i,j) = 0.2
MAVAIL(i,j) = 0.6
DO nk = 1, num_soil_layers
!TSLB(i,nk,j) = SST(i,j)
SMOIS(i,nk,j) = 0.14
SH2O(i,nk,j) = 0.14
ENDDO
!TMN(i,j) = SST(i,j)
!TSK(i,j) = SST(i,j)
endif
endif
ENDDO ! i
ENDDO ! j
ENDDO ! ij
ENDIF ! tidal_update
```