192 | | '''In dynspg_exp.F90''' the whole module have to be modified to solve a velocity equation, not a thickness weighted velocity equation. Then in the specific case of ln_dynadv_vec=FALSE and lk_vvl=TRUE, an term associated with the time derivative of the ssh must be added to the equation solved. [[BR]] |
| 192 | '''In dynspg_exp.F90''', the surface pressure gradient is already taken into account in lk_vvl=TRUE case. Therefore it must not be added in dynspg_exp. So replace[[BR]] |
| 193 | |
| 194 | {{{ |
| 195 | ! Surface pressure gradient (now) |
| 196 | DO jj = 2, jpjm1 |
| 197 | DO ji = fs_2, fs_jpim1 ! vector opt. |
| 198 | spgu(ji,jj) = - grav * ( sshn(ji+1,jj) - sshn(ji,jj) ) / e1u(ji,jj) |
| 199 | spgv(ji,jj) = - grav * ( sshn(ji,jj+1) - sshn(ji,jj) ) / e2v(ji,jj) |
| 200 | END DO |
| 201 | END DO |
| 202 | |
| 203 | ! Add the surface pressure trend to the general trend |
| 204 | DO jk = 1, jpkm1 |
| 205 | DO jj = 2, jpjm1 |
| 206 | DO ji = fs_2, fs_jpim1 ! vector opt. |
| 207 | ua(ji,jj,jk) = ua(ji,jj,jk) + spgu(ji,jj) |
| 208 | va(ji,jj,jk) = va(ji,jj,jk) + spgv(ji,jj) |
| 209 | END DO |
| 210 | END DO |
| 211 | END DO |
| 212 | }}} |
| 213 | by |
| 214 | |
| 215 | {{{ |
| 216 | IF( .NOT. lk_vvl ) THEN !* fixed volume : add the surface pressure gradient trend |
| 217 | ! |
| 218 | DO jj = 2, jpjm1 ! now surface pressure gradient |
| 219 | DO ji = fs_2, fs_jpim1 ! vector opt. |
| 220 | spgu(ji,jj) = - grav * ( sshn(ji+1,jj) - sshn(ji,jj) ) / e1u(ji,jj) |
| 221 | spgv(ji,jj) = - grav * ( sshn(ji,jj+1) - sshn(ji,jj) ) / e2v(ji,jj) |
| 222 | END DO |
| 223 | END DO |
| 224 | DO jk = 1, jpkm1 ! Add it to the general trend |
| 225 | DO jj = 2, jpjm1 |
| 226 | DO ji = fs_2, fs_jpim1 ! vector opt. |
| 227 | ua(ji,jj,jk) = ua(ji,jj,jk) + spgu(ji,jj) |
| 228 | va(ji,jj,jk) = va(ji,jj,jk) + spgv(ji,jj) |
| 229 | END DO |
| 230 | END DO |
| 231 | END DO |
| 232 | ! |
| 233 | ENDIF |
| 234 | }}} |
| 235 | |
| 236 | In addition, all the comment have been updated. The resulting subroutine can be found in attachment (https://forge.ipsl.jussieu.fr/nemo/attachment/wiki/2009WP/2009Stream3/VVL/dynspg_exp.F90). |
| 237 | |