Changeset 11475


Ignore:
Timestamp:
2019-08-28T09:22:35+02:00 (22 months ago)
Author:
davestorkey
Message:

2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps_rewrite_time_filterswap : Update header comments etc
and rename dom_vvl_sf_swp → dom_vvl_sf_update.

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  
    1212   !!            3.7  ! 2015-11  (G. Madec) introduce surface and scale factor ratio 
    1313   !!             -   ! 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. 
    1415   !!---------------------------------------------------------------------- 
    1516 
  • NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps_rewrite_time_filterswap/src/OCE/DOM/domvvl.F90

    r11053 r11475  
    1313   !!   dom_vvl_init     : define initial vertical scale factors, depths and column thickness 
    1414   !!   dom_vvl_sf_nxt   : Compute next vertical scale factors 
    15    !!   dom_vvl_sf_swp   : Swap vertical scale factors and update the vertical grid 
     15   !!   dom_vvl_sf_update   : Swap vertical scale factors and update the vertical grid 
    1616   !!   dom_vvl_interpol : Interpolate vertical scale factors from one grid point to another 
    1717   !!   dom_vvl_rst      : read/write restart file 
     
    3737   PUBLIC  dom_vvl_init       ! called by domain.F90 
    3838   PUBLIC  dom_vvl_sf_nxt     ! called by step.F90 
    39    PUBLIC  dom_vvl_sf_swp     ! called by step.F90 
     39   PUBLIC  dom_vvl_sf_update  ! called by step.F90 
    4040   PUBLIC  dom_vvl_interpol   ! called by dynnxt.F90 
    4141 
     
    566566 
    567567 
    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  *** 
    571571      !!                    
    572       !! ** Purpose :  compute time filter and swap of scale factors  
     572      !! ** Purpose :  for z tilde case: compute time filter and swap of scale factors  
    573573      !!               compute all depths and related variables for next time step 
    574574      !!               write outputs and restart file 
    575575      !! 
    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) 
    577577      !!               - reconstruct scale factor at other grid points (interpolate) 
    578578      !!               - recompute depths and water height fields 
    579579      !! 
    580       !! ** Action  :  - e3t_(b/n), tilde_e3t_(b/n) and e3(u/v)_n ready for next time step 
     580      !! ** Action  :  - tilde_e3t_(b/n) ready for next time step 
    581581      !!               - Recompute: 
    582582      !!                    e3(u/v)_b        
     
    599599      IF( ln_linssh )   RETURN      ! No calculation in linear free surface 
    600600      ! 
    601       IF( ln_timing )   CALL timing_start('dom_vvl_sf_swp') 
     601      IF( ln_timing )   CALL timing_start('dom_vvl_sf_update') 
    602602      ! 
    603603      IF( kt == nit000 )   THEN 
    604604         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,*) '~~~~~~~~~~~~~~~~~' 
    607607      ENDIF 
    608608      ! 
     
    624624      ! Horizontal scale factor interpolations 
    625625      ! -------------------------------------- 
    626       ! - ML - e3u(:,:,:,Kbb) and e3v(:,:,:,Kbb) are allready computed in dynnxt 
     626      ! - ML - e3u(:,:,:,Kbb) and e3v(:,:,:,Kbb) are already computed in dynnxt 
    627627      ! - JC - hu(:,:,:,Kbb), hv(:,:,:,:,Kbb), hur_b, hvr_b also 
    628628       
     
    667667      IF( lrst_oce  )   CALL dom_vvl_rst( kt, Kbb, Kmm, 'WRITE' ) 
    668668      ! 
    669       IF( ln_timing )   CALL timing_stop('dom_vvl_sf_swp') 
    670       ! 
    671    END SUBROUTINE dom_vvl_sf_swp 
     669      IF( ln_timing )   CALL timing_stop('dom_vvl_sf_update') 
     670      ! 
     671   END SUBROUTINE dom_vvl_sf_update 
    672672 
    673673 
  • NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps_rewrite_time_filterswap/src/OCE/DYN/dynatf.F90

    r11050 r11475  
    2020   !!            3.6  !  2014-04  (G. Madec) add the diagnostic of the time filter trends 
    2121   !!            3.7  !  2015-11  (J. Chanut) Free surface simplification 
    22    !!            4.1  !  2019-05  (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. 
    2323   !!------------------------------------------------------------------------- 
    2424   
     
    6969      !!                  ***  ROUTINE dyn_atf  *** 
    7070      !!                    
    71       !!  !!!!!!!!!!!!!!!!!!  REWRITE HEADER COMMENTS !!!!!!!!!!!!!!!!! 
    72       !! 
    7371      !! ** 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. 
    7774      !! 
    7875      !! ** Method  : * Ensure after velocities transport matches time splitting 
     
    8481      !!             at the AGRIF zoom   boundaries (lk_agrif=T) 
    8582      !! 
    86       !!              * Apply the time filter applied and swap of the dynamics 
     83      !!              * Apply the Asselin time filter to the now fields 
    8784      !!             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)) ] 
    9087      !!             Note that with flux form advection and non linear free surface, 
    9188      !!             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. 
    9390      !! 
    94       !! ** Action :   uu(Kmm),vv(Kmm)   filtered now horizontal velocity  
     91      !! ** Action :   puu(Kmm),pvv(Kmm)   filtered now horizontal velocity  
    9592      !!---------------------------------------------------------------------- 
    9693      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  
    99   !!             -   !  2010-09  (D.Storkey and E.O'Dea) bug fixes for BDY module 
    1010   !!            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. 
    1112   !!---------------------------------------------------------------------- 
    1213 
    1314   !!---------------------------------------------------------------------- 
    1415   !!   ssh_nxt       : after ssh 
    15    !!   ssh_atf       : filter ans swap the ssh arrays 
     16   !!   ssh_atf       : time filter the ssh arrays 
    1617   !!   wzv           : compute now vertical velocity 
    1718   !!---------------------------------------------------------------------- 
     
    222223      !!                    ***  ROUTINE ssh_atf  *** 
    223224      !! 
    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. 
    229226      !! 
    230227      !! ** Method  : - apply Asselin time fiter to now ssh (excluding the forcing 
     
    232229      !!                pssh(:,:,Kmm) = pssh(:,:,Kaa) + atfp * ( pssh(:,:,Kbb) -2 pssh(:,:,Kmm) + pssh(:,:,Kaa) ) 
    233230      !!                            - 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 
    238233      !! 
    239234      !! 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  
    22   !!====================================================================== 
    33   !!                       ***  MODULE  traatf  *** 
    4    !! Ocean active tracers:  time stepping on temperature and salinity 
     4   !! Ocean active tracers:  Asselin time filtering for temperature and salinity 
    55   !!====================================================================== 
    66   !! History :  OPA  !  1991-11  (G. Madec)  Original code 
     
    1717   !!            3.3  !  2010-04  (M. Leclair, G. Madec)  semi-implicit hpg with asselin filter + modified LF-RA 
    1818   !!             -   !  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 
    2526   !!---------------------------------------------------------------------- 
    2627   USE oce             ! ocean dynamics and tracers variables 
     
    6869      !!                   ***  ROUTINE traatf  *** 
    6970      !! 
    70       !!       !!!!!!!!!!!!!!!!!  REWRITE HEADER COMMENTS !!!!!!!!!!!!!!! 
    71       !! 
    7271      !! ** 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. 
    7573      !!  
    7674      !! ** Method  :   At this stage of the computation, ta and sa are the  
     
    8684      !!             domains (lk_agrif=T) 
    8785      !! 
    88       !! ** Action  : - ts(Kbb) & ts(Kmm) ready for the next time step 
     86      !! ** Action  : - ts(Kmm) time filtered 
    8987      !!---------------------------------------------------------------------- 
    9088      INTEGER                                  , INTENT(in   ) :: kt             ! ocean time-step index 
     
    10199      IF( kt == nit000 ) THEN 
    102100         IF(lwp) WRITE(numout,*) 
    103          IF(lwp) WRITE(numout,*) 'tra_atf : achieve the time stepping by Asselin filter and array swap' 
     101         IF(lwp) WRITE(numout,*) 'tra_atf : apply Asselin time filter to "now" fields' 
    104102         IF(lwp) WRITE(numout,*) '~~~~~~~' 
    105103      ENDIF 
     
    192190      !!                   ***  ROUTINE tra_atf_fix  *** 
    193191      !! 
    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 
    196193      !!  
    197194      !! ** 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 
    201197      !!---------------------------------------------------------------------- 
    202198      INTEGER                                  , INTENT(in   ) ::  kt            ! ocean time-step index 
     
    213209      IF( kt == kit000 )  THEN 
    214210         IF(lwp) WRITE(numout,*) 
    215          IF(lwp) WRITE(numout,*) 'tra_atf_fix : time stepping', cdtype 
     211         IF(lwp) WRITE(numout,*) 'tra_atf_fix : time filtering', cdtype 
    216212         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~' 
    217213      ENDIF 
     
    225221                  ztd = pt(ji,jj,jk,jn,Kaa) - 2._wp * ztn + pt(ji,jj,jk,jn,Kbb)  ! time laplacian on tracers 
    226222                  ! 
    227                   pt(ji,jj,jk,jn,Kmm) = ztn + atfp * ztd                      ! ptb <-- filtered ptn  
     223                  pt(ji,jj,jk,jn,Kmm) = ztn + atfp * ztd                      ! pt <-- filtered pt 
    228224               END DO 
    229225           END DO 
     
    240236      !! 
    241237      !! ** Purpose :   Time varying volume: apply the Asselin time filter   
    242       !!                and swap the tracer fields. 
    243238      !!  
    244239      !! ** 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 
    251244      !!---------------------------------------------------------------------- 
    252245      INTEGER                                  , INTENT(in   ) ::  kt        ! ocean time-step index 
     
    269262      IF( kt == kit000 )  THEN 
    270263         IF(lwp) WRITE(numout,*) 
    271          IF(lwp) WRITE(numout,*) 'tra_atf_vvl : time stepping', cdtype 
     264         IF(lwp) WRITE(numout,*) 'tra_atf_vvl : time filtering', cdtype 
    272265         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~' 
    273266      ENDIF 
  • NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps_rewrite_time_filterswap/src/OCE/oce.F90

    r11053 r11475  
    88   !!            3.3  !  2010-09  (C. Ethe) TRA-TRC merge: add ts, gtsu, gtsv 4D arrays 
    99   !!            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 
    1011   !!---------------------------------------------------------------------- 
    1112   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  
    3131   !!             -   !  2015-11  (J. Chanut) free surface simplification (remove filtered free surface) 
    3232   !!            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 
    3334   !!---------------------------------------------------------------------- 
    3435 
     
    265266 
    266267      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    267       ! Set boundary conditions and Swap 
     268      ! Set boundary conditions, time filter and swap time levels 
    268269      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    269270!!jc1: For agrif, it would be much better to finalize tracers/momentum here (e.g. bdy conditions) and move the swap  
     
    291292      Naa = Nrhs 
    292293      ! 
    293       IF(.NOT.ln_linssh) CALL dom_vvl_sf_swp( kstp, Nbb, Nnn, Naa )  ! swap of vertical scale factors 
     294      IF(.NOT.ln_linssh) CALL dom_vvl_sf_update( kstp, Nbb, Nnn, Naa )  ! recompute vertical scale factors 
    294295      ! 
    295296      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  
    1313   !!   dom_vvl_init     : define initial vertical scale factors, depths and column thickness 
    1414   !!   dom_vvl_sf_nxt   : Compute next vertical scale factors 
    15    !!   dom_vvl_sf_swp   : Swap vertical scale factors and update the vertical grid 
     15   !!   dom_vvl_sf_update   : Swap vertical scale factors and update the vertical grid 
    1616   !!   dom_vvl_interpol : Interpolate vertical scale factors from one grid point to another 
    1717   !!   dom_vvl_rst      : read/write restart file 
     
    3737   PUBLIC  dom_vvl_init       ! called by domain.F90 
    3838   PUBLIC  dom_vvl_sf_nxt     ! called by step.F90 
    39    PUBLIC  dom_vvl_sf_swp     ! called by step.F90 
     39   PUBLIC  dom_vvl_sf_update  ! called by step.F90 
    4040   PUBLIC  dom_vvl_interpol   ! called by dynnxt.F90 
    4141 
     
    566566 
    567567 
    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  *** 
    571571      !!                    
    572       !! ** Purpose :  compute time filter and swap of scale factors  
     572      !! ** Purpose :  for z tilde case: compute time filter and swap of scale factors  
    573573      !!               compute all depths and related variables for next time step 
    574574      !!               write outputs and restart file 
    575575      !! 
    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) 
    577577      !!               - reconstruct scale factor at other grid points (interpolate) 
    578578      !!               - recompute depths and water height fields 
    579579      !! 
    580       !! ** Action  :  - e3t_(b/n), tilde_e3t_(b/n) and e3(u/v)_n ready for next time step 
     580      !! ** Action  :  - tilde_e3t_(b/n) ready for next time step 
    581581      !!               - Recompute: 
    582582      !!                    e3(u/v)_b        
     
    599599      IF( ln_linssh )   RETURN      ! No calculation in linear free surface 
    600600      ! 
    601       IF( ln_timing )   CALL timing_start('dom_vvl_sf_swp') 
     601      IF( ln_timing )   CALL timing_start('dom_vvl_sf_update') 
    602602      ! 
    603603      IF( kt == nit000 )   THEN 
    604604         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,*) '~~~~~~~~~~~~~~~~~' 
    607607      ENDIF 
    608608      ! 
     
    667667      IF( lrst_oce  )   CALL dom_vvl_rst( kt, Kbb, Kmm, 'WRITE' ) 
    668668      ! 
    669       IF( ln_timing )   CALL timing_stop('dom_vvl_sf_swp') 
    670       ! 
    671    END SUBROUTINE dom_vvl_sf_swp 
     669      IF( ln_timing )   CALL timing_stop('dom_vvl_sf_update') 
     670      ! 
     671   END SUBROUTINE dom_vvl_sf_update 
    672672 
    673673 
Note: See TracChangeset for help on using the changeset viewer.