With all of John's bits of WET_DRY code I do indeed not get much shallower than Dcrit. It can go a little shallower due to the rzeta term.

Back to the question of tracers in the dry cells. John's code prevents the tracers from updating during the predictor part of the timestep, but they still get advection during the corrector part of the timestep from a nonzero Huon,Hvom even where umask_wet and vmask_wet are zero. To prevent that, you can try:

Code: Select all

```
diff --git a/ROMS/Nonlinear/step3d_uv.F b/ROMS/Nonlinear/step3d_uv.F
index 30c7058..a511e21 100644
--- a/ROMS/Nonlinear/step3d_uv.F
+++ b/ROMS/Nonlinear/step3d_uv.F
@@ -1251,6 +1251,9 @@
DO k=1,N(ng)
DO i=IstrP,IendT
Huon(i,j,k)=Huon(i,j,k)-DC(i,k)*FC(i,0)
+# ifdef WET_DRY
+ Huon(i,j,k)=Huon(i,j,k)*umask_wet(i,j)
+# endif
END DO
END DO
!
@@ -1470,6 +1473,9 @@
DO k=1,N(ng)
DO i=IstrT,IendT
Hvom(i,j,k)=Hvom(i,j,k)-DC(i,k)*FC(i,0)
+# ifdef WET_DRY
+ Hvom(i,j,k)=Hvom(i,j,k)*vmask_wet(i,j)
+# endif
END DO
END DO
END IF
```

The application of srflx in pre_step3d.F can also be masked out in the dry cells.

With these changes, the dry cell tracers remain completely static unless there is flow into the dry cell. In practice, there's some instability whereby always-dry cells can gain salt through the intermittent salt flux on their wet side. Perhaps it is the model's way of telling me I should have masked those cells.

If the cells never get wet, why should I care? Their wacky tracer values infect the neighboring wet cells through horizontal diffusion.