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

Ignore:
Timestamp:
2010-05-12T17:36:00+02:00 (14 years ago)
Author:
gm
Message:

ticket: #663 step-1 : introduce the modified forcing term

File:
1 edited

Legend:

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

    r1739 r1870  
    44   !! Ocean active tracers:  surface boundary condition 
    55   !!============================================================================== 
    6    !! History :  8.2  !  98-10  (G. Madec, G. Roullet, M. Imbard)  Original code 
    7    !!            8.2  !  01-02  (D. Ludicone)  sea ice and free surface 
    8    !!            8.5  !  02-06  (G. Madec)  F90: Free form and module 
     6   !! History :  OPA  !  2998-10  (G. Madec, G. Roullet, M. Imbard)  Original code 
     7   !!            8.2  !  2001-02  (D. Ludicone)  sea ice and free surface 
     8   !!   NEMO     1.0  !  2002-06  (G. Madec)  F90: Free form and module 
     9   !!            3.3  !  2010-04  (M. Leclair, G. Madec)  Forcing averaged over 2 time steps 
    910   !!---------------------------------------------------------------------- 
    1011 
     
    3132#  include "vectopt_loop_substitute.h90" 
    3233   !!---------------------------------------------------------------------- 
    33    !!   OPA 9.0 , LOCEAN-IPSL (2005)  
     34   !! NEMO/OPA 3.3 , LOCEAN-IPSL (2010)  
    3435   !! $Id$ 
    3536   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
     
    4647      !!      and add it to the general trend of tracer equations. 
    4748      !! 
    48       !! ** Method : 
    49       !!      Following Roullet and Madec (2000), the air-sea flux can be divided  
    50       !!      into three effects: (1) Fext, external forcing;  
     49      !! ** Method  :   Following Roullet and Madec (2000), the air-sea flux  
     50      !!      can be divided into three effects:  
     51      !!      (1) Fext, external forcing;  
    5152      !!      (2) Fwi, concentration/dilution effect due to water exchanged  
    5253      !!         at the surface by evaporation, precipitations and runoff (E-P-R);  
     
    5859      !!         solar part is added in traqsr.F routine. 
    5960      !!            ta = ta + q /(rau0 rcp e3t)  for k=1 
    60       !!            - salinity    : no salt flux 
     61      !!            - salinity    : only salt flux exchanged with sea-ice 
    6162      !! 
    6263      !!      The formulation for Fwb and Fwi vary according to the free  
     
    123124      ENDIF 
    124125 
    125       IF( .NOT.ln_traqsr )   qsr(:,:) = 0.e0   ! no solar radiation penetration 
     126!!gm      IF( .NOT.ln_traqsr )   qsr(:,:) = 0.e0   ! no solar radiation penetration 
     127      IF( .NOT.ln_traqsr ) THEN     ! no solar radiation penetration 
     128         qns(:,:) = qns(:,:) + qsr(:,:)      ! total heat flux in qns 
     129         qsr(:,:) = 0.e0                     ! qsr set to zero 
     130         IF( kt == nit000 ) THEN             ! idem on before field at nit000 
     131            qns_b(:,:) = qns_b(:,:) + qsr_b(:,:)   
     132            qsr_b(:,:) = 0.e0                      
     133         ENDIF 
     134      ENDIF 
    126135 
    127136      ! Concentration dillution effect on (t,s) 
    128       DO jj = 2, jpj 
    129          DO ji = fs_2, fs_jpim1   ! vector opt. 
    130 #if ! defined key_zco 
    131             zse3t = 1. / fse3t(ji,jj,1) 
    132 #endif 
    133             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 
    136                zsa = 0.e0                                            ! No salinity concent./dilut. effect 
    137             ELSE 
    138                zta = ro0cpr * qns(ji,jj) * zse3t     ! temperature : heat flux 
    139                zsa = emps(ji,jj) * zsrau * sn(ji,jj,1)   * zse3t     ! salinity :  concent./dilut. effect 
    140             ENDIF 
    141             ta(ji,jj,1) = ta(ji,jj,1) + zta                          ! add the trend to the general tracer trend 
    142             sa(ji,jj,1) = sa(ji,jj,1) + zsa 
     137!!      DO jj = 2, jpj 
     138!!         DO ji = fs_2, fs_jpim1   ! vector opt. 
     139!!#if ! defined key_zco 
     140!!            zse3t = 1. / fse3t(ji,jj,1) 
     141!!#endif 
     142!!            IF( lk_vvl) THEN 
     143!!               zta = ro0cpr * qns(ji,jj) * zse3t &                   ! temperature : heat flux 
     144!!                &    - emp(ji,jj) * zsrau * tn(ji,jj,1)  * zse3t     ! & cooling/heating effet of EMP flux 
     145!!               zsa = 0.e0                                            ! No salinity concent./dilut. effect 
     146!!            ELSE 
     147!!               zta = ro0cpr * qns(ji,jj) * zse3t     ! temperature : heat flux 
     148!!               zsa = emps(ji,jj) * zsrau * sn(ji,jj,1)   * zse3t     ! salinity :  concent./dilut. effect 
     149!!            ENDIF 
     150!!            ta(ji,jj,1) = ta(ji,jj,1) + zta                          ! add the trend to the general tracer trend 
     151!!            sa(ji,jj,1) = sa(ji,jj,1) + zsa 
     152!!         END DO 
     153!!      END DO 
     154 
     155      !                             ! ---------------------- ! 
     156      IF( lk_vvl ) THEN             !  Variable Volume case  ! 
     157         !                          ! ---------------------- ! 
     158         DO jj = 2, jpj 
     159            DO ji = fs_2, fs_jpim1   ! vector opt. 
     160               zse3t = 0.5 / fse3t(ji,jj,1) 
     161               !                           ! temperature: heat flux + cooling/heating effet of EMP flux 
     162               ta(ji,jj,1) = ta(ji,jj,1) + (  ro0cpr * ( qns(ji,jj) + qns_b(ji,jj) )                &  
     163                  &                         - zsrau  * ( emp(ji,jj) + emp_b(ji,jj) ) * tn(ji,jj,1)  ) * zse3t 
     164               !                           ! salinity: salt flux 
     165               sa(ji,jj,1) = sa(ji,jj,1) + ( emps(ji,jj) + emps_b(ji,jj) ) * zse3t 
     166 
     167!!gm BUG : in key_vvl emps must be modified to only include the salt flux due to with sea-ice freezing/melting 
     168!!gm       otherwise this flux will be missing  ==> modification required in limsbc,  limsbc_2 and CICE interface. 
     169 
     170            END DO 
    143171         END DO 
    144       END DO 
     172         !                          ! ---------------------- ! 
     173      ELSE                          !  Constant Volume case  ! 
     174         !                          ! ---------------------- ! 
     175         DO jj = 2, jpj 
     176            DO ji = fs_2, fs_jpim1   ! vector opt. 
     177               zse3t = 0.5 / fse3t(ji,jj,1) 
     178               !                           ! temperature: heat flux  
     179               ta(ji,jj,1) = ta(ji,jj,1) + ro0cpr * ( qns (ji,jj) + qns_b (ji,jj) )               * zse3t  
     180               !                           ! salinity: salt flux + concent./dilut. effect (both in emps) 
     181               sa(ji,jj,1) = sa(ji,jj,1) + zsrau  * ( emps(ji,jj) + emps_b(ji,jj) ) * sn(ji,jj,1) * zse3t 
     182            END DO 
     183         END DO 
     184         ! 
     185      ENDIF 
    145186 
    146       IF( l_trdtra ) THEN      ! save the sbc trends for diagnostic 
     187      IF( l_trdtra ) THEN        ! save the sbc trends for diagnostic 
    147188         ztrdt(:,:,:) = ta(:,:,:) - ztrdt(:,:,:) 
    148189         ztrds(:,:,:) = sa(:,:,:) - ztrds(:,:,:) 
    149190         CALL trd_mod(ztrdt, ztrds, jptra_trd_nsr, 'TRA', kt) 
    150191      ENDIF 
    151       ! 
     192      !                          ! control print 
    152193      IF(ln_ctl)   CALL prt_ctl( tab3d_1=ta, clinfo1=' sbc  - Ta: ', mask1=tmask,   & 
    153194         &                       tab3d_2=sa, clinfo2=       ' Sa: ', mask2=tmask, clinfo3='tra' ) 
Note: See TracChangeset for help on using the changeset viewer.