- Timestamp:
- 2020-06-10T13:13:39+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_1d_bugfixes/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90
r8400 r13088 1 MODULE sshwzv 1 MODULE sshwzv 2 2 !!============================================================================== 3 3 !! *** MODULE sshwzv *** … … 5 5 !!============================================================================== 6 6 !! History : 3.1 ! 2009-02 (G. Madec, M. Leclair) Original code 7 !! 3.3 ! 2010-04 (M. Leclair, G. Madec) modified LF-RA 7 !! 3.3 ! 2010-04 (M. Leclair, G. Madec) modified LF-RA 8 8 !! - ! 2010-05 (K. Mogensen, A. Weaver, M. Martin, D. Lea) Assimilation interface 9 9 !! - ! 2010-09 (D.Storkey and E.O'Dea) bug fixes for BDY module … … 17 17 !!---------------------------------------------------------------------- 18 18 USE oce ! ocean dynamics and tracers variables 19 USE dom_oce ! ocean space and time domain variables 19 USE dom_oce ! ocean space and time domain variables 20 20 USE sbc_oce ! surface boundary condition: ocean 21 21 USE domvvl ! Variable volume … … 28 28 USE lib_mpp ! MPP library 29 29 USE bdy_oce 30 USE bdy_par 30 USE bdy_par 31 31 USE bdydyn2d ! bdy_ssh routine 32 32 #if defined key_agrif 33 33 USE agrif_opa_interp 34 34 #endif 35 #if defined key_asminc 35 #if defined key_asminc 36 36 USE asminc ! Assimilation increment 37 37 #endif … … 59 59 !!---------------------------------------------------------------------- 60 60 !! *** ROUTINE ssh_nxt *** 61 !! 61 !! 62 62 !! ** Purpose : compute the after ssh (ssha) 63 63 !! … … 73 73 REAL(wp), POINTER, DIMENSION(:,: ) :: zhdiv 74 74 INTEGER, INTENT(in) :: kt ! time step 75 ! 75 ! 76 76 INTEGER :: jk ! dummy loop indices 77 77 REAL(wp) :: z2dt, z1_rau0 ! local scalars … … 80 80 IF( nn_timing == 1 ) CALL timing_start('ssh_nxt') 81 81 ! 82 CALL wrk_alloc( jpi, jpj, zhdiv ) 82 CALL wrk_alloc( jpi, jpj, zhdiv ) 83 83 ! 84 84 IF( kt == nit000 ) THEN … … 102 102 #if defined key_vvl 103 103 ! Don't directly adjust ssh but change hdivn at all levels instead 104 ! In trasbc also add in the heat and salt content associated with these changes at each level 105 DO jk = 1, jpkm1 106 hdivn(:,:,jk) = hdivn(:,:,jk) - ( ssh_iau(:,:) / ( ht_0(:,:) + 1.0 - ssmask(:,:) ) ) * ( e3t_0(:,:,jk) / fse3t_n(:,:,jk) ) * tmask(:,:,jk) 104 ! In trasbc also add in the heat and salt content associated with these changes at each level 105 DO jk = 1, jpkm1 106 hdivn(:,:,jk) = hdivn(:,:,jk) - ( ssh_iau(:,:) / ( ht_0(:,:) + 1.0 - ssmask(:,:) ) ) * ( e3t_0(:,:,jk) / fse3t_n(:,:,jk) ) * tmask(:,:,jk) 107 107 END DO 108 ENDIF 109 #endif 108 #endif 109 ENDIF 110 110 #endif 111 111 … … 121 121 ! In time-split case we need a first guess of the ssh after (using the baroclinic timestep) in order to 122 122 ! compute the vertical velocity which can be used to compute the non-linear terms of the momentum equations. 123 ! 123 ! 124 124 z1_rau0 = 0.5_wp * r1_rau0 125 125 ssha(:,:) = ( sshb(:,:) - z2dt * ( z1_rau0 * ( emp_b(:,:) + emp(:,:) ) + zhdiv(:,:) ) ) * ssmask(:,:) … … 146 146 IF(ln_ctl) CALL prt_ctl( tab2d_1=ssha, clinfo1=' ssha - : ', mask1=tmask, ovlap=1 ) 147 147 ! 148 CALL wrk_dealloc( jpi, jpj, zhdiv ) 148 CALL wrk_dealloc( jpi, jpj, zhdiv ) 149 149 ! 150 150 IF( nn_timing == 1 ) CALL timing_stop('ssh_nxt') … … 152 152 END SUBROUTINE ssh_nxt 153 153 154 154 155 155 SUBROUTINE wzv( kt ) 156 156 !!---------------------------------------------------------------------- 157 157 !! *** ROUTINE wzv *** 158 !! 158 !! 159 159 !! ** Purpose : compute the now vertical velocity 160 160 !! 161 !! ** Method : - Using the incompressibility hypothesis, the vertical 162 !! velocity is computed by integrating the horizontal divergence 161 !! ** Method : - Using the incompressibility hypothesis, the vertical 162 !! velocity is computed by integrating the horizontal divergence 163 163 !! from the bottom to the surface minus the scale factor evolution. 164 164 !! The boundary conditions are w=0 at the bottom (no flux) and. … … 176 176 REAL(wp) :: z1_2dt ! local scalars 177 177 !!---------------------------------------------------------------------- 178 178 179 179 IF( nn_timing == 1 ) CALL timing_start('wzv') 180 180 ! … … 195 195 ! 196 196 IF( ln_vvl_ztilde .OR. ln_vvl_layer ) THEN ! z_tilde and layer cases 197 CALL wrk_alloc( jpi, jpj, jpk, zhdiv ) 197 CALL wrk_alloc( jpi, jpj, jpk, zhdiv ) 198 198 ! 199 199 DO jk = 1, jpkm1 … … 215 215 END DO 216 216 ! IF( ln_vvl_layer ) wn(:,:,:) = 0.e0 217 CALL wrk_dealloc( jpi, jpj, jpk, zhdiv ) 217 CALL wrk_dealloc( jpi, jpj, jpk, zhdiv ) 218 218 ELSE ! z_star and linear free surface cases 219 219 DO jk = jpkm1, 1, -1 ! integrate from the bottom the hor. divergence … … 241 241 !! *** ROUTINE ssh_nxt *** 242 242 !! 243 !! ** Purpose : achieve the sea surface height time stepping by 243 !! ** Purpose : achieve the sea surface height time stepping by 244 244 !! applying Asselin time filter and swapping the arrays 245 !! ssha already computed in ssh_nxt 245 !! ssha already computed in ssh_nxt 246 246 !! 247 247 !! ** Method : - apply Asselin time fiter to now ssh (excluding the forcing
Note: See TracChangeset
for help on using the changeset viewer.