Changeset 11475
- Timestamp:
- 2019-08-28T09:22:35+02:00 (5 years ago)
- Location:
- NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps_rewrite_time_filterswap
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps_rewrite_time_filterswap/src/OCE/DOM/dom_oce.F90
r11053 r11475 12 12 !! 3.7 ! 2015-11 (G. Madec) introduce surface and scale factor ratio 13 13 !! - ! 2015-11 (G. Madec, A. Coward) time varying zgr by default 14 !! 4.1 ! 2019-08 (A. Coward, D. Storkey) rename prognostic variables in preparation for new time scheme. 14 15 !!---------------------------------------------------------------------- 15 16 -
NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps_rewrite_time_filterswap/src/OCE/DOM/domvvl.F90
r11053 r11475 13 13 !! dom_vvl_init : define initial vertical scale factors, depths and column thickness 14 14 !! dom_vvl_sf_nxt : Compute next vertical scale factors 15 !! dom_vvl_sf_ swp: Swap vertical scale factors and update the vertical grid15 !! dom_vvl_sf_update : Swap vertical scale factors and update the vertical grid 16 16 !! dom_vvl_interpol : Interpolate vertical scale factors from one grid point to another 17 17 !! dom_vvl_rst : read/write restart file … … 37 37 PUBLIC dom_vvl_init ! called by domain.F90 38 38 PUBLIC dom_vvl_sf_nxt ! called by step.F90 39 PUBLIC dom_vvl_sf_ swp! called by step.F9039 PUBLIC dom_vvl_sf_update ! called by step.F90 40 40 PUBLIC dom_vvl_interpol ! called by dynnxt.F90 41 41 … … 566 566 567 567 568 SUBROUTINE dom_vvl_sf_ swp( kt, Kbb, Kmm, Kaa )569 !!---------------------------------------------------------------------- 570 !! *** ROUTINE dom_vvl_sf_ swp***568 SUBROUTINE dom_vvl_sf_update( kt, Kbb, Kmm, Kaa ) 569 !!---------------------------------------------------------------------- 570 !! *** ROUTINE dom_vvl_sf_update *** 571 571 !! 572 !! ** Purpose : compute time filter and swap of scale factors572 !! ** Purpose : for z tilde case: compute time filter and swap of scale factors 573 573 !! compute all depths and related variables for next time step 574 574 !! write outputs and restart file 575 575 !! 576 !! ** Method : - swap of e3t with trick for volume/tracer conservation 576 !! ** Method : - swap of e3t with trick for volume/tracer conservation (ONLY FOR Z TILDE CASE) 577 577 !! - reconstruct scale factor at other grid points (interpolate) 578 578 !! - recompute depths and water height fields 579 579 !! 580 !! ** Action : - e3t_(b/n), tilde_e3t_(b/n) and e3(u/v)_nready for next time step580 !! ** Action : - tilde_e3t_(b/n) ready for next time step 581 581 !! - Recompute: 582 582 !! e3(u/v)_b … … 599 599 IF( ln_linssh ) RETURN ! No calculation in linear free surface 600 600 ! 601 IF( ln_timing ) CALL timing_start('dom_vvl_sf_ swp')601 IF( ln_timing ) CALL timing_start('dom_vvl_sf_update') 602 602 ! 603 603 IF( kt == nit000 ) THEN 604 604 IF(lwp) WRITE(numout,*) 605 IF(lwp) WRITE(numout,*) 'dom_vvl_sf_ swp : - time filter and swap of scale factors'606 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~ - interpolate scale factors and compute depths for next time step'605 IF(lwp) WRITE(numout,*) 'dom_vvl_sf_update : - interpolate scale factors and compute depths for next time step' 606 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~~~~' 607 607 ENDIF 608 608 ! … … 624 624 ! Horizontal scale factor interpolations 625 625 ! -------------------------------------- 626 ! - ML - e3u(:,:,:,Kbb) and e3v(:,:,:,Kbb) are al lready computed in dynnxt626 ! - ML - e3u(:,:,:,Kbb) and e3v(:,:,:,Kbb) are already computed in dynnxt 627 627 ! - JC - hu(:,:,:,Kbb), hv(:,:,:,:,Kbb), hur_b, hvr_b also 628 628 … … 667 667 IF( lrst_oce ) CALL dom_vvl_rst( kt, Kbb, Kmm, 'WRITE' ) 668 668 ! 669 IF( ln_timing ) CALL timing_stop('dom_vvl_sf_ swp')670 ! 671 END SUBROUTINE dom_vvl_sf_ swp669 IF( ln_timing ) CALL timing_stop('dom_vvl_sf_update') 670 ! 671 END SUBROUTINE dom_vvl_sf_update 672 672 673 673 -
NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps_rewrite_time_filterswap/src/OCE/DYN/dynatf.F90
r11050 r11475 20 20 !! 3.6 ! 2014-04 (G. Madec) add the diagnostic of the time filter trends 21 21 !! 3.7 ! 2015-11 (J. Chanut) Free surface simplification 22 !! 4.1 ! 2019-0 5 (D. Storkey) Rename dynnxt -> dynatf. Now just does time filtering.22 !! 4.1 ! 2019-08 (A. Coward, D. Storkey) Rename dynnxt.F90 -> dynatf.F90. Now just does time filtering. 23 23 !!------------------------------------------------------------------------- 24 24 … … 69 69 !! *** ROUTINE dyn_atf *** 70 70 !! 71 !! !!!!!!!!!!!!!!!!!! REWRITE HEADER COMMENTS !!!!!!!!!!!!!!!!!72 !!73 71 !! ** Purpose : Finalize after horizontal velocity. Apply the boundary 74 !! condition on the after velocity, achieve the time stepping 75 !! by applying the Asselin filter on now fields and swapping 76 !! the fields. 72 !! condition on the after velocity and apply the Asselin time 73 !! filter to the now fields. 77 74 !! 78 75 !! ** Method : * Ensure after velocities transport matches time splitting … … 84 81 !! at the AGRIF zoom boundaries (lk_agrif=T) 85 82 !! 86 !! * Apply the time filter applied and swap of the dynamics83 !! * Apply the Asselin time filter to the now fields 87 84 !! arrays to start the next time step: 88 !! (puu( :,:,:,Kbb),pvv(:,:,:,Kbb)) = (puu(:,:,:,Kmm),pvv(:,:,:,Kmm)) + atfp [ (puu(:,:,:,Kbb),pvv(:,:,:,Kbb)) + (puu(:,:,:,Kaa),pvv(:,:,:,Kaa)) - 2 (puu(:,:,:,Kmm),pvv(:,:,:,Kmm)) ]89 !! (puu(:,:,:,Kmm),pvv(:,:,:,Kmm)) = (puu(:,:,:,Kaa),pvv(:,:,:,Kaa)).85 !! (puu(Kmm),pvv(Kmm)) = (puu(Kmm),pvv(Kmm)) 86 !! + atfp [ (puu(Kbb),pvv(Kbb)) + (puu(Kaa),pvv(Kaa)) - 2 (puu(Kmm),pvv(Kmm)) ] 90 87 !! Note that with flux form advection and non linear free surface, 91 88 !! the time filter is applied on thickness weighted velocity. 92 !! As a result, dyn_atf MUST be called after tra_ nxt.89 !! As a result, dyn_atf MUST be called after tra_atf. 93 90 !! 94 !! ** Action : uu(Kmm),vv(Kmm) filtered now horizontal velocity91 !! ** Action : puu(Kmm),pvv(Kmm) filtered now horizontal velocity 95 92 !!---------------------------------------------------------------------- 96 93 INTEGER , INTENT(in ) :: kt ! ocean time-step index -
NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps_rewrite_time_filterswap/src/OCE/DYN/sshwzv.F90
r11466 r11475 9 9 !! - ! 2010-09 (D.Storkey and E.O'Dea) bug fixes for BDY module 10 10 !! 3.3 ! 2011-10 (M. Leclair) split former ssh_wzv routine and remove all vvl related work 11 !! 4.1 ! 2019-08 (A. Coward, D. Storkey) Rename ssh_nxt -> ssh_atf. Now only does time filtering. 11 12 !!---------------------------------------------------------------------- 12 13 13 14 !!---------------------------------------------------------------------- 14 15 !! ssh_nxt : after ssh 15 !! ssh_atf : filter ans swapthe ssh arrays16 !! ssh_atf : time filter the ssh arrays 16 17 !! wzv : compute now vertical velocity 17 18 !!---------------------------------------------------------------------- … … 222 223 !! *** ROUTINE ssh_atf *** 223 224 !! 224 !! !!!!!!!!!!!! REWRITE HEADER COMMENTS !!!!!!!!!!!! 225 !! 226 !! ** Purpose : achieve the sea surface height time stepping by 227 !! applying Asselin time filter and swapping the arrays 228 !! pssh(:,:,Kaa) already computed in ssh_nxt 225 !! ** Purpose : Apply Asselin time filter to now SSH. 229 226 !! 230 227 !! ** Method : - apply Asselin time fiter to now ssh (excluding the forcing … … 232 229 !! pssh(:,:,Kmm) = pssh(:,:,Kaa) + atfp * ( pssh(:,:,Kbb) -2 pssh(:,:,Kmm) + pssh(:,:,Kaa) ) 233 230 !! - atfp * rdt * ( emp_b - emp ) / rau0 234 !! pssh(:,:,Kmm) = pssh(:,:,Kaa) 235 !! 236 !! ** action : - pssh(:,:,Kbb), pssh(:,:,Kmm) : before & now sea surface height 237 !! ready for the next time step 231 !! 232 !! ** action : - pssh(:,:,Kmm) time filtered 238 233 !! 239 234 !! Reference : Leclair, M., and G. Madec, 2009, Ocean Modelling. -
NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps_rewrite_time_filterswap/src/OCE/TRA/traatf.F90
r11099 r11475 2 2 !!====================================================================== 3 3 !! *** MODULE traatf *** 4 !! Ocean active tracers: time stepping ontemperature and salinity4 !! Ocean active tracers: Asselin time filtering for temperature and salinity 5 5 !!====================================================================== 6 6 !! History : OPA ! 1991-11 (G. Madec) Original code … … 17 17 !! 3.3 ! 2010-04 (M. Leclair, G. Madec) semi-implicit hpg with asselin filter + modified LF-RA 18 18 !! - ! 2010-05 (C. Ethe, G. Madec) merge TRC-TRA 19 !!---------------------------------------------------------------------- 20 21 !!---------------------------------------------------------------------- 22 !! tra_atf : time stepping on tracers 23 !! tra_atf_fix : time stepping on tracers : fixed volume case 24 !! tra_atf_vvl : time stepping on tracers : variable volume case 19 !! 4.1 ! 2019-08 (A. Coward, D. Storkey) rename tranxt.F90 -> traatf.F90. Now only does time filtering. 20 !!---------------------------------------------------------------------- 21 22 !!---------------------------------------------------------------------- 23 !! tra_atf : time filtering on tracers 24 !! tra_atf_fix : time filtering on tracers : fixed volume case 25 !! tra_atf_vvl : time filtering on tracers : variable volume case 25 26 !!---------------------------------------------------------------------- 26 27 USE oce ! ocean dynamics and tracers variables … … 68 69 !! *** ROUTINE traatf *** 69 70 !! 70 !! !!!!!!!!!!!!!!!!! REWRITE HEADER COMMENTS !!!!!!!!!!!!!!!71 !!72 71 !! ** Purpose : Apply the boundary condition on the after temperature 73 !! and salinity fields, achieved the time stepping by adding 74 !! the Asselin filter on now fields and swapping the fields. 72 !! and salinity fields and add the Asselin time filter on now fields. 75 73 !! 76 74 !! ** Method : At this stage of the computation, ta and sa are the … … 86 84 !! domains (lk_agrif=T) 87 85 !! 88 !! ** Action : - ts(K bb) & ts(Kmm) ready for the next time step86 !! ** Action : - ts(Kmm) time filtered 89 87 !!---------------------------------------------------------------------- 90 88 INTEGER , INTENT(in ) :: kt ! ocean time-step index … … 101 99 IF( kt == nit000 ) THEN 102 100 IF(lwp) WRITE(numout,*) 103 IF(lwp) WRITE(numout,*) 'tra_atf : a chieve the time stepping by Asselin filter and array swap'101 IF(lwp) WRITE(numout,*) 'tra_atf : apply Asselin time filter to "now" fields' 104 102 IF(lwp) WRITE(numout,*) '~~~~~~~' 105 103 ENDIF … … 192 190 !! *** ROUTINE tra_atf_fix *** 193 191 !! 194 !! ** Purpose : fixed volume: apply the Asselin time filter and 195 !! swap the tracer fields. 192 !! ** Purpose : fixed volume: apply the Asselin time filter to the "now" field 196 193 !! 197 194 !! ** Method : - Apply a Asselin time filter on now fields. 198 !! - swap tracer fields to prepare the next time_step. 199 !! 200 !! ** Action : - ptb & ptn ready for the next time step 195 !! 196 !! ** Action : - pt(Kmm) ready for the next time step 201 197 !!---------------------------------------------------------------------- 202 198 INTEGER , INTENT(in ) :: kt ! ocean time-step index … … 213 209 IF( kt == kit000 ) THEN 214 210 IF(lwp) WRITE(numout,*) 215 IF(lwp) WRITE(numout,*) 'tra_atf_fix : time stepping', cdtype211 IF(lwp) WRITE(numout,*) 'tra_atf_fix : time filtering', cdtype 216 212 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~' 217 213 ENDIF … … 225 221 ztd = pt(ji,jj,jk,jn,Kaa) - 2._wp * ztn + pt(ji,jj,jk,jn,Kbb) ! time laplacian on tracers 226 222 ! 227 pt(ji,jj,jk,jn,Kmm) = ztn + atfp * ztd ! pt b <-- filtered ptn223 pt(ji,jj,jk,jn,Kmm) = ztn + atfp * ztd ! pt <-- filtered pt 228 224 END DO 229 225 END DO … … 240 236 !! 241 237 !! ** Purpose : Time varying volume: apply the Asselin time filter 242 !! and swap the tracer fields.243 238 !! 244 239 !! ** Method : - Apply a thickness weighted Asselin time filter on now fields. 245 !! - swap tracer fields to prepare the next time_step. 246 !! tb = ( e3t(Kmm)*tn + atfp*[ e3t(Kbb)*tb - 2 e3t(Kmm)*tn + e3t_a*ta ] ) 247 !! /( e3t(Kmm) + atfp*[ e3t(Kbb) - 2 e3t(Kmm) + e3t(Kaa) ] ) 248 !! tn = ta 249 !! 250 !! ** Action : - ptb & ptn ready for the next time step 240 !! pt(Kmm) = ( e3t(Kmm)*pt(Kmm) + atfp*[ e3t(Kbb)*pt(Kbb) - 2 e3t(Kmm)*pt(Kmm) + e3t_a*pt(Kaa) ] ) 241 !! /( e3t(Kmm) + atfp*[ e3t(Kbb) - 2 e3t(Kmm) + e3t(Kaa) ] ) 242 !! 243 !! ** Action : - pt(Kmm) ready for the next time step 251 244 !!---------------------------------------------------------------------- 252 245 INTEGER , INTENT(in ) :: kt ! ocean time-step index … … 269 262 IF( kt == kit000 ) THEN 270 263 IF(lwp) WRITE(numout,*) 271 IF(lwp) WRITE(numout,*) 'tra_atf_vvl : time stepping', cdtype264 IF(lwp) WRITE(numout,*) 'tra_atf_vvl : time filtering', cdtype 272 265 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~' 273 266 ENDIF -
NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps_rewrite_time_filterswap/src/OCE/oce.F90
r11053 r11475 8 8 !! 3.3 ! 2010-09 (C. Ethe) TRA-TRC merge: add ts, gtsu, gtsv 4D arrays 9 9 !! 3.7 ! 2014-01 (G. Madec) suppression of curl and before hdiv from in-core memory 10 !! 4.1 ! 2019-08 (A. Coward, D. Storkey) rename prognostic variables in preparation for new time scheme 10 11 !!---------------------------------------------------------------------- 11 12 USE par_oce ! ocean parameters -
NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps_rewrite_time_filterswap/src/OCE/step.F90
r11463 r11475 31 31 !! - ! 2015-11 (J. Chanut) free surface simplification (remove filtered free surface) 32 32 !! 4.0 ! 2017-05 (G. Madec) introduction of the vertical physics manager (zdfphy) 33 !! 4.1 ! 2019-08 (A. Coward, D. Storkey) rewrite in preparation for new timestepping scheme 33 34 !!---------------------------------------------------------------------- 34 35 … … 265 266 266 267 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 267 ! Set boundary conditions and Swap268 ! Set boundary conditions, time filter and swap time levels 268 269 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 269 270 !!jc1: For agrif, it would be much better to finalize tracers/momentum here (e.g. bdy conditions) and move the swap … … 291 292 Naa = Nrhs 292 293 ! 293 IF(.NOT.ln_linssh) CALL dom_vvl_sf_ swp( kstp, Nbb, Nnn, Naa ) ! swap ofvertical scale factors294 IF(.NOT.ln_linssh) CALL dom_vvl_sf_update( kstp, Nbb, Nnn, Naa ) ! recompute vertical scale factors 294 295 ! 295 296 IF( ln_diahsb ) CALL dia_hsb ( kstp, Nbb, Nnn ) ! - ML - global conservation diagnostics -
NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps_rewrite_time_filterswap/tests/VORTEX/MY_SRC/domvvl.F90
r11465 r11475 13 13 !! dom_vvl_init : define initial vertical scale factors, depths and column thickness 14 14 !! dom_vvl_sf_nxt : Compute next vertical scale factors 15 !! dom_vvl_sf_ swp: Swap vertical scale factors and update the vertical grid15 !! dom_vvl_sf_update : Swap vertical scale factors and update the vertical grid 16 16 !! dom_vvl_interpol : Interpolate vertical scale factors from one grid point to another 17 17 !! dom_vvl_rst : read/write restart file … … 37 37 PUBLIC dom_vvl_init ! called by domain.F90 38 38 PUBLIC dom_vvl_sf_nxt ! called by step.F90 39 PUBLIC dom_vvl_sf_ swp! called by step.F9039 PUBLIC dom_vvl_sf_update ! called by step.F90 40 40 PUBLIC dom_vvl_interpol ! called by dynnxt.F90 41 41 … … 566 566 567 567 568 SUBROUTINE dom_vvl_sf_ swp( kt, Kbb, Kmm, Kaa )569 !!---------------------------------------------------------------------- 570 !! *** ROUTINE dom_vvl_sf_ swp***568 SUBROUTINE dom_vvl_sf_update( kt, Kbb, Kmm, Kaa ) 569 !!---------------------------------------------------------------------- 570 !! *** ROUTINE dom_vvl_sf_update *** 571 571 !! 572 !! ** Purpose : compute time filter and swap of scale factors572 !! ** Purpose : for z tilde case: compute time filter and swap of scale factors 573 573 !! compute all depths and related variables for next time step 574 574 !! write outputs and restart file 575 575 !! 576 !! ** Method : - swap of e3t with trick for volume/tracer conservation 576 !! ** Method : - swap of e3t with trick for volume/tracer conservation (ONLY FOR Z TILDE CASE) 577 577 !! - reconstruct scale factor at other grid points (interpolate) 578 578 !! - recompute depths and water height fields 579 579 !! 580 !! ** Action : - e3t_(b/n), tilde_e3t_(b/n) and e3(u/v)_nready for next time step580 !! ** Action : - tilde_e3t_(b/n) ready for next time step 581 581 !! - Recompute: 582 582 !! e3(u/v)_b … … 599 599 IF( ln_linssh ) RETURN ! No calculation in linear free surface 600 600 ! 601 IF( ln_timing ) CALL timing_start('dom_vvl_sf_ swp')601 IF( ln_timing ) CALL timing_start('dom_vvl_sf_update') 602 602 ! 603 603 IF( kt == nit000 ) THEN 604 604 IF(lwp) WRITE(numout,*) 605 IF(lwp) WRITE(numout,*) 'dom_vvl_sf_ swp : - time filter and swap of scale factors'606 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~ - interpolate scale factors and compute depths for next time step'605 IF(lwp) WRITE(numout,*) 'dom_vvl_sf_update : - interpolate scale factors and compute depths for next time step' 606 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~~~~' 607 607 ENDIF 608 608 ! … … 667 667 IF( lrst_oce ) CALL dom_vvl_rst( kt, Kbb, Kmm, 'WRITE' ) 668 668 ! 669 IF( ln_timing ) CALL timing_stop('dom_vvl_sf_ swp')670 ! 671 END SUBROUTINE dom_vvl_sf_ swp669 IF( ln_timing ) CALL timing_stop('dom_vvl_sf_update') 670 ! 671 END SUBROUTINE dom_vvl_sf_update 672 672 673 673
Note: See TracChangeset
for help on using the changeset viewer.