Changeset 12324 for NEMO/branches/UKMO/NEMO_4.0.1_FKOSM/src
- Timestamp:
- 2020-01-15T12:47:44+01:00 (5 years ago)
- Location:
- NEMO/branches/UKMO/NEMO_4.0.1_FKOSM/src/OCE
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/UKMO/NEMO_4.0.1_FKOSM/src/OCE/SBC/sbcblk.F90
r11715 r12324 124 124 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: cdn_oce, chn_oce, cen_oce ! needed by Lupkes 2015 bulk scheme 125 125 126 LOGICAL :: ln_humi_dpt = .FALSE. ! calculate specific hunidity from dewpoint 127 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: qair ! specific humidity of air at input height 128 126 129 INTEGER :: nblk ! choice of the bulk algorithm 127 130 ! ! associated indices: … … 145 148 !!------------------------------------------------------------------- 146 149 ALLOCATE( Cd_atm (jpi,jpj), Ch_atm (jpi,jpj), Ce_atm (jpi,jpj), t_zu(jpi,jpj), q_zu(jpi,jpj), & 147 & cdn_oce(jpi,jpj), chn_oce(jpi,jpj), cen_oce(jpi,jpj), STAT=sbc_blk_alloc )150 & cdn_oce(jpi,jpj), chn_oce(jpi,jpj), cen_oce(jpi,jpj), qair(jpi,jpj), STAT=sbc_blk_alloc ) 148 151 ! 149 152 CALL mpp_sum ( 'sbcblk', sbc_blk_alloc ) … … 171 174 NAMELIST/namsbc_blk/ sn_wndi, sn_wndj, sn_humi, sn_qsr, sn_qlw , & ! input fields 172 175 & sn_tair, sn_prec, sn_snow, sn_slp, sn_tdif, & 173 & ln_NCAR, ln_COARE_3p0, ln_COARE_3p5, ln_ECMWF, 176 & ln_NCAR, ln_COARE_3p0, ln_COARE_3p5, ln_ECMWF, ln_humi_dpt,& ! bulk algorithm 174 177 & cn_dir , ln_taudif, rn_zqt, rn_zu, & 175 178 & rn_pfac, rn_efac, rn_vfac, ln_Cd_L12, ln_Cd_L15 … … 323 326 ! 324 327 ! ! compute the surface ocean fluxes using bulk formulea 328 ! ..... if dewpoint supplied instead of specific humidaity, calculate specific humidity 329 IF(ln_humi_dpt) THEN 330 qair(:,:) = q_sat( sf(jp_humi)%fnow(:,:,1), sf(jp_slp)%fnow(:,:,1) ) 331 ELSE 332 qair(:,:) = sf(jp_humi)%fnow(:,:,1) 333 END IF 334 325 335 IF( MOD( kt - 1, nn_fsbc ) == 0 ) CALL blk_oce( kt, sf, sst_m, ssu_m, ssv_m ) 326 336 … … 332 342 ENDIF 333 343 tatm_ice(:,:) = sf(jp_tair)%fnow(:,:,1) 334 qatm_ice(:,:) = sf(jp_humi)%fnow(:,:,1)344 qatm_ice(:,:) = qair(:,:) 335 345 tprecip(:,:) = sf(jp_prec)%fnow(:,:,1) * rn_pfac 336 346 sprecip(:,:) = sf(jp_snow)%fnow(:,:,1) * rn_pfac … … 434 444 !! (see Josey, Gulev & Yu, 2013) / doi=10.1016/B978-0-12-391851-2.00005-2 435 445 !! (since reanalysis products provide T at z, not theta !) 436 ztpot = sf(jp_tair)%fnow(:,:,1) + gamma_moist( sf(jp_tair)%fnow(:,:,1), sf(jp_humi)%fnow(:,:,1) ) * rn_zqt446 ztpot(:,:) = sf(jp_tair)%fnow(:,:,1) + gamma_moist( sf(jp_tair)%fnow(:,:,1), qair(:,:) ) * rn_zqt 437 447 438 448 SELECT CASE( nblk ) !== transfer coefficients ==! Cd, Ch, Ce at T-point 439 449 ! 440 CASE( np_NCAR ) ; CALL turb_ncar ( rn_zqt, rn_zu, zst, ztpot, zsq, sf(jp_humi)%fnow, wndm, & ! NCAR-COREv2450 CASE( np_NCAR ) ; CALL turb_ncar ( rn_zqt, rn_zu, zst, ztpot, zsq, qair, wndm, & ! NCAR-COREv2 441 451 & Cd_atm, Ch_atm, Ce_atm, t_zu, q_zu, zU_zu, cdn_oce, chn_oce, cen_oce ) 442 CASE( np_COARE_3p0 ) ; CALL turb_coare ( rn_zqt, rn_zu, zst, ztpot, zsq, sf(jp_humi)%fnow, wndm, & ! COARE v3.0452 CASE( np_COARE_3p0 ) ; CALL turb_coare ( rn_zqt, rn_zu, zst, ztpot, zsq, qair, wndm, & ! COARE v3.0 443 453 & Cd_atm, Ch_atm, Ce_atm, t_zu, q_zu, zU_zu, cdn_oce, chn_oce, cen_oce ) 444 CASE( np_COARE_3p5 ) ; CALL turb_coare3p5( rn_zqt, rn_zu, zst, ztpot, zsq, sf(jp_humi)%fnow, wndm, & ! COARE v3.5454 CASE( np_COARE_3p5 ) ; CALL turb_coare3p5( rn_zqt, rn_zu, zst, ztpot, zsq, qair, wndm, & ! COARE v3.5 445 455 & Cd_atm, Ch_atm, Ce_atm, t_zu, q_zu, zU_zu, cdn_oce, chn_oce, cen_oce ) 446 CASE( np_ECMWF ) ; CALL turb_ecmwf ( rn_zqt, rn_zu, zst, ztpot, zsq, sf(jp_humi)%fnow, wndm, & ! ECMWF456 CASE( np_ECMWF ) ; CALL turb_ecmwf ( rn_zqt, rn_zu, zst, ztpot, zsq, qair, wndm, & ! ECMWF 447 457 & Cd_atm, Ch_atm, Ce_atm, t_zu, q_zu, zU_zu, cdn_oce, chn_oce, cen_oce ) 448 458 CASE DEFAULT … … 454 464 zrhoa(:,:) = rho_air( t_zu(:,:) , q_zu(:,:) , sf(jp_slp)%fnow(:,:,1) ) 455 465 ELSE ! At zt: 456 zrhoa(:,:) = rho_air( sf(jp_tair)%fnow(:,:,1), sf(jp_humi)%fnow(:,:,1), sf(jp_slp)%fnow(:,:,1) )466 zrhoa(:,:) = rho_air( sf(jp_tair)%fnow(:,:,1), qair(:,:), sf(jp_slp)%fnow(:,:,1) ) 457 467 END IF 458 468 … … 495 505 IF( ABS( rn_zu - rn_zqt) < 0.01_wp ) THEN 496 506 !! q_air and t_air are given at 10m (wind reference height) 497 zevap(:,:) = rn_efac*MAX( 0._wp, zqla(:,:)*Ce_atm(:,:)*(zsq(:,:) - sf(jp_humi)%fnow(:,:,1)) ) ! Evaporation, using bulk wind speed498 zqsb (:,:) = cp_air( sf(jp_humi)%fnow(:,:,1))*zqla(:,:)*Ch_atm(:,:)*(zst(:,:) - ztpot(:,:) ) ! Sensible Heat, using bulk wind speed507 zevap(:,:) = rn_efac*MAX( 0._wp, zqla(:,:)*Ce_atm(:,:)*(zsq(:,:) - qair(:,:)) ) ! Evaporation, using bulk wind speed 508 zqsb (:,:) = cp_air(qair(:,:))*zqla(:,:)*Ch_atm(:,:)*(zst(:,:) - ztpot(:,:) ) ! Sensible Heat, using bulk wind speed 499 509 ELSE 500 510 !! q_air and t_air are not given at 10m (wind reference height) 501 511 ! Values of temp. and hum. adjusted to height of wind during bulk algorithm iteration must be used!!! 502 512 zevap(:,:) = rn_efac*MAX( 0._wp, zqla(:,:)*Ce_atm(:,:)*(zsq(:,:) - q_zu(:,:) ) ) ! Evaporation, using bulk wind speed 503 zqsb (:,:) = cp_air( sf(jp_humi)%fnow(:,:,1))*zqla(:,:)*Ch_atm(:,:)*(zst(:,:) - t_zu(:,:) ) ! Sensible Heat, using bulk wind speed513 zqsb (:,:) = cp_air(qair(:,:))*zqla(:,:)*Ch_atm(:,:)*(zst(:,:) - t_zu(:,:) ) ! Sensible Heat, using bulk wind speed 504 514 ENDIF 505 515 … … 742 752 ! local scalars ( place there for vector optimisation purposes) 743 753 ! Computing density of air! Way denser that 1.2 over sea-ice !!! 744 zrhoa (:,:) = rho_air(sf(jp_tair)%fnow(:,:,1), sf(jp_humi)%fnow(:,:,1), sf(jp_slp)%fnow(:,:,1))754 zrhoa (:,:) = rho_air(sf(jp_tair)%fnow(:,:,1), qair(:,:), sf(jp_slp)%fnow(:,:,1)) 745 755 746 756 !!gm brutal.... … … 806 816 zcoef_dqla = -Ls * 11637800. * (-5897.8) 807 817 ! 808 zrhoa(:,:) = rho_air( sf(jp_tair)%fnow(:,:,1), sf(jp_humi)%fnow(:,:,1), sf(jp_slp)%fnow(:,:,1) )818 zrhoa(:,:) = rho_air( sf(jp_tair)%fnow(:,:,1), qair(:,:), sf(jp_slp)%fnow(:,:,1) ) 809 819 ! 810 820 zztmp = 1. / ( 1. - albo ) … … 837 847 ! Latent Heat 838 848 qla_ice(ji,jj,jl) = rn_efac * MAX( 0.e0, zrhoa(ji,jj) * Ls * Ch_atm(ji,jj) * wndm_ice(ji,jj) * & 839 & ( 11637800. * EXP( -5897.8 * z1_st(ji,jj,jl) ) / zrhoa(ji,jj) - sf(jp_humi)%fnow(ji,jj,1) ) )849 & ( 11637800. * EXP( -5897.8 * z1_st(ji,jj,jl) ) / zrhoa(ji,jj) - qair(ji,jj) ) ) 840 850 ! Latent heat sensitivity for ice (Dqla/Dt) 841 851 IF( qla_ice(ji,jj,jl) > 0._wp ) THEN -
NEMO/branches/UKMO/NEMO_4.0.1_FKOSM/src/OCE/ZDF/zdfosm.F90
r12323 r12324 141 141 !!---------------------------------------------------------------------- 142 142 !! NEMO/OCE 4.0 , NEMO Consortium (2018) 143 !! $Id $143 !! $Id: zdfosm.F90 12317 2020-01-14 12:40:47Z agn $ 144 144 !! Software governed by the CeCILL license (see ./LICENSE) 145 145 !!---------------------------------------------------------------------- … … 483 483 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 484 484 ! BL must be always 4 levels deep. 485 ! For calculation of lateral buoyancy gradients for FK in 486 ! zdf_osm_zmld_horizontal_gradients need halo values for ibld, so must 487 ! previously exist for hbl also. 485 488 hbl(:,:) = MAX(hbl(:,:), gdepw_n(:,:,4) ) 486 489 ibld(:,:) = 4 487 490 DO jk = 5, jpkm1 488 DO jj = 2, jpjm1489 DO ji = 2, jpim1491 DO jj = 1, jpj 492 DO ji = 1, jpi 490 493 IF ( hbl(ji,jj) >= gdepw_n(ji,jj,jk) ) THEN 491 494 ibld(ji,jj) = MIN(mbkt(ji,jj), jk) … … 526 529 END DO 527 530 528 imld = ibld! use imld to hold previous blayer index531 imld(:,:) = ibld(:,:) ! use imld to hold previous blayer index 529 532 ibld(:,:) = 4 530 533 … … 1008 1011 END DO 1009 1012 1013 IF(ln_dia_osm) THEN 1014 IF ( iom_use("zdtdz_pyc") ) CALL iom_put( "zdtdz_pyc", wmask*zdtdz_pyc ) 1015 IF ( iom_use("zdsdz_pyc") ) CALL iom_put( "zdsdz_pyc", wmask*zdsdz_pyc ) 1016 IF ( iom_use("zdbdz_pyc") ) CALL iom_put( "zdbdz_pyc", wmask*zdbdz_pyc ) 1017 END IF 1018 1010 1019 ! KPP-style Ri# mixing 1011 1020 IF( ln_kpprimix) THEN … … 1139 1148 END DO 1140 1149 END DO 1150 ! Lateral boundary conditions on final outputs for hbl, on T-grid (sign unchanged) 1151 CALL lbc_lnk_multi( 'zdfosm', hbl, 'T', 1., dh, 'T', 1., hmle, 'T', 1. ) 1141 1152 ! Lateral boundary conditions on final outputs for gham[ts], on W-grid (sign unchanged) 1142 1153 ! Lateral boundary conditions on final outputs for gham[uv], on [UV]-grid (sign unchanged) … … 2186 2197 CALL iom_set_rstw_var_active('wn') 2187 2198 CALL iom_set_rstw_var_active('hbl') 2188 CALL iom_set_rstw_var_active('hbli') 2199 CALL iom_set_rstw_var_active('dh') 2200 IF( ln_osm_mle ) THEN 2201 CALL iom_set_rstw_var_active('hmle') 2202 END IF 2189 2203 ENDIF 2190 2204 END SUBROUTINE zdf_osm_init … … 2204 2218 CHARACTER(len=*), INTENT(in) :: cdrw ! "READ"/"WRITE" flag 2205 2219 2206 INTEGER :: id1, id2 ! iom enquiry index2220 INTEGER :: id1, id2, id3 ! iom enquiry index 2207 2221 INTEGER :: ji, jj, jk ! dummy loop indices 2208 2222 INTEGER :: iiki, ikt ! local integer … … 2232 2246 CALL iom_get( numror, jpdom_autoglo, 'dh', dh, ldxios = lrxios ) 2233 2247 WRITE(numout,*) ' ===>>>> : hbl & dh read from restart file' 2248 IF( ln_osm_mle ) THEN 2249 id3 = iom_varid( numror, 'hmle' , ldstop = .FALSE. ) 2250 IF( id3 > 0) THEN 2251 CALL iom_get( numror, jpdom_autoglo, 'hmle' , hmle , ldxios = lrxios ) 2252 WRITE(numout,*) ' ===>>>> : hmle read from restart file' 2253 ELSE 2254 WRITE(numout,*) ' ===>>>> : hmle not found, set to hbl' 2255 hmle(:,:) = hbl(:,:) ! Initialise MLE depth. 2256 END IF 2257 END IF 2234 2258 RETURN 2235 2259 ELSE ! 'hbl' & 'dh' not in restart file, recalculate … … 2243 2267 IF( TRIM(cdrw) == 'WRITE') THEN !* Write hbli into the restart file, then return 2244 2268 IF(lwp) WRITE(numout,*) '---- osm-rst ----' 2245 CALL iom_rstput( kt, nitrst, numrow, 'wn' , wn , ldxios = lwxios ) 2246 CALL iom_rstput( kt, nitrst, numrow, 'hbl' , hbl , ldxios = lwxios ) 2247 CALL iom_rstput( kt, nitrst, numrow, 'dh' , dh, ldxios = lwxios ) 2269 CALL iom_rstput( kt, nitrst, numrow, 'wn' , wn, ldxios = lwxios ) 2270 CALL iom_rstput( kt, nitrst, numrow, 'hbl' , hbl, ldxios = lwxios ) 2271 CALL iom_rstput( kt, nitrst, numrow, 'dh' , dh, ldxios = lwxios ) 2272 IF( ln_osm_mle ) THEN 2273 CALL iom_rstput( kt, nitrst, numrow, 'hmle', hmle, ldxios = lwxios ) 2274 END IF 2248 2275 RETURN 2249 2276 END IF … … 2279 2306 END DO 2280 2307 2281 IF( ln_osm_mle ) hmle(:,:) = hbl(:,:) ! Initialise MLE depth.2282 2283 2308 WRITE(numout,*) ' ===>>>> : hbl computed from stratification' 2309 2310 IF( ln_osm_mle ) THEN 2311 hmle(:,:) = hbl(:,:) ! Initialise MLE depth. 2312 WRITE(numout,*) ' ===>>>> : hmle set = to hbl' 2313 END IF 2314 2284 2315 wn(:,:,:) = 0._wp 2285 2316 WRITE(numout,*) ' ===>>>> : wn not in restart file, set to zero initially' -
NEMO/branches/UKMO/NEMO_4.0.1_FKOSM/src/OCE/ZDF/zdfphy.F90
r11715 r12324 56 56 !!---------------------------------------------------------------------- 57 57 !! NEMO/OCE 4.0 , NEMO Consortium (2018) 58 !! $Id $58 !! $Id: zdfphy.F90 12178 2019-12-11 11:02:38Z agn $ 59 59 !! Software governed by the CeCILL license (see ./LICENSE) 60 60 !!---------------------------------------------------------------------- … … 172 172 IF( ln_zdfosm .AND. ln_zdfevd ) CALL ctl_stop( 'zdf_phy_init: chose between ln_zdfosm and ln_zdfevd' ) 173 173 IF( lk_top .AND. ln_zdfnpc ) CALL ctl_stop( 'zdf_phy_init: npc scheme is not working with key_top' ) 174 IF( lk_top .AND. ln_zdfosm ) CALL ctl_ stop( 'zdf_phy_init: osmosis scheme is not working with key_top' )174 IF( lk_top .AND. ln_zdfosm ) CALL ctl_warn( 'zdf_phy_init: osmosis gives no non-local fluxes for TOP tracers yet' ) 175 175 IF(lwp) THEN 176 176 WRITE(numout,*)
Note: See TracChangeset
for help on using the changeset viewer.