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 2128 for branches/devukmo2010/NEMO/OPA_SRC/TRA/trasbc.F90 – NEMO

Ignore:
Timestamp:
2010-09-28T14:29:51+02:00 (14 years ago)
Author:
rfurner
Message:

merged branches OBS, ASM, Rivers, BDY & mixed_dynldf ready for vn3.3 merge

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/devukmo2010/NEMO/OPA_SRC/TRA/trasbc.F90

    r1892 r2128  
    2121   USE in_out_manager  ! I/O manager 
    2222   USE prtctl          ! Print control 
     23   USE sbcrnf          ! River runoff   
     24   USE sbcmod          ! ln_rnf   
    2325 
    2426   IMPLICIT NONE 
     
    103105      INTEGER, INTENT(in) ::   kt     ! ocean time-step index 
    104106      !! 
    105       INTEGER  ::   ji, jj                   ! dummy loop indices 
    106       REAL(wp) ::   zta, zsa, zsrau, zse3t   ! temporary scalars 
     107      INTEGER  ::   ji, jj, jk           ! dummy loop indices   
     108      REAL(wp) ::   zta, zsa             ! temporary scalars, adjustment to temperature and salinity   
     109      REAL(wp) ::   zata, zasa           ! temporary scalars, calculations of automatic change to temp & sal due to vvl (done elsewhere)   
     110      REAL(wp) ::   zsrau, zse3t, zdep   ! temporary scalars, 1/density, 1/height of box, 1/height of effected water column   
     111      REAL(wp) ::   zdheat, zdsalt       ! total change of temperature and salinity   
    107112      !!---------------------------------------------------------------------- 
    108113 
     
    125130      IF( .NOT.ln_traqsr )   qsr(:,:) = 0.e0   ! no solar radiation penetration 
    126131 
    127       ! Concentration dillution effect on (t,s) 
     132      ! Concentration dilution effect on (t,s) due to evapouration, precipitation and qns, but not river runoff   
    128133      DO jj = 2, jpj 
    129134         DO ji = fs_2, fs_jpim1   ! vector opt. 
     
    132137#endif 
    133138            IF( lk_vvl) THEN 
    134                zta = ro0cpr * qns(ji,jj) * zse3t &                   ! temperature : heat flux 
    135                 &    - emp(ji,jj) * zsrau * tn(ji,jj,1)  * zse3t     ! & cooling/heating effet of EMP flux 
     139               zta =  ro0cpr * qns(ji,jj) * zse3t &                  ! temperature : heat flux  
     140                &    - emp(ji,jj) * zsrau * tn(ji,jj,1) * zse3t      ! & cooling/heating effet of EMP flux  
    136141               zsa = ( emps(ji,jj) - emp(ji,jj) ) & 
    137142                &                 * zsrau * sn(ji,jj,1)  * zse3t     ! concent./dilut. effect due to sea-ice  
    138143                                                                     ! melt/formation and (possibly) SSS restoration 
    139144            ELSE 
    140                zta = ro0cpr * qns(ji,jj) * zse3t     ! temperature : heat flux 
    141                zsa = emps(ji,jj) * zsrau * sn(ji,jj,1)   * zse3t     ! salinity :  concent./dilut. effect 
     145               zta =  ro0cpr * qns(ji,jj) * zse3t                    ! temperature : heat flux  
     146               zsa =  emps(ji,jj) * zsrau * sn(ji,jj,1) * zse3t      ! salinity :  concent./dilut. effect  
    142147            ENDIF 
    143148            ta(ji,jj,1) = ta(ji,jj,1) + zta                          ! add the trend to the general tracer trend 
     
    145150         END DO 
    146151      END DO 
     152 
     153      IF ( ln_rnf ) THEN   
     154 
     155      ! Effect on (t,s) due to river runoff (dilution effect automatically applied via vertical tracer advection)  
     156        DO jj=1,jpj   
     157           DO ji=1,jpi   
     158              zdep = 1. / rnf_dep(ji,jj)   
     159              zse3t= 1. / fse3t(ji,jj,1)   
     160 
     161              IF ( rnf(ji,jj) .gt. 0.0 ) THEN 
     162                 ! ammend t and s due to direct tracer flux 
     163                 IF ( rnf_tmp(ji,jj) == -999 )   rnf_tmp(ji,jj)=tn(ji,jj,1)        ! if not specified set runoff temp to be sst 
     164                 DO jk=1, rnf_mod_dep(ji,jj) 
     165                    ta(ji,jj,jk) = ta(ji,jj,jk) + rnf_tmp(ji,jj) * rnf(ji,jj) * zsrau * zdep 
     166                    sa(ji,jj,jk) = sa(ji,jj,jk) + rnf_sal(ji,jj) * rnf(ji,jj) * zsrau * zdep 
     167                 ENDDO 
     168              ELSEIF (rnf(ji,jj) .lt. 0.) THEN   !! for use in baltic when flow is out of domain, want no change in temp and sal 
     169                 ! negate concentration/dilution effect from traadv, as the tracer leaves domain 
     170                 DO jk=1, rnf_mod_dep(ji,jj) 
     171                    ta(ji,jj,jk) = ta(ji,jj,jk) + tn(ji,jj,jk) * rnf(ji,jj) * zsrau * zdep 
     172                    sa(ji,jj,jk) = sa(ji,jj,jk) + sn(ji,jj,jk) * rnf(ji,jj) * zsrau * zdep 
     173                 ENDDO 
     174              ENDIF 
     175 
     176           ENDDO   
     177        ENDDO   
     178 
     179      ENDIF   
    147180 
    148181      IF( l_trdtra ) THEN      ! save the sbc trends for diagnostic 
Note: See TracChangeset for help on using the changeset viewer.