Changeset 6041 for branches/2015/dev_r5776_UKMO2_OBS_efficiency_improvs/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90
- Timestamp:
- 2015-12-14T10:06:06+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2015/dev_r5776_UKMO2_OBS_efficiency_improvs/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90
r5656 r6041 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 … … 36 31 USE asminc ! Assimilation increment 37 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 38 38 USE wrk_nemo ! Memory Allocation 39 39 USE timing ! Timing … … 66 66 !! by the time step. 67 67 !! 68 !! ** action : ssha :after sea surface height68 !! ** action : ssha, after sea surface height 69 69 !! 70 70 !! Reference : Leclair, M., and G. Madec, 2009, Ocean Modelling. 71 71 !!---------------------------------------------------------------------- 72 ! 73 REAL(wp), POINTER, DIMENSION(:,: ) :: zhdiv 74 INTEGER, INTENT(in) :: kt ! time step 72 INTEGER, INTENT(in) :: kt ! time step 75 73 ! 76 INTEGER :: jk ! dummy loop indice 77 REAL(wp) :: z2dt, z1_rau0 ! local scalars 78 !!---------------------------------------------------------------------- 79 ! 80 IF( nn_timing == 1 ) CALL timing_start('ssh_nxt') 81 ! 82 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 ) 83 82 ! 84 83 IF( kt == nit000 ) THEN 85 !86 84 IF(lwp) WRITE(numout,*) 87 85 IF(lwp) WRITE(numout,*) 'ssh_nxt : after sea surface height' 88 86 IF(lwp) WRITE(numout,*) '~~~~~~~ ' 89 ! 90 ENDIF 91 ! 92 CALL div_cur( kt ) ! Horizontal divergence & Relative vorticity 87 ENDIF 88 ! 89 CALL div_hor( kt ) ! Horizontal divergence 93 90 ! 94 91 z2dt = 2._wp * rdt ! set time step size (Euler/Leapfrog) … … 106 103 ! compute the vertical velocity which can be used to compute the non-linear terms of the momentum equations. 107 104 ! 108 z 1_rau0= 0.5_wp * r1_rau0109 ssha(:,:) = ( sshb(:,:) - z2dt * ( z 1_rau0* ( emp_b(:,:) + emp(:,:) ) + zhdiv(:,:) ) ) * ssmask(:,:)110 111 #if ! defined key_dynspg_ts 112 ! These lines are not necessary with time splitting since113 ! boundary condition on sea level is set during ts loop114 # if defined key_agrif115 CALL agrif_ssh( kt )116 # endif117 # if defined key_bdy118 IF (lk_bdy) THEN119 CALL lbc_lnk( ssha, 'T', 1. )! Not sure that's necessary120 CALL bdy_ssh( ssha )! Duplicate sea level across open boundaries121 ENDIF122 # endif123 #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 124 121 125 122 #if defined key_asminc 126 ! ! Include the IAU weighted SSH increment 127 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 128 124 CALL ssh_asm_inc( kt ) 129 125 ssha(:,:) = ssha(:,:) + z2dt * ssh_iau(:,:) 130 126 ENDIF 131 127 #endif 132 133 128 ! !------------------------------! 134 129 ! ! outputs ! … … 159 154 !! Reference : Leclair, M., and G. Madec, 2009, Ocean Modelling. 160 155 !!---------------------------------------------------------------------- 161 ! 162 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 163 160 REAL(wp), POINTER, DIMENSION(:,: ) :: z2d 164 161 REAL(wp), POINTER, DIMENSION(:,:,:) :: z3d, zhdiv 165 ! 166 INTEGER :: ji, jj, jk ! dummy loop indices 167 REAL(wp) :: z1_2dt ! local scalars 168 !!---------------------------------------------------------------------- 169 170 IF( nn_timing == 1 ) CALL timing_start('wzv') 162 !!---------------------------------------------------------------------- 163 ! 164 IF( nn_timing == 1 ) CALL timing_start('wzv') 171 165 ! 172 166 IF( kt == nit000 ) THEN 173 !174 167 IF(lwp) WRITE(numout,*) 175 168 IF(lwp) WRITE(numout,*) 'wzv : now vertical velocity ' … … 177 170 ! 178 171 wn(:,:,jpk) = 0._wp ! bottom boundary condition: w=0 (set once for all) 179 !180 172 ENDIF 181 173 ! !------------------------------! … … 193 185 DO jj = 2, jpjm1 194 186 DO ji = fs_2, fs_jpim1 ! vector opt. 195 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) ) 196 188 END DO 197 189 END DO … … 216 208 217 209 #if defined key_bdy 218 IF (lk_bdy) THEN210 IF( lk_bdy ) THEN 219 211 DO jk = 1, jpkm1 220 212 wn(:,:,jk) = wn(:,:,jk) * bdytmask(:,:) … … 224 216 ! 225 217 IF( nn_timing == 1 ) CALL timing_stop('wzv') 226 227 218 ! 228 219 END SUBROUTINE wzv 220 229 221 230 222 SUBROUTINE ssh_swp( kt ) … … 258 250 ENDIF 259 251 260 # if defined key_dynspg_ts 261 IF( ( neuler == 0 .AND. kt == nit000 ) .OR. ln_bt_fw ) THEN !** Euler time-stepping: no filter 262 # else 263 IF ( neuler == 0 .AND. kt == nit000 ) THEN !** Euler time-stepping at first time-step : no filter 264 #endif 252 IF( ( neuler == 0 .AND. kt == nit000 ) .OR. ( ln_bt_fw .AND. ln_dynspg_ts ) ) THEN 253 !** Euler time-stepping: no filter 265 254 sshb(:,:) = sshn(:,:) ! before <-- now 266 255 sshn(:,:) = ssha(:,:) ! now <-- after (before already = now) 256 ! 267 257 ELSE !** Leap-Frog time-stepping: Asselin filter + swap 268 258 sshb(:,:) = sshn(:,:) + atfp * ( sshb(:,:) - 2 * sshn(:,:) + ssha(:,:) ) ! before <-- now filtered
Note: See TracChangeset
for help on using the changeset viewer.