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 2824 for branches – NEMO

Changeset 2824 for branches


Ignore:
Timestamp:
2011-08-09T16:05:52+02:00 (13 years ago)
Author:
acc
Message:

Branch: dev_r2802_NOCS_vvlfix. Changes in dynspg_ts.F90 to make correct use of fse3u_b and to replace unnecessary division operations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2011/dev_r2802_NOCS_vvlfix/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90

    r2724 r2824  
    119119      INTEGER  ::   ji, jj, jk, jn   ! dummy loop indices 
    120120      INTEGER  ::   icycle           ! local scalar 
    121       REAL(wp) ::   zraur, zcoef, z2dt_e, z2dt_b     ! local scalars 
     121      REAL(wp) ::   zraur, zcoef, z2dt_e, z1_2dt_b     ! local scalars 
    122122      REAL(wp) ::   z1_8, zx1, zy1                   !   -      - 
    123123      REAL(wp) ::   z1_4, zx2, zy2                   !   -      - 
     
    161161 
    162162      !                                   !* Local constant initialization 
    163       z2dt_b = 2.0 * rdt                                    ! baroclinic time step 
     163      z1_2dt_b = 1._wp / ( 2.0_wp * rdt )                               ! baroclinic time step 
     164      IF( neuler == 0 .AND. kt == nit000 )   z1_2dt_b = 1.0_wp / rdt    ! baroclinic time step (starting with euler timestep) 
    164165      z1_8 = 0.5 * 0.25                                     ! coefficient for vorticity estimates 
    165166      z1_4 = 0.5 * 0.5 
     
    195196               ! 
    196197#if defined key_vvl 
    197                ub_b(ji,jj) = ub_b(ji,jj) + (fse3u_0(ji,jj,jk)*(1.+sshu_b(ji,jj)*muu(ji,jj,jk)))* ub(ji,jj,jk)  
    198                vb_b(ji,jj) = vb_b(ji,jj) + (fse3v_0(ji,jj,jk)*(1.+sshv_b(ji,jj)*muv(ji,jj,jk)))* vb(ji,jj,jk)    
     198!              ub_b(ji,jj) = ub_b(ji,jj) + (fse3u_0(ji,jj,jk)*(1.+sshu_b(ji,jj)*muu(ji,jj,jk)))* ub(ji,jj,jk)  
     199!              vb_b(ji,jj) = vb_b(ji,jj) + (fse3v_0(ji,jj,jk)*(1.+sshv_b(ji,jj)*muv(ji,jj,jk)))* vb(ji,jj,jk)    
     200               ub_b(ji,jj) = ub_b(ji,jj) + fse3u_b(ji,jj,jk)* ub(ji,jj,jk)   *umask(ji,jj,jk)  
     201               vb_b(ji,jj) = vb_b(ji,jj) + fse3v_b(ji,jj,jk)* vb(ji,jj,jk)   *vmask(ji,jj,jk) 
    199202#else 
    200203               ub_b(ji,jj) = ub_b(ji,jj) + fse3u_0(ji,jj,jk) * ub(ji,jj,jk)  * umask(ji,jj,jk) 
     
    278281      !                                             ! Remove barotropic contribution of bottom friction  
    279282      !                                             ! from the barotropic transport trend 
    280       zcoef = -1. / z2dt_b 
     283      zcoef = -1._wp * z1_2dt_b 
    281284# if defined key_vectopt_loop 
    282285      DO jj = 1, 1 
     
    565568      !                                   !* update the general momentum trend 
    566569      DO jk=1,jpkm1 
    567          ua(:,:,jk) = ua(:,:,jk) + ( zu_sum(:,:) - ub_b(:,:) ) / z2dt_b 
    568          va(:,:,jk) = va(:,:,jk) + ( zv_sum(:,:) - vb_b(:,:) ) / z2dt_b 
     570         ua(:,:,jk) = ua(:,:,jk) + ( zu_sum(:,:) - ub_b(:,:) ) * z1_2dt_b 
     571         va(:,:,jk) = va(:,:,jk) + ( zv_sum(:,:) - vb_b(:,:) ) * z1_2dt_b 
    569572      END DO 
    570573      un_b  (:,:) =  zu_sum(:,:)  
Note: See TracChangeset for help on using the changeset viewer.