66 | | |
| 66 | flux limiter is needed if: |
| 67 | |
| 68 | [[Image(fig05.png)]] |
| 69 | |
| 70 | So: |
| 71 | |
| 72 | [[Image(fig06.png)]] |
| 73 | |
| 74 | [[Image(fig07.png)]] is the time step, U is the vertical integrated velocity, q is the source rate from |
| 75 | precipitation, evaporation, and river inflow, Fi is water flux rate across each boundary |
| 76 | of the control volume, which is positive for outflow and negative for inflow. The |
| 77 | subscript i identifies each boundary  in the west, east, north, and south directions. |
| 78 | Dmin is the minimal water depth to be kept in a dry grid cell while D is the total depth |
| 79 | of the grid cell. [[Image(fig08.png)]] is the horizontal area of the water column. sign() is |
| 80 | the sign function. Obviously, [[Image(fig09.png)]] should have the following property: |
| 81 | |
| 82 | |
| 83 | [[Image(fig10.png)]] |
| 84 | |
| 85 | |
| 86 | In other words, the strength of limiter varies from 0 to 1 which corresponding to the fully shutting down the outflow and no limiter on outflow respectively. |
| 87 | |
| 88 | One case needs to be paid attention here is the above equations can produce a negative |
| 89 | value of [[Image(fig11.png)]] , This is corresponding to a large evaporation rate. In that case, we need to |
| 90 | turn off the evaporation on that grid cell during that time step. |
| 91 | |
| 92 | The limited flux (only in the horizontal directions) has the following form: |
| 93 | |
| 94 | [[Image(fig12.png)]] |
| 95 | |
| 96 | The above equation is applied to all the continuity equation and tracer equations. The |
| 97 | resultant water column on each grid cell will have its depth greater than or equals to the |
| 98 | predefined minimal depth Dmin. |
| 99 | |
| 100 | ==== Continuity Equation and Tracer Equations. ==== |
| 101 | |
| 102 | We need to be careful with the explicit time splitting method when the flux limiter is |
| 103 | applied to the continuityequation.Therearemanyexternaltimestepswithineach |
| 104 | internaltimestep.Themulti- barotropic stepping updates the sea surface height and vertical |
| 105 | integrated horizontal velocity. It is tedious to keep the consistency between these two |
| 106 | modes on the W/D grid cells. The reason to do the explicit time splitting is because of |
| 107 | the big ratio of gravity wave speed to the baroclinic velocity. We argue here that this |
| 108 | ratio must be a small value (less than or equals to 1) in the W/D area because of the |
| 109 | relatively small water depth. So, we simplify this case by turning off the time splitting |
| 110 | procedure on the W/D grid cells. |
| 111 | |
| 112 | A few iterations may be needed to take into account of the interactions between the two |
| 113 | neighbouring cells when the limiter coefficient is calculated. As this flux limiter only |
| 114 | effects around the W/D front, the iteration should converge very quickly. Also, the |
| 115 | iteration is only needed for the continuity equation and should not be a very much extra |
| 116 | burden to the whole computation. |
| 117 | |
| 118 | For the tracer Equation, it can simply be implemented by applying the flux limiter |
| 119 | coefficient to the horizontal velocities. In such way, we don’t need change anything in |
| 120 | the original source code except update the velocities. |
| 121 | |
| 122 | ==== Momentum equations ==== |
| 123 | |
| 124 | For the momentum equations, the grid cell water depth is just the weight averaged depth of |
| 125 | the two neighboring water depths, hence it always keeps positive as long as the water |
| 126 | depth on the tracer grid cells is positive. So, we don’t need to apply any momentum flux |
| 127 | limiter. |
| 128 | |
| 129 | The critical issue is how to maintain the model stability. The velocity nodes can be |
| 130 | categorized into ocean nodes, land nodes, and W/D nodes based on whether wetting/drying |
| 131 | happens or not on it. For the ocean nodes, which never got dried out, we don’t need to |
| 132 | implement any W/D work there. For the land nodes, which never got flooded with water, we |
| 133 | can just set the velocity to zero and don’t need to solve any equations. For the W/D |
| 134 | nodes, some specific improvements need to be implemented to keep model stable. These |
| 135 | improvements include filtering out the unrealistic hydrostatic pressure gradient and other |
| 136 | nonlinear and the Coriolis forcing term. |
| 137 | |
| 138 | A momentum grid cell which is between a wet grid cell and a dry grid cell, will have modified |
| 139 | barotropic pressure gradients as demonstrated in the following two equations: |
| 140 | |
| 141 | [[Image(fig13.png)]] |
| 142 | |
| 143 | [[Image(fig14.png)]] |
| 144 | |
| 145 | where: |
| 146 | |
| 147 | [[Image(fig15.png)]] |
| 148 | |
| 149 | [[Image(fig16.png)]] |
| 150 | |
| 151 | Where, sign() is the Fortran sign function. D is total depth, [[Image(fig17.png)]] is the sea surface height. g is gravity acceleration. P is the barotropic pressure gradient. |
| 152 | |
| 153 | The bottom friction on DDW will automatically increase when the “log layer” configuration |
| 154 | is used. The vertical viscous/diffusive coefficient on DDW will be increased manually to |
| 155 | keep the model stable. |
| 156 | |
| 157 | The surface wind stress and surface heating/cooling will be neglected at DDW cells. The |
| 158 | justification is that these cells are thought fully or nearly dried. |
| 159 | |
| 160 | ==== Code implementation: ==== |
| 161 | |
| 162 | One problem with to implement the current method is the sigma coordinate redistribution |
| 163 | with time. The existing NEMO code uses coefficient “mut(uvf)(:,:,:)” which is based on the |
| 164 | physical initial vertical length scale factors. In wetting/drying case, people might |
| 165 | encounter zero depth in some grid cells at the initiation stage. So, it is modified to use |
| 166 | the initial sigma coordinate vertical scale to do the redistribution. |
| 167 | |
| 168 | The current method tries to be independent of the existing code as much as possible, that |
| 169 | is to say, to minimise the interferences from the wetting/drying module to the existing |
| 170 | code. CPP method seems to be the most ideal one. But we were reminded that NEMO |
| 171 | development policy is trying to reduce the use of CPP. So, the code is implemented with |
| 172 | some extra coefficients which have value of 1 or zero when applied to the |
| 173 | non-wetting/drying case.In some other parts, the wetting/drying code was added in some IF |
| 174 | or CASE blocks. We are currently working on the implementation of this method onto NEMO |
| 175 | v3.6 r:6397. Will provide a detailed list of the code modifications when the |
| 176 | implementation is finished. |