Changeset 592 for trunk/NEMO/OPA_SRC/DYN/wzvmod.F90
- Timestamp:
- 2007-02-09T10:15:25+01:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMO/OPA_SRC/DYN/wzvmod.F90
r455 r592 4 4 !! Ocean diagnostic variable : vertical velocity 5 5 !!============================================================================== 6 6 !! History : 5.0 ! 90-10 (C. Levy, G. Madec) Original code 7 !! 7.0 ! 96-01 (G. Madec) Statement function for e3 8 !! 8.5 ! 02-07 (G. Madec) Free form, F90 7 9 !!---------------------------------------------------------------------- 8 10 !! wzv : Compute the vertical velocity … … 14 16 USE prtctl ! Print control 15 17 18 USE domvvl ! Variable volume 19 USE phycst 20 USE ocesbc ! ocean surface boundary condition 21 USE lbclnk ! ocean lateral boundary condition (or mpp link) 22 16 23 IMPLICIT NONE 17 24 PRIVATE 18 25 19 26 !! * Routine accessibility 20 PUBLIC wzv ! routine called by step.F90 and inidtr.F9027 PUBLIC wzv ! routine called by step.F90 and inidtr.F90 21 28 22 29 !! * Substitutions 23 30 # include "domzgr_substitute.h90" 31 !!---------------------------------------------------------------------- 32 !! OPA 9.0 , LOCEAN-IPSL (2005) 33 !! $Header$ 34 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 24 35 !!---------------------------------------------------------------------- 25 36 … … 40 51 !! velocity is computed by integrating the horizontal divergence 41 52 !! from the bottom to the surface. 42 !! 43 !! in r egid-lid case, w=0 at the sea surface.53 !! The boundary conditions are w=0 at the bottom (no flux) and, 54 !! in rigid-lid case, w=0 at the sea surface. 44 55 !! 45 56 !! ** action : wn array : the now vertical velocity 46 !!47 !! History :48 !! 5.0 ! 90-10 (C. Levy, G. Madec) Original code49 !! 7.0 ! 96-01 (G. Madec) Statement function for e350 !! 8.5 ! 02-07 (G. Madec) Free form, F9051 57 !!---------------------------------------------------------------------- 52 58 !! * Arguments … … 55 61 !! * Local declarations 56 62 INTEGER :: jj, jk ! dummy loop indices 57 !!----------------------------------------------------------------------58 !! OPA 9.0 , LOCEAN-IPSL (2005)59 !! $Header$60 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt61 63 !!---------------------------------------------------------------------- 62 64 … … 103 105 !! 104 106 !! ** action : wn array : the now vertical velocity 105 !!106 !! History :107 !! 9.0 ! 02-07 (G. Madec) Vector optimization108 107 !!---------------------------------------------------------------------- 109 108 !! * Arguments … … 111 110 112 111 !! * Local declarations 113 INTEGER :: jk ! dummy loop indices 114 !!---------------------------------------------------------------------- 115 !! OPA 8.5, LODYC-IPSL (2002) 112 INTEGER :: jk ! dummy loop indices 113 !! Variable volume 114 INTEGER :: ji, jj ! dummy loop indices 115 REAL(wp) :: z2dt, zraur ! temporary scalar 116 REAL(wp), DIMENSION (jpi,jpj) :: zssha, zun, zvn, zhdiv 116 117 !!---------------------------------------------------------------------- 117 118 … … 125 126 ENDIF 126 127 127 ! Computation from the bottom 128 DO jk = jpkm1, 1, -1 129 wn(:,:,jk) = wn(:,:,jk+1) - fse3t(:,:,jk) * hdivn(:,:,jk) 130 END DO 128 IF( lk_vvl ) THEN ! Variable volume 129 ! 130 z2dt = 2. * rdt ! time step: leap-frog 131 IF( neuler == 0 .AND. kt == nit000 ) z2dt = rdt ! time step: Euler if restart from rest 132 zraur = 1. / rauw 133 134 ! Vertically integrated quantities 135 ! -------------------------------- 136 zun(:,:) = 0.e0 137 zvn(:,:) = 0.e0 138 ! 139 DO jk = 1, jpkm1 ! Vertically integrated transports (now) 140 zun(:,:) = zun(:,:) + fse3u(:,:,jk) * un(:,:,jk) 141 zvn(:,:) = zvn(:,:) + fse3v(:,:,jk) * vn(:,:,jk) 142 END DO 143 144 ! Horizontal divergence of barotropic transports 145 !-------------------------------------------------- 146 DO jj = 2, jpjm1 147 DO ji = 2, jpim1 ! vector opt. 148 zhdiv(ji,jj) = ( e2u(ji ,jj ) * zun(ji ,jj ) & 149 & - e2u(ji-1,jj ) * zun(ji-1,jj ) & 150 & + e1v(ji ,jj ) * zvn(ji ,jj ) & 151 & - e1v(ji ,jj-1) * zvn(ji ,jj-1) ) & 152 & / ( e1t(ji,jj) * e2t(ji,jj) ) 153 END DO 154 END DO 155 156 #if defined key_obc && ( key_dynspg_exp || key_dynspg_ts ) 157 ! open boundaries (div must be zero behind the open boundary) 158 ! mpp remark: The zeroing of hdiv can probably be extended to 1->jpi/jpj for the correct row/column 159 IF( lp_obc_east ) zhdiv(nie0p1:nie1p1,nje0 :nje1) = 0.e0 ! east 160 IF( lp_obc_west ) zhdiv(niw0 :niw1 ,njw0 :njw1) = 0.e0 ! west 161 IF( lp_obc_north ) zhdiv(nin0 :nin1 ,njn0p1:njn1p1) = 0.e0 ! north 162 IF( lp_obc_south ) zhdiv(nis0 :nis1 ,njs0 :njs1) = 0.e0 ! south 163 #endif 164 165 CALL lbc_lnk( zhdiv, 'T', 1. ) 166 167 ! Sea surface elevation time stepping 168 ! ----------------------------------- 169 zssha(:,:) = sshb(:,:) - z2dt * ( zraur * emp(:,:) + zhdiv(:,:) ) * tmask(:,:,1) 170 171 ! Vertical velocity computed from bottom 172 ! -------------------------------------- 173 DO jk = jpkm1, 1, -1 174 wn(:,:,jk) = wn(:,:,jk+1) - fse3t(:,:,jk) * hdivn(:,:,jk) & 175 & - ( zssha(:,:) - sshb(:,:) ) * fsve3t(:,:,jk) * mut(:,:,jk) / z2dt 176 END DO 177 178 ELSE ! Fixed volume 179 180 ! Vertical velocity computed from bottom 181 ! -------------------------------------- 182 DO jk = jpkm1, 1, -1 183 wn(:,:,jk) = wn(:,:,jk+1) - fse3t(:,:,jk) * hdivn(:,:,jk) 184 END DO 185 186 ENDIF 131 187 132 188 IF(ln_ctl) CALL prt_ctl(tab3d_1=wn, clinfo1=' w**2 - : ', mask1=wn)
Note: See TracChangeset
for help on using the changeset viewer.