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

Ignore:
Timestamp:
2013-11-20T16:02:06+01:00 (10 years ago)
Author:
cbricaud
Message:

correction for timesplitting

File:
1 edited

Legend:

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

    r4278 r4288  
    9999      !  Ocean dynamics : hdiv, rot, ssh, e3, wn 
    100100      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
     101                         CALL zdf_bfr( kstp )         ! bottom friction (if quadratic) 
    101102                         CALL ssh_nxt       ( kstp )  ! after ssh (includes call to div_cur) 
    102103      IF( lk_dynspg_ts ) THEN 
     
    108109          IF( ln_zps      )       CALL zps_hde( kstp, jpts, tsn, gtsu, gtsv,  &  ! zps: now hor. derivative 
    109110                &                                          rhd, gru , grv  )     ! of t, s, rd at the last ocean level 
    110                                   CALL zdf_bfr( kstp )         ! bottom friction (if quadratic) 
    111111 
    112112                                  ua(:,:,:) = 0.e0             ! set dynamics trends to zero 
     
    125125                                  CALL dyn_hpg( kstp )         ! horizontal gradient of Hydrostatic pressure 
    126126                                  CALL dyn_spg( kstp, indic )  ! surface pressure gradient 
     127 
     128                                  hdivb(:,:,:) = hdivn(:,:,:)  ! Store now divergence and rot temporarly, revert to these below  
     129                                  rotb(:,:,:)  = rotn(:,:,:)      
     130                                  ua_sv(:,:,:) = ua(:,:,:)     ! Save trends (barotropic trend has been fully updated) 
     131                                  va_sv(:,:,:) = va(:,:,:) 
     132 
    127133                                  CALL div_cur( kstp )         ! Horizontal divergence & Relative vorticity (2nd call in time-split case) 
    128  
    129                                   ua_sv(:,:,:) = ua(:,:,:)     ! save next velocities (not trends !) 
    130                                   va_sv(:,:,:) = va(:,:,:) 
    131134      ENDIF 
    132135      IF( lk_vvl     )   CALL dom_vvl_sf_nxt( kstp )  ! after vertical scale factors 
     
    140143      ! 
    141144      !  VERTICAL PHYSICS 
    142       IF( .NOT. lk_dynspg_ts ) CALL zdf_bfr( kstp )         ! bottom friction 
    143  
    144145      !                                               ! Vertical eddy viscosity and diffusivity coefficients 
    145146      IF( lk_zdfric  )   CALL zdf_ric( kstp )            ! Richardson number dependent Kz 
     
    252253      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    253254      IF( lk_dynspg_ts   )  THEN 
    254 ! revert to previously computed tendencies: 
     255! revert to previously computed momentum tendencies 
    255256! (not using ua, va as temporary arrays during tracers' update could avoid that) 
    256257                               ua(:,:,:) = ua_sv(:,:,:) 
    257258                               va(:,:,:) = va_sv(:,:,:) 
     259! Revert now divergence and rotational to previously computed ones  
     260!(needed because of the time swap in div_cur, at the beginning of each time step) 
     261                               hdivn(:,:,:) = hdivb(:,:,:) 
     262                               rotn(:,:,:)  = rotb(:,:,:)  
     263 
    258264                               CALL dyn_bfr( kstp )         ! bottom friction 
    259265                               CALL dyn_zdf( kstp )         ! vertical diffusion 
Note: See TracChangeset for help on using the changeset viewer.