- Timestamp:
- 2015-07-10T13:28:53+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2014/dev_r4765_CNRS_agrif/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90
r3764 r5581 9 9 !! 3.3 ! 2010-04 (M. Leclair, G. Madec) Forcing averaged over 2 time steps 10 10 !! - ! 2010-09 (C. Ethe, G. Madec) Merge TRA-TRC 11 !! 3.6 ! 2014-11 (P. Mathiot) isf melting forcing 11 12 !!---------------------------------------------------------------------- 12 13 … … 18 19 USE dom_oce ! ocean space domain variables 19 20 USE phycst ! physical constant 21 USE sbcmod ! ln_rnf 22 USE sbcrnf ! River runoff 23 USE sbcisf ! Ice shelf 20 24 USE traqsr ! solar radiation penetration 21 USE trdmod_oce ! ocean trends 22 USE trdtra ! ocean trends 25 USE trd_oce ! trends: ocean variables 26 USE trdtra ! trends manager: tracers 27 ! 23 28 USE in_out_manager ! I/O manager 24 29 USE prtctl ! Print control 25 USE sbcrnf ! River runoff26 USE sbcmod ! ln_rnf27 30 USE iom 28 31 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 29 32 USE wrk_nemo ! Memory Allocation 30 33 USE timing ! Timing 34 USE eosbn2 31 35 32 36 IMPLICIT NONE … … 39 43 # include "vectopt_loop_substitute.h90" 40 44 !!---------------------------------------------------------------------- 41 !! NEMO/OPA 3. 3 , NEMO Consortium (2010)45 !! NEMO/OPA 3.7 , NEMO Consortium (2014) 42 46 !! $Id$ 43 47 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) … … 91 95 !! where emp, the surface freshwater budget (evaporation minus 92 96 !! precipitation minus runoff) given in kg/m2/s is divided 93 !! by rau0 = 1020 kg/m3(density of sea water) to obtain m/s.97 !! by rau0 (density of sea water) to obtain m/s. 94 98 !! Note: even though Fwe does not appear explicitly for 95 99 !! temperature in this routine, the heat carried by the water … … 107 111 !! ** Action : - Update the 1st level of (ta,sa) with the trend associated 108 112 !! with the tracer surface boundary condition 109 !! - s ave the trend it in ttrd ('key_trdtra')113 !! - send trends to trdtra module (l_trdtra=T) 110 114 !!---------------------------------------------------------------------- 111 115 INTEGER, INTENT(in) :: kt ! ocean time-step index 112 116 !! 113 117 INTEGER :: ji, jj, jk, jn ! dummy loop indices 118 INTEGER :: ikt, ikb 119 INTEGER :: nk_isf 114 120 REAL(wp) :: zfact, z1_e3t, zdep 121 REAL(wp) :: zalpha, zhk 122 REAL(wp) :: zt_frz, zpress 115 123 REAL(wp), POINTER, DIMENSION(:,:,:) :: ztrdt, ztrds 116 124 !!---------------------------------------------------------------------- … … 124 132 ENDIF 125 133 126 IF( l_trdtra ) 134 IF( l_trdtra ) THEN !* Save ta and sa trends 127 135 CALL wrk_alloc( jpi, jpj, jpk, ztrdt, ztrds ) 128 136 ztrdt(:,:,:) = tsa(:,:,:,jp_tem) … … 137 145 138 146 !---------------------------------------- 139 ! EMP, EMPSand QNS effects147 ! EMP, SFX and QNS effects 140 148 !---------------------------------------- 141 149 ! Set before sbc tracer content fields … … 146 154 & iom_varid( numror, 'sbc_hc_b', ldstop = .FALSE. ) > 0 ) THEN 147 155 IF(lwp) WRITE(numout,*) ' nit000-1 surface tracer content forcing fields red in the restart file' 148 zfact = 0.5 e0156 zfact = 0.5_wp 149 157 CALL iom_get( numror, jpdom_autoglo, 'sbc_hc_b', sbc_tsc_b(:,:,jp_tem) ) ! before heat content sbc trend 150 158 CALL iom_get( numror, jpdom_autoglo, 'sbc_sc_b', sbc_tsc_b(:,:,jp_sal) ) ! before salt content sbc trend 151 159 ELSE ! No restart or restart not found: Euler forward time stepping 152 zfact = 1. e0153 sbc_tsc_b(:,:,:) = 0. e0160 zfact = 1._wp 161 sbc_tsc_b(:,:,:) = 0._wp 154 162 ENDIF 155 163 ELSE ! Swap of forcing fields 156 164 ! ! ---------------------- 157 zfact = 0.5 e0165 zfact = 0.5_wp 158 166 sbc_tsc_b(:,:,:) = sbc_tsc(:,:,:) 159 167 ENDIF … … 182 190 END DO 183 191 END DO 184 CALL iom_put( "emp_x_sst", emp (:,:) * tsn(:,:,1,jp_tem) )! c/d term on sst185 CALL iom_put( "emp_x_sss", emp (:,:) * tsn(:,:,1,jp_sal) )! c/d term on sss192 IF( iom_use('emp_x_sst') ) CALL iom_put( "emp_x_sst", emp (:,:) * tsn(:,:,1,jp_tem) ) ! c/d term on sst 193 IF( iom_use('emp_x_sss') ) CALL iom_put( "emp_x_sss", emp (:,:) * tsn(:,:,1,jp_sal) ) ! c/d term on sss 186 194 ENDIF 187 195 ! Concentration dilution effect on (t,s) due to evapouration, precipitation and qns, but not river runoff … … 205 213 ENDIF 206 214 ! 215 ! 216 !---------------------------------------- 217 ! Ice Shelf effects (ISF) 218 ! tbl treated as in Losh (2008) JGR 219 !---------------------------------------- 220 ! 221 IF( nn_isf > 0 ) THEN 222 zfact = 0.5e0 223 DO jj = 2, jpj 224 DO ji = fs_2, fs_jpim1 225 226 ikt = misfkt(ji,jj) 227 ikb = misfkb(ji,jj) 228 229 ! level fully include in the ice shelf boundary layer 230 ! if isfdiv, we have to remove heat flux due to inflow at 0oC (as in rnf when you add rnf at sst) 231 ! sign - because fwf sign of evapo (rnf sign of precip) 232 DO jk = ikt, ikb - 1 233 ! compute tfreez for the temperature correction (we add water at freezing temperature) 234 ! zpress = grav*rau0*fsdept(ji,jj,jk)*1.e-04 235 zt_frz = -1.9 !eos_fzp( tsn(ji,jj,jk,jp_sal), zpress ) 236 ! compute trend 237 tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem) & 238 & + zfact * (risf_tsc_b(ji,jj,jp_tem) + risf_tsc(ji,jj,jp_tem) & 239 & - rdivisf * (fwfisf(ji,jj) + fwfisf_b(ji,jj)) * zt_frz * r1_rau0) & 240 & * r1_hisf_tbl(ji,jj) 241 tsa(ji,jj,jk,jp_sal) = tsa(ji,jj,jk,jp_sal) & 242 & + zfact * (risf_tsc_b(ji,jj,jp_sal) + risf_tsc(ji,jj,jp_sal)) * r1_hisf_tbl(ji,jj) 243 END DO 244 245 ! level partially include in ice shelf boundary layer 246 ! compute tfreez for the temperature correction (we add water at freezing temperature) 247 ! zpress = grav*rau0*fsdept(ji,jj,ikb)*1.e-04 248 zt_frz = -1.9 !eos_fzp( tsn(ji,jj,ikb,jp_sal), zpress ) 249 ! compute trend 250 tsa(ji,jj,ikb,jp_tem) = tsa(ji,jj,ikb,jp_tem) & 251 & + zfact * (risf_tsc_b(ji,jj,jp_tem) + risf_tsc(ji,jj,jp_tem) & 252 & - rdivisf * (fwfisf(ji,jj) + fwfisf_b(ji,jj)) * zt_frz * r1_rau0) & 253 & * r1_hisf_tbl(ji,jj) * ralpha(ji,jj) 254 tsa(ji,jj,ikb,jp_sal) = tsa(ji,jj,ikb,jp_sal) & 255 & + zfact * (risf_tsc_b(ji,jj,jp_sal) + risf_tsc(ji,jj,jp_sal)) * r1_hisf_tbl(ji,jj) * ralpha(ji,jj) 256 END DO 257 END DO 258 IF( lrst_oce ) THEN 259 IF(lwp) WRITE(numout,*) 260 IF(lwp) WRITE(numout,*) 'sbc : isf surface tracer content forcing fields written in ocean restart file ', & 261 & 'at it= ', kt,' date= ', ndastp 262 IF(lwp) WRITE(numout,*) '~~~~' 263 CALL iom_rstput( kt, nitrst, numrow, 'fwf_isf_b', fwfisf(:,:) ) 264 CALL iom_rstput( kt, nitrst, numrow, 'isf_hc_b' , risf_tsc(:,:,jp_tem) ) 265 CALL iom_rstput( kt, nitrst, numrow, 'isf_sc_b' , risf_tsc(:,:,jp_sal) ) 266 ENDIF 267 END IF 268 ! 207 269 !---------------------------------------- 208 270 ! River Runoff effects … … 226 288 ENDIF 227 289 228 IF( l_trdtra ) THEN ! s ave the horizontal diffusivetrends for further diagnostics290 IF( l_trdtra ) THEN ! send trends for further diagnostics 229 291 ztrdt(:,:,:) = tsa(:,:,:,jp_tem) - ztrdt(:,:,:) 230 292 ztrds(:,:,:) = tsa(:,:,:,jp_sal) - ztrds(:,:,:) 231 CALL trd_tra( kt, 'TRA', jp_tem, jptra_ trd_nsr, ztrdt )232 CALL trd_tra( kt, 'TRA', jp_sal, jptra_ trd_nsr, ztrds )293 CALL trd_tra( kt, 'TRA', jp_tem, jptra_nsr, ztrdt ) 294 CALL trd_tra( kt, 'TRA', jp_sal, jptra_nsr, ztrds ) 233 295 CALL wrk_dealloc( jpi, jpj, jpk, ztrdt, ztrds ) 234 296 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.