New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 11480 for NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/DYN/sshwzv.F90 – NEMO

Ignore:
Timestamp:
2019-08-29T11:23:25+02:00 (5 years ago)
Author:
davestorkey
Message:

2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps : Merge in changes from branch of branch.
Main changes:

  1. "nxt" modules renamed as "atf" and now just do Asselin time filtering. The time level swapping is achieved by swapping indices.
  2. Some additional prognostic grid variables changed to use a time dimension.

Notes:

  1. This merged branch passes SETTE tests but does not identical results to the SETTE tests with the trunk@10721 unless minor bugs to do with Euler timestepping and the OFF timestepping are fixed in the trunk (NEMO tickets #2310 and #2311).
  2. The nn_dttrc > 1 option for TOP (TOP has a different timestep to OCE) doesn't work. But it doesn't work in the trunk or NEMO 4.0 release either.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/DYN/sshwzv.F90

    r11421 r11480  
    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_swp       : filter ans swap the ssh arrays 
     16   !!   ssh_atf       : time filter the ssh arrays 
    1617   !!   wzv           : compute now vertical velocity 
    1718   !!---------------------------------------------------------------------- 
     
    4344   PUBLIC   wzv        ! called by step.F90 
    4445   PUBLIC   wAimp      ! called by step.F90 
    45    PUBLIC   ssh_swp    ! called by step.F90 
     46   PUBLIC   ssh_atf    ! called by step.F90 
    4647 
    4748   !! * Substitutions 
     
    218219 
    219220 
    220    SUBROUTINE ssh_swp( kt, Kbb, Kmm, Kaa ) 
    221       !!---------------------------------------------------------------------- 
    222       !!                    ***  ROUTINE ssh_nxt  *** 
    223       !! 
    224       !! ** Purpose :   achieve the sea surface  height time stepping by  
    225       !!              applying Asselin time filter and swapping the arrays 
    226       !!              ssh(:,:,Kaa)  already computed in ssh_nxt   
     221   SUBROUTINE ssh_atf( kt, Kbb, Kmm, Kaa, pssh ) 
     222      !!---------------------------------------------------------------------- 
     223      !!                    ***  ROUTINE ssh_atf  *** 
     224      !! 
     225      !! ** Purpose :   Apply Asselin time filter to now SSH. 
    227226      !! 
    228227      !! ** Method  : - apply Asselin time fiter to now ssh (excluding the forcing 
    229228      !!              from the filter, see Leclair and Madec 2010) and swap : 
    230       !!                ssh(:,:,Kmm) = ssh(:,:,Kaa) + atfp * ( ssh(:,:,Kbb) -2 ssh(:,:,Kmm) + ssh(:,:,Kaa) ) 
     229      !!                pssh(:,:,Kmm) = pssh(:,:,Kaa) + atfp * ( pssh(:,:,Kbb) -2 pssh(:,:,Kmm) + pssh(:,:,Kaa) ) 
    231230      !!                            - atfp * rdt * ( emp_b - emp ) / rau0 
    232       !!                ssh(:,:,Kmm) = ssh(:,:,Kaa) 
    233       !! 
    234       !! ** action  : - ssh(:,:,Kbb), ssh(:,:,Kmm)   : before & now sea surface height 
    235       !!                               ready for the next time step 
     231      !! 
     232      !! ** action  : - pssh(:,:,Kmm) time filtered 
    236233      !! 
    237234      !! Reference  : Leclair, M., and G. Madec, 2009, Ocean Modelling. 
    238235      !!---------------------------------------------------------------------- 
    239       INTEGER, INTENT(in) ::   kt              ! ocean time-step index 
    240       INTEGER, INTENT(in) ::   Kbb, Kmm, Kaa   ! ocean time-step index 
     236      INTEGER                         , INTENT(in   ) ::   kt             ! ocean time-step index 
     237      INTEGER                         , INTENT(in   ) ::   Kbb, Kmm, Kaa  ! ocean time level indices 
     238      REAL(wp), DIMENSION(jpi,jpj,jpt), INTENT(inout) ::   pssh           ! SSH field 
    241239      ! 
    242240      REAL(wp) ::   zcoef   ! local scalar 
    243241      !!---------------------------------------------------------------------- 
    244242      ! 
    245       IF( ln_timing )   CALL timing_start('ssh_swp') 
     243      IF( ln_timing )   CALL timing_start('ssh_atf') 
    246244      ! 
    247245      IF( kt == nit000 ) THEN 
    248246         IF(lwp) WRITE(numout,*) 
    249          IF(lwp) WRITE(numout,*) 'ssh_swp : Asselin time filter and swap of sea surface height' 
     247         IF(lwp) WRITE(numout,*) 'ssh_atf : Asselin time filter of sea surface height' 
    250248         IF(lwp) WRITE(numout,*) '~~~~~~~ ' 
    251249      ENDIF 
    252250      !              !==  Euler time-stepping: no filter, just swap  ==! 
    253       IF ( neuler == 0 .AND. kt == nit000 ) THEN 
    254          ssh(:,:,Kmm) = ssh(:,:,Kaa)                              ! now    <-- after  (before already = now) 
    255          ! 
    256       ELSE           !==  Leap-Frog time-stepping: Asselin filter + swap  ==! 
    257          !                                                  ! before <-- now filtered 
    258          ssh(:,:,Kbb) = ssh(:,:,Kmm) + atfp * ( ssh(:,:,Kbb) - 2 * ssh(:,:,Kmm) + ssh(:,:,Kaa) ) 
    259          IF( .NOT.ln_linssh ) THEN                          ! before <-- with forcing removed 
     251      IF ( .NOT.( neuler == 0 .AND. kt == nit000 ) ) THEN   ! Only do time filtering for leapfrog timesteps 
     252         !                                                  ! filtered "now" field 
     253         pssh(:,:,Kmm) = pssh(:,:,Kmm) + atfp * ( pssh(:,:,Kbb) - 2 * pssh(:,:,Kmm) + pssh(:,:,Kaa) ) 
     254         IF( .NOT.ln_linssh ) THEN                          ! "now" <-- with forcing removed 
    260255            zcoef = atfp * rdt * r1_rau0 
    261             ssh(:,:,Kbb) = ssh(:,:,Kbb) - zcoef * (     emp_b(:,:) - emp   (:,:)   & 
     256            pssh(:,:,Kmm) = pssh(:,:,Kmm) - zcoef * (     emp_b(:,:) - emp   (:,:)   & 
    262257               &                             -    rnf_b(:,:) + rnf   (:,:)   & 
    263258               &                             + fwfisf_b(:,:) - fwfisf(:,:)   ) * ssmask(:,:) 
    264259         ENDIF 
    265          ssh(:,:,Kmm) = ssh(:,:,Kaa)                              ! now <-- after 
    266       ENDIF 
    267       ! 
    268       IF(ln_ctl)   CALL prt_ctl( tab2d_1=ssh(:,:,Kbb), clinfo1=' ssh(:,:,Kbb)  - : ', mask1=tmask ) 
    269       ! 
    270       IF( ln_timing )   CALL timing_stop('ssh_swp') 
    271       ! 
    272    END SUBROUTINE ssh_swp 
     260      ENDIF 
     261      ! 
     262      IF(ln_ctl)   CALL prt_ctl( tab2d_1=pssh(:,:,Kmm), clinfo1=' pssh(:,:,Kmm)  - : ', mask1=tmask ) 
     263      ! 
     264      IF( ln_timing )   CALL timing_stop('ssh_atf') 
     265      ! 
     266   END SUBROUTINE ssh_atf 
    273267 
    274268   SUBROUTINE wAimp( kt, Kmm ) 
Note: See TracChangeset for help on using the changeset viewer.