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 4178 for branches/2013/dev_r3858_NOC_ZTC/NEMOGCM/NEMO/OPA_SRC/step.F90 – NEMO

Ignore:
Timestamp:
2013-11-11T13:01:19+01:00 (10 years ago)
Author:
acc
Message:

Branch 2013/dev_r3858_NOC_ZTC, #863. Merge of Mercator time-stepping changes with z-tilde structure. Not yet fully operational with key_dynspg_ts but main structural changes are all in place.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2013/dev_r3858_NOC_ZTC/NEMOGCM/NEMO/OPA_SRC/step.F90

    r3953 r4178  
    9999      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    100100                         CALL ssh_nxt       ( kstp )  ! after ssh 
     101      IF( lk_dynspg_ts ) THEN 
     102                                  CALL wzv_1         ( kstp )  ! now cross-level velocity  
     103          ! In case the time splitting case, update almost all momentum trends here: 
     104          ! Note that the computation of vertical velocity above, hence "after" sea level 
     105          ! is necessary to compute momentum advection for the rhs of barotropic loop: 
     106                                  CALL eos    ( tsn, rhd, rhop )                 ! now in situ density for hpg computation 
     107          IF( ln_zps      )       CALL zps_hde( kstp, jpts, tsn, gtsu, gtsv,  &  ! zps: now hor. derivative 
     108                &                                          rhd, gru , grv  )     ! of t, s, rd at the last ocean level 
     109                                  CALL zdf_bfr( kstp )         ! bottom friction (if quadratic) 
     110 
     111                                  ua(:,:,:) = 0.e0             ! set dynamics trends to zero 
     112                                  va(:,:,:) = 0.e0 
     113          IF(  ln_asmiau .AND. & 
     114             & ln_dyninc       )  CALL dyn_asm_inc  ( kstp )   ! apply dynamics assimilation increment 
     115          IF( ln_neptsimp )       CALL dyn_nept_cor ( kstp )   ! subtract Neptune velocities (simplified) 
     116          IF( lk_bdy           )  CALL bdy_dyn3d_dmp( kstp )   ! bdy damping trends 
     117                                  CALL dyn_adv      ( kstp )   ! advection (vector or flux form) 
     118                                  CALL dyn_vor      ( kstp )   ! vorticity term including Coriolis 
     119                                  CALL dyn_ldf      ( kstp )   ! lateral mixing 
     120          IF( ln_neptsimp )       CALL dyn_nept_cor ( kstp )   ! add Neptune velocities (simplified) 
     121#if defined key_agrif 
     122          IF(.NOT. Agrif_Root())  CALL Agrif_Sponge_dyn        ! momentum sponge 
     123#endif 
     124                                  CALL dyn_hpg( kstp )         ! horizontal gradient of Hydrostatic pressure 
     125                                  CALL dyn_spg( kstp, indic )  ! surface pressure gradient 
     126 
     127                                  ua_sv(:,:,:) = ua(:,:,:)     ! save next velocities (not trends !) 
     128                                  va_sv(:,:,:) = va(:,:,:) 
     129      ENDIF 
    101130      IF( lk_vvl     )   CALL dom_vvl_sf_nxt( kstp )  ! after vertical scale factors 
    102                          CALL wzv           ( kstp )  ! now cross-level velocity 
     131                         CALL wzv_2         ( kstp )  ! now cross-level velocity (original) 
    103132 
    104133      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    109138      ! 
    110139      !  VERTICAL PHYSICS 
    111                         CALL zdf_bfr( kstp )         ! bottom friction 
     140      IF( .NOT. lk_dynspg_ts ) CALL zdf_bfr( kstp )         ! bottom friction 
    112141 
    113142      !                                               ! Vertical eddy viscosity and diffusivity coefficients 
     
    208237 
    209238      ELSE                                                  ! centered hpg  (eos then time stepping) 
    210                              CALL eos    ( tsn, rhd, rhop, fsdept_n(:,:,:) )  ! now in situ density for hpg computation 
    211          IF( ln_zps      )   CALL zps_hde( kstp, jpts, tsn, gtsu, gtsv,  &    ! zps: now hor. derivative 
     239         IF ( .NOT. lk_dynspg_ts ) THEN                     ! eos already called in time-split case 
     240                                CALL eos    ( tsn, rhd, rhop, fsdept_n(:,:,:) )  ! now in situ density for hpg computation 
     241            IF( ln_zps      )   CALL zps_hde( kstp, jpts, tsn, gtsu, gtsv,  &    ! zps: now hor. derivative 
    212242            &                                          rhd, gru , grv  )      ! of t, s, rd at the last ocean level 
     243         ENDIF 
    213244         IF( ln_zdfnpc   )   CALL tra_npc( kstp )                ! update after fields by non-penetrative convection 
    214245                             CALL tra_nxt( kstp )                ! tracer fields at next time step 
     
    218249      ! Dynamics                                    (tsa used as workspace) 
    219250      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
     251      IF( lk_dynspg_ts   )  THEN 
     252! revert to previously computed tendencies: 
     253! (not using ua, va as temporary arrays during tracers' update could avoid that) 
     254                               ua(:,:,:) = ua_sv(:,:,:) 
     255                               va(:,:,:) = va_sv(:,:,:) 
     256                               CALL dyn_bfr( kstp )         ! bottom friction 
     257                               CALL dyn_zdf( kstp )         ! vertical diffusion 
     258      ELSE 
    220259                               ua(:,:,:) = 0.e0             ! set dynamics trends to zero 
    221260                               va(:,:,:) = 0.e0 
    222261 
    223       IF(  ln_asmiau .AND. & 
    224          & ln_dyninc       )   CALL dyn_asm_inc( kstp )     ! apply dynamics assimilation increment 
    225       IF( ln_bkgwri )          CALL asm_bkg_wri( kstp )     ! output background fields 
    226       IF( ln_neptsimp )        CALL dyn_nept_cor( kstp )    ! subtract Neptune velocities (simplified) 
    227       IF( lk_bdy           )   CALL bdy_dyn3d_dmp(kstp )    ! bdy damping trends 
     262        IF(  ln_asmiau .AND. & 
     263           & ln_dyninc      )  CALL dyn_asm_inc( kstp )     ! apply dynamics assimilation increment 
     264        IF( ln_bkgwri )        CALL asm_bkg_wri( kstp )     ! output background fields 
     265        IF( ln_neptsimp )      CALL dyn_nept_cor( kstp )    ! subtract Neptune velocities (simplified) 
     266        IF( lk_bdy          )  CALL bdy_dyn3d_dmp(kstp )    ! bdy damping trends 
    228267                               CALL dyn_adv( kstp )         ! advection (vector or flux form) 
    229268                               CALL dyn_vor( kstp )         ! vorticity term including Coriolis 
    230269                               CALL dyn_ldf( kstp )         ! lateral mixing 
    231       IF( ln_neptsimp )        CALL dyn_nept_cor( kstp )    ! add Neptune velocities (simplified) 
    232 #if defined key_agrif 
    233       IF(.NOT. Agrif_Root())  CALL Agrif_Sponge_dyn        ! momemtum sponge 
     270        IF( ln_neptsimp )      CALL dyn_nept_cor( kstp )    ! add Neptune velocities (simplified) 
     271#if defined key_agrif 
     272        IF(.NOT. Agrif_Root()) CALL Agrif_Sponge_dyn        ! momemtum sponge 
    234273#endif 
    235274                               CALL dyn_hpg( kstp )         ! horizontal gradient of Hydrostatic pressure 
     
    237276                               CALL dyn_zdf( kstp )         ! vertical diffusion 
    238277                               CALL dyn_spg( kstp, indic )  ! surface pressure gradient 
     278      ENDIF 
    239279                               CALL dyn_nxt( kstp )         ! lateral velocity at next time step 
    240280 
Note: See TracChangeset for help on using the changeset viewer.