Changeset 13710 for NEMO/branches/2020/dev_r12702_ASINTER-02_emanuelaclementi_Waves/src/OCE/SBC/sbcblk.F90
- Timestamp:
- 2020-11-02T10:56:42+01:00 (3 years ago)
- Location:
- NEMO/branches/2020/dev_r12702_ASINTER-02_emanuelaclementi_Waves
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/dev_r12702_ASINTER-02_emanuelaclementi_Waves
- Property svn:externals
-
old new 3 3 ^/utils/build/mk@HEAD mk 4 4 ^/utils/tools@HEAD tools 5 ^/vendors/AGRIF/dev @HEADext/AGRIF5 ^/vendors/AGRIF/dev_r12970_AGRIF_CMEMS ext/AGRIF 6 6 ^/vendors/FCM@HEAD ext/FCM 7 7 ^/vendors/IOIPSL@HEAD ext/IOIPSL 8 8 9 9 # SETTE 10 ^/utils/CI/sette@ HEADsette10 ^/utils/CI/sette@13559 sette
-
- Property svn:externals
-
NEMO/branches/2020/dev_r12702_ASINTER-02_emanuelaclementi_Waves/src/OCE/SBC/sbcblk.F90
r12991 r13710 44 44 USE lib_fortran ! to use key_nosignedzero 45 45 #if defined key_si3 46 USE ice , ONLY : jpl, a_i_b, at_i_b, rn_cnd_s, hfx_err_dif47 USE ice thd_dh ! for CALL ice_thd_snwblow46 USE ice , ONLY : u_ice, v_ice, jpl, a_i_b, at_i_b, t_su, rn_cnd_s, hfx_err_dif, nn_qtrice 47 USE icevar ! for CALL ice_var_snwblow 48 48 #endif 49 49 USE sbcblk_algo_ncar ! => turb_ncar : NCAR - CORE (Large & Yeager, 2009) … … 74 74 #endif 75 75 76 INTEGER , PUBLIC :: jpfld ! maximum number of files to read 77 INTEGER , PUBLIC, PARAMETER :: jp_wndi = 1 ! index of 10m wind velocity (i-component) (m/s) at T-point 78 INTEGER , PUBLIC, PARAMETER :: jp_wndj = 2 ! index of 10m wind velocity (j-component) (m/s) at T-point 79 INTEGER , PUBLIC, PARAMETER :: jp_tair = 3 ! index of 10m air temperature (Kelvin) 80 INTEGER , PUBLIC, PARAMETER :: jp_humi = 4 ! index of specific humidity ( % ) 81 INTEGER , PUBLIC, PARAMETER :: jp_qsr = 5 ! index of solar heat (W/m2) 82 INTEGER , PUBLIC, PARAMETER :: jp_qlw = 6 ! index of Long wave (W/m2) 83 INTEGER , PUBLIC, PARAMETER :: jp_prec = 7 ! index of total precipitation (rain+snow) (Kg/m2/s) 84 INTEGER , PUBLIC, PARAMETER :: jp_snow = 8 ! index of snow (solid prcipitation) (kg/m2/s) 85 INTEGER , PUBLIC, PARAMETER :: jp_slp = 9 ! index of sea level pressure (Pa) 86 INTEGER , PUBLIC, PARAMETER :: jp_hpgi =10 ! index of ABL geostrophic wind or hpg (i-component) (m/s) at T-point 87 INTEGER , PUBLIC, PARAMETER :: jp_hpgj =11 ! index of ABL geostrophic wind or hpg (j-component) (m/s) at T-point 88 76 INTEGER , PUBLIC, PARAMETER :: jp_wndi = 1 ! index of 10m wind velocity (i-component) (m/s) at T-point 77 INTEGER , PUBLIC, PARAMETER :: jp_wndj = 2 ! index of 10m wind velocity (j-component) (m/s) at T-point 78 INTEGER , PUBLIC, PARAMETER :: jp_tair = 3 ! index of 10m air temperature (Kelvin) 79 INTEGER , PUBLIC, PARAMETER :: jp_humi = 4 ! index of specific humidity ( % ) 80 INTEGER , PUBLIC, PARAMETER :: jp_qsr = 5 ! index of solar heat (W/m2) 81 INTEGER , PUBLIC, PARAMETER :: jp_qlw = 6 ! index of Long wave (W/m2) 82 INTEGER , PUBLIC, PARAMETER :: jp_prec = 7 ! index of total precipitation (rain+snow) (Kg/m2/s) 83 INTEGER , PUBLIC, PARAMETER :: jp_snow = 8 ! index of snow (solid prcipitation) (kg/m2/s) 84 INTEGER , PUBLIC, PARAMETER :: jp_slp = 9 ! index of sea level pressure (Pa) 85 INTEGER , PUBLIC, PARAMETER :: jp_uoatm = 10 ! index of surface current (i-component) 86 ! ! seen by the atmospheric forcing (m/s) at T-point 87 INTEGER , PUBLIC, PARAMETER :: jp_voatm = 11 ! index of surface current (j-component) 88 ! ! seen by the atmospheric forcing (m/s) at T-point 89 INTEGER , PUBLIC, PARAMETER :: jp_cc = 12 ! index of cloud cover (-) range:0-1 90 INTEGER , PUBLIC, PARAMETER :: jp_hpgi = 13 ! index of ABL geostrophic wind or hpg (i-component) (m/s) at T-point 91 INTEGER , PUBLIC, PARAMETER :: jp_hpgj = 14 ! index of ABL geostrophic wind or hpg (j-component) (m/s) at T-point 92 INTEGER , PUBLIC, PARAMETER :: jpfld = 14 ! maximum number of files to read 93 94 ! Warning: keep this structure allocatable for Agrif... 89 95 TYPE(FLD), PUBLIC, ALLOCATABLE, DIMENSION(:) :: sf ! structure of input atmospheric fields (file informations, fields read) 90 96 … … 98 104 LOGICAL :: ln_Cd_L15 ! ice-atm drag = F( ice concentration, atmospheric stability ) (Lupkes et al. JGR2015) 99 105 ! 106 LOGICAL :: ln_crt_fbk ! Add surface current feedback to the wind stress computation (Renault et al. 2020) 107 REAL(wp) :: rn_stau_a ! Alpha and Beta coefficients of Renault et al. 2020, eq. 10: Stau = Alpha * Wnd + Beta 108 REAL(wp) :: rn_stau_b ! 109 ! 100 110 REAL(wp) :: rn_pfac ! multiplication factor for precipitation 101 111 REAL(wp), PUBLIC :: rn_efac ! multiplication factor for evaporation 102 REAL(wp), PUBLIC :: rn_vfac ! multiplication factor for ice/ocean velocity in the calculation of wind stress103 112 REAL(wp) :: rn_zqt ! z(q,t) : height of humidity and temperature measurements 104 113 REAL(wp) :: rn_zu ! z(u) : height of wind measurements 105 114 ! 106 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: Cd_ice , Ch_ice , Ce_ice ! transfert coefficients over ice107 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: Cdn_oce, Chn_oce, Cen_oce ! neutral coeffs over ocean (L15 bulk scheme)108 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: t_zu, q_zu ! air temp. and spec. hum. at wind speed height (L15 bulk scheme)115 REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:) :: Cdn_oce, Chn_oce, Cen_oce ! neutral coeffs over ocean (L15 bulk scheme and ABL) 116 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: Cd_ice , Ch_ice , Ce_ice ! transfert coefficients over ice 117 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: t_zu, q_zu ! air temp. and spec. hum. at wind speed height (L15 bulk scheme) 109 118 110 119 LOGICAL :: ln_skin_cs ! use the cool-skin (only available in ECMWF and COARE algorithms) !LB … … 113 122 LOGICAL :: ln_humi_dpt ! humidity read in files ("sn_humi") is dew-point temperature [K] if .true. !LB 114 123 LOGICAL :: ln_humi_rlh ! humidity read in files ("sn_humi") is relative humidity [%] if .true. !LB 124 LOGICAL :: ln_tpot !!GS: flag to compute or not potential temperature 115 125 ! 116 126 INTEGER :: nhumi ! choice of the bulk algorithm … … 162 172 !! 163 173 CHARACTER(len=100) :: cn_dir ! Root directory for location of atmospheric forcing files 164 TYPE(FLD_N), ALLOCATABLE, DIMENSION(:) :: slf_i ! array of namelist informations on the fields to read 165 TYPE(FLD_N) :: sn_wndi, sn_wndj, sn_humi, sn_qsr ! informations about the fields to be read 166 TYPE(FLD_N) :: sn_qlw , sn_tair, sn_prec, sn_snow ! " " 167 TYPE(FLD_N) :: sn_slp , sn_hpgi, sn_hpgj ! " " 174 TYPE(FLD_N), DIMENSION(jpfld) :: slf_i ! array of namelist informations on the fields to read 175 TYPE(FLD_N) :: sn_wndi, sn_wndj , sn_humi, sn_qsr ! informations about the fields to be read 176 TYPE(FLD_N) :: sn_qlw , sn_tair , sn_prec, sn_snow ! " " 177 TYPE(FLD_N) :: sn_slp , sn_uoatm, sn_voatm ! " " 178 TYPE(FLD_N) :: sn_cc, sn_hpgi, sn_hpgj ! " " 179 INTEGER :: ipka ! number of levels in the atmospheric variable 168 180 NAMELIST/namsbc_blk/ sn_wndi, sn_wndj, sn_humi, sn_qsr, sn_qlw , & ! input fields 169 & sn_tair, sn_prec, sn_snow, sn_slp, sn_hpgi, sn_hpgj, & 181 & sn_tair, sn_prec, sn_snow, sn_slp, sn_uoatm, sn_voatm, & 182 & sn_cc, sn_hpgi, sn_hpgj, & 170 183 & ln_NCAR, ln_COARE_3p0, ln_COARE_3p6, ln_ECMWF, & ! bulk algorithm 171 184 & cn_dir , rn_zqt, rn_zu, & 172 & rn_pfac, rn_efac, rn_vfac, ln_Cd_L12, ln_Cd_L15, & 185 & rn_pfac, rn_efac, ln_Cd_L12, ln_Cd_L15, ln_tpot, & 186 & ln_crt_fbk, rn_stau_a, rn_stau_b, & ! current feedback 173 187 & ln_skin_cs, ln_skin_wl, ln_humi_sph, ln_humi_dpt, ln_humi_rlh ! cool-skin / warm-layer !LB 174 188 !!--------------------------------------------------------------------- … … 242 256 ! !* set the bulk structure 243 257 ! !- store namelist information in an array 244 IF( ln_blk ) jpfld = 9 245 IF( ln_abl ) jpfld = 11 246 ALLOCATE( slf_i(jpfld) ) 247 ! 248 slf_i(jp_wndi) = sn_wndi ; slf_i(jp_wndj) = sn_wndj 249 slf_i(jp_qsr ) = sn_qsr ; slf_i(jp_qlw ) = sn_qlw 250 slf_i(jp_tair) = sn_tair ; slf_i(jp_humi) = sn_humi 251 slf_i(jp_prec) = sn_prec ; slf_i(jp_snow) = sn_snow 252 slf_i(jp_slp ) = sn_slp 253 IF( ln_abl ) THEN 254 slf_i(jp_hpgi) = sn_hpgi ; slf_i(jp_hpgj) = sn_hpgj 255 END IF 258 ! 259 slf_i(jp_wndi ) = sn_wndi ; slf_i(jp_wndj ) = sn_wndj 260 slf_i(jp_qsr ) = sn_qsr ; slf_i(jp_qlw ) = sn_qlw 261 slf_i(jp_tair ) = sn_tair ; slf_i(jp_humi ) = sn_humi 262 slf_i(jp_prec ) = sn_prec ; slf_i(jp_snow ) = sn_snow 263 slf_i(jp_slp ) = sn_slp ; slf_i(jp_cc ) = sn_cc 264 slf_i(jp_uoatm) = sn_uoatm ; slf_i(jp_voatm) = sn_voatm 265 slf_i(jp_hpgi ) = sn_hpgi ; slf_i(jp_hpgj ) = sn_hpgj 266 ! 267 IF( .NOT. ln_abl ) THEN ! force to not use jp_hpgi and jp_hpgj, should already be done in namelist_* but we never know... 268 slf_i(jp_hpgi)%clname = 'NOT USED' 269 slf_i(jp_hpgj)%clname = 'NOT USED' 270 ENDIF 256 271 ! 257 272 ! !- allocate the bulk structure … … 264 279 DO jfpr= 1, jpfld 265 280 ! 266 IF( TRIM(sf(jfpr)%clrootname) == 'NOT USED' ) THEN !-- not used field --! (only now allocated and set to zero) 267 ALLOCATE( sf(jfpr)%fnow(jpi,jpj,1) ) 268 sf(jfpr)%fnow(:,:,1) = 0._wp 281 IF( ln_abl .AND. & 282 & ( jfpr == jp_wndi .OR. jfpr == jp_wndj .OR. jfpr == jp_humi .OR. & 283 & jfpr == jp_hpgi .OR. jfpr == jp_hpgj .OR. jfpr == jp_tair ) ) THEN 284 ipka = jpka ! ABL: some fields are 3D input 285 ELSE 286 ipka = 1 287 ENDIF 288 ! 289 ALLOCATE( sf(jfpr)%fnow(jpi,jpj,ipka) ) 290 ! 291 IF( TRIM(sf(jfpr)%clrootname) == 'NOT USED' ) THEN !-- not used field --! (only now allocated and set to default) 292 IF( jfpr == jp_slp ) THEN 293 sf(jfpr)%fnow(:,:,1:ipka) = 101325._wp ! use standard pressure in Pa 294 ELSEIF( jfpr == jp_prec .OR. jfpr == jp_snow .OR. jfpr == jp_uoatm .OR. jfpr == jp_voatm ) THEN 295 sf(jfpr)%fnow(:,:,1:ipka) = 0._wp ! no precip or no snow or no surface currents 296 ELSEIF( jfpr == jp_hpgi .OR. jfpr == jp_hpgj ) THEN 297 IF( .NOT. ln_abl ) THEN 298 DEALLOCATE( sf(jfpr)%fnow ) ! deallocate as not used in this case 299 ELSE 300 sf(jfpr)%fnow(:,:,1:ipka) = 0._wp 301 ENDIF 302 ELSEIF( jfpr == jp_cc ) THEN 303 sf(jp_cc)%fnow(:,:,1:ipka) = pp_cldf 304 ELSE 305 WRITE(ctmp1,*) 'sbc_blk_init: no default value defined for field number', jfpr 306 CALL ctl_stop( ctmp1 ) 307 ENDIF 269 308 ELSE !-- used field --! 270 IF( ln_abl .AND. & 271 & ( jfpr == jp_wndi .OR. jfpr == jp_wndj .OR. jfpr == jp_humi .OR. & 272 & jfpr == jp_hpgi .OR. jfpr == jp_hpgj .OR. jfpr == jp_tair ) ) THEN ! ABL: some fields are 3D input 273 ALLOCATE( sf(jfpr)%fnow(jpi,jpj,jpka) ) 274 IF( sf(jfpr)%ln_tint ) ALLOCATE( sf(jfpr)%fdta(jpi,jpj,jpka,2) ) 275 ELSE ! others or Bulk fields are 2D fiels 276 ALLOCATE( sf(jfpr)%fnow(jpi,jpj,1) ) 277 IF( sf(jfpr)%ln_tint ) ALLOCATE( sf(jfpr)%fdta(jpi,jpj,1,2) ) 278 ENDIF 309 IF( sf(jfpr)%ln_tint ) ALLOCATE( sf(jfpr)%fdta(jpi,jpj,ipka,2) ) ! allocate array for temporal interpolation 279 310 ! 280 311 IF( sf(jfpr)%freqh > 0. .AND. MOD( NINT(3600. * sf(jfpr)%freqh), nn_fsbc * NINT(rn_Dt) ) /= 0 ) & 281 282 312 & CALL ctl_warn( 'sbc_blk_init: sbcmod timestep rn_Dt*nn_fsbc is NOT a submultiple of atmospheric forcing frequency.', & 313 & ' This is not ideal. You should consider changing either rn_Dt or nn_fsbc value...' ) 283 314 ENDIF 284 315 END DO … … 308 339 WRITE(numout,*) ' factor applied on precipitation (total & snow) rn_pfac = ', rn_pfac 309 340 WRITE(numout,*) ' factor applied on evaporation rn_efac = ', rn_efac 310 WRITE(numout,*) ' factor applied on ocean/ice velocity rn_vfac = ', rn_vfac311 341 WRITE(numout,*) ' (form absolute (=0) to relative winds(=1))' 312 342 WRITE(numout,*) ' use ice-atm drag from Lupkes2012 ln_Cd_L12 = ', ln_Cd_L12 313 343 WRITE(numout,*) ' use ice-atm drag from Lupkes2015 ln_Cd_L15 = ', ln_Cd_L15 344 WRITE(numout,*) ' use surface current feedback on wind stress ln_crt_fbk = ', ln_crt_fbk 345 IF(ln_crt_fbk) THEN 346 WRITE(numout,*) ' Renault et al. 2020, eq. 10: Stau = Alpha * Wnd + Beta' 347 WRITE(numout,*) ' Alpha rn_stau_a = ', rn_stau_a 348 WRITE(numout,*) ' Beta rn_stau_b = ', rn_stau_b 349 ENDIF 314 350 ! 315 351 WRITE(numout,*) … … 410 446 ! ! compute the surface ocean fluxes using bulk formulea 411 447 IF( MOD( kt - 1, nn_fsbc ) == 0 ) THEN 412 CALL blk_oce_1( kt, sf(jp_wndi)%fnow(:,:,1), sf(jp_wndj)%fnow(:,:,1), & ! <<= in 413 & sf(jp_tair)%fnow(:,:,1), sf(jp_humi)%fnow(:,:,1), & ! <<= in 414 & sf(jp_slp )%fnow(:,:,1), sst_m, ssu_m, ssv_m, & ! <<= in 415 & sf(jp_qsr )%fnow(:,:,1), sf(jp_qlw )%fnow(:,:,1), & ! <<= in (wl/cs) 416 & tsk_m, zssq, zcd_du, zsen, zevp ) ! =>> out 417 418 CALL blk_oce_2( sf(jp_tair)%fnow(:,:,1), sf(jp_qsr )%fnow(:,:,1), & ! <<= in 419 & sf(jp_qlw )%fnow(:,:,1), sf(jp_prec)%fnow(:,:,1), & ! <<= in 420 & sf(jp_snow)%fnow(:,:,1), tsk_m, & ! <<= in 421 & zsen, zevp ) ! <=> in out 448 CALL blk_oce_1( kt, sf(jp_wndi )%fnow(:,:,1), sf(jp_wndj )%fnow(:,:,1), & ! <<= in 449 & sf(jp_tair )%fnow(:,:,1), sf(jp_humi )%fnow(:,:,1), & ! <<= in 450 & sf(jp_slp )%fnow(:,:,1), sst_m, ssu_m, ssv_m, & ! <<= in 451 & sf(jp_uoatm)%fnow(:,:,1), sf(jp_voatm)%fnow(:,:,1), & ! <<= in 452 & sf(jp_qsr )%fnow(:,:,1), sf(jp_qlw )%fnow(:,:,1), & ! <<= in (wl/cs) 453 & tsk_m, zssq, zcd_du, zsen, zevp ) ! =>> out 454 455 CALL blk_oce_2( sf(jp_tair )%fnow(:,:,1), sf(jp_qsr )%fnow(:,:,1), & ! <<= in 456 & sf(jp_qlw )%fnow(:,:,1), sf(jp_prec )%fnow(:,:,1), & ! <<= in 457 & sf(jp_snow )%fnow(:,:,1), tsk_m, & ! <<= in 458 & zsen, zevp ) ! <=> in out 422 459 ENDIF 423 460 ! … … 451 488 452 489 453 SUBROUTINE blk_oce_1( kt, pwndi, pwndj , ptair, phumi,& ! inp454 & pslp , pst , pu , pv,& ! inp455 & pqsr , pqlw ,& ! inp456 & ptsk, pssq , pcd_du, psen , pevp )! out490 SUBROUTINE blk_oce_1( kt, pwndi, pwndj, ptair, phumi, & ! inp 491 & pslp , pst , pu , pv, & ! inp 492 & puatm, pvatm, pqsr , pqlw , & ! inp 493 & ptsk , pssq , pcd_du, psen, pevp ) ! out 457 494 !!--------------------------------------------------------------------- 458 495 !! *** ROUTINE blk_oce_1 *** … … 479 516 REAL(wp), INTENT(in ), DIMENSION(:,:) :: pu ! surface current at U-point (i-component) [m/s] 480 517 REAL(wp), INTENT(in ), DIMENSION(:,:) :: pv ! surface current at V-point (j-component) [m/s] 518 REAL(wp), INTENT(in ), DIMENSION(:,:) :: puatm ! surface current seen by the atm at T-point (i-component) [m/s] 519 REAL(wp), INTENT(in ), DIMENSION(:,:) :: pvatm ! surface current seen by the atm at T-point (j-component) [m/s] 481 520 REAL(wp), INTENT(in ), DIMENSION(:,:) :: pqsr ! 482 521 REAL(wp), INTENT(in ), DIMENSION(:,:) :: pqlw ! … … 489 528 INTEGER :: ji, jj ! dummy loop indices 490 529 REAL(wp) :: zztmp ! local variable 530 REAL(wp) :: zstmax, zstau 531 #if defined key_cyclone 491 532 REAL(wp), DIMENSION(jpi,jpj) :: zwnd_i, zwnd_j ! wind speed components at T-point 533 #endif 534 REAL(wp), DIMENSION(jpi,jpj) :: ztau_i, ztau_j ! wind stress components at T-point 492 535 REAL(wp), DIMENSION(jpi,jpj) :: zU_zu ! bulk wind speed at height zu [m/s] 493 536 REAL(wp), DIMENSION(jpi,jpj) :: ztpot ! potential temperature of air at z=rn_zqt [K] … … 504 547 ptsk(:,:) = pst(:,:) + rt0 ! by default: skin temperature = "bulk SST" (will remain this way if NCAR algorithm used!) 505 548 549 ! --- cloud cover --- ! 550 cloud_fra(:,:) = sf(jp_cc)%fnow(:,:,1) 551 506 552 ! ----------------------------------------------------------------------------- ! 507 553 ! 0 Wind components and module at T-point relative to the moving ocean ! … … 513 559 zwnd_j(:,:) = 0._wp 514 560 CALL wnd_cyc( kt, zwnd_i, zwnd_j ) ! add analytical tropical cyclone (Vincent et al. JGR 2012) 515 DO_2D_00_00 516 pwndi(ji,jj) = pwndi(ji,jj) + zwnd_i(ji,jj) 517 pwndj(ji,jj) = pwndj(ji,jj) + zwnd_j(ji,jj) 561 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 562 zwnd_i(ji,jj) = pwndi(ji,jj) + zwnd_i(ji,jj) 563 zwnd_j(ji,jj) = pwndj(ji,jj) + zwnd_j(ji,jj) 564 ! ... scalar wind at T-point (not masked) 565 wndm(ji,jj) = SQRT( zwnd_i(ji,jj) * zwnd_i(ji,jj) + zwnd_j(ji,jj) * zwnd_j(ji,jj) ) 566 END_2D 567 #else 568 ! ... scalar wind module at T-point (not masked) 569 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 570 wndm(ji,jj) = SQRT( pwndi(ji,jj) * pwndi(ji,jj) + pwndj(ji,jj) * pwndj(ji,jj) ) 518 571 END_2D 519 572 #endif 520 DO_2D_00_00521 zwnd_i(ji,jj) = ( pwndi(ji,jj) - rn_vfac * 0.5 * ( pu(ji-1,jj ) + pu(ji,jj) ) )522 zwnd_j(ji,jj) = ( pwndj(ji,jj) - rn_vfac * 0.5 * ( pv(ji ,jj-1) + pv(ji,jj) ) )523 END_2D524 CALL lbc_lnk_multi( 'sbcblk', zwnd_i, 'T', -1., zwnd_j, 'T', -1. )525 ! ... scalar wind ( = | U10m - U_oce | ) at T-point (masked)526 wndm(:,:) = SQRT( zwnd_i(:,:) * zwnd_i(:,:) &527 & + zwnd_j(:,:) * zwnd_j(:,:) ) * tmask(:,:,1)528 529 573 ! ----------------------------------------------------------------------------- ! 530 574 ! I Solar FLUX ! … … 574 618 !#LB: because AGRIF hates functions that return something else than a scalar, need to 575 619 ! use scalar version of gamma_moist() ... 576 DO_2D_11_11 577 ztpot(ji,jj) = ptair(ji,jj) + gamma_moist( ptair(ji,jj), zqair(ji,jj) ) * rn_zqt 578 END_2D 579 ENDIF 580 581 620 IF( ln_tpot ) THEN 621 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 622 ztpot(ji,jj) = ptair(ji,jj) + gamma_moist( ptair(ji,jj), zqair(ji,jj) ) * rn_zqt 623 END_2D 624 ELSE 625 ztpot = ptair(:,:) 626 ENDIF 627 ENDIF 582 628 583 629 !! Time to call the user-selected bulk parameterization for … … 608 654 609 655 END SELECT 610 656 657 IF( iom_use('Cd_oce') ) CALL iom_put("Cd_oce", zcd_oce * tmask(:,:,1)) 658 IF( iom_use('Ce_oce') ) CALL iom_put("Ce_oce", zce_oce * tmask(:,:,1)) 659 IF( iom_use('Ch_oce') ) CALL iom_put("Ch_oce", zch_oce * tmask(:,:,1)) 660 !! LB: mainly here for debugging purpose: 661 IF( iom_use('theta_zt') ) CALL iom_put("theta_zt", (ztpot-rt0) * tmask(:,:,1)) ! potential temperature at z=zt 662 IF( iom_use('q_zt') ) CALL iom_put("q_zt", zqair * tmask(:,:,1)) ! specific humidity " 663 IF( iom_use('theta_zu') ) CALL iom_put("theta_zu", (t_zu -rt0) * tmask(:,:,1)) ! potential temperature at z=zu 664 IF( iom_use('q_zu') ) CALL iom_put("q_zu", q_zu * tmask(:,:,1)) ! specific humidity " 665 IF( iom_use('ssq') ) CALL iom_put("ssq", pssq * tmask(:,:,1)) ! saturation specific humidity at z=0 666 IF( iom_use('wspd_blk') ) CALL iom_put("wspd_blk", zU_zu * tmask(:,:,1)) ! bulk wind speed at z=zu 667 611 668 IF( ln_skin_cs .OR. ln_skin_wl ) THEN 612 669 !! ptsk and pssq have been updated!!! … … 624 681 625 682 IF( ln_abl ) THEN !== ABL formulation ==! multiplication by rho_air and turbulent fluxes computation done in ablstp 626 !! FL do we need this multiplication by tmask ... ??? 627 DO_2D_11_11 628 zztmp = zU_zu(ji,jj) !* tmask(ji,jj,1) 683 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 684 zztmp = zU_zu(ji,jj) 629 685 wndm(ji,jj) = zztmp ! Store zU_zu in wndm to compute ustar2 in ablmod 630 686 pcd_du(ji,jj) = zztmp * zcd_oce(ji,jj) 631 687 psen(ji,jj) = zztmp * zch_oce(ji,jj) 632 688 pevp(ji,jj) = zztmp * zce_oce(ji,jj) 689 rhoa(ji,jj) = rho_air( ptair(ji,jj), phumi(ji,jj), pslp(ji,jj) ) 633 690 END_2D 634 691 ELSE !== BLK formulation ==! turbulent fluxes computation … … 644 701 pevp(:,:) = pevp(:,:) * tmask(:,:,1) 645 702 646 ! Tau i and j component on T-grid points, using array "zcd_oce" as a temporary array... 647 zcd_oce = 0._wp 648 WHERE ( wndm > 0._wp ) zcd_oce = taum / wndm 649 zwnd_i = zcd_oce * zwnd_i 650 zwnd_j = zcd_oce * zwnd_j 651 652 CALL iom_put( "taum_oce", taum ) ! output wind stress module 703 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 704 IF( wndm(ji,jj) > 0._wp ) THEN 705 zztmp = taum(ji,jj) / wndm(ji,jj) 706 #if defined key_cyclone 707 ztau_i(ji,jj) = zztmp * zwnd_i(ji,jj) 708 ztau_j(ji,jj) = zztmp * zwnd_j(ji,jj) 709 #else 710 ztau_i(ji,jj) = zztmp * pwndi(ji,jj) 711 ztau_j(ji,jj) = zztmp * pwndj(ji,jj) 712 #endif 713 ELSE 714 ztau_i(ji,jj) = 0._wp 715 ztau_j(ji,jj) = 0._wp 716 ENDIF 717 END_2D 718 719 IF( ln_crt_fbk ) THEN ! aply eq. 10 and 11 of Renault et al. 2020 (doi: 10.1029/2019MS001715) 720 zstmax = MIN( rn_stau_a * 3._wp + rn_stau_b, 0._wp ) ! set the max value of Stau corresponding to a wind of 3 m/s (<0) 721 DO_2D( 0, 1, 0, 1 ) ! end at jpj and jpi, as ztau_j(ji,jj+1) ztau_i(ji+1,jj) used in the next loop 722 zstau = MIN( rn_stau_a * wndm(ji,jj) + rn_stau_b, zstmax ) ! stau (<0) must be smaller than zstmax 723 ztau_i(ji,jj) = ztau_i(ji,jj) + zstau * ( 0.5_wp * ( pu(ji-1,jj ) + pu(ji,jj) ) - puatm(ji,jj) ) 724 ztau_j(ji,jj) = ztau_j(ji,jj) + zstau * ( 0.5_wp * ( pv(ji ,jj-1) + pv(ji,jj) ) - pvatm(ji,jj) ) 725 taum(ji,jj) = SQRT( ztau_i(ji,jj) * ztau_i(ji,jj) + ztau_j(ji,jj) * ztau_j(ji,jj) ) 726 END_2D 727 ENDIF 653 728 654 729 ! ... utau, vtau at U- and V_points, resp. 655 730 ! Note the use of 0.5*(2-umask) in order to unmask the stress along coastlines 656 ! Note th e use of MAX(tmask(i,j),tmask(i+1,j) is to mask tau over ice shelves657 DO_2D _10_10658 utau(ji,jj) = 0.5 * ( 2. - umask(ji,jj,1) ) * ( z wnd_i(ji,jj) + zwnd_i(ji+1,jj ) ) &659 & * MAX(tmask(ji,jj,1),tmask(ji+1,jj,1))660 vtau(ji,jj) = 0.5 * ( 2. - vmask(ji,jj,1) ) * ( z wnd_j(ji,jj) + zwnd_j(ji ,jj+1) ) &661 & * MAX(tmask(ji,jj,1),tmask(ji,jj+1,1))731 ! Note that coastal wind stress is not used in the code... so this extra care has no effect 732 DO_2D( 0, 0, 0, 0 ) ! start loop at 2, in case ln_crt_fbk = T 733 utau(ji,jj) = 0.5 * ( 2. - umask(ji,jj,1) ) * ( ztau_i(ji,jj) + ztau_i(ji+1,jj ) ) & 734 & * MAX(tmask(ji,jj,1),tmask(ji+1,jj,1)) 735 vtau(ji,jj) = 0.5 * ( 2. - vmask(ji,jj,1) ) * ( ztau_j(ji,jj) + ztau_j(ji ,jj+1) ) & 736 & * MAX(tmask(ji,jj,1),tmask(ji,jj+1,1)) 662 737 END_2D 663 CALL lbc_lnk_multi( 'sbcblk', utau, 'U', -1., vtau, 'V', -1. ) 738 739 IF( ln_crt_fbk ) THEN 740 CALL lbc_lnk_multi( 'sbcblk', utau, 'U', -1., vtau, 'V', -1., taum, 'T', -1. ) 741 ELSE 742 CALL lbc_lnk_multi( 'sbcblk', utau, 'U', -1., vtau, 'V', -1. ) 743 ENDIF 744 745 CALL iom_put( "taum_oce", taum ) ! output wind stress module 664 746 665 747 IF(sn_cfctl%l_prtctl) THEN … … 737 819 738 820 ! use scalar version of L_vap() for AGRIF compatibility 739 DO_2D _11_11821 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 740 822 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 741 823 END_2D … … 832 914 ! 833 915 INTEGER :: ji, jj ! dummy loop indices 834 REAL(wp) :: zwndi_t , zwndj_t ! relative wind components at T-point835 916 REAL(wp) :: zootm_su ! sea-ice surface mean temperature 836 917 REAL(wp) :: zztmp1, zztmp2 ! temporary arrays … … 843 924 ! ------------------------------------------------------------ ! 844 925 ! C-grid ice dynamics : U & V-points (same as ocean) 845 DO_2D_00_00 846 zwndi_t = ( pwndi(ji,jj) - rn_vfac * 0.5_wp * ( puice(ji-1,jj ) + puice(ji,jj) ) ) 847 zwndj_t = ( pwndj(ji,jj) - rn_vfac * 0.5_wp * ( pvice(ji ,jj-1) + pvice(ji,jj) ) ) 848 wndm_ice(ji,jj) = SQRT( zwndi_t * zwndi_t + zwndj_t * zwndj_t ) * tmask(ji,jj,1) 926 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 927 wndm_ice(ji,jj) = SQRT( pwndi(ji,jj) * pwndi(ji,jj) + pwndj(ji,jj) * pwndj(ji,jj) ) 849 928 END_2D 850 CALL lbc_lnk( 'sbcblk', wndm_ice, 'T', 1. )851 929 ! 852 930 ! Make ice-atm. drag dependent on ice concentration … … 859 937 Ce_ice(:,:) = Ch_ice(:,:) ! sensible and latent heat transfer coef. are considered identical 860 938 ENDIF 861 862 !! IF ( iom_use("Cd_ice") ) CALL iom_put("Cd_ice", Cd_ice) ! output value of pure ice-atm. transfer coef. 863 !! IF ( iom_use("Ch_ice") ) CALL iom_put("Ch_ice", Ch_ice) ! output value of pure ice-atm. transfer coef. 864 939 940 IF( iom_use('Cd_ice') ) CALL iom_put("Cd_ice", Cd_ice) 941 IF( iom_use('Ce_ice') ) CALL iom_put("Ce_ice", Ce_ice) 942 IF( iom_use('Ch_ice') ) CALL iom_put("Ch_ice", Ch_ice) 943 865 944 ! local scalars ( place there for vector optimisation purposes) 866 !IF (ln_abl) rhoa (:,:) = rho_air( ptair(:,:), phumi(:,:), pslp(:,:) ) !!GS: rhoa must be (re)computed here with ABL to avoid division by zero after (TBI)867 945 zcd_dui(:,:) = wndm_ice(:,:) * Cd_ice(:,:) 868 946 869 947 IF( ln_blk ) THEN 870 ! ------------------------------------------------------------ ! 871 ! Wind stress relative to the moving ice ( U10m - U_ice ) ! 872 ! ------------------------------------------------------------ ! 873 ! C-grid ice dynamics : U & V-points (same as ocean) 874 DO_2D_00_00 875 putaui(ji,jj) = 0.5_wp * ( rhoa(ji+1,jj) * zcd_dui(ji+1,jj) & 876 & + rhoa(ji ,jj) * zcd_dui(ji ,jj) ) & 877 & * ( 0.5_wp * ( pwndi(ji+1,jj) + pwndi(ji,jj) ) - rn_vfac * puice(ji,jj) ) 878 pvtaui(ji,jj) = 0.5_wp * ( rhoa(ji,jj+1) * zcd_dui(ji,jj+1) & 879 & + rhoa(ji,jj ) * zcd_dui(ji,jj ) ) & 880 & * ( 0.5_wp * ( pwndj(ji,jj+1) + pwndj(ji,jj) ) - rn_vfac * pvice(ji,jj) ) 948 ! ---------------------------------------------------- ! 949 ! Wind stress relative to nonmoving ice ( U10m ) ! 950 ! ---------------------------------------------------- ! 951 ! supress moving ice in wind stress computation as we don't know how to do it properly... 952 DO_2D( 0, 1, 0, 1 ) ! at T point 953 putaui(ji,jj) = rhoa(ji,jj) * zcd_dui(ji,jj) * pwndi(ji,jj) 954 pvtaui(ji,jj) = rhoa(ji,jj) * zcd_dui(ji,jj) * pwndj(ji,jj) 881 955 END_2D 882 CALL lbc_lnk_multi( 'sbcblk', putaui, 'U', -1., pvtaui, 'V', -1. ) 956 ! 957 DO_2D( 0, 0, 0, 0 ) ! U & V-points (same as ocean). 958 ! take care of the land-sea mask to avoid "pollution" of coastal stress. p[uv]taui used in frazil and rheology 959 zztmp1 = 0.5_wp * ( 2. - umask(ji,jj,1) ) * MAX( tmask(ji,jj,1),tmask(ji+1,jj ,1) ) 960 zztmp2 = 0.5_wp * ( 2. - vmask(ji,jj,1) ) * MAX( tmask(ji,jj,1),tmask(ji ,jj+1,1) ) 961 putaui(ji,jj) = zztmp1 * ( putaui(ji,jj) + putaui(ji+1,jj ) ) 962 pvtaui(ji,jj) = zztmp2 * ( pvtaui(ji,jj) + pvtaui(ji ,jj+1) ) 963 END_2D 964 CALL lbc_lnk_multi( 'sbcblk', putaui, 'U', -1._wp, pvtaui, 'V', -1._wp ) 883 965 ! 884 966 IF(sn_cfctl%l_prtctl) CALL prt_ctl( tab2d_1=putaui , clinfo1=' blk_ice: putaui : ' & 885 967 & , tab2d_2=pvtaui , clinfo2=' pvtaui : ' ) 886 ELSE 968 ELSE ! ln_abl 887 969 zztmp1 = 11637800.0_wp 888 970 zztmp2 = -5897.8_wp 889 DO_2D _11_11971 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 890 972 pcd_dui(ji,jj) = zcd_dui (ji,jj) 891 973 pseni (ji,jj) = wndm_ice(ji,jj) * Ch_ice(ji,jj) … … 928 1010 REAL(wp) :: zcoef_dqlw, zcoef_dqla ! - - 929 1011 REAL(wp) :: zztmp, zztmp2, z1_rLsub ! - - 930 REAL(wp) :: zfr1, zfr2 ! local variables931 1012 REAL(wp), DIMENSION(jpi,jpj,jpl) :: z1_st ! inverse of surface temperature 932 1013 REAL(wp), DIMENSION(jpi,jpj,jpl) :: z_qlw ! long wave heat flux over ice … … 937 1018 REAL(wp), DIMENSION(jpi,jpj) :: zqair ! specific humidity of air at z=rn_zqt [kg/kg] !LB 938 1019 REAL(wp), DIMENSION(jpi,jpj) :: ztmp, ztmp2 1020 REAL(wp), DIMENSION(jpi,jpj) :: ztri 939 1021 !!--------------------------------------------------------------------- 940 1022 ! … … 1021 1103 ! --- evaporation minus precipitation --- ! 1022 1104 zsnw(:,:) = 0._wp 1023 CALL ice_ thd_snwblow( (1.-at_i_b(:,:)), zsnw ) ! snow distribution over ice after wind blowing1105 CALL ice_var_snwblow( (1.-at_i_b(:,:)), zsnw ) ! snow distribution over ice after wind blowing 1024 1106 emp_oce(:,:) = ( 1._wp - at_i_b(:,:) ) * zevap(:,:) - ( tprecip(:,:) - sprecip(:,:) ) - sprecip(:,:) * (1._wp - zsnw ) 1025 1107 emp_ice(:,:) = SUM( a_i_b(:,:,:) * evap_ice(:,:,:), dim=3 ) - sprecip(:,:) * zsnw … … 1048 1130 END DO 1049 1131 1050 ! --- shortwave radiation transmitted below the surface (W/m2, see Grenfell Maykut 77) --- ! 1051 zfr1 = ( 0.18 * ( 1.0 - cldf_ice ) + 0.35 * cldf_ice ) ! transmission when hi>10cm 1052 zfr2 = ( 0.82 * ( 1.0 - cldf_ice ) + 0.65 * cldf_ice ) ! zfr2 such that zfr1 + zfr2 to equal 1 1053 ! 1054 WHERE ( phs(:,:,:) <= 0._wp .AND. phi(:,:,:) < 0.1_wp ) ! linear decrease from hi=0 to 10cm 1055 qtr_ice_top(:,:,:) = qsr_ice(:,:,:) * ( zfr1 + zfr2 * ( 1._wp - phi(:,:,:) * 10._wp ) ) 1056 ELSEWHERE( phs(:,:,:) <= 0._wp .AND. phi(:,:,:) >= 0.1_wp ) ! constant (zfr1) when hi>10cm 1057 qtr_ice_top(:,:,:) = qsr_ice(:,:,:) * zfr1 1058 ELSEWHERE ! zero when hs>0 1059 qtr_ice_top(:,:,:) = 0._wp 1060 END WHERE 1061 ! 1062 1132 ! --- shortwave radiation transmitted thru the surface scattering layer (W/m2) --- ! 1133 IF( nn_qtrice == 0 ) THEN 1134 ! formulation derived from Grenfell and Maykut (1977), where transmission rate 1135 ! 1) depends on cloudiness 1136 ! 2) is 0 when there is any snow 1137 ! 3) tends to 1 for thin ice 1138 ztri(:,:) = 0.18 * ( 1.0 - cloud_fra(:,:) ) + 0.35 * cloud_fra(:,:) ! surface transmission when hi>10cm 1139 DO jl = 1, jpl 1140 WHERE ( phs(:,:,jl) <= 0._wp .AND. phi(:,:,jl) < 0.1_wp ) ! linear decrease from hi=0 to 10cm 1141 qtr_ice_top(:,:,jl) = qsr_ice(:,:,jl) * ( ztri(:,:) + ( 1._wp - ztri(:,:) ) * ( 1._wp - phi(:,:,jl) * 10._wp ) ) 1142 ELSEWHERE( phs(:,:,jl) <= 0._wp .AND. phi(:,:,jl) >= 0.1_wp ) ! constant (ztri) when hi>10cm 1143 qtr_ice_top(:,:,jl) = qsr_ice(:,:,jl) * ztri(:,:) 1144 ELSEWHERE ! zero when hs>0 1145 qtr_ice_top(:,:,jl) = 0._wp 1146 END WHERE 1147 ENDDO 1148 ELSEIF( nn_qtrice == 1 ) THEN 1149 ! formulation is derived from the thesis of M. Lebrun (2019). 1150 ! It represents the best fit using several sets of observations 1151 ! It comes with snow conductivities adapted to freezing/melting conditions (see icethd_zdf_bl99.F90) 1152 qtr_ice_top(:,:,:) = 0.3_wp * qsr_ice(:,:,:) 1153 ENDIF 1154 ! 1063 1155 IF( iom_use('evap_ao_cea') .OR. iom_use('hflx_evap_cea') ) THEN 1064 1156 ztmp(:,:) = zevap(:,:) * ( 1._wp - at_i_b(:,:) ) … … 1142 1234 ! 1143 1235 DO jl = 1, jpl 1144 DO_2D _11_111236 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 1145 1237 zhe = ( rn_cnd_s * phi(ji,jj,jl) + rcnd_i * phs(ji,jj,jl) ) * zfac ! Effective thickness 1146 1238 IF( zhe >= zfac2 ) zgfac(ji,jj,jl) = MIN( 2._wp, 0.5_wp * ( 1._wp + LOG( zhe * zfac3 ) ) ) ! Enhanced conduction factor … … 1157 1249 ! 1158 1250 DO jl = 1, jpl 1159 DO_2D _11_111251 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 1160 1252 ! 1161 1253 zkeff_h = zfac * zgfac(ji,jj,jl) / & ! Effective conductivity of the snow-ice system divided by thickness … … 1305 1397 zqi_sat(:,:) = q_sat( ptm_su(:,:), pslp(:,:) ) ! saturation humidity over ice [kg/kg] 1306 1398 ! 1307 DO_2D _00_001399 DO_2D( 0, 0, 0, 0 ) 1308 1400 ! Virtual potential temperature [K] 1309 1401 zthetav_os = zst(ji,jj) * ( 1._wp + rctv0 * zqo_sat(ji,jj) ) ! over ocean … … 1348 1440 ! 1349 1441 END_2D 1350 CALL lbc_lnk_multi( 'sbcblk', pcd, 'T', 1. , pch, 'T', 1.)1442 CALL lbc_lnk_multi( 'sbcblk', pcd, 'T', 1.0_wp, pch, 'T', 1.0_wp ) 1351 1443 ! 1352 1444 END SUBROUTINE Cdn10_Lupkes2015
Note: See TracChangeset
for help on using the changeset viewer.