Changeset 1505 for trunk/NEMO
- Timestamp:
- 2009-07-20T17:36:58+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMO/OPA_SRC/DYN/dynspg_exp.F90
r1438 r1505 4 4 !! Ocean dynamics: surface pressure gradient trend 5 5 !!====================================================================== 6 !! History : 9.0 ! 2005-11 (V. Garnier, G. Madec, L. Bessieres) Original code 6 !! History : 2.0 ! 2005-11 (V. Garnier, G. Madec, L. Bessieres) Original code 7 !! 3.2 ! 2009-06 (G. Madec, M. Leclair, R. Benshila) introduce sshwzv module 7 8 !!---------------------------------------------------------------------- 8 9 #if defined key_dynspg_exp || defined key_esopa 9 10 !!---------------------------------------------------------------------- 10 !! 'key_dynspg_exp' free sfce cst vol. without filter nor ts11 !! 'key_dynspg_exp' explicit free surface 11 12 !!---------------------------------------------------------------------- 12 13 !! dyn_spg_exp : update the momentum trend with the surface … … 49 50 !! 50 51 !! ** Purpose : Compute the now trend due to the surface pressure 51 !! gradient in case of explicit free surface formulation and 52 !! add it to the general trend of momentum equation. Compute 53 !! the free surface. 52 !! gradient in case of explicit free surface formulation and 53 !! add it to the general trend of momentum equation. 54 54 !! 55 !! ** Method : Explicit free surface formulation. The surface pressure 56 !! gradient is given by: 57 !! spgu = 1/rau0 d/dx(ps) = g/e1u di( sshn ) 58 !! spgv = 1/rau0 d/dy(ps) = g/e2v dj( sshn ) 59 !! -1- Compute the now surface pressure gradient 60 !! -2- Add it to the general trend 55 !! ** Method : Explicit free surface formulation. Add to the general 56 !! momentum trend the surface pressure gradient : 57 !! (ua,va) = (ua,va) + (spgu,spgv) 58 !! where spgu = -1/rau0 d/dx(ps) = -g/e1u di( sshn ) 59 !! spgv = -1/rau0 d/dy(ps) = -g/e2v dj( sshn ) 61 60 !! 62 !! ** Action : - Update (ua,va) with the surf. pressure gradient trend 61 !! ** Action : (ua,va) trend of horizontal velocity increased by 62 !! the surf. pressure gradient trend 63 63 !!--------------------------------------------------------------------- 64 64 INTEGER, INTENT( in ) :: kt ! ocean time-step index … … 71 71 IF(lwp) WRITE(numout,*) 'dyn_spg_exp : surface pressure gradient trend' 72 72 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~ (explicit free surface)' 73 74 ! set to zero free surface specific arrays75 spgu(:,:) = 0.e0 ! surface pressure gradient (i-direction)76 spgv(:,:) = 0.e0 ! surface pressure gradient (j-direction)73 ! 74 spgu(:,:) = 0.e0 ; spgv(:,:) = 0.e0 75 ! 76 IF( lk_vvl .AND. lwp ) WRITE(numout,*) ' lk_vvl=T : spg is included in dynhpg' 77 77 ENDIF 78 78 79 ! read or estimate sea surface height and vertically integrated velocities80 IF( lk_obc ) CALL obc_dta_bt( kt, 0 )81 79 82 ! Surface pressure gradient (now) 83 DO jj = 2, jpjm1 84 DO ji = fs_2, fs_jpim1 ! vector opt. 85 spgu(ji,jj) = - grav * ( sshn(ji+1,jj) - sshn(ji,jj) ) / e1u(ji,jj) 86 spgv(ji,jj) = - grav * ( sshn(ji,jj+1) - sshn(ji,jj) ) / e2v(ji,jj) 87 END DO 88 END DO 80 !!gm bug ?? Rachid we have to discuss of the call below. I don't understand why it is here and not in ssh_wzv 81 IF( lk_obc ) CALL obc_dta_bt( kt, 0 ) ! OBC: read or estimate ssh and vertically integrated velocities 82 !!gm 89 83 90 ! Add the surface pressure trend to the generaltrend91 DO jk = 1, jpkm192 DO jj = 2, jpjm1 84 IF( .NOT. lk_vvl ) THEN !* fixed volume : add the surface pressure gradient trend 85 ! 86 DO jj = 2, jpjm1 ! now surface pressure gradient 93 87 DO ji = fs_2, fs_jpim1 ! vector opt. 94 ua(ji,jj,jk) = ua(ji,jj,jk) + spgu(ji,jj) 95 va(ji,jj,jk) = va(ji,jj,jk) + spgv(ji,jj) 88 spgu(ji,jj) = - grav * ( sshn(ji+1,jj) - sshn(ji,jj) ) / e1u(ji,jj) 89 spgv(ji,jj) = - grav * ( sshn(ji,jj+1) - sshn(ji,jj) ) / e2v(ji,jj) 90 END DO 91 END DO 92 DO jk = 1, jpkm1 ! Add it to the general trend 93 DO jj = 2, jpjm1 94 DO ji = fs_2, fs_jpim1 ! vector opt. 95 ua(ji,jj,jk) = ua(ji,jj,jk) + spgu(ji,jj) 96 va(ji,jj,jk) = va(ji,jj,jk) + spgv(ji,jj) 97 END DO 96 98 END DO 97 99 END DO 98 END DO 99 100 ! 101 ENDIF 102 ! 100 103 END SUBROUTINE dyn_spg_exp 101 104
Note: See TracChangeset
for help on using the changeset viewer.