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.
trasbc.F90 in branches/DEV_r1837_mass_heat_salt_fluxes/NEMO/OPA_SRC/TRA – NEMO

source: branches/DEV_r1837_mass_heat_salt_fluxes/NEMO/OPA_SRC/TRA/trasbc.F90 @ 1859

Last change on this file since 1859 was 1859, checked in by gm, 14 years ago

ticket:#665 step 2 & 3: heat content in qns & new forcing terms

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 8.3 KB
Line 
1MODULE trasbc
2   !!======================================================================
3   !!                       ***  MODULE  trasbc  ***
4   !! Ocean active tracers:  surface boundary condition
5   !!======================================================================
6   !! History :  OPA  !  1998-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-05  (Y. Aksenov G. Madec) salt flux + heat associated with emp
10   !!----------------------------------------------------------------------
11
12   !!----------------------------------------------------------------------
13   !!   tra_sbc      : update the tracer trend at ocean surface
14   !!----------------------------------------------------------------------
15   USE oce             ! ocean dynamics and active tracers
16   USE sbc_oce         ! surface boundary condition: ocean
17   USE dom_oce         ! ocean space domain variables
18   USE phycst          ! physical constant
19   USE traqsr          ! solar radiation penetration
20   USE trdmod          ! ocean trends
21   USE trdmod_oce      ! ocean variables trends
22   USE in_out_manager  ! I/O manager
23   USE prtctl          ! Print control
24
25   IMPLICIT NONE
26   PRIVATE
27
28   PUBLIC   tra_sbc    ! routine called by step.F90
29
30   !! * Substitutions
31#  include "domzgr_substitute.h90"
32#  include "vectopt_loop_substitute.h90"
33   !!----------------------------------------------------------------------
34   !! NEMO/OPA 3.3 , LOCEAN-IPSL (2010)
35   !! $Id$
36   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
37   !!----------------------------------------------------------------------
38
39CONTAINS
40
41   SUBROUTINE tra_sbc ( kt )
42      !!----------------------------------------------------------------------
43      !!                  ***  ROUTINE tra_sbc  ***
44      !!                   
45      !! ** Purpose :   Compute the tracer surface boundary condition trend of
46      !!      (flux through the interface, concentration/dilution effect)
47      !!      and add it to the general trend of tracer equations.
48      !!
49      !! ** Method :
50      !!      Following Roullet and Madec (2000), the air-sea flux can be divided
51      !!      into three effects: (1) Fext, external forcing;
52      !!      (2) Fwi, concentration/dilution effect due to water exchanged
53      !!         at the surface by evaporation, precipitations and runoff (E-P-R);
54      !!      (3) Fwe, tracer carried with the water that is exchanged.
55      !!            - salinity    : salt flux only due to freezing/melting
56      !!            sa = sa +  fsalt / rau0 / e3t  for k=1
57      !!
58      !!      Fext, flux through the air-sea interface for temperature and salt:
59      !!            - temperature : heat flux q (w/m2). If penetrative solar
60      !!         radiation q is only the non solar part of the heat flux, the
61      !!         solar part is added in traqsr.F routine.
62      !!            ta = ta + q /(rau0 rcp e3t)  for k=1
63      !!            - salinity    : no salt flux
64      !!
65      !!      The formulation for Fwb and Fwi vary according to the free
66      !!      surface formulation (linear or variable volume).
67      !!      * Linear free surface
68      !!            The surface freshwater flux modifies the ocean volume
69      !!         and thus the concentration of a tracer and the temperature.
70      !!         First order of the effect of surface freshwater exchange
71      !!         for salinity, it can be neglected on temperature (especially
72      !!         as the temperature of precipitations and runoffs is usually
73      !!         unknown).
74      !!            - temperature : we assume that the temperature of both
75      !!         precipitations and runoffs is equal to the SST, thus there
76      !!         is no additional flux since in this case, the concentration
77      !!         dilution effect is balanced by the net heat flux associated
78      !!         to the freshwater exchange (Fwe+Fwi=0):
79      !!            (Tp P - Te E) + SST (P-E) = 0 when Tp=Te=SST
80      !!            - salinity    : evaporation, precipitation and runoff
81      !!         water has a zero salinity  but there is a salt flux due to
82      !!         freezing/melting, thus:
83      !!            sa = sa + emp * sn / rau0 / e3t   for k=1
84      !!                    + fsalt    / rau0 / e3t
85      !!         where emp, the surface freshwater budget (evaporation minus
86      !!         precipitation minus runoff) given in kg/m2/s is divided
87      !!         by rau0 = 1020 kg/m3 (density of sea water) to obtain m/s.   
88      !!         Note: even though Fwe does not appear explicitly for
89      !!         temperature in this routine, the heat carried by the water
90      !!         exchanged through the surface is part of the total heat flux
91      !!         forcing and must be taken into account in the global heat
92      !!         balance).
93      !!      * nonlinear free surface (variable volume, lk_vvl)
94      !!         contrary to the linear free surface case, Fwi is properly
95      !!         taken into account by using the true layer thicknesses to       
96      !!         calculate tracer content and advection. There is no need to
97      !!         deal with it in this routine.
98      !!           - temperature: Fwe=SST (P-E+R) is added to Fext.
99      !!           - salinity:  Fwe sa = sa +  fsalt / rau0 / e3t.
100      !!
101      !! ** Action  : - Update the 1st level of (ta,sa) with the trend associated
102      !!                with the tracer surface boundary condition
103      !!              - save the trend it in ttrd ('key_trdtra')
104      !!----------------------------------------------------------------------
105      USE oce, ONLY :   ztrdt => ua   ! use ua as 3D workspace   
106      USE oce, ONLY :   ztrds => va   !  -  va     -      -   
107      !!
108      INTEGER, INTENT(in) ::   kt     ! ocean time-step index
109      !!
110      INTEGER  ::   ji, jj        ! dummy loop indices
111      REAL(wp) ::   z1_e3t_rau0   ! local scalars
112      !!----------------------------------------------------------------------
113
114      IF( kt == nit000 ) THEN
115         IF(lwp) WRITE(numout,*)
116         IF(lwp) WRITE(numout,*) 'tra_sbc : TRAcer Surface Boundary Condition'
117         IF(lwp) WRITE(numout,*) '~~~~~~~ '
118      ENDIF
119
120      IF( l_trdtra ) THEN           ! Save ta and sa trends
121         ztrdt(:,:,:) = ta(:,:,:) 
122         ztrds(:,:,:) = sa(:,:,:) 
123      ENDIF
124
125!!gm useless staff ???
126      IF( .NOT.ln_traqsr )   qsr(:,:) = 0.e0   ! no solar radiation penetration
127!!gm
128
129     
130      IF( lk_vvl ) THEN          ! Variable Volume Layers case   ===>> heat content of mass flux in qns
131         DO jj = 2, jpj
132            DO ji = fs_2, fs_jpim1   ! vector opt.
133               z1_e3t_rau0 = 1./ ( fse3t(ji,jj,1) * rau0 )
134               ta(ji,jj,1) = ta(ji,jj,1) + z1_e3t_rau0 * qns (ji,jj)  * r1_rcp             ! non solar heat flux
135               sa(ji,jj,1) = sa(ji,jj,1) + z1_e3t_rau0 * emps(ji,jj)                       ! salt flux (freezing/melting)
136            END DO
137         END DO
138         !
139      ELSE                       ! Constant Volume layers case   ===>> Concentration dillution effect
140         DO jj = 2, jpj
141            DO ji = fs_2, fs_jpim1   ! vector opt.
142               z1_e3t_rau0 = 1./ ( fse3t(ji,jj,1) * rau0 )
143               ta(ji,jj,1) = ta(ji,jj,1) + z1_e3t_rau0 * (  qns (ji,jj) * r1_rcp       &   ! non solar heat flux
144                  &                                       + emp (ji,jj) * tn(ji,jj,1)  )   ! concent./dilut. effect
145               sa(ji,jj,1) = sa(ji,jj,1) + z1_e3t_rau0 * (  emps(ji,jj)                &   ! salt flux (freezing/melting)
146                  &                                       + emp (ji,jj) * sn(ji,jj,1)  )   ! concent./dilut. effect
147            END DO
148         END DO
149      ENDIF
150
151      IF( l_trdtra ) THEN      ! save the sbc trends for diagnostic
152         ztrdt(:,:,:) = ta(:,:,:) - ztrdt(:,:,:)
153         ztrds(:,:,:) = sa(:,:,:) - ztrds(:,:,:)
154         CALL trd_mod(ztrdt, ztrds, jptra_trd_nsr, 'TRA', kt)
155      ENDIF
156      !
157      IF(ln_ctl)   CALL prt_ctl( tab3d_1=ta, clinfo1=' sbc  - Ta: ', mask1=tmask,   &
158         &                       tab3d_2=sa, clinfo2=       ' Sa: ', mask2=tmask, clinfo3='tra' )
159      !
160   END SUBROUTINE tra_sbc
161
162   !!======================================================================
163END MODULE trasbc
Note: See TracBrowser for help on using the repository browser.