Changeset 12199 for NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE
- Timestamp:
- 2019-12-12T09:30:08+01:00 (5 years ago)
- Location:
- NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/SBC
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/SBC/abl.F90
r12182 r12199 2 2 !!====================================================================== 3 3 !! *** MODULE abl *** 4 !! Abl : ABL dynamics and active tracers defined in memory 4 !! Abl : ABL dynamics and active tracers defined in memory 5 5 !!====================================================================== 6 6 USE par_kind ! abl parameters 7 7 8 8 IMPLICIT NONE 9 9 PRIVATE 10 !! -------------------------- ! 10 !! -------------------------- ! 11 11 REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:,:,:) :: u_abl !: i-horizontal velocity [m/s] 12 12 REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:,:,:) :: v_abl !: j-horizontal velocity [m/s] 13 REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:,:,:,:) :: tq_abl !: 4D T-q fields [Kelvin,kg/kg] 13 REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:,:,:,:) :: tq_abl !: 4D T-q fields [Kelvin,kg/kg] 14 14 REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:,:) :: avm_abl !: turbulent viscosity [m2/s] 15 15 REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:,:) :: avt_abl !: turbulent diffusivity [m2/s] … … 21 21 ! 22 22 INTEGER , PUBLIC :: nt_n, nt_a !: now / after indices (equal 1 or 2) 23 ! 23 ! 24 24 !!---------------------------------------------------------------------- 25 25 !! NEMO/OPA 4.0 , NEMO Consortium (2011) 26 !! $Id: abl.F90 4990 2014-12-15 16:42:49Z timgraham $ 26 !! $Id: abl.F90 4990 2014-12-15 16:42:49Z timgraham $ 27 27 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 28 28 !!---------------------------------------------------------------------- -
NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/SBC/sbc_oce.F90
r12182 r12199 2 2 !!====================================================================== 3 3 !! *** MODULE sbc_oce *** 4 !! Surface module : variables defined in core memory 4 !! Surface module : variables defined in core memory 5 5 !!====================================================================== 6 6 !! History : 3.0 ! 2006-06 (G. Madec) Original code … … 9 9 !! - ! 2010-11 (G. Madec) ice-ocean stress always computed at each ocean time-step 10 10 !! 3.3 ! 2010-10 (J. Chanut, C. Bricaud) add the surface pressure forcing 11 !! 4.0 ! 2012-05 (C. Rousset) add attenuation coef for use in ice model 11 !! 4.0 ! 2012-05 (C. Rousset) add attenuation coef for use in ice model 12 12 !! 4.0 ! 2016-06 (L. Brodeau) new unified bulk routine (based on AeroBulk) 13 !! 4.0 ! 2019-03 (F. Lemarié, G. Samson) add compatibility with ABL mode 13 !! 4.0 ! 2019-03 (F. Lemarié, G. Samson) add compatibility with ABL mode 14 14 !!---------------------------------------------------------------------- 15 15 … … 27 27 PUBLIC sbc_oce_alloc ! routine called in sbcmod.F90 28 28 PUBLIC sbc_tau2wnd ! routine called in several sbc modules 29 29 30 30 !!---------------------------------------------------------------------- 31 31 !! Namelist for the Ocean Surface Boundary Condition … … 45 45 LOGICAL , PUBLIC :: ln_dm2dc !: Daily mean to Diurnal Cycle short wave (qsr) 46 46 LOGICAL , PUBLIC :: ln_rnf !: runoffs / runoff mouths 47 LOGICAL , PUBLIC :: ln_ssr !: Sea Surface restoring on SST and/or SSS 47 LOGICAL , PUBLIC :: ln_ssr !: Sea Surface restoring on SST and/or SSS 48 48 LOGICAL , PUBLIC :: ln_apr_dyn !: Atmospheric pressure forcing used on dynamics (ocean & ice) 49 49 INTEGER , PUBLIC :: nn_ice !: flag for ice in the surface boundary condition (=0/1/2/3) … … 51 51 ! !: =F levitating ice (no presure effect) with mass and salt exchanges 52 52 ! !: =T embedded sea-ice (pressure effect + mass and salt exchanges) 53 INTEGER , PUBLIC :: nn_components !: flag for sbc module (including sea-ice) coupling mode (see component definition below) 54 INTEGER , PUBLIC :: nn_fwb !: FreshWater Budget: 55 ! !: = 0 unchecked 53 INTEGER , PUBLIC :: nn_components !: flag for sbc module (including sea-ice) coupling mode (see component definition below) 54 INTEGER , PUBLIC :: nn_fwb !: FreshWater Budget: 55 ! !: = 0 unchecked 56 56 ! !: = 1 global mean of e-p-r set to zero at each nn_fsbc time step 57 57 ! !: = 2 annual global mean of e-p-r set to zero … … 81 81 INTEGER , PUBLIC, PARAMETER :: jp_purecpl = 5 !: Pure ocean-atmosphere Coupled formulation 82 82 INTEGER , PUBLIC, PARAMETER :: jp_none = 6 !: for OPA when doing coupling via SAS module 83 84 !!---------------------------------------------------------------------- 85 !! Stokes drift parametrization definition 83 84 !!---------------------------------------------------------------------- 85 !! Stokes drift parametrization definition 86 86 !!---------------------------------------------------------------------- 87 87 INTEGER , PUBLIC, PARAMETER :: jp_breivik_2014 = 0 !: Breivik 2014: v_z=v_0*[exp(2*k*z)/(1-8*k*z)] 88 INTEGER , PUBLIC, PARAMETER :: jp_li_2017 = 1 !: Li et al 2017: Stokes drift based on Phillips spectrum (Breivik 2016) 89 90 INTEGER , PUBLIC, PARAMETER :: jp_peakfr = 2 !: Li et al 2017: using the peak wave number read from wave model instead 91 88 INTEGER , PUBLIC, PARAMETER :: jp_li_2017 = 1 !: Li et al 2017: Stokes drift based on Phillips spectrum (Breivik 2016) 89 ! with depth averaged profile 90 INTEGER , PUBLIC, PARAMETER :: jp_peakfr = 2 !: Li et al 2017: using the peak wave number read from wave model instead 91 ! of the inverse depth scale 92 92 LOGICAL , PUBLIC :: ll_st_bv2014 = .FALSE. ! logical indicator, .true. if Breivik 2014 parameterisation is active. 93 93 LOGICAL , PUBLIC :: ll_st_li2017 = .FALSE. ! logical indicator, .true. if Li 2017 parameterisation is active. … … 98 98 !! component definition 99 99 !!---------------------------------------------------------------------- 100 INTEGER , PUBLIC, PARAMETER :: jp_iam_nemo = 0 !: Initial single executable configuration 101 100 INTEGER , PUBLIC, PARAMETER :: jp_iam_nemo = 0 !: Initial single executable configuration 101 ! (no internal OASIS coupling) 102 102 INTEGER , PUBLIC, PARAMETER :: jp_iam_opa = 1 !: Multi executable configuration - OPA component 103 103 ! (internal OASIS coupling) 104 104 INTEGER , PUBLIC, PARAMETER :: jp_iam_sas = 2 !: Multi executable configuration - SAS component 105 105 ! (internal OASIS coupling) 106 106 !!---------------------------------------------------------------------- 107 107 !! Ocean Surface Boundary Condition fields … … 112 112 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: utau , utau_b !: sea surface i-stress (ocean referential) [N/m2] 113 113 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: vtau , vtau_b !: sea surface j-stress (ocean referential) [N/m2] 114 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: taum !: module of sea surface stress (at T-point) [N/m2] 114 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: taum !: module of sea surface stress (at T-point) [N/m2] 115 115 !! wndm is used compute surface gases exchanges in ice-free ocean or leads 116 116 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: wndm !: wind speed module at T-point (=|U10m-Uoce|) [m/s] 117 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: rhoa !: air density at "rn_zu" m above the sea [kg/m3] !LB117 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: rhoa !: air density at "rn_zu" m above the sea [kg/m3] 118 118 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: qsr !: sea heat flux: solar [W/m2] 119 119 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: qns , qns_b !: sea heat flux: non solar [W/m2] … … 124 124 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: emp_tot !: total E-P over ocean and ice [Kg/m2/s] 125 125 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: fmmflx !: freshwater budget: freezing/melting [Kg/m2/s] 126 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: rnf , rnf_b !: river runoff [Kg/m2/s] 127 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: fwficb , fwficb_b !: iceberg melting [Kg/m2/s] 126 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: rnf , rnf_b !: river runoff [Kg/m2/s] 127 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: fwficb , fwficb_b !: iceberg melting [Kg/m2/s] 128 128 !! 129 129 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: sbc_tsc, sbc_tsc_b !: sbc content trend [K.m/s] jpi,jpj,jpts … … 138 138 139 139 !!--------------------------------------------------------------------- 140 !! ABL Vertical Domain size 140 !! ABL Vertical Domain size 141 141 !!--------------------------------------------------------------------- 142 142 INTEGER , PUBLIC :: jpka = 2 !: ABL number of vertical levels (default definition) … … 154 154 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: sss_m !: mean (nn_fsbc time-step) surface sea salinity [psu] 155 155 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: ssh_m !: mean (nn_fsbc time-step) sea surface height [m] 156 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tsk_m !: mean (nn_fsbc time-step) SKIN surface sea temp. [Celsius] 156 157 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: e3t_m !: mean (nn_fsbc time-step) sea surface layer thickness [m] 157 158 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: frq_m !: mean (nn_fsbc time-step) fraction of solar net radiation absorbed in the 1st T level [-] … … 175 176 ! 176 177 ALLOCATE( utau(jpi,jpj) , utau_b(jpi,jpj) , taum(jpi,jpj) , & 177 & vtau(jpi,jpj) , vtau_b(jpi,jpj) , wndm(jpi,jpj) , rhoa(jpi,jpj) , STAT=ierr(1) ) 178 178 & vtau(jpi,jpj) , vtau_b(jpi,jpj) , wndm(jpi,jpj) , rhoa(jpi,jpj) , STAT=ierr(1) ) 179 ! 179 180 ALLOCATE( qns_tot(jpi,jpj) , qns (jpi,jpj) , qns_b(jpi,jpj), & 180 181 & qsr_tot(jpi,jpj) , qsr (jpi,jpj) , & 181 182 & emp (jpi,jpj) , emp_b(jpi,jpj) , & 182 183 & sfx (jpi,jpj) , sfx_b(jpi,jpj) , emp_tot(jpi,jpj), fmmflx(jpi,jpj), STAT=ierr(2) ) 183 184 ! 184 185 ALLOCATE( rnf (jpi,jpj) , sbc_tsc (jpi,jpj,jpts) , qsr_hc (jpi,jpj,jpk) , & 185 186 & rnf_b(jpi,jpj) , sbc_tsc_b(jpi,jpj,jpts) , qsr_hc_b(jpi,jpj,jpk) , & 186 187 & fwficb (jpi,jpj), fwficb_b(jpi,jpj), STAT=ierr(3) ) 187 188 ! 188 189 ALLOCATE( tprecip(jpi,jpj) , sprecip(jpi,jpj) , fr_i(jpi,jpj) , & 189 & atm_co2(jpi,jpj) , 190 & atm_co2(jpi,jpj) , tsk_m(jpi,jpj) , & 190 191 & ssu_m (jpi,jpj) , sst_m(jpi,jpj) , frq_m(jpi,jpj) , & 191 192 & ssv_m (jpi,jpj) , sss_m(jpi,jpj) , ssh_m(jpi,jpj) , STAT=ierr(4) ) … … 203 204 !!--------------------------------------------------------------------- 204 205 !! *** ROUTINE sbc_tau2wnd *** 205 !! 206 !! ** Purpose : Estimation of wind speed as a function of wind stress 206 !! 207 !! ** Purpose : Estimation of wind speed as a function of wind stress 207 208 !! 208 209 !! ** Method : |tau|=rhoa*Cd*|U|^2 … … 215 216 INTEGER :: ji, jj ! dummy indices 216 217 !!--------------------------------------------------------------------- 217 zcoef = 0.5 / ( zrhoa * zcdrag ) 218 zcoef = 0.5 / ( zrhoa * zcdrag ) 218 219 DO jj = 2, jpjm1 219 220 DO ji = fs_2, fs_jpim1 ! vect. opt. 220 ztx = utau(ji-1,jj ) + utau(ji,jj) 221 zty = vtau(ji ,jj-1) + vtau(ji,jj) 221 ztx = utau(ji-1,jj ) + utau(ji,jj) 222 zty = vtau(ji ,jj-1) + vtau(ji,jj) 222 223 ztau = SQRT( ztx * ztx + zty * zty ) 223 224 wndm(ji,jj) = SQRT ( ztau * zcoef ) * tmask(ji,jj,1) -
NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/SBC/sbcblk.F90
r12193 r12199 178 178 ! 179 179 ! !** read bulk namelist 180 REWIND( numnam_ref ) !* Namelist namsbc_blk in reference namelist : bulk parameters 180 181 READ ( numnam_ref, namsbc_blk, IOSTAT = ios, ERR = 901) 181 182 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_blk in reference namelist' ) 182 183 ! 184 REWIND( numnam_cfg ) !* Namelist namsbc_blk in configuration namelist : bulk parameters 183 185 READ ( numnam_cfg, namsbc_blk, IOSTAT = ios, ERR = 902 ) 184 186 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namsbc_blk in configuration namelist' ) … … 399 401 ! Sanity/consistence test on humidity at first time step to detect potential screw-up: 400 402 IF( kt == nit000 ) THEN 401 WRITE(numout,*) ''403 IF(lwp) WRITE(numout,*) '' 402 404 #if defined key_agrif 403 WRITE(numout,*) ' === AGRIF => Sanity/consistence test on air humidity SKIPPED! :( ==='405 IF(lwp) WRITE(numout,*) ' === AGRIF => Sanity/consistence test on air humidity SKIPPED! :( ===' 404 406 #else 405 407 ztmp = SUM(tmask(:,:,1)) ! number of ocean points on local proc domain … … 415 417 END SELECT 416 418 IF(ztmp < 0._wp) THEN 417 WRITE(numout,'(" Mean humidity value found on proc #",i5.5," is: ",f)') narea, ztmp419 IF (lwp) WRITE(numout,'(" Mean humidity value found on proc #",i5.5," is: ",f)') narea, ztmp 418 420 CALL ctl_stop( 'STOP', 'Something is wrong with air humidity!!!', & 419 421 & ' ==> check the unit in your input files' , & … … 422 424 END IF 423 425 END IF 424 WRITE(numout,*) ' === Sanity/consistence test on air humidity sucessfuly passed! ==='426 IF(lwp) WRITE(numout,*) ' === Sanity/consistence test on air humidity sucessfuly passed! ===' 425 427 #endif 426 WRITE(numout,*) ''428 IF(lwp) WRITE(numout,*) '' 427 429 END IF !IF( kt == nit000 ) 428 430 ! ! compute the surface ocean fluxes using bulk formulea … … 432 434 & sf(jp_slp )%fnow(:,:,1), sst_m, ssu_m, ssv_m, & ! <<= in 433 435 & sf(jp_qsr )%fnow(:,:,1), sf(jp_qlw )%fnow(:,:,1), & ! <<= in (wl/cs) 434 & zssq, zcd_du, zsen, zevp )! =>> out436 & tsk_m, zssq, zcd_du, zsen, zevp ) ! =>> out 435 437 436 438 CALL blk_oce_2( sf(jp_tair)%fnow(:,:,1), sf(jp_qsr )%fnow(:,:,1), & ! <<= in 437 439 & sf(jp_qlw )%fnow(:,:,1), sf(jp_prec)%fnow(:,:,1), & ! <<= in 438 & sf(jp_snow)%fnow(:,:,1), sst_m, & ! <<= in440 & sf(jp_snow)%fnow(:,:,1), tsk_m, & ! <<= in 439 441 & zsen, zevp ) ! <=> in out 440 442 ENDIF … … 470 472 471 473 SUBROUTINE blk_oce_1( kt, pwndi, pwndj , ptair, phumi, & ! inp 472 & pslp , pst , pu , pv,& ! inp473 & pqsr , pqlw ,& ! inp474 & pssq , pcd_du, psen , pevp ) ! out474 & pslp , pst , pu , pv, & ! inp 475 & pqsr , pqlw , & ! inp 476 & ptsk, pssq , pcd_du, psen , pevp ) ! out 475 477 !!--------------------------------------------------------------------- 476 478 !! *** ROUTINE blk_oce_1 *** … … 494 496 REAL(wp), INTENT(in ), DIMENSION(:,:) :: ptair ! potential temperature at T-points [Kelvin] 495 497 REAL(wp), INTENT(in ), DIMENSION(:,:) :: pslp ! sea-level pressure [Pa] 496 REAL(wp), INTENT(in ), DIMENSION(:,:) :: pst ! surface temperature [Cel cius]498 REAL(wp), INTENT(in ), DIMENSION(:,:) :: pst ! surface temperature [Celsius] 497 499 REAL(wp), INTENT(in ), DIMENSION(:,:) :: pu ! surface current at U-point (i-component) [m/s] 498 500 REAL(wp), INTENT(in ), DIMENSION(:,:) :: pv ! surface current at V-point (j-component) [m/s] 499 501 REAL(wp), INTENT(in ), DIMENSION(:,:) :: pqsr ! 500 502 REAL(wp), INTENT(in ), DIMENSION(:,:) :: pqlw ! 503 REAL(wp), INTENT( out), DIMENSION(:,:) :: ptsk ! skin temp. (or SST if CS & WL not used) [Celsius] 501 504 REAL(wp), INTENT( out), DIMENSION(:,:) :: pssq ! specific humidity at pst [kg/kg] 502 505 REAL(wp), INTENT( out), DIMENSION(:,:) :: pcd_du ! Cd x |dU| at T-points [m/s] … … 507 510 REAL(wp) :: zztmp ! local variable 508 511 REAL(wp), DIMENSION(jpi,jpj) :: zwnd_i, zwnd_j ! wind speed components at T-point 509 REAL(wp), DIMENSION(jpi,jpj) :: zst ! surface temperature in Kelvin510 512 REAL(wp), DIMENSION(jpi,jpj) :: zU_zu ! bulk wind speed at height zu [m/s] 511 513 REAL(wp), DIMENSION(jpi,jpj) :: ztpot ! potential temperature of air at z=rn_zqt [K] … … 519 521 ! 520 522 ! local scalars ( place there for vector optimisation purposes) 521 zst(:,:) = pst(:,:) + rt0 ! convert SST from Celcius to Kelvin (and set minimum value far above 0 K) 523 ! ! Temporary conversion from Celcius to Kelvin (and set minimum value far above 0 K) 524 ptsk(:,:) = pst(:,:) + rt0 ! by default: skin temperature = "bulk SST" (will remain this way if NCAR algorithm used!) 522 525 523 526 ! ----------------------------------------------------------------------------- ! … … 566 569 567 570 ! specific humidity at SST 568 pssq(:,:) = rdct_qsat_salt * q_sat( zst(:,:), pslp(:,:) )571 pssq(:,:) = rdct_qsat_salt * q_sat( ptsk(:,:), pslp(:,:) ) 569 572 570 573 IF( ln_skin_cs .OR. ln_skin_wl ) THEN 571 zztmp1(:,:) = zst(:,:) 574 !! Backup "bulk SST" and associated spec. hum. 575 zztmp1(:,:) = ptsk(:,:) 572 576 zztmp2(:,:) = pssq(:,:) 573 577 ENDIF … … 608 612 609 613 CASE( np_NCAR ) 610 CALL turb_ncar ( rn_zqt, rn_zu, zst, ztpot, pssq, zqair, wndm, &614 CALL turb_ncar ( rn_zqt, rn_zu, ptsk, ztpot, pssq, zqair, wndm, & 611 615 & zcd_oce, zch_oce, zce_oce, t_zu, q_zu, zU_zu, cdn_oce, chn_oce, cen_oce ) 612 616 613 617 CASE( np_COARE_3p0 ) 614 CALL turb_coare3p0 ( kt, rn_zqt, rn_zu, zst, ztpot, pssq, zqair, wndm, ln_skin_cs, ln_skin_wl, &618 CALL turb_coare3p0 ( kt, rn_zqt, rn_zu, ptsk, ztpot, pssq, zqair, wndm, ln_skin_cs, ln_skin_wl, & 615 619 & zcd_oce, zch_oce, zce_oce, t_zu, q_zu, zU_zu, cdn_oce, chn_oce, cen_oce, & 616 620 & Qsw=qsr(:,:), rad_lw=pqlw(:,:), slp=pslp(:,:) ) 617 621 618 622 CASE( np_COARE_3p6 ) 619 CALL turb_coare3p6 ( kt, rn_zqt, rn_zu, zst, ztpot, pssq, zqair, wndm, ln_skin_cs, ln_skin_wl, &623 CALL turb_coare3p6 ( kt, rn_zqt, rn_zu, ptsk, ztpot, pssq, zqair, wndm, ln_skin_cs, ln_skin_wl, & 620 624 & zcd_oce, zch_oce, zce_oce, t_zu, q_zu, zU_zu, cdn_oce, chn_oce, cen_oce, & 621 625 & Qsw=qsr(:,:), rad_lw=pqlw(:,:), slp=pslp(:,:) ) 622 626 623 627 CASE( np_ECMWF ) 624 CALL turb_ecmwf ( kt, rn_zqt, rn_zu, zst, ztpot, pssq, zqair, wndm, ln_skin_cs, ln_skin_wl, &628 CALL turb_ecmwf ( kt, rn_zqt, rn_zu, ptsk, ztpot, pssq, zqair, wndm, ln_skin_cs, ln_skin_wl, & 625 629 & zcd_oce, zch_oce, zce_oce, t_zu, q_zu, zU_zu, cdn_oce, chn_oce, cen_oce, & 626 630 & Qsw=qsr(:,:), rad_lw=pqlw(:,:), slp=pslp(:,:) ) … … 632 636 633 637 IF( ln_skin_cs .OR. ln_skin_wl ) THEN 634 !! In the presence of sea-ice we forget about the cool-skin/warm-layer update of zst and pssq: 635 WHERE ( fr_i < 0.001_wp ) 636 ! zst and pssq have been updated by cool-skin/warm-layer scheme and we keep it!!! 637 zst(:,:) = zst(:,:)*tmask(:,:,1) 638 pssq(:,:) = pssq(:,:)*tmask(:,:,1) 639 ELSEWHERE 640 ! we forget about the update... 641 zst(:,:) = zztmp1(:,:) !#LB: using what we backed up before skin-algo 642 pssq(:,:) = zztmp2(:,:) !#LB: " " " 638 !! ptsk and pssq have been updated!!! 639 !! 640 !! In the presence of sea-ice we forget about the cool-skin/warm-layer update of ptsk and pssq: 641 WHERE ( fr_i(:,:) > 0.001_wp ) 642 ! sea-ice present, we forget about the update, using what we backed up before call to turb_*() 643 ptsk(:,:) = zztmp1(:,:) 644 pssq(:,:) = zztmp2(:,:) 643 645 END WHERE 644 646 END IF … … 669 671 END DO 670 672 ELSE !== BLK formulation ==! turbulent fluxes computation 671 CALL BULK_FORMULA( rn_zu, zst(:,:), pssq(:,:), t_zu(:,:), q_zu(:,:), &673 CALL BULK_FORMULA( rn_zu, ptsk(:,:), pssq(:,:), t_zu(:,:), q_zu(:,:), & 672 674 & zcd_oce(:,:), zch_oce(:,:), zce_oce(:,:), & 673 675 & wndm(:,:), zU_zu(:,:), pslp(:,:), & … … 707 709 ENDIF 708 710 ! 709 ENDIF 710 ! 711 ENDIF !IF( ln_abl ) 712 713 ptsk(:,:) = ( ptsk(:,:) - rt0 ) * tmask(:,:,1) ! Back to Celsius 714 715 IF( ln_skin_cs .OR. ln_skin_wl ) THEN 716 CALL iom_put( "t_skin" , ptsk ) ! T_skin in Celsius 717 CALL iom_put( "dt_skin" , ptsk - pst ) ! T_skin - SST temperature difference... 718 ENDIF 719 711 720 IF(ln_ctl) THEN 712 721 CALL prt_ctl( tab2d_1=pevp , clinfo1=' blk_oce_1: pevp : ' ) … … 719 728 720 729 SUBROUTINE blk_oce_2( ptair, pqsr, pqlw, pprec, & ! <<= in 721 & psnow, pst, psen, pevp ) ! <<= in730 & psnow, ptsk, psen, pevp ) ! <<= in 722 731 !!--------------------------------------------------------------------- 723 732 !! *** ROUTINE blk_oce_2 *** … … 740 749 REAL(wp), INTENT(in), DIMENSION(:,:) :: pprec 741 750 REAL(wp), INTENT(in), DIMENSION(:,:) :: psnow 742 REAL(wp), INTENT(in), DIMENSION(:,:) :: p st ! surface temperature [Celcius]751 REAL(wp), INTENT(in), DIMENSION(:,:) :: ptsk ! SKIN surface temperature [Celsius] 743 752 REAL(wp), INTENT(in), DIMENSION(:,:) :: psen 744 753 REAL(wp), INTENT(in), DIMENSION(:,:) :: pevp … … 746 755 INTEGER :: ji, jj ! dummy loop indices 747 756 REAL(wp) :: zztmp,zz1,zz2,zz3 ! local variable 748 REAL(wp), DIMENSION(jpi,jpj) :: zqlw ! long wave and sensible heat fluxes 757 REAL(wp), DIMENSION(jpi,jpj) :: ztskk ! skin temp. in Kelvin 758 REAL(wp), DIMENSION(jpi,jpj) :: zqlw ! long wave and sensible heat fluxes 749 759 REAL(wp), DIMENSION(jpi,jpj) :: zqla ! latent heat fluxes and evaporation 750 REAL(wp), DIMENSION(jpi,jpj) :: zst ! surface temperature in Kelvin751 760 !!--------------------------------------------------------------------- 752 761 ! 753 762 ! local scalars ( place there for vector optimisation purposes) 754 zst(:,:) = pst(:,:) + rt0 ! convert SST from Celcius to Kelvin (and set minimum value far above 0 K) 755 756 763 764 ztskk(:,:) = ptsk(:,:) + rt0 ! => ptsk in Kelvin rather than Celsius 765 757 766 ! ----------------------------------------------------------------------------- ! 758 767 ! III Net longwave radiative FLUX ! … … 760 769 761 770 !! LB: now moved after Turbulent fluxes because must use the skin temperature rather that the SST 762 !! (z stis skin temperature if ln_skin_cs==.TRUE. .OR. ln_skin_wl==.TRUE.)763 zqlw(:,:) = emiss_w * ( pqlw(:,:) - stefan*z st(:,:)*zst(:,:)*zst(:,:)*zst(:,:) ) * tmask(:,:,1) ! Net radiative longwave flux764 765 ! Turbulent fluxesover ocean766 ! ----------------------- ------771 !! (ztskk is skin temperature if ln_skin_cs==.TRUE. .OR. ln_skin_wl==.TRUE.) 772 zqlw(:,:) = emiss_w * ( pqlw(:,:) - stefan*ztskk(:,:)*ztskk(:,:)*ztskk(:,:)*ztskk(:,:) ) * tmask(:,:,1) ! Net radiative longwave flux 773 774 ! Latent flux over ocean 775 ! ----------------------- 767 776 768 777 ! use scalar version of L_vap() for AGRIF compatibility 769 778 DO jj = 1, jpj 770 779 DO ji = 1, jpi 771 zqla(ji,jj) = - 1._wp * L_vap( zst(ji,jj) ) * pevp(ji,jj) ! Latent Heat flux !!GS: possibility to add a global qla to avoid recomputation after abl update780 zqla(ji,jj) = - L_vap( ztskk(ji,jj) ) * pevp(ji,jj) ! Latent Heat flux !!GS: possibility to add a global qla to avoid recomputation after abl update 772 781 ENDDO 773 782 ENDDO … … 788 797 qns(:,:) = zqlw(:,:) + psen(:,:) + zqla(:,:) & ! Downward Non Solar 789 798 & - psnow(:,:) * rn_pfac * rLfus & ! remove latent melting heat for solid precip 790 & - pevp(:,:) * p st(:,:) * rcp & ! remove evap heat content at SST !LB??? pst is Celsius !?799 & - pevp(:,:) * ptsk(:,:) * rcp & ! remove evap heat content at SST 791 800 & + ( pprec(:,:) - psnow(:,:) ) * rn_pfac & ! add liquid precip heat content at Tair 792 801 & * ( ptair(:,:) - rt0 ) * rcp & … … 815 824 CALL iom_put( "qsr_oce" , qsr ) ! output downward solar heat over the ocean 816 825 CALL iom_put( "qt_oce" , qns+qsr ) ! output total downward heat over the ocean 817 ENDIF818 !819 IF( ln_skin_cs .OR. ln_skin_wl ) THEN820 CALL iom_put( "t_skin" , (zst - rt0) * tmask(:,:,1) ) ! T_skin in Celsius821 CALL iom_put( "dt_skin" , (zst - pst - rt0) * tmask(:,:,1) ) ! T_skin - SST temperature difference...822 826 ENDIF 823 827 ! … … 1105 1109 1106 1110 IF( iom_use('evap_ao_cea') .OR. iom_use('hflx_evap_cea') ) THEN 1107 ztmp(:,:) = zevap(:,:) * ( 1._wp - at_i_b(:,:) ) 1111 ztmp(:,:) = zevap(:,:) * ( 1._wp - at_i_b(:,:) ) 1108 1112 IF( iom_use('evap_ao_cea' ) ) CALL iom_put( 'evap_ao_cea' , ztmp(:,:) * tmask(:,:,1) ) ! ice-free oce evap (cell average) 1109 1113 IF( iom_use('hflx_evap_cea') ) CALL iom_put( 'hflx_evap_cea', ztmp(:,:) * sst_m(:,:) * rcp * tmask(:,:,1) ) ! heat flux from evap (cell average) … … 1114 1118 ENDIF 1115 1119 IF( iom_use('hflx_snow_cea') .OR. iom_use('hflx_snow_ao_cea') .OR. iom_use('hflx_snow_ai_cea') ) THEN 1116 WHERE( SUM( a_i_b, dim=3 ) > 1.e-10 ) ; ztmp(:,:) = rcpi * SUM( (ptsu-rt0) * a_i_b, dim=3 ) / SUM( a_i_b, dim=3 ) 1117 ELSEWHERE ; ztmp(:,:) = rcp * sst_m(:,:) 1118 ENDWHERE 1119 ztmp2(:,:) = sprecip(:,:) * ( ztmp(:,:) - rLfus ) 1120 IF( iom_use('hflx_snow_cea') ) CALL iom_put('hflx_snow_cea' , ztmp2(:,:) ) ! heat flux from snow (cell average) 1121 IF( iom_use('hflx_snow_ao_cea') ) CALL iom_put('hflx_snow_ao_cea', ztmp2(:,:) * ( 1._wp - zsnw(:,:) ) ) ! heat flux from snow (over ocean) 1122 IF( iom_use('hflx_snow_ai_cea') ) CALL iom_put('hflx_snow_ai_cea', ztmp2(:,:) * zsnw(:,:) ) ! heat flux from snow (over ice) 1120 WHERE( SUM( a_i_b, dim=3 ) > 1.e-10 ) 1121 ztmp(:,:) = rcpi * SUM( (ptsu-rt0) * a_i_b, dim=3 ) / SUM( a_i_b, dim=3 ) 1122 ELSEWHERE 1123 ztmp(:,:) = rcp * sst_m(:,:) 1124 ENDWHERE 1125 ztmp2(:,:) = sprecip(:,:) * ( ztmp(:,:) - rLfus ) 1126 IF( iom_use('hflx_snow_cea') ) CALL iom_put('hflx_snow_cea' , ztmp2(:,:) ) ! heat flux from snow (cell average) 1127 IF( iom_use('hflx_snow_ao_cea') ) CALL iom_put('hflx_snow_ao_cea', ztmp2(:,:) * ( 1._wp - zsnw(:,:) ) ) ! heat flux from snow (over ocean) 1128 IF( iom_use('hflx_snow_ai_cea') ) CALL iom_put('hflx_snow_ai_cea', ztmp2(:,:) * zsnw(:,:) ) ! heat flux from snow (over ice) 1123 1129 ENDIF 1124 1130 !
Note: See TracChangeset
for help on using the changeset viewer.