Changeset 1859 for branches/DEV_r1837_mass_heat_salt_fluxes/NEMO/OPA_SRC
- Timestamp:
- 2010-05-06T10:40:07+02:00 (14 years ago)
- Location:
- branches/DEV_r1837_mass_heat_salt_fluxes/NEMO/OPA_SRC
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DEV_r1837_mass_heat_salt_fluxes/NEMO/OPA_SRC/SBC/sbcana.F90
r1732 r1859 6 6 !! History : 3.0 ! 2006-06 (G. Madec) Original code 7 7 !! 3.2 ! 2009-07 (G. Madec) Style only 8 !! 3.3 ! 2010-07 (Y. Aksenov G. Madec) salt flux + heat associated with emp 8 9 !!---------------------------------------------------------------------- 9 10 … … 39 40 # include "vectopt_loop_substitute.h90" 40 41 !!---------------------------------------------------------------------- 41 !! NEMO/OPA 3. 2 , LOCEAN-IPSL (2009)42 !! NEMO/OPA 3.3 , LOCEAN-IPSL (2010) 42 43 !! $Id$ 43 44 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) … … 60 61 !! 61 62 !! ** Action : - set the ocean surface boundary condition, i.e. 62 !! utau, vtau, taum, wndm, qns, qsr, emp , emps63 !! utau, vtau, taum, wndm, qns, qsr, emp 63 64 !!---------------------------------------------------------------------- 64 65 INTEGER, INTENT(in) :: kt ! ocean time step … … 88 89 ! 89 90 nn_tau000 = MAX( nn_tau000, 1 ) ! must be >= 1 90 qns (:,:) = rn_qns0 91 qsr (:,:) = rn_qsr0 92 emp (:,:) = rn_emp0 93 emps (:,:) = rn_emp0 91 emp(:,:) = rn_emp0 92 qns(:,:) = rn_qns0 - emp(:,:) * sst_m(:,:) * rcp ! including heat content associated with mass flux at SST 93 qsr(:,:) = rn_qsr0 94 94 ! 95 95 ENDIF … … 123 123 !! 124 124 !! ** Action : - set the ocean surface boundary condition, i.e. 125 !! utau, vtau, taum, wndm, qns, qsr, emp , emps125 !! utau, vtau, taum, wndm, qns, qsr, emp 126 126 !! 127 127 !! Reference : Hazeleger, W., and S. Drijfhout, JPO, 30, 677-695, 2000. … … 204 204 END DO 205 205 END DO 206 emps(:,:) = emp(:,:)207 206 208 207 ! Compute the emp flux such as its integration on the whole domain at each time is zero … … 226 225 ENDIF 227 226 228 !salinity terms 229 emp (:,:) = emp(:,:) - zsumemp * tmask(:,:,1) 230 emps(:,:) = emp(:,:) 227 228 ! freshwater (mass flux) and update of qns with heat content of emp 229 emp (:,:) = emp(:,:) - zsumemp * tmask(:,:,1) ! freshwater flux (=0 in domain average) 230 qns (:,:) = qns(:,:) - emp(:,:) * sst_m(:,:) * rcp ! evap and precip are at SST 231 231 232 232 -
branches/DEV_r1837_mass_heat_salt_fluxes/NEMO/OPA_SRC/SBC/sbcblk_clio.F90
r1732 r1859 9 9 !! 3.0 ! 2008-03 (C. Talandier, G. Madec) surface module + LIM3 10 10 !! 3.2 ! 2009-04 (B. Lemaire) Introduce iom_put 11 !! 3.3 ! 2010-05 (Y. Aksenov G. Madec) salt flux + heat associated with emp 11 12 !!---------------------------------------------------------------------- 12 13 13 14 !!---------------------------------------------------------------------- 14 !! sbc_blk_clio : CLIO bulk formulation: read and update required input fields15 !! blk_clio_oce : ocean CLIO bulk formulea: compute momentum, heat and freswater fluxes for the ocean16 !! blk_ice_clio : ice CLIO bulk formulea: compute momentum, heat and freswater fluxes for the sea-ice15 !! sbc_blk_clio : CLIO bulk formulation: read and update required input fields 16 !! blk_clio_oce : ocean CLIO bulk formulea: compute momentum, heat and freswater fluxes for the ocean 17 !! blk_ice_clio : ice CLIO bulk formulea: compute momentum, heat and freswater fluxes for the sea-ice 17 18 !! blk_clio_qsr_oce : shortwave radiation for ocean computed from the cloud cover 18 19 !! blk_clio_qsr_ice : shortwave radiation for ice computed from the cloud cover 19 !! flx_blk_declin : solar declinaison20 !! flx_blk_declin : solar declinaison 20 21 !!---------------------------------------------------------------------- 21 22 USE oce ! ocean dynamics and tracers … … 47 48 INTEGER , PARAMETER :: jp_vtau = 2 ! index of wind stress (j-component) (N/m2) at V-point 48 49 INTEGER , PARAMETER :: jp_wndm = 3 ! index of 10m wind module (m/s) at T-point 49 INTEGER , PARAMETER :: jp_humi = 4 ! index of specific humidity ( -)50 INTEGER , PARAMETER :: jp_ccov = 5 ! index of cloud cover ( -)50 INTEGER , PARAMETER :: jp_humi = 4 ! index of specific humidity ( % ) 51 INTEGER , PARAMETER :: jp_ccov = 5 ! index of cloud cover ( % ) 51 52 INTEGER , PARAMETER :: jp_tair = 6 ! index of 10m air temperature (Kelvin) 52 53 INTEGER , PARAMETER :: jp_prec = 7 ! index of total precipitation (rain+snow) (Kg/m2/s) … … 81 82 # include "vectopt_loop_substitute.h90" 82 83 !!---------------------------------------------------------------------- 83 !! NEMO/OPA 3. 2 , LOCEAN-IPSL (2009)84 !! NEMO/OPA 3.3 , LOCEAN-IPSL (2010) 84 85 !! $Id$ 85 86 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) … … 98 99 !! the i-component of the stress (N/m2) 99 100 !! the j-component of the stress (N/m2) 100 !! the 10m wind pseed module (m/s)101 !! the 10m wind speed module (m/s) 101 102 !! the 10m air temperature (Kelvin) 102 !! the 10m specific humidity ( -)103 !! the cloud cover ( -)103 !! the 10m specific humidity (%) 104 !! the cloud cover (%) 104 105 !! the total precipitation (rain+snow) (Kg/m2/s) 105 106 !! (2) CALL blk_oce_clio 106 107 !! 107 108 !! C A U T I O N : never mask the surface stress fields 108 !! the stress is assumed to be in the mesh referential 109 !! i.e. the (i,j) referential 109 !! the stress is assumed to be in the (i,j) mesh referential 110 110 !! 111 111 !! ** Action : defined at each time-step at the air-sea interface … … 113 113 !! - taum wind stress module at T-point 114 114 !! - wndm 10m wind module at T-point 115 !! - qns, qsr non-slor and solar heat flux 116 !! - emp, emps evaporation minus precipitation 115 !! - qns non-solar heat flux including latent heat of solid 116 !! precip. melting and emp heat content 117 !! - qsr solar heat flux 118 !! - emp upward mass flux (evap. - precip) 117 119 !!---------------------------------------------------------------------- 118 120 INTEGER, INTENT( in ) :: kt ! ocean time step … … 175 177 ! ! ====================== ! 176 178 ! 177 CALL fld_read( kt, nn_fsbc, sf ) ! input fields providedat the current time-step179 CALL fld_read( kt, nn_fsbc, sf ) ! input fields at the current time-step 178 180 ! 179 181 #if defined key_lim3 180 tatm_ice(:,:) = sf(jp_tair)%fnow(:,:) !RB ugly patch182 tatm_ice(:,:) = sf(jp_tair)%fnow(:,:) ! Tair needed in LIM-3 (!RB ugly patch) 181 183 #endif 182 ! 184 IF( MOD( kt - 1, nn_fsbc ) == 0 ) CALL blk_oce_clio( sf, sst_m ) ! surface ocean fluxes using CLIO bulk formulea 185 ENDIF ! 186 183 187 IF(lwp .AND. nitend-nit000 <= 100 ) THEN 184 188 IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN … … 210 214 ENDIF 211 215 ENDIF 212 213 IF( MOD( kt - 1, nn_fsbc ) == 0 ) THEN214 CALL blk_oce_clio( sf, sst_m ) ! compute the surface ocean fluxes using CLIO bulk formulea215 ENDIF !216 216 ! 217 217 END SUBROUTINE sbc_blk_clio … … 239 239 !! - taum wind stress module at T-point 240 240 !! - wndm 10m wind module at T-point 241 !! - qns, qsr non-slor and solar heat flux 242 !! - emp, emps evaporation minus precipitation 241 !! - qns non-solar heat flux including latent heat of solid 242 !! precip. melting and emp heat content 243 !! - qsr solar heat flux 244 !! - emp suface mass flux (evap.-precip.) 243 245 !! ** Nota : sf has to be a dummy argument for AGRIF on NEC 244 246 !!---------------------------------------------------------------------- … … 257 259 REAL(wp) :: zsst, ztatm, zcco1, zpatm, zcmax, zrmax ! - - 258 260 REAL(wp) :: zrhoa, zev, zes, zeso, zqatm, zevsqr ! - - 259 REAL(wp) :: ztx2, zty2 261 REAL(wp) :: ztx2, zty2, zcevap, zcprec ! - - 260 262 !! 261 263 REAL(wp), DIMENSION(jpi,jpj) :: zqlw ! long-wave heat flux over ocean … … 270 272 !------------------------------------! 271 273 !CDIR COLLAPSE 272 DO jj = 1 , jpj 273 DO ji = 1, jpi 274 utau(ji,jj) = sf(jp_utau)%fnow(ji,jj) 275 vtau(ji,jj) = sf(jp_vtau)%fnow(ji,jj) 276 END DO 277 END DO 274 utau(:,:) = sf(jp_utau)%fnow(:,:) 275 !CDIR COLLAPSE 276 vtau(:,:) = sf(jp_vtau)%fnow(:,:) 277 278 !------------------------------------! 279 ! store the wind speed (wndm ) ! 280 !------------------------------------! 281 !CDIR COLLAPSE 282 wndm(:,:) = sf(jp_wndm)%fnow(:,:) 278 283 279 284 !------------------------------------! … … 291 296 CALL lbc_lnk( taum, 'T', 1. ) 292 297 293 !------------------------------------!294 ! store the wind speed (wndm ) !295 !------------------------------------!296 !CDIR COLLAPSE297 DO jj = 1 , jpj298 DO ji = 1, jpi299 wndm(ji,jj) = sf(jp_wndm)%fnow(ji,jj)300 END DO301 END DO302 303 298 !------------------------------------------------! 304 299 ! Shortwave radiation for ocean and snow/ice ! 305 300 !------------------------------------------------! 306 307 301 CALL blk_clio_qsr_oce( qsr ) 308 302 … … 401 395 ! III Total FLUXES ! 402 396 ! ----------------------------------------------------------------------------- ! 403 404 !CDIR COLLAPSE 405 !CDIR NOVERRCHK 406 DO jj = 1, jpj 407 !CDIR NOVERRCHK 408 DO ji = 1, jpi 409 qns (ji,jj) = zqlw(ji,jj) - zqsb(ji,jj) - zqla(ji,jj) ! Downward Non Solar flux 410 emp (ji,jj) = zqla(ji,jj) / cevap - sf(jp_prec)%fnow(ji,jj) / rday * tmask(ji,jj,1) 411 END DO 412 END DO 413 emps(:,:) = emp(:,:) 414 ! 397 zcevap = rcp / cevap ! convert zqla ==> evap (Kg/m2/s) ==> m/s ==> W/m2 398 zcprec = rcp / rday ! convert prec ( mm/day ==> m/s) ==> W/m2 399 400 !CDIR COLLAPSE 401 emp(:,:) = zqla(:,:) / cevap & ! freshwater flux 402 & - sf(jp_prec)%fnow(:,:) / rday * tmask(:,:,1) 403 ! 404 !CDIR COLLAPSE 405 qns(:,:) = zqlw(:,:) - zqsb(:,:) - zqla(:,:) & ! Downward Non Solar flux 406 & - zqla(:,:) * pst(:,:) * zcevap & ! remove evap. heat content at SST in Celcius 407 & + sf(jp_prec)%fnow(:,:) * sf(jp_tair)%fnow(:,:) * zcprec ! add precip. heat content at Tair in Celcius 408 ! NB: if sea-ice model, the snow precip are computed and the associated heat is added to qns (see blk_ice_clio) 409 415 410 CALL iom_put( "qlw_oce", zqlw ) ! output downward longwave heat over the ocean 416 411 CALL iom_put( "qsb_oce", - zqsb ) ! output downward sensible heat over the ocean … … 425 420 & tab2d_2=vtau , clinfo2=' vtau : ', mask2=vmask ) 426 421 ENDIF 427 422 ! 428 423 END SUBROUTINE blk_oce_clio 429 424 … … 447 442 !! 448 443 !! ** Action : call albedo_oce/albedo_ice to compute ocean/ice albedo 449 !! computation of snow precipitation 450 !! computation of solar flux at the ocean and ice surfaces 451 !! computation of the long-wave radiation for the ocean and sea/ice 452 !! computation of turbulent heat fluxes over water and ice 453 !! computation of evaporation over water 454 !! computation of total heat fluxes sensitivity over ice (dQ/dT) 455 !! computation of latent heat flux sensitivity over ice (dQla/dT) 456 !! 444 !! - snow precipitation 445 !! - solar flux at the ocean and ice surfaces 446 !! - the long-wave radiation for the ocean and sea/ice 447 !! - turbulent heat fluxes over water and ice 448 !! - evaporation over water 449 !! - total heat fluxes sensitivity over ice (dQ/dT) 450 !! - latent heat flux sensitivity over ice (dQla/dT) 451 !! - qns : modified the non solar heat flux over the ocean 452 !! to take into account solid precip latent heat flux 457 453 !!---------------------------------------------------------------------- 458 454 REAL(wp), INTENT(in ), DIMENSION(:,:,:) :: pst ! ice surface temperature [Kelvin] … … 633 629 ! 634 630 ! ----------------------------------------------------------------------------- ! 635 ! Total FLUXES !631 ! Total FLUXES ! 636 632 ! ----------------------------------------------------------------------------- ! 637 633 ! 638 634 !CDIR COLLAPSE 639 p_qns(:,:,:) = z_qlw (:,:,:) - z_qsb (:,:,:) - p_qla (:,:,:)! Downward Non Solar flux635 p_qns(:,:,:) = z_qlw(:,:,:) - z_qsb(:,:,:) - p_qla(:,:,:) ! Downward Non Solar flux 640 636 !CDIR COLLAPSE 641 637 p_tpr(:,:) = sf(jp_prec)%fnow(:,:) / rday ! total precipitation [kg/m2/s] 638 ! 639 ! ----------------------------------------------------------------------------- ! 640 ! Correct the OCEAN non solar flux with the existence of solid precipitation ! 641 ! ---------------=====--------------------------------------------------------- ! 642 !CDIR COLLAPSE 643 qns(:,:) = qns(:,:) & ! update the non-solar heat flux with: 644 & - p_spr(:,:) * lfus & ! remove melting solid precip 645 & + p_spr(:,:) * MIN( sf(jp_tair)%fnow(:,:), rt0_snow - rt0 ) * cpic & ! add solid P at least below melting 646 & - p_spr(:,:) * sf(jp_tair)%fnow(:,:) * rcp ! remove solid precip. at Tair 642 647 ! 643 648 !!gm : not necessary as all input data are lbc_lnk... … … 667 672 CALL prt_ctl(tab2d_1=p_taui , clinfo1=' blk_ice_clio: p_taui : ', tab2d_2=p_tauj , clinfo2=' p_tauj : ') 668 673 ENDIF 669 670 674 ! 671 675 END SUBROUTINE blk_ice_clio 672 676 -
branches/DEV_r1837_mass_heat_salt_fluxes/NEMO/OPA_SRC/SBC/sbcblk_core.F90
r1730 r1859 12 12 !! 3.0 ! 2006-06 (G. Madec) sbc rewritting 13 13 !! 3.2 ! 2009-04 (B. Lemaire) Introduce iom_put 14 !! 3.3 ! 2010-05 (Y. Aksenov G. Madec) salt flux + heat associated with emp 14 15 !!---------------------------------------------------------------------- 15 16 … … 45 46 INTEGER , PARAMETER :: jp_wndi = 1 ! index of 10m wind velocity (i-component) (m/s) at T-point 46 47 INTEGER , PARAMETER :: jp_wndj = 2 ! index of 10m wind velocity (j-component) (m/s) at T-point 47 INTEGER , PARAMETER :: jp_humi = 3 ! index of specific humidity ( -)48 INTEGER , PARAMETER :: jp_humi = 3 ! index of specific humidity ( % ) 48 49 INTEGER , PARAMETER :: jp_qsr = 4 ! index of solar heat (W/m2) 49 50 INTEGER , PARAMETER :: jp_qlw = 5 ! index of Long wave (W/m2) … … 62 63 REAL(wp), PARAMETER :: Cice = 1.63e-3 ! transfer coefficient over ice 63 64 64 ! !!* Namelist namsbc_core : CORE bulk parameters65 LOGICAL :: ln_2m = .FALSE. ! logical flag for height of air temp. and hum66 LOGICAL :: ln_taudif = .FALSE. ! logical flag to use the "mean of stress module - module of mean stress" data67 REAL(wp) :: rn_pfac = 1. ! multiplicati onfactor for precipitation65 ! !!* Namelist namsbc_core : CORE bulk parameters 66 LOGICAL :: ln_2m = .FALSE. ! air temperature and humidity given at 2m (T) or 10m (F) 67 LOGICAL :: ln_taudif = .FALSE. ! (T) use the "mean of stress module - module of mean stress" data or (F) not 68 REAL(wp) :: rn_pfac = 1. ! multiplicative factor for precipitation 68 69 69 70 !! * Substitutions … … 71 72 # include "vectopt_loop_substitute.h90" 72 73 !!---------------------------------------------------------------------- 73 !! NEMO/OPA 3. 2 , LOCEAN-IPSL (2009)74 !! NEMO/OPA 3.3 , LOCEAN-IPSL (2010) 74 75 !! $Id$ 75 76 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) … … 88 89 !! the 10m wind velocity (i-component) (m/s) at T-point 89 90 !! the 10m wind velocity (j-component) (m/s) at T-point 90 !! the specific humidity ( -)91 !! the 10m or 2m specific humidity ( % ) 91 92 !! the solar heat (W/m2) 92 93 !! the Long wave (W/m2) 93 !! the 10m air temperature(Kelvin)94 !! the 10m or 2m air temperature (Kelvin) 94 95 !! the total precipitation (rain+snow) (Kg/m2/s) 95 96 !! the snow (solid prcipitation) (kg/m2/s) 96 !! OPTIONAL parameter (see ln_taudif namelist flag): 97 !! the tau diff associated to HF tau (N/m2) at T-point 97 !! the tau diff associated to HF tau (N/m2) at T-point (ln_taudif=T) 98 98 !! (2) CALL blk_oce_core 99 99 !! 100 100 !! C A U T I O N : never mask the surface stress fields 101 !! the stress is assumed to be in the mesh referential 102 !! i.e. the (i,j) referential 101 !! the stress is assumed to be in the (i,j) mesh referential 103 102 !! 104 103 !! ** Action : defined at each time-step at the air-sea interface 105 104 !! - utau, vtau i- and j-component of the wind stress 106 !! - taum wind stress module at T-point 107 !! - wndm 10m wind module at T-point 108 !! - qns, qsr non-slor and solar heat flux 109 !! - emp, emps evaporation minus precipitation 105 !! - taum, wndm wind stress and 10m wind modules at T-point 106 !! - qns, qsr non-solar and solar heat flux 107 !! - emp upward mass flux (evapo. - precip.) 110 108 !!---------------------------------------------------------------------- 111 109 INTEGER, INTENT( in ) :: kt ! ocean time step 112 110 !! 111 INTEGER :: jf ! dummy loop indice 112 INTEGER :: ifld ! number of files to be read 113 113 INTEGER :: ierror ! return error code 114 INTEGER :: ifpr ! dummy loop indice115 INTEGER :: jfld ! dummy loop arguments116 114 !! 117 115 CHARACTER(len=100) :: cn_dir ! Root directory for location of core files 118 116 TYPE(FLD_N), DIMENSION(jpfld) :: slf_i ! array of namelist informations on the fields to read 119 TYPE(FLD_N) :: sn_wndi, sn_wndj, sn_humi, sn_qsr ! informations about the fields to be read 120 TYPE(FLD_N) :: sn_qlw , sn_tair, sn_prec, sn_snow ! " " 121 TYPE(FLD_N) :: sn_tdif ! " " 117 TYPE(FLD_N) :: sn_wndi, sn_wndj, sn_humi, sn_qsr ! informations about the fields to be read 118 TYPE(FLD_N) :: sn_qlw , sn_tair, sn_prec, sn_snow, sn_tdif ! - - 122 119 NAMELIST/namsbc_core/ cn_dir , ln_2m , ln_taudif, rn_pfac, & 123 120 & sn_wndi, sn_wndj, sn_humi , sn_qsr , & … … 156 153 ! do we use HF tau information? 157 154 lhftau = ln_taudif 158 jfld = jpfld - COUNT( (/.NOT. lhftau/) )155 ifld = jpfld - COUNT( (/.NOT. lhftau/) ) 159 156 ! 160 157 ! set sf structure 161 ALLOCATE( sf( jfld), STAT=ierror )158 ALLOCATE( sf(ifld), STAT=ierror ) 162 159 IF( ierror > 0 ) THEN 163 160 CALL ctl_stop( 'sbc_blk_core: unable to allocate sf structure' ) ; RETURN 164 161 ENDIF 165 DO ifpr= 1, jfld166 ALLOCATE( sf( ifpr)%fnow(jpi,jpj) )167 ALLOCATE( sf( ifpr)%fdta(jpi,jpj,2) )162 DO jf = 1, ifld 163 ALLOCATE( sf(jf)%fnow(jpi,jpj) ) 164 ALLOCATE( sf(jf)%fdta(jpi,jpj,2) ) 168 165 END DO 169 166 ! … … 173 170 ENDIF 174 171 172 !!gm all the below lines should be executed only at nn_fbc frequency, no??? check fldread capability 173 175 174 CALL fld_read( kt, nn_fsbc, sf ) ! input fields provided at the current time-step 176 175 ! 177 176 #if defined key_lim3 178 tatm_ice(:,:) = sf(jp_tair)%fnow(:,:) 177 tatm_ice(:,:) = sf(jp_tair)%fnow(:,:) ! air temperature over ice (LIM3 only) 179 178 #endif 180 181 IF( MOD( kt - 1, nn_fsbc ) == 0 ) THEN 182 CALL blk_oce_core( sf, sst_m, ssu_m, ssv_m ) ! compute the surface ocean fluxes using CLIO bulk formulea 183 ENDIF 184 ! ! using CORE bulk formulea 179 ! ! surface ocean fluxes using CORE bulk formulea 180 IF( MOD( kt - 1, nn_fsbc ) == 0 ) CALL blk_oce_core( sf, sst_m, ssu_m, ssv_m ) 181 ! 185 182 END SUBROUTINE sbc_blk_core 186 183 … … 196 193 !! fields read in sbc_read 197 194 !! 198 !! ** Outputs : - utau : i-component of the stress at U-point (N/m2) 199 !! - vtau : j-component of the stress at V-point (N/m2) 200 !! - taum : Wind stress module at T-point (N/m2) 201 !! - wndm : Wind speed module at T-point (m/s) 202 !! - qsr : Solar heat flux over the ocean (W/m2) 203 !! - qns : Non Solar heat flux over the ocean (W/m2) 204 !! - evap : Evaporation over the ocean (kg/m2/s) 205 !! - emp(s) : evaporation minus precipitation (kg/m2/s) 195 !! ** Action : - utau : i-component of the stress at U-point (N/m2) 196 !! - vtau : j-component of the stress at V-point (N/m2) 197 !! - taum : Wind stress module at T-point (N/m2) 198 !! - wndm : 10m Wind speed module at T-point (m/s) 199 !! - qsr : Solar heat flux over the ocean (W/m2) 200 !! - qns : Non Solar heat flux over the ocean (W/m2) 201 !! including the latent heat of solid 202 !! precip. melting and emp heat content 203 !! - emp : upward mass flux (evap. - precip.) (kg/m2/s) 206 204 !! 207 205 !! ** Nota : sf has to be a dummy argument for AGRIF on NEC 208 206 !!--------------------------------------------------------------------- 209 TYPE(fld), INTENT(in), DIMENSION(:) :: sf ! input data 210 REAL(wp) ,INTENT(in), DIMENSION(jpi,jpj) :: pst ! surface temperature [Celcius]211 REAL(wp) ,INTENT(in), DIMENSION(jpi,jpj) :: pu ! surface current at U-point (i-component) [m/s]212 REAL(wp) ,INTENT(in), DIMENSION(jpi,jpj) :: pv ! surface current at V-point (j-component) [m/s]213 207 TYPE(fld), INTENT(in), DIMENSION(:) :: sf ! input data (forcing field structure) 208 REAL(wp) , INTENT(in), DIMENSION(jpi,jpj) :: pst ! surface temperature [Celcius] 209 REAL(wp) , INTENT(in), DIMENSION(jpi,jpj) :: pu ! surface current at U-point (i-component) [m/s] 210 REAL(wp) , INTENT(in), DIMENSION(jpi,jpj) :: pv ! surface current at V-point (j-component) [m/s] 211 !! 214 212 INTEGER :: ji, jj ! dummy loop indices 215 REAL(wp) :: zcoef_qsatw 216 REAL(wp) :: zztmp ! temporary variable 213 REAL(wp) :: zcoef_qsatw, zztmp ! temporary scalar 217 214 REAL(wp), DIMENSION(jpi,jpj) :: zwnd_i, zwnd_j ! wind speed components at T-point 218 215 REAL(wp), DIMENSION(jpi,jpj) :: zqsatw ! specific humidity at pst … … 230 227 zcoef_qsatw = 0.98 * 640380. / rhoa 231 228 232 zst(:,:) = pst(:,:) + rt0 ! converte Celcius to Kelvin (and set minimum value far above 0 K)229 zst(:,:) = pst(:,:) + rt0 ! converte SST from Celcius to Kelvin (and set minimum value far above 0 K) 233 230 234 231 ! ----------------------------------------------------------------------------- ! … … 262 259 ! ocean albedo assumed to be 0.066 263 260 !CDIR COLLAPSE 264 qsr (:,:) = ( 1. - 0.066 ) * sf(jp_qsr)%fnow(:,:) * tmask(:,:,1) ! Short Wave261 qsr (:,:) = ( 1. - 0.066 ) * sf(jp_qsr)%fnow(:,:) * tmask(:,:,1) ! Short Wave 265 262 !CDIR COLLAPSE 266 263 zqlw(:,:) = ( sf(jp_qlw)%fnow(:,:) - Stef * zst(:,:)*zst(:,:)*zst(:,:)*zst(:,:) ) * tmask(:,:,1) ! Long Wave … … 353 350 354 351 !CDIR COLLAPSE 355 qns(:,:) = zqlw(:,:) - zqsb(:,:) - zqla(:,:) ! Downward Non Solar flux 356 !CDIR COLLAPSE 357 emp (:,:) = zevap(:,:) - sf(jp_prec)%fnow(:,:) * rn_pfac * tmask(:,:,1) 358 !CDIR COLLAPSE 359 emps(:,:) = emp(:,:) 352 emp (:,:) = ( zevap(:,:) & ! mass flux (evap. - precip.) 353 & - sf(jp_prec)%fnow(:,:) * rn_pfac ) * tmask(:,:,1) 354 !CDIR COLLAPSE 355 qns(:,:) = zqlw(:,:) - zqsb(:,:) - zqla(:,:) & ! Downward Non Solar flux 356 & - sf(jp_snow)%fnow(:,:) * lfus & ! remove latent melting heat for solid precip 357 & - zevap(:,:) * pst(ji,jj) * rcp & ! remove evap heat content at SST 358 & + ( sf(jp_prec)%fnow(:,:) - sf(jp_snow)%fnow(:,:) ) & ! add liquid precip heat content at Tair 359 & * ( sf(jp_tair)%fnow(:,:) - rt0 ) * rcp & 360 & + sf(jp_snow)%fnow(:,:) & ! add solid precip heat content at min(Tair,Tsnow) 361 & * ( MIN( sf(jp_tair)%fnow(:,:), rt0_snow ) - rt0 ) * cpic 360 362 ! 361 363 CALL iom_put( "qlw_oce", zqlw ) ! output downward longwave heat over the ocean … … 392 394 !! caution : the net upward water flux has with mm/day unit 393 395 !!--------------------------------------------------------------------- 394 REAL(wp), INTENT(in ), DIMENSION(:,:,:) 395 REAL(wp), INTENT(in ), DIMENSION(jpi,jpj) 396 REAL(wp), INTENT(in ), DIMENSION(jpi,jpj) 397 REAL(wp), INTENT(in ), DIMENSION(:,:,:) 398 REAL(wp), INTENT( out), DIMENSION(jpi,jpj) 399 REAL(wp), INTENT( out), DIMENSION(jpi,jpj) 400 REAL(wp), INTENT( out), DIMENSION(:,:,:) 401 REAL(wp), INTENT( out), DIMENSION(:,:,:) 402 REAL(wp), INTENT( out), DIMENSION(:,:,:) 403 REAL(wp), INTENT( out), DIMENSION(:,:,:) 404 REAL(wp), INTENT( out), DIMENSION(:,:,:) 405 REAL(wp), INTENT( out), DIMENSION(jpi,jpj) 406 REAL(wp), INTENT( out), DIMENSION(jpi,jpj) 407 REAL(wp), INTENT( out), DIMENSION(jpi,jpj) 408 REAL(wp), INTENT( out), DIMENSION(jpi,jpj) 409 CHARACTER(len=1), INTENT(in ) 410 INTEGER, INTENT(in ) 396 REAL(wp), INTENT(in ), DIMENSION(:,:,:) :: pst ! ice surface temperature (>0, =rt0 over land) [Kelvin] 397 REAL(wp), INTENT(in ), DIMENSION(jpi,jpj) :: pui ! ice surface velocity (i- and i- components [m/s] 398 REAL(wp), INTENT(in ), DIMENSION(jpi,jpj) :: pvi ! at I-point (B-grid) or U & V-point (C-grid) 399 REAL(wp), INTENT(in ), DIMENSION(:,:,:) :: palb ! ice albedo (clear sky) (alb_ice_cs) [%] 400 REAL(wp), INTENT( out), DIMENSION(jpi,jpj) :: p_taui ! i- & j-components of surface ice stress [N/m2] 401 REAL(wp), INTENT( out), DIMENSION(jpi,jpj) :: p_tauj ! at I-point (B-grid) or U & V-point (C-grid) 402 REAL(wp), INTENT( out), DIMENSION(:,:,:) :: p_qns ! non solar heat flux over ice (T-point) [W/m2] 403 REAL(wp), INTENT( out), DIMENSION(:,:,:) :: p_qsr ! solar heat flux over ice (T-point) [W/m2] 404 REAL(wp), INTENT( out), DIMENSION(:,:,:) :: p_qla ! latent heat flux over ice (T-point) [W/m2] 405 REAL(wp), INTENT( out), DIMENSION(:,:,:) :: p_dqns ! non solar heat sensistivity (T-point) [W/m2] 406 REAL(wp), INTENT( out), DIMENSION(:,:,:) :: p_dqla ! latent heat sensistivity (T-point) [W/m2] 407 REAL(wp), INTENT( out), DIMENSION(jpi,jpj) :: p_tpr ! total precipitation (T-point) [Kg/m2/s] 408 REAL(wp), INTENT( out), DIMENSION(jpi,jpj) :: p_spr ! solid precipitation (T-point) [Kg/m2/s] 409 REAL(wp), INTENT( out), DIMENSION(jpi,jpj) :: p_fr1 ! 1sr fraction of qsr penetration in ice (T-point) [%] 410 REAL(wp), INTENT( out), DIMENSION(jpi,jpj) :: p_fr2 ! 2nd fraction of qsr penetration in ice (T-point) [%] 411 CHARACTER(len=1), INTENT(in ) :: cd_grid ! ice grid ( C or B-grid) 412 INTEGER, INTENT(in ) :: pdim ! number of ice categories 411 413 !! 412 414 INTEGER :: ji, jj, jl ! dummy loop indices 413 415 INTEGER :: ijpl ! number of ice categories (size of 3rd dim of input arrays) 414 REAL(wp) :: zst2, z st3415 REAL(wp) :: z coef_wnorm, zcoef_wnorm2, zcoef_dqlw, zcoef_dqla, zcoef_dqsb416 REAL(wp) :: zcoef_frca 417 REAL(wp) :: zwnorm_f, zwndi_f , zwndj_f 418 REAL(wp) :: zwndi_t , zwndj_t 419 REAL(wp), DIMENSION(jpi,jpj) :: z_wnds_t! wind speed ( = | U10m - U_ice | ) at T-point420 REAL(wp), DIMENSION(jpi,jpj,pdim) :: z_qlw 421 REAL(wp), DIMENSION(jpi,jpj,pdim) :: z_qsb 422 REAL(wp), DIMENSION(jpi,jpj,pdim) :: z_dqlw 423 REAL(wp), DIMENSION(jpi,jpj,pdim) :: z_dqsb 416 REAL(wp) :: zst2, zcoef_wnorm , zcoef_dqlw ! 417 REAL(wp) :: zst3, zcoef_wnorm2, zcoef_dqla, zcoef_dqsb ! 418 REAL(wp) :: zcoef_frca ! fractional cloud amount 419 REAL(wp) :: zwnorm_f, zwndi_f , zwndj_f ! relative wind module and components at F-point 420 REAL(wp) :: zwndi_t , zwndj_t ! relative wind components at T-point 421 REAL(wp), DIMENSION(jpi,jpj) :: z_wnds_t ! wind speed ( = | U10m - U_ice | ) at T-point 422 REAL(wp), DIMENSION(jpi,jpj,pdim) :: z_qlw ! long wave heat flux over ice 423 REAL(wp), DIMENSION(jpi,jpj,pdim) :: z_qsb ! sensible heat flux over ice 424 REAL(wp), DIMENSION(jpi,jpj,pdim) :: z_dqlw ! long wave heat sensitivity over ice 425 REAL(wp), DIMENSION(jpi,jpj,pdim) :: z_dqsb ! sensible heat sensitivity over ice 424 426 !!--------------------------------------------------------------------- 425 427 … … 576 578 CALL prt_ctl(tab2d_1=z_wnds_t, clinfo1=' blk_ice_core: z_wnds_t : ') 577 579 ENDIF 578 580 ! 579 581 END SUBROUTINE blk_ice_core 580 582 581 583 582 584 SUBROUTINE TURB_CORE_1Z(zu, sst, T_a, q_sat, q_a, & 583 & dU , Cd, Ch, Ce )585 & dU , Cd , Ch , Ce ) 584 586 !!---------------------------------------------------------------------- 585 587 !! *** ROUTINE turb_core *** … … 704 706 705 707 706 SUBROUTINE TURB_CORE_2Z(zt, zu, sst, T_zt, q_sat, q_zt, dU, Cd, Ch, Ce, T_zu, q_zu) 708 SUBROUTINE TURB_CORE_2Z( zt , zu, sst, T_zt, q_sat, & 709 & q_zt, dU, Cd , Ch , Ce , T_zu, q_zu) 707 710 !!---------------------------------------------------------------------- 708 711 !! *** ROUTINE turb_core *** … … 838 841 Ce = Ce_n10*sqrt_Cd/sqrt_Cd_n10/xct 839 842 !! 840 !!841 843 END DO 842 ! !844 ! 843 845 END SUBROUTINE TURB_CORE_2Z 844 846 -
branches/DEV_r1837_mass_heat_salt_fluxes/NEMO/OPA_SRC/SBC/sbccpl.F90
r1833 r1859 4 4 !! Surface Boundary Condition : momentum, heat and freshwater fluxes in coupled mode 5 5 !!====================================================================== 6 !! History : 2.0 ! 06-2007 (R. Redler, N. Keenlyside, W. Park) Original code split into flxmod & taumod 7 !! 3.0 ! 02-2008 (G. Madec, C Talandier) surface module 8 !! 3.1 ! 02-2009 (G. Madec, S. Masson, E. Maisonave, A. Caubel) generic coupled interface 6 !! History : 2.0 ! 2007-06 (R. Redler, N. Keenlyside, W. Park) Original code split into flxmod & taumod 7 !! 3.0 ! 2008-02 (G. Madec, C Talandier) surface module 8 !! 3.1 ! 2009-02 (G. Madec, S. Masson, E. Maisonave, A. Caubel) generic coupled interface 9 !! 3.3 ! 2010-05 (Y. Aksenov G. Madec) salt flux + heat associated with emp 9 10 !!---------------------------------------------------------------------- 10 11 #if defined key_oasis3 || defined key_oasis4 … … 156 157 # include "vectopt_loop_substitute.h90" 157 158 !!---------------------------------------------------------------------- 158 !! NEMO/OPA 3. 0 , LOCEAN-IPSL (2008)159 !! NEMO/OPA 3.3 , LOCEAN-IPSL (2010) 159 160 !! $Id$ 160 161 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) … … 562 563 !! ** Action : update utau, vtau ocean stress at U,V grid 563 564 !! taum, wndm wind stres and wind speed module at T-point 564 !! qns , qsr non solar and solar ocean heat fluxes ('ocean only case) 565 !! emp = emps evap. - precip. (- runoffs) (- calving) ('ocean only case) 565 !! qns non solar heat fluxes including emp heat content (ocean only case) 566 !! and the latent heat flux of solid precip. melting 567 !! qsr solar ocean heat fluxes (ocean only case) 568 !! emp upward mass flux [evap. - precip. (- runoffs) (- calving)] (ocean only case) 566 569 !!---------------------------------------------------------------------- 567 570 INTEGER, INTENT(in) :: kt ! ocean model time step index … … 697 700 ENDIF 698 701 699 ! u(v)tau and taum will be modified by ice model ( wndm will be changed by PISCES)702 ! u(v)tau and taum will be modified by ice model (and wndm will be changed by PISCES) 700 703 ! -> need to be reset before each call of the ice/fsbc 701 704 IF( MOD( kt-1, k_fsbc ) == 0 ) THEN … … 712 715 ! ! ========================= ! 713 716 ! 714 ! ! non solar heat flux over the ocean (qns) 715 IF( srcv(jpr_qnsoce)%laction ) qns(:,:) = frcv(:,:,jpr_qnsoce) 716 IF( srcv(jpr_qnsmix)%laction ) qns(:,:) = frcv(:,:,jpr_qnsmix) 717 ! energy for melting solid precipitation over free ocean 718 zcoef = xlsn / rhosn 719 qns(:,:) = qns(:,:) - frcv(:,:,jpr_snow) * zcoef 720 ! ! solar flux over the ocean (qsr) 721 IF( srcv(jpr_qsroce)%laction ) qsr(:,:) = frcv(:,:,jpr_qsroce) 722 IF( srcv(jpr_qsrmix)%laction ) qsr(:,:) = frcv(:,:,jpr_qsrmix) 723 ! 724 ! ! total freshwater fluxes over the ocean (emp, emps) 717 ! ! total freshwater fluxes over the ocean (emp) 725 718 SELECT CASE( TRIM( cn_rcv_emp ) ) ! evaporation - precipitation 726 719 CASE( 'conservative' ) … … 752 745 !! ENDIF 753 746 !!gm end of internal cooking 754 ! 755 emps(:,:) = emp(:,:) ! concentration/dilution = emp 756 757 ! ! 10 m wind speed 758 IF( srcv(jpr_w10m)%laction ) wndm(:,:) = frcv(:,:,jpr_w10m) 747 ! 748 ! ! non solar heat flux over the ocean (qns) 749 IF( srcv(jpr_qnsoce)%laction ) qns(:,:) = frcv(:,:,jpr_qnsoce) 750 IF( srcv(jpr_qnsmix)%laction ) qns(:,:) = frcv(:,:,jpr_qnsmix) 751 ! 752 zcoef = xlsn / rhosn ! qns update over free ocean with: 753 qns(:,:) = qns(:,:) - frcv(:,:,jpr_snow) * zcoef ! energy for melting solid precipitation over free ocean 754 & - emp(:,:) * sst_m(:,:) * rcp ! remove heat content due to mass flux (assumed to be at SST) 755 ! 756 ! ! solar flux over the ocean (qsr) 757 IF( srcv(jpr_qsroce)%laction ) qsr(:,:) = frcv(:,:,jpr_qsroce) 758 IF( srcv(jpr_qsrmix)%laction ) qsr(:,:) = frcv(:,:,jpr_qsrmix) 759 759 ! 760 760 #if defined key_cpl_carbon_cycle 761 ! 761 ! ! atmosph. CO2 (ppm) 762 762 IF( srcv(jpr_co2)%laction ) atm_co2(:,:) = frcv(:,:,jpr_co2) 763 763 #endif 764 764 ! 765 765 ENDIF 766 766 ! … … 1046 1046 !!---------------------------------------------------------------------- 1047 1047 zicefr(:,:,1) = 1.- p_frld(:,:,1) 1048 IF( lk_diaar5 ) zcptn(:,:) = rcp * tn(:,:,1)1048 zcptn(:,:) = rcp * sst_m(:,:) 1049 1049 ! 1050 1050 ! ! ========================= ! … … 1118 1118 & + pist(:,:,1) * zicefr(:,:,1) ) ) 1119 1119 END SELECT 1120 ! ! snow melting heat flux .... 1121 ! energy for melting solid precipitation over ice-free ocean 1122 zcoef = xlsn / rhosn 1120 ! 1121 zcoef = xlsn / rhosn ! qns_tot update over free ocean with: 1123 1122 ztmp(:,:) = p_frld(:,:,1) * zsnow(:,:) * zcoef 1124 pqns_tot(:,:) = pqns_tot(:,:) - ztmp(:,:) 1125 IF( lk_diaar5 ) CALL iom_put( 'hflx_snow_cea', ztmp + zsnow(:,:) * zcptn(:,:) ) ! heat flux from snow (cell average) 1126 !!gm 1127 !! currently it is taken into account in leads budget but not in the qns_tot, and thus not in 1128 !! the flux that enter the ocean.... 1129 !! moreover 1 - it is not diagnose anywhere.... 1130 !! 2 - it is unclear for me whether this heat lost is taken into account in the atmosphere or not... 1131 !! 1132 !! similar job should be done for snow and precipitation temperature 1133 ! ! Iceberg melting heat flux .... 1134 ! energy for iceberg melting 1135 IF( srcv(jpr_cal)%laction ) THEN 1123 pqns_tot(:,:) = pqns_tot(:,:) & 1124 & - ztmp(:,:) & ! remove the latent heat flux of solid precip. melting 1125 & + ( pemp_tot(:,:) & ! remove the heat content of mass flux (assumed to be at SST) 1126 & - pemp_ice(:,:) * p_frld(:,:,1) ) * zcptn(:,:) 1127 ! 1128 IF( lk_diaar5 ) CALL iom_put( 'hflx_snow_cea', ztmp(:,:) + zsnow(:,:) * zcptn(:,:) ) ! heat flux from snow (cell average) 1129 1130 !!gm BUG ??? just above the right value should be : ztmp + zsnow*p_frld*zcptn 1131 1132 ! 1133 IF( srcv(jpr_cal)%laction ) THEN ! remove the latent heat flux of iceberg melting 1136 1134 zcoef = xlic / rhoic 1137 1135 ztmp(:,:) = frcv(:,:,jpr_cal) * zcoef 1138 1136 pqns_tot(:,:) = pqns_tot(:,:) - ztmp(:,:) 1137 ! 1139 1138 IF( lk_diaar5 ) CALL iom_put( 'hflx_cal_cea', ztmp + frcv(:,:,jpr_cal) * zcptn(:,:) ) ! heat flux from calving 1140 1139 ENDIF -
branches/DEV_r1837_mass_heat_salt_fluxes/NEMO/OPA_SRC/SBC/sbcflx.F90
r1730 r1859 4 4 !! Ocean forcing: momentum, heat and freshwater flux formulation 5 5 !!===================================================================== 6 !! History : 9.0 ! 06-06 (G. Madec) Original code 6 !! History : 1.0 ! 2006-06 (G. Madec) Original code 7 !! 3.3 ! 2010-05 (Y. Aksenov G. Madec) salt flux + heat associated with emp 7 8 !!---------------------------------------------------------------------- 8 9 … … 52 53 # include "vectopt_loop_substitute.h90" 53 54 !!---------------------------------------------------------------------- 54 !! OPA 9.0 , LOCEAN-IPSL (2006)55 !! NEMO/OPA 3.3 , LOCEAN-IPSL (2010) 55 56 !! $Id$ 56 57 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) … … 74 75 !! 75 76 !! CAUTION : - never mask the surface stress fields 76 !! - the stress is assumed to be in the mesh referential 77 !! i.e. the (i,j) referential 77 !! - the stress is assumed to be in the (i,j) mesh referential 78 78 !! 79 79 !! ** Action : update at each time-step … … 81 81 !! - taum wind stress module at T-point 82 82 !! - wndm 10m wind module at T-point 83 !! - qns, qsr non-slor and solar heat flux 84 !! - emp, emps evaporation minus precipitation 83 !! - qns non solar heat flux including heat flux due to emp 84 !! - qsr solar heat flux 85 !! - emp upward mass flux (evap. - precip.) 85 86 !!---------------------------------------------------------------------- 86 87 INTEGER, INTENT(in) :: kt ! ocean time step … … 136 137 ENDIF 137 138 138 CALL fld_read( kt, nn_fsbc, sf ) ! Read input fields and provides the 139 ! ! input fields at the current time-step 139 CALL fld_read( kt, nn_fsbc, sf ) ! input fields at the current time-step 140 140 141 IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN 142 ! 143 ! set the ocean fluxes from read fields 141 IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN ! set the ocean fluxes from read fields 144 142 !CDIR COLLAPSE 145 143 DO jj = 1, jpj … … 151 149 emp (ji,jj) = sf(jp_emp )%fnow(ji,jj) 152 150 END DO 153 END DO 154 155 ! module of wind stress and wind speed at T-point 156 zcoef = 1. / ( zrhoa * zcdrag ) 151 END DO 152 ! ! add to qns the heat due to e-p 153 qns(:,:) = qns(:,:) - emp(:,:) * sst_m(:,:) * rcp ! mass flux are at SST 154 155 zcoef = 1. / ( zrhoa * zcdrag ) ! module of wind stress and wind speed at T-point 157 156 !CDIR NOVERRCHK 158 157 DO jj = 2, jpjm1 … … 167 166 END DO 168 167 CALL lbc_lnk( taum(:,:), 'T', 1. ) ; CALL lbc_lnk( wndm(:,:), 'T', 1. ) 169 170 ! Initialization of emps (when no ice model)171 emps(:,:) = emp (:,:)172 168 173 ! control print (if less than 100 time-step asked) 174 IF( nitend-nit000 <= 100 .AND. lwp ) THEN 169 IF( nitend-nit000 <= 100 .AND. lwp ) THEN ! control print (if less than 100 time-step asked) 175 170 WRITE(numout,*) 176 171 WRITE(numout,*) ' read daily momentum, heat and freshwater fluxes OK' -
branches/DEV_r1837_mass_heat_salt_fluxes/NEMO/OPA_SRC/SBC/sbcfwb.F90
r1822 r1859 4 4 !! Ocean fluxes : domain averaged freshwater budget 5 5 !!====================================================================== 6 !! History : 8.2 ! 01-02 (E. Durand) Original code 7 !! 8.5 ! 02-06 (G. Madec) F90: Free form and module 8 !! 9.0 ! 06-08 (G. Madec) Surface module 9 !! 9.2 ! 09-07 (C. Talandier) emp mean s spread over erp area 6 !! History : OPA ! 2001-02 (E. Durand) Original code 7 !! NEMO 1.0 ! 2002-06 (G. Madec) F90: Free form and module 8 !! 3.0 ! 2006-08 (G. Madec) Surface module 9 !! 3.2 ! 2009-07 (C. Talandier) emp mean s spread over erp area 10 !! 3.3 ! 2010-05 (Y. Aksenov G. Madec) embedded sea-ice case 10 11 !!---------------------------------------------------------------------- 11 12 … … 27 28 PRIVATE 28 29 29 PUBLIC sbc_fwb 30 31 REAL(wp) :: a_fwb_b 32 REAL(wp) :: a_fwb 33 REAL(wp) :: empold 34 REAL(wp) :: area 30 PUBLIC sbc_fwb ! routine called by step 31 32 REAL(wp) :: a_fwb_b ! annual domain averaged freshwater budget 33 REAL(wp) :: a_fwb ! for 2 year before (_b) and before year. 34 REAL(wp) :: empold ! empold to be suppressed 35 REAL(wp) :: area ! global mean ocean surface (interior domain) 35 36 36 37 REAL(wp), DIMENSION(jpi,jpj) :: e1e2_i ! area of the interior domain (e1t*e2t*tmask_i) … … 40 41 # include "vectopt_loop_substitute.h90" 41 42 !!---------------------------------------------------------------------- 42 !! OPA 9.0 , LOCEAN-IPSL (2006)43 !! NEMO/OPA 3.3 , LOCEAN-IPSL (2010) 43 44 !! $Id$ 44 45 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) … … 57 58 !! =2 annual global mean corrected from previous year 58 59 !! =3 global mean of emp set to zero at each nn_fsbc time step 59 !! &spread out over erp area depending its sign60 !! and spread out over erp area depending its sign 60 61 !!---------------------------------------------------------------------- 61 62 INTEGER, INTENT( in ) :: kt ! ocean time-step index … … 63 64 INTEGER, INTENT( in ) :: kn_fwb ! ocean time-step index 64 65 !! 65 INTEGER :: inum 66 INTEGER :: ikty, iyear 67 REAL(wp) :: z_emp, z_emp_nsrf, zsum_emp, zsum_erp 68 REAL(wp) :: zsurf_neg, zsurf_pos, zsurf_tospread 69 REAL(wp), DIMENSION(jpi,jpj) :: ztmsk_neg, ztmsk_ pos, ztmsk_tospread70 REAL(wp), DIMENSION(jpi,jpj) :: z _wgt, zerp_cor66 INTEGER :: inum ! temporary logical unit 67 INTEGER :: ikty, iyear ! 68 REAL(wp) :: z_emp, z_emp_nsrf, zsum_emp, zsum_erp, zcoef ! temporary scalars 69 REAL(wp) :: zsurf_neg, zsurf_pos, zsurf_tospread ! - - 70 REAL(wp), DIMENSION(jpi,jpj) :: ztmsk_neg, ztmsk_tospread ! 2D workspace 71 REAL(wp), DIMENSION(jpi,jpj) :: ztmsk_pos, z_wgt, zerp_cor ! - - 71 72 !!---------------------------------------------------------------------- 72 73 ! … … 83 84 IF( kn_fwb == 3 .AND. nn_sssr /= 2 ) & 84 85 & CALL ctl_stop( 'The option nn_fwb = 3 must be associated to nn_sssr = 2 ' ) 85 86 86 ENDIF 87 87 ! … … 99 99 CALL ctl_stop( ctmp1 ) 100 100 ! 101 102 !103 101 CASE ( 1 ) ! global mean emp set to zero 104 102 IF( MOD( kt-1, kn_fsbc ) == 0 ) THEN 105 103 z_emp = SUM( e1e2_i(:,:) * emp(:,:) ) / area 106 104 IF( lk_mpp ) CALL mpp_sum( z_emp ) ! sum over the global domain 107 emp (:,:) = emp (:,:) - z_emp 108 emps(:,:) = emps(:,:) - z_emp 105 zcoef = z_emp * rcp 106 emp(:,:) = emp(:,:) - z_emp 107 qns(:,:) = qns(:,:) + zcoef * sst_m(:,:) 109 108 ENDIF 110 109 ! … … 138 137 ! correct the freshwater fluxes 139 138 IF( MOD( kt-1, kn_fsbc ) == 0 ) THEN 140 emp (:,:) = emp (:,:) + empold 141 emps(:,:) = emps(:,:) + empold 139 zcoef = z_emp * rcp 140 emp(:,:) = emp (:,:) + empold 141 qns(:,:) = qns(:,:) - zcoef * sst_m(:,:) 142 142 ENDIF 143 143 ! … … 152 152 ! 153 153 IF( MOD( kt-1, kn_fsbc ) == 0 ) THEN 154 ! Select <0 and >0 area of erp154 ! ! Select <0 and >0 area of erp 155 155 ztmsk_pos(:,:) = tmask_i(:,:) 156 WHERE( erp < 0.e0 ) ztmsk_pos= 0.e0156 WHERE( erp(:,:) < 0.e0 ) ztmsk_pos(:,:) = 0.e0 157 157 ztmsk_neg(:,:) = tmask_i(:,:) - ztmsk_pos(:,:) 158 158 159 ! Area filled by <0 and >0 erp160 zsurf_neg = SUM( e1e2_i(:,:)*ztmsk_neg(:,:))161 zsurf_pos = SUM( e1e2_i(:,:)*ztmsk_pos(:,:))159 ! ! Area filled by <0 and >0 erp 160 zsurf_neg = SUM( e1e2_i(:,:) * ztmsk_neg(:,:) ) 161 zsurf_pos = SUM( e1e2_i(:,:) * ztmsk_pos(:,:) ) 162 162 163 ! emp global mean163 ! ! emp global mean 164 164 z_emp = SUM( e1e2_i(:,:) * emp(:,:) ) / area 165 165 ! 166 IF( lk_mpp ) CALL mpp_sum( z_emp )166 IF( lk_mpp ) CALL mpp_sum( z_emp ) 167 167 IF( lk_mpp ) CALL mpp_sum( zsurf_neg ) 168 168 IF( lk_mpp ) CALL mpp_sum( zsurf_pos ) 169 169 170 IF( z_emp < 0.e0 ) THEN 171 ! to spread out over >0 erp area to increase evaporation damping process 170 IF( z_emp < 0.e0 ) THEN ! spread out over >0 erp area to increase evaporation damping process 172 171 zsurf_tospread = zsurf_pos 173 172 ztmsk_tospread(:,:) = ztmsk_pos(:,:) 174 ELSE 175 ! to spread out over <0 erp area to increase precipitation damping process 173 ELSE ! spread out over <0 erp area to increase precipitation damping process 176 174 zsurf_tospread = zsurf_neg 177 175 ztmsk_tospread(:,:) = ztmsk_neg(:,:) … … 192 190 CALL lbc_lnk( zerp_cor, 'T', 1. ) 193 191 194 emp (:,:) = emp(:,:) + zerp_cor(:,:)195 emps(:,:) = emps(:,:) + zerp_cor(:,:)196 erp (:,:) = erp(:,:) + zerp_cor(:,:)192 emp(:,:) = emp(:,:) + zerp_cor(:,:) 193 qns(:,:) = qns(:,:) - zerp_cor(:,:) * rcp * sst_m(:,:) 194 erp(:,:) = erp(:,:) + zerp_cor(:,:) 197 195 198 196 IF( nprint == 1 .AND. lwp ) THEN -
branches/DEV_r1837_mass_heat_salt_fluxes/NEMO/OPA_SRC/SBC/sbcice_if.F90
r1730 r1859 30 30 # include "domzgr_substitute.h90" 31 31 !!---------------------------------------------------------------------- 32 !! NEMO/OPA 3. 0 , LOCEAN-IPSL (2008)32 !! NEMO/OPA 3.3 , LOCEAN-IPSL (2010) 33 33 !! $Id$ 34 34 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) … … 72 72 ! ! file ! frequency ! variable ! time intep ! clim ! 'yearly' or ! weights ! rotation ! 73 73 ! ! name ! (hours) ! name ! (T/F) ! (T/F) ! 'monthly' ! filename ! pairs ! 74 sn_ice = FLD_N('ice_cover', -1 , 'ice_cov' , .true. , .true. , 'yearly' , '' , '' )75 76 REWIND ( numnam ) ! ...read in namlist namiif74 sn_ice = FLD_N('ice_cover', -1 , 'ice_cov' , .true. , .true. , 'yearly' , '' , '' ) 75 ! 76 REWIND ( numnam ) ! read in namlist namiif 77 77 READ ( numnam, namsbc_iif ) 78 78 ! 79 79 ALLOCATE( sf_ice(1), STAT=ierror ) 80 80 IF( ierror > 0 ) THEN … … 83 83 ALLOCATE( sf_ice(1)%fnow(jpi,jpj) ) 84 84 ALLOCATE( sf_ice(1)%fdta(jpi,jpj,2) ) 85 86 87 ! fill sf_ice with sn_ice and control print 85 ! 86 ! ! fill sf_ice with sn_ice and control print 88 87 CALL fld_fill( sf_ice, (/ sn_ice /), cn_dir, 'sbc_ice_if', 'ice-if sea-ice model', 'namsbc_iif' ) 89 88 ! 90 89 ENDIF 91 90 92 CALL fld_read( kt, nn_fsbc, sf_ice ) ! Read input fields and provides the 93 ! ! input fields at the current time-step 91 CALL fld_read( kt, nn_fsbc, sf_ice ) ! Read input fields at the current time-step 94 92 95 93 IF( MOD( kt-1, nn_fsbc) == 0 ) THEN … … 101 99 fr_i(:,:) = tfreez( sss_m ) * tmask(:,:,1) ! sea surface freezing temperature [Celcius] 102 100 103 ! Flux and ice fraction computation104 101 !CDIR COLLAPSE 105 DO jj = 1, jpj 102 DO jj = 1, jpj ! Flux and ice fraction computation 106 103 DO ji = 1, jpi 107 104 ! -
branches/DEV_r1837_mass_heat_salt_fluxes/NEMO/OPA_SRC/SBC/sbcmod.F90
r1792 r1859 4 4 !! Surface module : provide to the ocean its surface boundary condition 5 5 !!====================================================================== 6 !! History : 3.0 ! 07-2006 (G. Madec) Original code 7 !! - ! 08-2008 (S. Masson, E. .... ) coupled interface 6 !! History : 3.0 ! 2007-06 (G. Madec) Original code 7 !! 3.1 ! 2008-08 (S. Masson, E. .... ) coupled interface 8 !! 3.3 ! 2010-05 (Y. Aksenov G. Madec) salt flux + heat associated with emp 8 9 !!---------------------------------------------------------------------- 9 10 … … 49 50 # include "domzgr_substitute.h90" 50 51 !!---------------------------------------------------------------------- 51 !! NEMO/OPA 3. 0 , LOCEAN-IPSL (2008)52 !! NEMO/OPA 3.3 , LOCEAN-IPSL (2010) 52 53 !! $Id$ 53 54 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) … … 86 87 !!gm IF( lk_sbc_cpl ) THEN ; ln_cpl = .TRUE. ; ELSE ; ln_cpl = .FALSE. ; ENDIF 87 88 88 IF 89 IF( Agrif_Root() ) THEN 89 90 IF( lk_lim2 ) nn_ice = 2 90 91 IF( lk_lim3 ) nn_ice = 3 … … 123 124 ENDIF 124 125 IF( nn_ice == 0 ) fr_i(:,:) = 0.e0 ! no ice in the domain, ice fraction is always zero 126 127 emps(:,:) = 0.e0 ! the salt flux will be computed (i.e. will be non-zero) only if 128 ! ! sea-ice is present, or lk_vvl=F, or surface salt restoring is used. 125 129 126 130 ! ! restartability -
branches/DEV_r1837_mass_heat_salt_fluxes/NEMO/OPA_SRC/SBC/sbcrnf.F90
r1730 r1859 8 8 !! 3.0 ! 2006-07 (G. Madec) Surface module 9 9 !! 3.2 ! 2009-04 (B. Lemaire) Introduce iom_put 10 !! - ! 2010-05 (Y. Aksenov G. Madec) salt flux + heat associated with emp 10 11 !!---------------------------------------------------------------------- 11 12 … … 41 42 REAL(wp), PUBLIC, DIMENSION(jpk) :: rnfmsk_z !: river mouth mask (vert.) 42 43 44 REAL(wp) :: rfact_rcp ! = rn_rfact * rcp 43 45 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_rnf ! structure of input SST (file information, fields read) 44 46 45 47 !!---------------------------------------------------------------------- 46 !! NEMO/OPA 3. 2 , LOCEAN-IPSL (2009)48 !! NEMO/OPA 3.3 , LOCEAN-IPSL (2010) 47 49 !! $Id$ 48 50 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) … … 64 66 !!---------------------------------------------------------------------- 65 67 INTEGER, INTENT(in) :: kt ! ocean time step 66 ! !68 ! 67 69 INTEGER :: ji, jj ! dummy loop indices 68 70 INTEGER :: ierror ! temporary integer … … 78 80 ALLOCATE( sf_rnf(1)%fdta(jpi,jpj,2) ) 79 81 ENDIF 80 CALL sbc_rnf_init(sf_rnf) 82 CALL sbc_rnf_init( sf_rnf ) 83 ! 84 rfact_rcp = rn_rfact * rcp 81 85 ENDIF 82 86 … … 85 89 ! !-------------------! 86 90 ! 87 CALL fld_read( kt, nn_fsbc, sf_rnf ) ! Read Runoffs data and provides it 88 ! ! at the current time-step 89 90 ! Runoff reduction only associated to the ORCA2_LIM configuration 91 ! when reading the NetCDF file runoff_1m_nomask.nc 92 IF( cp_cfg == 'orca' .AND. jp_cfg == 2 ) THEN 93 DO jj = 1, jpj 91 CALL fld_read( kt, nn_fsbc, sf_rnf ) ! Read Runoffs data at the current time-step 92 ! 93 !!gm CAUTION this is ugly ===>>> to be removed! 94 IF( cp_cfg == 'orca' .AND. jp_cfg == 2 ) THEN ! Runoff reduction only associated to the ORCA2_LIM configuration 95 DO jj = 1, jpj ! when reading the NetCDF file runoff_1m_nomask.nc 94 96 DO ji = 1, jpi 95 97 IF( gphit(ji,jj) > 40 .AND. gphit(ji,jj) < 65 ) sf_rnf(1)%fnow(ji,jj) = 0.85 * sf_rnf(1)%fnow(ji,jj) … … 97 99 END DO 98 100 ENDIF 99 100 ! C a u t i o n : runoff is negative and in kg/m2/s 101 102 IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN 103 emp (:,:) = emp (:,:) - rn_rfact * ABS( sf_rnf(1)%fnow(:,:) ) 104 emps(:,:) = emps(:,:) - rn_rfact * ABS( sf_rnf(1)%fnow(:,:) ) 101 ! 102 IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN ! C a u t i o n : runoff is negative and in kg/m2/s 103 emp(:,:) = emp(:,:) - rn_rfact * ABS( sf_rnf(1)%fnow(:,:) ) ! mass flux 104 qns(:,:) = qns(:,:) + rfact_rcp * ABS( sf_rnf(1)%fnow(:,:) ) * sst_m(:,:) ! its associated heat content (at SST) 105 ! 105 106 CALL iom_put( "runoffs", sf_rnf(1)%fnow ) ! runoffs 106 107 ENDIF -
branches/DEV_r1837_mass_heat_salt_fluxes/NEMO/OPA_SRC/SBC/sbcssr.F90
r1730 r1859 6 6 !! History : 3.0 ! 2006-06 (G. Madec) Original code 7 7 !! 3.2 ! 2009-04 (B. Lemaire) Introduce iom_put 8 !! - ! 2009-07 (C. Talandier, G. Madec) Add a bound to the Erp 9 !! 3.3 ! 2010-05 (Y. Aksenov G. Madec) salt flux + heat associated with emp 8 10 !!---------------------------------------------------------------------- 9 11 … … 37 39 REAL(wp) :: rn_deds = -27.70 ! restoring factor on SST and SSS 38 40 LOGICAL :: ln_sssr_bnd = .false. ! flag to bound erp term 39 REAL(wp) :: rn_sssr_bnd = 0.e0 ! ABS(Max./Min.) value of erp term [mm/day]41 REAL(wp) :: rn_sssr_bnd = 4.e0 ! ABS(Max./Min.) value of erp term [mm/day] 40 42 41 43 REAL(wp) , ALLOCATABLE, DIMENSION(:) :: buffer ! Temporary buffer for exchange … … 46 48 # include "domzgr_substitute.h90" 47 49 !!---------------------------------------------------------------------- 48 !! NEMO/OPA 3. 2 , LOCEAN-IPSL (2009)50 !! NEMO/OPA 3.3 , LOCEAN-IPSL (2010) 49 51 !! $Id$ 50 52 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) … … 70 72 !! 71 73 INTEGER :: ji, jj ! dummy loop indices 72 REAL(wp) :: zerp ! local scalar for evaporation damping73 REAL(wp) :: zqrp ! local scalar for heat flux damping74 REAL(wp) :: zsrp ! local scalar for unit conversion of rn_deds factor75 REAL(wp) :: zerp_bnd ! local scalar for unit conversion of rn_epr_max factor76 74 INTEGER :: ierror ! return error code 77 !! 78 CHARACTER(len=100) :: cn_dir ! Root directory for location of ssr files 75 REAL(wp) :: zerp, zqrp, zsrp, zerp_bnd ! local scalar 76 !! 77 CHARACTER(len=100) :: cn_dir = './' ! Root directory for location of ssr files 79 78 TYPE(FLD_N) :: sn_sst, sn_sss ! informations about the fields to be read 80 79 NAMELIST/namsbc_ssr/ cn_dir, nn_sstr, nn_sssr, rn_dqdt, rn_deds, sn_sst, sn_sss, ln_sssr_bnd, rn_sssr_bnd … … 85 84 ! ! -------------------- ! 86 85 ! !* set file information 87 cn_dir = './' ! directory in which the model is executed88 86 ! ... default values (NB: frequency positive => hours, negative => months) 89 87 ! ! file ! frequency ! variable ! time intep ! clim ! 'yearly' or ! weights ! rotation ! … … 158 156 END DO 159 157 END DO 160 CALL iom_put( "qrp", qrp ) ! heat flux damping 161 ENDIF 162 ! 163 IF( nn_sssr == 1 ) THEN !* Salinity damping term (salt flux , emps only)158 CALL iom_put( "qrp", qrp ) ! heat flux damping 159 ENDIF 160 ! 161 IF( nn_sssr == 1 ) THEN !* Salinity damping term (salt flux only (emps)) 164 162 zsrp = rn_deds / rday ! from [mm/day] to [kg/m2/s] 165 163 !CDIR COLLAPSE … … 167 165 DO ji = 1, jpi 168 166 zerp = zsrp * ( 1. - 2.*rnfmsk(ji,jj) ) & ! No damping in vicinity of river mouths 169 & * ( sss_m(ji,jj) - sf_sss(1)%fnow(ji,jj) ) & 170 & / ( sss_m(ji,jj) + 1.e-20 ) 167 & * ( sss_m(ji,jj) - sf_sss(1)%fnow(ji,jj) ) 171 168 emps(ji,jj) = emps(ji,jj) + zerp 172 erp( ji,jj) = zerp 169 erp( ji,jj) = zerp / MAX( sss_m(ji,jj), 1.e-20 ) ! converted into an equivalent emp (diag. only) 173 170 END DO 174 171 END DO 175 172 CALL iom_put( "erp", erp ) ! freshwater flux damping 176 173 ! 177 ELSEIF( nn_sssr == 2 ) THEN !* Salinity damping term (volume flux , emp and emps)174 ELSEIF( nn_sssr == 2 ) THEN !* Salinity damping term (volume flux (emp) and qns) 178 175 zsrp = rn_deds / rday ! from [mm/day] to [kg/m2/s] 179 176 zerp_bnd = rn_sssr_bnd / rday ! - - … … 183 180 zerp = zsrp * ( 1. - 2.*rnfmsk(ji,jj) ) & ! No damping in vicinity of river mouths 184 181 & * ( sss_m(ji,jj) - sf_sss(1)%fnow(ji,jj) ) & 185 & / ( sss_m(ji,jj) + 1.e-20)182 & / MAX( sss_m(ji,jj), 1.e-20 ) 186 183 IF( ln_sssr_bnd ) zerp = SIGN( 1., zerp ) * MIN( zerp_bnd, ABS(zerp) ) 187 emp (ji,jj) = emp (ji,jj) + zerp 188 emps(ji,jj) = emps(ji,jj) + zerp 189 erp (ji,jj) = zerp 184 !!gm better coding IF( ln_sssr_bnd ) zerp = MAX( -zerp_bnd, MIN( zerp, zerp_bnd ) ) 185 emp(ji,jj) = emp(ji,jj) + zerp 186 qns(ji,jj) = qns(ji,jj) - zerp * rcp * sst_m(ji,jj) 187 erp(ji,jj) = zerp 190 188 END DO 191 189 END DO -
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.