- Timestamp:
- 2020-06-24T14:38:26+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/dev_r12527_Gurvan_ShallowWater/src/OCE/DYN/dynatf.F90
r12489 r13151 13 13 !! - ! 2002-10 (C. Talandier, A-M. Treguier) Open boundary cond. 14 14 !! 2.0 ! 2005-11 (V. Garnier) Surface pressure gradient organization 15 !! 2.3 ! 2007-07 (D. Storkey) Calls to BDY routines. 15 !! 2.3 ! 2007-07 (D. Storkey) Calls to BDY routines. 16 16 !! 3.2 ! 2009-06 (G. Madec, R.Benshila) re-introduce the vvl option 17 17 !! 3.3 ! 2010-09 (D. Storkey, E.O'Dea) Bug fix for BDY module … … 22 22 !! 4.1 ! 2019-08 (A. Coward, D. Storkey) Rename dynnxt.F90 -> dynatf.F90. Now just does time filtering. 23 23 !!------------------------------------------------------------------------- 24 24 25 25 !!---------------------------------------------------------------------------------------------- 26 26 !! dyn_atf : apply Asselin time filtering to "now" velocities and vertical scale factors … … 42 42 USE trdken ! trend manager: kinetic energy 43 43 USE isf_oce , ONLY: ln_isf ! ice shelf 44 USE isfdynatf , ONLY: isf_dynatf ! ice shelf volume filter correction subroutine 44 USE isfdynatf , ONLY: isf_dynatf ! ice shelf volume filter correction subroutine 45 45 ! 46 46 USE in_out_manager ! I/O manager … … 59 59 PUBLIC dyn_atf ! routine called by step.F90 60 60 61 #if defined key_qco 62 !!---------------------------------------------------------------------- 63 !! 'key_qco' EMPTY ROUTINE Quasi-Eulerian vertical coordonate 64 !!---------------------------------------------------------------------- 65 CONTAINS 66 67 SUBROUTINE dyn_atf ( kt, Kbb, Kmm, Kaa, puu, pvv, pe3t, pe3u, pe3v ) 68 INTEGER , INTENT(in ) :: kt ! ocean time-step index 69 INTEGER , INTENT(in ) :: Kbb, Kmm, Kaa ! before and after time level indices 70 REAL(wp), DIMENSION(jpi,jpj,jpk,jpt), INTENT(inout) :: puu, pvv ! velocities to be time filtered 71 REAL(wp), DIMENSION(jpi,jpj,jpk,jpt), INTENT(inout) :: pe3t, pe3u, pe3v ! scale factors to be time filtered 72 73 WRITE(*,*) 'dyn_atf: You should not have seen this print! error?', kt 74 END SUBROUTINE dyn_atf 75 76 #else 77 61 78 !! * Substitutions 62 79 # include "do_loop_substitute.h90" 63 80 !!---------------------------------------------------------------------- 64 81 !! NEMO/OCE 4.0 , NEMO Consortium (2018) 65 !! $Id$ 82 !! $Id$ 66 83 !! Software governed by the CeCILL license (see ./LICENSE) 67 84 !!---------------------------------------------------------------------- … … 71 88 !!---------------------------------------------------------------------- 72 89 !! *** ROUTINE dyn_atf *** 73 !! 74 !! ** Purpose : Finalize after horizontal velocity. Apply the boundary 90 !! 91 !! ** Purpose : Finalize after horizontal velocity. Apply the boundary 75 92 !! condition on the after velocity and apply the Asselin time 76 93 !! filter to the now fields. … … 79 96 !! estimate (ln_dynspg_ts=T) 80 97 !! 81 !! * Apply lateral boundary conditions on after velocity 98 !! * Apply lateral boundary conditions on after velocity 82 99 !! at the local domain boundaries through lbc_lnk call, 83 100 !! at the one-way open boundaries (ln_bdy=T), … … 86 103 !! * Apply the Asselin time filter to the now fields 87 104 !! arrays to start the next time step: 88 !! (puu(Kmm),pvv(Kmm)) = (puu(Kmm),pvv(Kmm)) 105 !! (puu(Kmm),pvv(Kmm)) = (puu(Kmm),pvv(Kmm)) 89 106 !! + rn_atfp [ (puu(Kbb),pvv(Kbb)) + (puu(Kaa),pvv(Kaa)) - 2 (puu(Kmm),pvv(Kmm)) ] 90 107 !! Note that with flux form advection and non linear free surface, … … 92 109 !! As a result, dyn_atf MUST be called after tra_atf. 93 110 !! 94 !! ** Action : puu(Kmm),pvv(Kmm) filtered now horizontal velocity 111 !! ** Action : puu(Kmm),pvv(Kmm) filtered now horizontal velocity 95 112 !!---------------------------------------------------------------------- 96 113 INTEGER , INTENT(in ) :: kt ! ocean time-step index … … 103 120 REAL(wp) :: zve3a, zve3n, zve3b, z1_2dt ! - - 104 121 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zue, zve, zwfld 105 REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: ze3t_f, ze3u_f, ze3v_f, zua, zva 122 REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: ze3t_f, ze3u_f, ze3v_f, zua, zva 106 123 !!---------------------------------------------------------------------- 107 124 ! … … 131 148 ! 132 149 IF( .NOT.ln_bt_fw ) THEN 133 ! Remove advective velocity from "now velocities" 134 ! prior to asselin filtering 135 ! In the forward case, this is done below after asselin filtering 136 ! so that asselin contribution is removed at the same time 150 ! Remove advective velocity from "now velocities" 151 ! prior to asselin filtering 152 ! In the forward case, this is done below after asselin filtering 153 ! so that asselin contribution is removed at the same time 137 154 DO jk = 1, jpkm1 138 155 puu(:,:,jk,Kmm) = ( puu(:,:,jk,Kmm) - un_adv(:,:)*r1_hu(:,:,Kmm) + uu_b(:,:,Kmm) )*umask(:,:,jk) 139 156 pvv(:,:,jk,Kmm) = ( pvv(:,:,jk,Kmm) - vn_adv(:,:)*r1_hv(:,:,Kmm) + vv_b(:,:,Kmm) )*vmask(:,:,jk) 140 END DO 157 END DO 141 158 ENDIF 142 159 ENDIF 143 160 144 161 ! Update after velocity on domain lateral boundaries 145 ! -------------------------------------------------- 162 ! -------------------------------------------------- 146 163 # if defined key_agrif 147 164 CALL Agrif_dyn( kt ) !* AGRIF zoom boundaries … … 198 215 zwfld(:,:) = emp_b(:,:) - emp(:,:) 199 216 IF ( ln_rnf ) zwfld(:,:) = zwfld(:,:) - ( rnf_b(:,:) - rnf(:,:) ) 217 200 218 DO jk = 1, jpkm1 201 219 ze3t_f(:,:,jk) = ze3t_f(:,:,jk) - zcoef * zwfld(:,:) * tmask(:,:,jk) & 202 & * pe3t(:,:,jk,Kmm) / ( ht(:,:) + 1._wp - ssmask(:,:) ) 220 & * pe3t(:,:,jk,Kmm) / ( ht(:,:) + 1._wp - ssmask(:,:) ) 203 221 END DO 204 222 ! … … 237 255 pvv(ji,jj,jk,Kmm) = ( zve3n + rn_atfp * ( zve3b - 2._wp * zve3n + zve3a ) ) / ze3v_f(ji,jj,jk) 238 256 END_3D 239 pe3u(:,:,1:jpkm1,Kmm) = ze3u_f(:,:,1:jpkm1) 257 pe3u(:,:,1:jpkm1,Kmm) = ze3u_f(:,:,1:jpkm1) 240 258 pe3v(:,:,1:jpkm1,Kmm) = ze3v_f(:,:,1:jpkm1) 241 259 ! … … 248 266 IF( ln_dynspg_ts .AND. ln_bt_fw ) THEN 249 267 ! Revert filtered "now" velocities to time split estimate 250 ! Doing it here also means that asselin filter contribution is removed 268 ! Doing it here also means that asselin filter contribution is removed 251 269 zue(:,:) = pe3u(:,:,1,Kmm) * puu(:,:,1,Kmm) * umask(:,:,1) 252 zve(:,:) = pe3v(:,:,1,Kmm) * pvv(:,:,1,Kmm) * vmask(:,:,1) 270 zve(:,:) = pe3v(:,:,1,Kmm) * pvv(:,:,1,Kmm) * vmask(:,:,1) 253 271 DO jk = 2, jpkm1 254 272 zue(:,:) = zue(:,:) + pe3u(:,:,jk,Kmm) * puu(:,:,jk,Kmm) * umask(:,:,jk) 255 zve(:,:) = zve(:,:) + pe3v(:,:,jk,Kmm) * pvv(:,:,jk,Kmm) * vmask(:,:,jk) 273 zve(:,:) = zve(:,:) + pe3v(:,:,jk,Kmm) * pvv(:,:,jk,Kmm) * vmask(:,:,jk) 256 274 END DO 257 275 DO jk = 1, jpkm1 … … 305 323 IF(sn_cfctl%l_prtctl) CALL prt_ctl( tab3d_1=puu(:,:,:,Kaa), clinfo1=' nxt - puu(:,:,:,Kaa): ', mask1=umask, & 306 324 & tab3d_2=pvv(:,:,:,Kaa), clinfo2=' pvv(:,:,:,Kaa): ' , mask2=vmask ) 307 ! 325 ! 308 326 IF( ln_dynspg_ts ) DEALLOCATE( zue, zve ) 309 327 IF( l_trddyn ) DEALLOCATE( zua, zva ) … … 312 330 END SUBROUTINE dyn_atf 313 331 332 #endif 333 314 334 !!========================================================================= 315 335 END MODULE dynatf
Note: See TracChangeset
for help on using the changeset viewer.