Changeset 5951 for branches/2014/dev_r4650_UKMO14.4_OBS_GENERAL_VINTERP/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90
- Timestamp:
- 2015-11-30T12:48:01+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2014/dev_r4650_UKMO14.4_OBS_GENERAL_VINTERP/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90
r5950 r5951 20 20 USE sbc_oce ! surface boundary condition: ocean 21 21 USE domvvl ! Variable volume 22 USE divcur ! hor. divergence and curl (div & cur routines) 23 USE restart ! only for lrst_oce 24 USE in_out_manager ! I/O manager 25 USE prtctl ! Print control 26 USE phycst 27 USE lbclnk ! ocean lateral boundary condition (or mpp link) 28 USE lib_mpp ! MPP library 22 USE divhor ! horizontal divergence 23 USE phycst ! physical constants 29 24 USE bdy_oce 30 25 USE bdy_par 31 26 USE bdydyn2d ! bdy_ssh routine 32 27 #if defined key_agrif 33 USE agrif_opa_update34 28 USE agrif_opa_interp 35 29 #endif … … 37 31 USE asminc ! Assimilation increment 38 32 #endif 33 USE in_out_manager ! I/O manager 34 USE restart ! only for lrst_oce 35 USE prtctl ! Print control 36 USE lbclnk ! ocean lateral boundary condition (or mpp link) 37 USE lib_mpp ! MPP library 39 38 USE wrk_nemo ! Memory Allocation 40 39 USE timing ! Timing … … 67 66 !! by the time step. 68 67 !! 69 !! ** action : ssha :after sea surface height68 !! ** action : ssha, after sea surface height 70 69 !! 71 70 !! Reference : Leclair, M., and G. Madec, 2009, Ocean Modelling. 72 71 !!---------------------------------------------------------------------- 73 ! 74 REAL(wp), POINTER, DIMENSION(:,: ) :: zhdiv 75 INTEGER, INTENT(in) :: kt ! time step 72 INTEGER, INTENT(in) :: kt ! time step 76 73 ! 77 INTEGER :: jk ! dummy loop indice 78 REAL(wp) :: z2dt, z1_rau0 ! local scalars 79 !!---------------------------------------------------------------------- 80 ! 81 IF( nn_timing == 1 ) CALL timing_start('ssh_nxt') 82 ! 83 CALL wrk_alloc( jpi, jpj, zhdiv ) 74 INTEGER :: jk ! dummy loop indice 75 REAL(wp) :: z2dt, zcoef ! local scalars 76 REAL(wp), POINTER, DIMENSION(:,: ) :: zhdiv ! 2D workspace 77 !!---------------------------------------------------------------------- 78 ! 79 IF( nn_timing == 1 ) CALL timing_start('ssh_nxt') 80 ! 81 CALL wrk_alloc( jpi,jpj, zhdiv ) 84 82 ! 85 83 IF( kt == nit000 ) THEN 86 !87 84 IF(lwp) WRITE(numout,*) 88 85 IF(lwp) WRITE(numout,*) 'ssh_nxt : after sea surface height' 89 86 IF(lwp) WRITE(numout,*) '~~~~~~~ ' 90 ! 91 ENDIF 92 ! 93 CALL div_cur( kt ) ! Horizontal divergence & Relative vorticity 87 ENDIF 88 ! 89 CALL div_hor( kt ) ! Horizontal divergence 94 90 ! 95 91 z2dt = 2._wp * rdt ! set time step size (Euler/Leapfrog) … … 107 103 ! compute the vertical velocity which can be used to compute the non-linear terms of the momentum equations. 108 104 ! 109 z 1_rau0= 0.5_wp * r1_rau0110 ssha(:,:) = ( sshb(:,:) - z2dt * ( z 1_rau0* ( emp_b(:,:) + emp(:,:) ) + zhdiv(:,:) ) ) * ssmask(:,:)111 112 #if ! defined key_dynspg_ts 113 ! These lines are not necessary with time splitting since114 ! boundary condition on sea level is set during ts loop115 # if defined key_agrif116 CALL agrif_ssh( kt )117 # endif118 # if defined key_bdy119 IF (lk_bdy) THEN120 CALL lbc_lnk( ssha, 'T', 1. )! Not sure that's necessary121 CALL bdy_ssh( ssha )! Duplicate sea level across open boundaries122 ENDIF123 # endif124 #endif 105 zcoef = 0.5_wp * r1_rau0 106 ssha(:,:) = ( sshb(:,:) - z2dt * ( zcoef * ( emp_b(:,:) + emp(:,:) ) + zhdiv(:,:) ) ) * ssmask(:,:) 107 108 IF ( .NOT.ln_dynspg_ts ) THEN 109 ! These lines are not necessary with time splitting since 110 ! boundary condition on sea level is set during ts loop 111 # if defined key_agrif 112 CALL agrif_ssh( kt ) 113 # endif 114 # if defined key_bdy 115 IF( lk_bdy ) THEN 116 CALL lbc_lnk( ssha, 'T', 1. ) ! Not sure that's necessary 117 CALL bdy_ssh( ssha ) ! Duplicate sea level across open boundaries 118 ENDIF 119 # endif 120 ENDIF 125 121 126 122 #if defined key_asminc 127 ! ! Include the IAU weighted SSH increment 128 IF( lk_asminc .AND. ln_sshinc .AND. ln_asmiau ) THEN 123 IF( lk_asminc .AND. ln_sshinc .AND. ln_asmiau ) THEN ! Include the IAU weighted SSH increment 129 124 CALL ssh_asm_inc( kt ) 130 125 ssha(:,:) = ssha(:,:) + z2dt * ssh_iau(:,:) 131 126 ENDIF 132 127 #endif 133 134 128 ! !------------------------------! 135 129 ! ! outputs ! … … 160 154 !! Reference : Leclair, M., and G. Madec, 2009, Ocean Modelling. 161 155 !!---------------------------------------------------------------------- 162 ! 163 INTEGER, INTENT(in) :: kt ! time step 156 INTEGER, INTENT(in) :: kt ! time step 157 ! 158 INTEGER :: ji, jj, jk ! dummy loop indices 159 REAL(wp) :: z1_2dt ! local scalars 164 160 REAL(wp), POINTER, DIMENSION(:,: ) :: z2d 165 161 REAL(wp), POINTER, DIMENSION(:,:,:) :: z3d, zhdiv 166 ! 167 INTEGER :: ji, jj, jk ! dummy loop indices 168 REAL(wp) :: z1_2dt ! local scalars 169 !!---------------------------------------------------------------------- 170 171 IF( nn_timing == 1 ) CALL timing_start('wzv') 162 !!---------------------------------------------------------------------- 163 ! 164 IF( nn_timing == 1 ) CALL timing_start('wzv') 172 165 ! 173 166 IF( kt == nit000 ) THEN 174 !175 167 IF(lwp) WRITE(numout,*) 176 168 IF(lwp) WRITE(numout,*) 'wzv : now vertical velocity ' … … 178 170 ! 179 171 wn(:,:,jpk) = 0._wp ! bottom boundary condition: w=0 (set once for all) 180 !181 172 ENDIF 182 173 ! !------------------------------! … … 194 185 DO jj = 2, jpjm1 195 186 DO ji = fs_2, fs_jpim1 ! vector opt. 196 zhdiv(ji,jj,jk) = r1_e1 2t(ji,jj) * ( un_td(ji,jj,jk) - un_td(ji-1,jj,jk) + vn_td(ji,jj,jk) - vn_td(ji,jj-1,jk) )187 zhdiv(ji,jj,jk) = r1_e1e2t(ji,jj) * ( un_td(ji,jj,jk) - un_td(ji-1,jj,jk) + vn_td(ji,jj,jk) - vn_td(ji,jj-1,jk) ) 197 188 END DO 198 189 END DO … … 217 208 218 209 #if defined key_bdy 219 IF (lk_bdy) THEN210 IF( lk_bdy ) THEN 220 211 DO jk = 1, jpkm1 221 212 wn(:,:,jk) = wn(:,:,jk) * bdytmask(:,:) … … 225 216 ! 226 217 IF( nn_timing == 1 ) CALL timing_stop('wzv') 227 228 218 ! 229 219 END SUBROUTINE wzv 220 230 221 231 222 SUBROUTINE ssh_swp( kt ) … … 259 250 ENDIF 260 251 261 # if defined key_dynspg_ts 262 IF( ( neuler == 0 .AND. kt == nit000 ) .OR. ln_bt_fw ) THEN !** Euler time-stepping: no filter 263 # else 264 IF ( neuler == 0 .AND. kt == nit000 ) THEN !** Euler time-stepping at first time-step : no filter 265 #endif 252 IF( ( neuler == 0 .AND. kt == nit000 ) .OR. ( ln_bt_fw .AND. ln_dynspg_ts ) ) THEN 253 !** Euler time-stepping: no filter 266 254 sshb(:,:) = sshn(:,:) ! before <-- now 267 255 sshn(:,:) = ssha(:,:) ! now <-- after (before already = now) 256 ! 268 257 ELSE !** Leap-Frog time-stepping: Asselin filter + swap 269 258 sshb(:,:) = sshn(:,:) + atfp * ( sshb(:,:) - 2 * sshn(:,:) + ssha(:,:) ) ! before <-- now filtered 270 IF( lk_vvl ) sshb(:,:) = sshb(:,:) - atfp * rdt / rau0 * ( emp_b(:,:) - emp(:,:) - rnf_b(:,:) + rnf(:,:) ) * ssmask(:,:) 259 IF( lk_vvl ) sshb(:,:) = sshb(:,:) - atfp * rdt / rau0 * ( emp_b(:,:) - emp(:,:) & 260 & - rnf_b(:,:) + rnf(:,:) & 261 & + fwfisf_b(:,:) - fwfisf(:,:) ) * ssmask(:,:) 271 262 sshn(:,:) = ssha(:,:) ! now <-- after 272 263 ENDIF 273 !274 ! Update velocity at AGRIF zoom boundaries275 #if defined key_agrif276 IF ( .NOT.Agrif_Root() ) CALL Agrif_Update_Dyn( kt )277 #endif278 264 ! 279 265 IF(ln_ctl) CALL prt_ctl( tab2d_1=sshb, clinfo1=' sshb - : ', mask1=tmask, ovlap=1 )
Note: See TracChangeset
for help on using the changeset viewer.