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 8829 for branches/2017/dev_r8789_sbc/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90 – NEMO

Ignore:
Timestamp:
2017-11-28T10:50:49+01:00 (6 years ago)
Author:
charris
Message:

First set of modifications following (p)review.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_r8789_sbc/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90

    r8794 r8829  
    7575      INTEGER, INTENT(in) ::   kt   ! ocean time-step index 
    7676      ! 
    77       INTEGER  ::   ji, jj, jk, jn        ! dummy loop indices   
    78       INTEGER  ::   ikt, ikb              ! local integers 
    79       REAL(wp) ::   zfact, z1_e3t, zdep   ! local scalar 
     77      INTEGER  ::   ji, jj, jk, jn              ! dummy loop indices   
     78      INTEGER  ::   ikt, ikb                    ! local integers 
     79      REAL(wp) ::   zfact, z1_e3t, zdep, ztim   ! local scalar 
    8080      REAL(wp), POINTER, DIMENSION(:,:,:) ::  ztrdt, ztrds 
    8181      !!---------------------------------------------------------------------- 
     
    219219      IF( ln_sshinc ) THEN         ! input of heat and salt due to assimilation 
    220220          ! 
    221          ! Only required for vvl case (without vvl all the ssh increment is added to the surface layer and because the extra 
    222          ! water added by assimilation is always assumed to have the same T/S as the layer it is added to, and no additional T/S  
    223          ! content is explicitly added into qns/sfx due to ssh_iau, there is no need to include a compensating term to adjust  
    224          ! for it here) 
    225          ! 
    226          IF( .NOT. ln_linssh ) THEN  
     221         IF( ln_linssh ) THEN  
    227222            DO jj = 2, jpj  
    228223               DO ji = fs_2, fs_jpim1 
    229                   zdep = ssh_iau(ji,jj) / ( ht_0(ji,jj) + 1.0 - ssmask(ji, jj) ) 
    230                   DO jk = 1, jpkm1 
    231                      tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem)   & 
    232                                            &            + tsn(ji,jj,jk,jp_tem) * zdep * ( e3t_0(ji,jj,jk) / e3t_n(ji,jj,jk) ) 
    233                      tsa(ji,jj,jk,jp_sal) = tsa(ji,jj,jk,jp_sal)   & 
    234                                            &            + tsn(ji,jj,jk,jp_sal) * zdep * ( e3t_0(ji,jj,jk) / e3t_n(ji,jj,jk) ) 
    235                   END DO 
     224                  ztim = ssh_iau(ji,jj) / e3t_n(ji,jj,1) 
     225                  tsa(ji,jj,1,jp_tem) = tsa(ji,jj,1,jp_tem) + tsn(ji,jj,1,jp_tem) * ztim 
     226                  tsa(ji,jj,1,jp_sal) = tsa(ji,jj,1,jp_sal) + tsn(ji,jj,1,jp_sal) * ztim 
     227               END DO 
     228            END DO 
     229         ELSE 
     230            DO jj = 2, jpj  
     231               DO ji = fs_2, fs_jpim1 
     232                  ztim = ssh_iau(ji,jj) / ( ht_n(ji,jj) + 1. - ssmask(ji, jj) ) 
     233                  tsa(ji,jj,:,jp_tem) = tsa(ji,jj,:,jp_tem) + tsn(ji,jj,:,jp_tem) * ztim 
     234                  tsa(ji,jj,:,jp_sal) = tsa(ji,jj,:,jp_sal) + tsn(ji,jj,:,jp_sal) * ztim 
    236235               END DO   
    237236            END DO   
     
    239238         ! 
    240239      ENDIF 
     240      ! 
    241241#endif 
    242242 
Note: See TracChangeset for help on using the changeset viewer.