- Timestamp:
- 2010-05-06T10:40:07+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DEV_r1837_mass_heat_salt_fluxes/NEMO/OPA_SRC/TRA/trasbc.F90
r1858 r1859 1 1 MODULE trasbc 2 !!====================================================================== ========2 !!====================================================================== 3 3 !! *** MODULE trasbc *** 4 4 !! Ocean active tracers: surface boundary condition 5 !!============================================================================== 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 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 9 10 !!---------------------------------------------------------------------- 10 11 … … 31 32 # include "vectopt_loop_substitute.h90" 32 33 !!---------------------------------------------------------------------- 33 !! OPA 9.0 , LOCEAN-IPSL (2005)34 !! NEMO/OPA 3.3 , LOCEAN-IPSL (2010) 34 35 !! $Id$ 35 36 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) … … 52 53 !! at the surface by evaporation, precipitations and runoff (E-P-R); 53 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 54 57 !! 55 58 !! Fext, flux through the air-sea interface for temperature and salt: … … 76 79 !! (Tp P - Te E) + SST (P-E) = 0 when Tp=Te=SST 77 80 !! - salinity : evaporation, precipitation and runoff 78 !! water has a zero salinity (Fwe=0), thus only Fwi remains: 79 !! sa = sa + emp * sn / e3t for k=1 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 80 85 !! where emp, the surface freshwater budget (evaporation minus 81 86 !! precipitation minus runoff) given in kg/m2/s is divided 82 !! by 1035 kg/m3 (density of ocena water) to obtain m/s.87 !! by rau0 = 1020 kg/m3 (density of sea water) to obtain m/s. 83 88 !! Note: even though Fwe does not appear explicitly for 84 89 !! temperature in this routine, the heat carried by the water … … 92 97 !! deal with it in this routine. 93 98 !! - temperature: Fwe=SST (P-E+R) is added to Fext. 94 !! - salinity: Fwe = 0, there is no surface flux of salt.99 !! - salinity: Fwe sa = sa + fsalt / rau0 / e3t. 95 100 !! 96 101 !! ** Action : - Update the 1st level of (ta,sa) with the trend associated … … 103 108 INTEGER, INTENT(in) :: kt ! ocean time-step index 104 109 !! 105 INTEGER :: ji, jj 106 REAL(wp) :: z ta, zsa, zsrau, zse3t ! temporaryscalars110 INTEGER :: ji, jj ! dummy loop indices 111 REAL(wp) :: z1_e3t_rau0 ! local scalars 107 112 !!---------------------------------------------------------------------- 108 113 … … 113 118 ENDIF 114 119 115 zsrau = 1. / rau0 ! initialization116 #if defined key_zco117 zse3t = 1. / e3t_0(1)118 #endif119 120 120 IF( l_trdtra ) THEN ! Save ta and sa trends 121 121 ztrdt(:,:,:) = ta(:,:,:) … … 123 123 ENDIF 124 124 125 !!gm useless staff ??? 125 126 IF( .NOT.ln_traqsr ) qsr(:,:) = 0.e0 ! no solar radiation penetration 127 !!gm 126 128 127 ! 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 = r1_rau0_rcp * 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 = r1_rau0_rcp * 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 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 143 137 END DO 144 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 145 150 146 151 IF( l_trdtra ) THEN ! save the sbc trends for diagnostic
Note: See TracChangeset
for help on using the changeset viewer.