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 12279 for NEMO/trunk/src/OCE/TRA/tranxt.F90 – NEMO

Ignore:
Timestamp:
2019-12-20T14:36:15+01:00 (4 years ago)
Author:
jchanut
Message:

#2317, changes for LFRA freshwater correction

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/OCE/TRA/tranxt.F90

    r10425 r12279  
    267267      INTEGER  ::   ji, jj, jk, jn              ! dummy loop indices 
    268268      REAL(wp) ::   zfact, zfact1, ztc_a , ztc_n , ztc_b , ztc_f , ztc_d    ! local scalar 
    269       REAL(wp) ::   zfact2, ze3t_b, ze3t_n, ze3t_a, ze3t_f, ze3t_d   !   -      - 
     269      REAL(wp) ::   zfact2, ze3t_b, ze3t_n, ze3t_a, ze3t_f, ze3t_d, zscale  !   -      - 
    270270      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:) ::   ztrd_atf 
    271271      !!---------------------------------------------------------------------- 
     
    312312                  ztc_f  = ztc_n  + atfp * ztc_d 
    313313                  ! 
     314                  zscale = zfact2 * e3t_n(ji,jj,jk) / ( ht_n(ji,jj) + 1._wp - ssmask(ji,jj) ) 
     315                  ze3t_f = ze3t_f - zscale * ( emp_b(ji,jj) - emp(ji,jj) ) 
     316                  IF ( ll_rnf ) ze3t_f = ze3t_f - zscale * (    rnf_b(ji,jj) -    rnf(ji,jj) ) 
     317                  IF ( ll_isf ) ze3t_f = ze3t_f - zscale * ( fwfisf_b(ji,jj) - fwfisf(ji,jj) ) 
     318 
    314319                  IF( jk == mikt(ji,jj) ) THEN           ! first level  
    315                      ze3t_f = ze3t_f - zfact2 * ( (emp_b(ji,jj)    - emp(ji,jj)   )  & 
    316                             &                   + (fwfisf_b(ji,jj) - fwfisf(ji,jj))  ) 
    317320                     ztc_f  = ztc_f  - zfact1 * ( psbc_tc(ji,jj,jn) - psbc_tc_b(ji,jj,jn) ) 
    318321                  ENDIF 
    319                   IF( ln_rnf_depth ) THEN 
    320                      ! Rivers are not just at the surface must go down to nk_rnf(ji,jj) 
    321                      IF( mikt(ji,jj) <=jk .and. jk <= nk_rnf(ji,jj)  ) THEN 
    322                         ze3t_f = ze3t_f - zfact2 * ( - (rnf_b(ji,jj) - rnf(ji,jj)   )  ) & 
    323                     &                            * ( e3t_n(ji,jj,jk) / h_rnf(ji,jj) )  
    324                      ENDIF 
    325                   ELSE 
    326                      IF( jk == mikt(ji,jj) ) THEN           ! first level  
    327                         ze3t_f = ze3t_f - zfact2 * ( - (rnf_b(ji,jj)    - rnf(ji,jj)   ) )  
    328                      ENDIF 
    329                   ENDIF 
    330  
    331322                  ! 
    332323                  ! solar penetration (temperature only) 
Note: See TracChangeset for help on using the changeset viewer.