SCALE-RM
Data Types | Functions/Subroutines | Variables
scale_bulkflux Module Reference

module Surface bulk flux More...

Functions/Subroutines

subroutine, public bulkflux_setup (dx)
 
subroutine bulkflux_diagnose_scales_2d (IA, IS, IE, JA, JS, JE, SFLX_MW, SFLX_MU, SFLX_MV, SFLX_SH, SFLX_QV, SFC_DENS, SFC_TEMP, PBL, Ustar, Tstar, Qstar, Wstar, RLmo, mask)
 
subroutine bulkflux_diagnose_scales_0d (SFLX_MW, SFLX_MU, SFLX_MV, SFLX_SH, SFLX_QV, SFC_DENS, SFC_TEMP, PBL, Ustar, Tstar, Qstar, Wstar, RLmo)
 
subroutine bulkflux_diagnose_surface_2d (IA, IS, IE, JA, JS, JE, ATM_U, ATM_V, ATM_TEMP, ATM_QV, SFC_TEMP, SFC_QV, ATM_Z1, SFC_Z0M, SFC_Z0H, SFC_Z0E, U10, V10, T2, Q2, mask, FracU10, FracT2, FracQ2)
 
subroutine calc_scales_b91w01 (IL, Uabs, TH1, TH0, TV0, Q1, Q0, PBL, log_Z1ovZ0M, log_Z1ovZ0H, log_Z1ovZ0E, DP_Z1, DP_Z0M, DP_Z0H, DP_Z0E, RzM, RzH, RzE, Wstar, Ustar, Tstar, Qstar, BFLX, FracU10, FracT2, FracQ2)
 
real(dp) function fmm_unstable (Z, IL)
 

Variables

procedure(bc), pointer, public bulkflux => NULL()
 
character(len=h_short), public bulkflux_type = 'B91W01'
 

Detailed Description

module Surface bulk flux

Description
calculation of surface bulk flux
Author
Team SCALE
NAMELIST
  • PARAM_BULKFLUX
    nametypedefault valuecomment
    BULKFLUX_TYPE character(len=H_SHORT) 'B91W01' ! 'U95', 'B91', and 'B91W01'
    BULKFLUX_NK2018 logical .true. > Nishizawa and Kitamura (2018)
    BULKFLUX_ITR_SA_MAX integer 5 maximum iteration number for successive approximation
    BULKFLUX_ITR_NR_MAX integer 10 maximum iteration number for Newton-Raphson method
    BULKFLUX_WSCF real(RP) empirical scaling factor of Wstar (Beljaars 1994)
    BULKFLUX_UABS_MIN real(RP) 1.0E-2_RP minimum of Uabs [m/s]
    BULKFLUX_WSTAR_MIN real(RP) 1.0E-4_RP minimum of W* [m/s]
    BULKFLUX_SURFDIAG_NEUTRAL logical .true. calculate surface diagnoses with neutral condition

History Output
No history output

Function/Subroutine Documentation

◆ bulkflux_setup()

subroutine, public scale_bulkflux::bulkflux_setup ( real(rp), intent(in)  dx)

Definition at line 126 of file scale_bulkflux.F90.

126  use scale_prc, only: &
127  prc_abort
128  implicit none
129  real(RP), intent(in) :: dx
130 
131  namelist / param_bulkflux / &
132  bulkflux_type, &
133  bulkflux_nk2018, &
134  bulkflux_itr_sa_max, &
135  bulkflux_itr_nr_max, &
136  bulkflux_wscf, &
137  bulkflux_uabs_min, &
138  bulkflux_wstar_min, &
139  bulkflux_surfdiag_neutral
140 
141  integer :: ierr
142  !---------------------------------------------------------------------------
143 
144  log_newline
145  log_info("BULKFLUX_setup",*) 'Setup'
146 
147  ! WSCF = 1.2 for dx > 1 km (Beljaars 1994)
148  ! lim_{dx->0} WSCF = 0 for LES (Fig. 6 Kitamura and Ito 2016 BLM)
149  bulkflux_wscf = 1.2_rp * min(dx*1.e-3_rp, 1.0_rp)
150 
151 
152  !--- read namelist
153  rewind(io_fid_conf)
154  read(io_fid_conf,nml=param_bulkflux,iostat=ierr)
155 
156  if( ierr < 0 ) then !--- missing
157  log_info("BULKFLUX_setup",*) 'Not found namelist. Default used.'
158  elseif( ierr > 0 ) then !--- fatal error
159  log_error("BULKFLUX_setup",*) 'Not appropriate names in namelist PARAM_BULKFLUX. Check!'
160  call prc_abort
161  endif
162  log_nml(param_bulkflux)
163 
164  log_newline
165  log_info("BULKFLUX_setup",*) 'Scheme for surface bulk flux : ', trim(bulkflux_type)
166  select case(bulkflux_type)
167  case('U95')
168  log_info_cont(*) '=> Uno et al.(1995)'
169  bulkflux => bulkflux_u95
170  case('B91W01')
171  log_info_cont(*) '=> Beljaars and Holtslag (1991) and Wilson (2001)'
172  flag_w01 = .true.
173  bulkflux => bulkflux_b91w01
174  case('B91')
175  log_info_cont(*) '=> Beljaars and Holtslag (1991)'
176  flag_w01 = .false.
177  bulkflux => bulkflux_b91w01
178  case default
179  log_error("BULKFLUX_setup",*) 'Unsupported BULKFLUX_type. STOP'
180  call prc_abort
181  end select
182 
183  return

References bulkflux, bulkflux_type, scale_io::io_fid_conf, and scale_prc::prc_abort().

Referenced by mod_rm_driver::rm_driver().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bulkflux_diagnose_scales_2d()

subroutine scale_bulkflux::bulkflux_diagnose_scales_2d ( integer, intent(in)  IA,
integer, intent(in)  IS,
integer, intent(in)  IE,
integer, intent(in)  JA,
integer, intent(in)  JS,
integer, intent(in)  JE,
real(rp), dimension (ia,ja), intent(in)  SFLX_MW,
real(rp), dimension (ia,ja), intent(in)  SFLX_MU,
real(rp), dimension (ia,ja), intent(in)  SFLX_MV,
real(rp), dimension (ia,ja), intent(in)  SFLX_SH,
real(rp), dimension (ia,ja), intent(in)  SFLX_QV,
real(rp), dimension(ia,ja), intent(in)  SFC_DENS,
real(rp), dimension(ia,ja), intent(in)  SFC_TEMP,
real(rp), dimension (ia,ja), intent(in)  PBL,
real(rp), dimension(ia,ja), intent(out)  Ustar,
real(rp), dimension(ia,ja), intent(out)  Tstar,
real(rp), dimension(ia,ja), intent(out)  Qstar,
real(rp), dimension(ia,ja), intent(out)  Wstar,
real(rp), dimension (ia,ja), intent(out)  RLmo,
logical, dimension(ia,ja), intent(in), optional  mask 
)

Definition at line 197 of file scale_bulkflux.F90.

197  use scale_const, only: &
198  eps => const_eps, &
199  grav => const_grav, &
200  cpdry => const_cpdry, &
201  karman => const_karman, &
202  epstvap => const_epstvap
203  implicit none
204  integer, intent(in) :: IA, IS, IE
205  integer, intent(in) :: JA, JS, JE
206 
207  real(RP), intent(in) :: SFLX_MW (IA,JA)
208  real(RP), intent(in) :: SFLX_MU (IA,JA)
209  real(RP), intent(in) :: SFLX_MV (IA,JA)
210  real(RP), intent(in) :: SFLX_SH (IA,JA)
211  real(RP), intent(in) :: SFLX_QV (IA,JA)
212  real(RP), intent(in) :: SFC_DENS(IA,JA)
213  real(RP), intent(in) :: SFC_TEMP(IA,JA)
214  real(RP), intent(in) :: PBL (IA,JA)
215 
216  real(RP), intent(out) :: Ustar(IA,JA)
217  real(RP), intent(out) :: Tstar(IA,JA)
218  real(RP), intent(out) :: Qstar(IA,JA)
219  real(RP), intent(out) :: Wstar(IA,JA)
220  real(RP), intent(out) :: RLmo (IA,JA)
221 
222  logical, intent(in), optional :: mask(IA,JA)
223 
224  integer :: i, j
225 
226  if ( present(mask) ) then
227  !$omp parallel do
228  do j = js, je
229  do i = is, ie
230  if ( mask(i,j) ) then
231  call bulkflux_diagnose_scales_0d( sflx_mw(i,j), sflx_mu(i,j), sflx_mv(i,j), & ! (in)
232  sflx_sh(i,j), sflx_qv(i,j), & ! (in)
233  sfc_dens(i,j), sfc_temp(i,j), pbl(i,j), & ! (in)
234  ustar(i,j), tstar(i,j), qstar(i,j), & ! (out)
235  wstar(i,j), rlmo(i,j) ) ! (out)
236  end if
237  end do
238  end do
239  else
240  !$omp parallel do
241  do j = js, je
242  do i = is, ie
243  call bulkflux_diagnose_scales_0d( sflx_mw(i,j), sflx_mu(i,j), sflx_mv(i,j), & ! (in)
244  sflx_sh(i,j), sflx_qv(i,j), & ! (in)
245  sfc_dens(i,j), sfc_temp(i,j), pbl(i,j), & ! (in)
246  ustar(i,j), tstar(i,j), qstar(i,j), & ! (out)
247  wstar(i,j), rlmo(i,j) ) ! (out)
248  end do
249  end do
250  end if
251 
252  return

References bulkflux_diagnose_scales_0d(), scale_const::const_cpdry, scale_const::const_eps, scale_const::const_epstvap, scale_const::const_grav, and scale_const::const_karman.

Here is the call graph for this function:

◆ bulkflux_diagnose_scales_0d()

subroutine scale_bulkflux::bulkflux_diagnose_scales_0d ( real(rp), intent(in)  SFLX_MW,
real(rp), intent(in)  SFLX_MU,
real(rp), intent(in)  SFLX_MV,
real(rp), intent(in)  SFLX_SH,
real(rp), intent(in)  SFLX_QV,
real(rp), intent(in)  SFC_DENS,
real(rp), intent(in)  SFC_TEMP,
real(rp), intent(in)  PBL,
real(rp), intent(out)  Ustar,
real(rp), intent(out)  Tstar,
real(rp), intent(out)  Qstar,
real(rp), intent(out)  Wstar,
real(rp), intent(out)  RLmo 
)

Definition at line 261 of file scale_bulkflux.F90.

261  use scale_const, only: &
262  eps => const_eps, &
263  grav => const_grav, &
264  cpdry => const_cpdry, &
265  karman => const_karman, &
266  epstvap => const_epstvap
267  implicit none
268  real(RP), intent(in) :: SFLX_MW
269  real(RP), intent(in) :: SFLX_MU
270  real(RP), intent(in) :: SFLX_MV
271  real(RP), intent(in) :: SFLX_SH
272  real(RP), intent(in) :: SFLX_QV
273  real(RP), intent(in) :: SFC_DENS
274  real(RP), intent(in) :: SFC_TEMP
275  real(RP), intent(in) :: PBL
276 
277  real(RP), intent(out) :: Ustar
278  real(RP), intent(out) :: Tstar
279  real(RP), intent(out) :: Qstar
280  real(RP), intent(out) :: Wstar
281  real(RP), intent(out) :: RLmo
282 
283  real(RP) :: BFLX, tmp, sw
284  logical :: ws_flag
285  integer :: i, j
286 
287  ws_flag = ( bulkflux_type == 'B91W01' )
288 
289  ustar = sqrt( sqrt( sflx_mw**2 + sflx_mu**2 + sflx_mv**2 ) / sfc_dens )
290  sw = 0.5_rp - sign( 0.5_rp, ustar - eps )
291  tstar = - sflx_sh / ( sfc_dens * ustar * cpdry + sw ) * ( 1.0_rp - sw )
292  qstar = - sflx_qv / ( sfc_dens * ustar + sw ) * ( 1.0_rp - sw )
293  bflx = - ustar * tstar - epstvap * ustar * qstar * sfc_temp
294  rlmo = - karman * grav * bflx / ( ustar**3 * sfc_temp + sw ) * ( 1.0_rp - sw )
295  if ( ws_flag ) then
296  tmp = pbl * grav / sfc_temp * bflx
297  sw = 0.5_rp + sign( 0.5_rp, tmp ) ! if tmp is plus, sw = 1
298  wstar = ( tmp * sw )**( 1.0_rp / 3.0_rp )
299  else
300  wstar = 0.0_rp
301  end if
302 
303  return

References bulkflux_type, scale_const::const_cpdry, scale_const::const_eps, scale_const::const_epstvap, scale_const::const_grav, and scale_const::const_karman.

Referenced by bulkflux_diagnose_scales_2d().

Here is the caller graph for this function:

◆ bulkflux_diagnose_surface_2d()

subroutine scale_bulkflux::bulkflux_diagnose_surface_2d ( integer, intent(in)  IA,
integer, intent(in)  IS,
integer, intent(in)  IE,
integer, intent(in)  JA,
integer, intent(in)  JS,
integer, intent(in)  JE,
real(rp), dimension (ia,ja), intent(in)  ATM_U,
real(rp), dimension (ia,ja), intent(in)  ATM_V,
real(rp), dimension(ia,ja), intent(in)  ATM_TEMP,
real(rp), dimension (ia,ja), intent(in)  ATM_QV,
real(rp), dimension(ia,ja), intent(in)  SFC_TEMP,
real(rp), dimension (ia,ja), intent(in)  SFC_QV,
real(rp), dimension (ia,ja), intent(in)  ATM_Z1,
real(rp), dimension (ia,ja), intent(in)  SFC_Z0M,
real(rp), dimension (ia,ja), intent(in)  SFC_Z0H,
real(rp), dimension (ia,ja), intent(in)  SFC_Z0E,
real(rp), dimension(ia,ja), intent(out)  U10,
real(rp), dimension(ia,ja), intent(out)  V10,
real(rp), dimension (ia,ja), intent(out)  T2,
real(rp), dimension (ia,ja), intent(out)  Q2,
logical, dimension (ia,ja), intent(in), optional  mask,
real(rp), dimension(ia,ja), intent(in), optional  FracU10,
real(rp), dimension (ia,ja), intent(in), optional  FracT2,
real(rp), dimension (ia,ja), intent(in), optional  FracQ2 
)

Definition at line 319 of file scale_bulkflux.F90.

319  implicit none
320  integer, intent(in) :: IA, IS, IE
321  integer, intent(in) :: JA, JS, JE
322 
323  real(RP), intent(in) :: ATM_U (IA,JA)
324  real(RP), intent(in) :: ATM_V (IA,JA)
325  real(RP), intent(in) :: ATM_TEMP(IA,JA)
326  real(RP), intent(in) :: ATM_QV (IA,JA)
327  real(RP), intent(in) :: SFC_TEMP(IA,JA)
328  real(RP), intent(in) :: SFC_QV (IA,JA)
329  real(RP), intent(in) :: ATM_Z1 (IA,JA)
330  real(RP), intent(in) :: SFC_Z0M (IA,JA)
331  real(RP), intent(in) :: SFC_Z0H (IA,JA)
332  real(RP), intent(in) :: SFC_Z0E (IA,JA)
333 
334  real(RP), intent(out) :: U10(IA,JA)
335  real(RP), intent(out) :: V10(IA,JA)
336  real(RP), intent(out) :: T2 (IA,JA)
337  real(RP), intent(out) :: Q2 (IA,JA)
338 
339  logical, intent(in), optional :: mask (IA,JA)
340  real(RP), intent(in), optional :: FracU10(IA,JA)
341  real(RP), intent(in), optional :: FracT2 (IA,JA)
342  real(RP), intent(in), optional :: FracQ2 (IA,JA)
343 
344  integer :: i, j
345 
346  if ( present(fracu10) ) then
347  if ( present(mask) ) then
348  !$omp parallel do
349  do j = js, je
350  do i = is, ie
351  if ( mask(i,j) ) then
352  call bulkflux_diagnose_surface_0d( atm_u(i,j), atm_v(i,j), &
353  atm_temp(i,j), atm_qv(i,j), &
354  sfc_temp(i,j), sfc_qv(i,j), &
355  atm_z1(i,j), &
356  sfc_z0m(i,j), sfc_z0h(i,j), sfc_z0e(i,j), &
357  u10(i,j), v10(i,j), t2(i,j), q2(i,j), &
358  fracu10(i,j), fract2(i,j), fracq2(i,j) )
359  end if
360  end do
361  end do
362 
363  else
364  !$omp parallel do
365  do j = js, je
366  do i = is, ie
367  call bulkflux_diagnose_surface_0d( atm_u(i,j), atm_v(i,j), &
368  atm_temp(i,j), atm_qv(i,j), &
369  sfc_temp(i,j), sfc_qv(i,j), &
370  atm_z1(i,j), &
371  sfc_z0m(i,j), sfc_z0h(i,j), sfc_z0e(i,j), &
372  u10(i,j), v10(i,j), t2(i,j), q2(i,j), &
373  fracu10(i,j), fract2(i,j), fracq2(i,j) )
374  end do
375  end do
376  end if
377  else
378  if ( present(mask) ) then
379  !$omp parallel do
380  do j = js, je
381  do i = is, ie
382  if ( mask(i,j) ) then
383  call bulkflux_diagnose_surface_0d( atm_u(i,j), atm_v(i,j), &
384  atm_temp(i,j), atm_qv(i,j), &
385  sfc_temp(i,j), sfc_qv(i,j), &
386  atm_z1(i,j), &
387  sfc_z0m(i,j), sfc_z0h(i,j), sfc_z0e(i,j), &
388  u10(i,j), v10(i,j), t2(i,j), q2(i,j) )
389  end if
390  end do
391  end do
392 
393  else
394  !$omp parallel do
395  do j = js, je
396  do i = is, ie
397  call bulkflux_diagnose_surface_0d( atm_u(i,j), atm_v(i,j), &
398  atm_temp(i,j), atm_qv(i,j), &
399  sfc_temp(i,j), sfc_qv(i,j), &
400  atm_z1(i,j), &
401  sfc_z0m(i,j), sfc_z0h(i,j), sfc_z0e(i,j), &
402  u10(i,j), v10(i,j), t2(i,j), q2(i,j) )
403  end do
404  end do
405  end if
406  end if
407 
408  return

References calc_scales_b91w01(), scale_const::const_cpdry, scale_const::const_cpvap, scale_const::const_epstvap, scale_const::const_grav, scale_const::const_karman, scale_const::const_pre00, scale_const::const_rdry, and scale_const::const_rvap.

Here is the call graph for this function:

◆ calc_scales_b91w01()

subroutine scale_bulkflux::calc_scales_b91w01 ( real(dp), intent(in)  IL,
real(dp), intent(in)  Uabs,
real(dp), intent(in)  TH1,
real(dp), intent(in)  TH0,
real(dp), intent(in)  TV0,
real(rp), intent(in)  Q1,
real(rp), intent(in)  Q0,
real(rp), intent(in)  PBL,
real(dp), intent(in)  log_Z1ovZ0M,
real(dp), intent(in)  log_Z1ovZ0H,
real(dp), intent(in)  log_Z1ovZ0E,
real(dp), intent(in)  DP_Z1,
real(dp), intent(in)  DP_Z0M,
real(dp), intent(in)  DP_Z0H,
real(dp), intent(in)  DP_Z0E,
real(dp), intent(in)  RzM,
real(dp), intent(in)  RzH,
real(dp), intent(in)  RzE,
real(dp), intent(inout)  Wstar,
real(dp), intent(out)  Ustar,
real(dp), intent(out)  Tstar,
real(dp), intent(out)  Qstar,
real(dp), intent(out)  BFLX,
real(rp), intent(out), optional  FracU10,
real(rp), intent(out), optional  FracT2,
real(rp), intent(out), optional  FracQ2 
)

Definition at line 841 of file scale_bulkflux.F90.

841  use scale_const, only: &
842  grav => const_grav, &
843  karman => const_karman, &
844  epstvap => const_epstvap
845  implicit none
846  real(DP), intent(in) :: IL
847  real(DP), intent(in) :: Uabs
848  real(DP), intent(in) :: TH1
849  real(DP), intent(in) :: TH0
850  real(DP), intent(in) :: TV0
851  real(RP), intent(in) :: Q1
852  real(RP), intent(in) :: Q0
853  real(RP), intent(in) :: PBL
854  real(DP), intent(in) :: log_Z1ovZ0M
855  real(DP), intent(in) :: log_Z1ovZ0H
856  real(DP), intent(in) :: log_Z1ovZ0E
857  real(DP), intent(in) :: DP_Z1
858  real(DP), intent(in) :: DP_Z0M
859  real(DP), intent(in) :: DP_Z0H
860  real(DP), intent(in) :: DP_Z0E
861  real(DP), intent(in) :: RzM
862  real(DP), intent(in) :: RzH
863  real(DP), intent(in) :: RzE
864 
865  real(DP), intent(inout) :: Wstar
866 
867  real(DP), intent(out) :: Ustar
868  real(DP), intent(out) :: Tstar
869  real(DP), intent(out) :: Qstar
870  real(DP), intent(out) :: BFLX
871 
872  real(RP), intent(out), optional :: FracU10
873  real(RP), intent(out), optional :: FracT2
874  real(RP), intent(out), optional :: FracQ2
875 
876  real(DP) :: denoM, denoH, denoE
877 
878  real(DP) :: tmp, sw
879 
880  if ( il < 0.0_dp ) then ! unstable condition
881 
882  if ( bulkflux_nk2018 ) then
883  denom = log_z1ovz0m &
884  - fmm_unstable(dp_z1,il) + fmm_unstable(dp_z0m,il) * dp_z0m / dp_z1 &
885  + rzm * ( fm_unstable(dp_z0m,il) - 1.0_dp )
886  tmp = fhm_unstable(dp_z1,il)
887  denoh = log_z1ovz0h &
888  - tmp + fhm_unstable(dp_z0h,il) * dp_z0h / dp_z1 &
889  + rzh * ( fh_unstable(dp_z0h,il) - 1.0_dp )
890  denoe = log_z1ovz0e &
891  - tmp + fhm_unstable(dp_z0e,il) * dp_z0e / dp_z1 &
892  + rze * ( fh_unstable(dp_z0e,il) - 1.0_dp )
893  else
894  denom = log_z1ovz0m - fm_unstable(dp_z1,il) + fm_unstable(dp_z0m,il)
895  tmp = fh_unstable(dp_z1,il)
896  denoh = log_z1ovz0h - tmp + fh_unstable(dp_z0h,il)
897  denoe = log_z1ovz0e - tmp + fh_unstable(dp_z0e,il)
898  end if
899  ustar = karman / denom * sqrt( uabs**2 + (bulkflux_wscf*wstar)**2 )
900  tstar = karman / denoh * ( th1 - th0 )
901  qstar = karman / denoe * ( q1 - q0 )
902  if ( present(fracu10) ) then
903  fracu10 = ( log(10.0_dp/dp_z0m) - fm_unstable(10.0_dp,il) + fm_unstable(dp_z0m,il) ) / denom
904  tmp = fm_unstable(2.0_dp,il)
905  fract2 = ( log(2.0_dp/dp_z0h) - tmp + fh_unstable(dp_z0h,il) ) / denoh
906  fracq2 = ( log(2.0_dp/dp_z0e) - tmp + fh_unstable(dp_z0e,il) ) / denoe
907  end if
908 
909  else ! stable condition
910 
911  if ( bulkflux_nk2018 ) then
912  denom = log_z1ovz0m &
913  - fmm_stable(dp_z1,il) + fmm_stable(dp_z0m,il) * dp_z0m / dp_z1 &
914  + rzm * ( fm_stable(dp_z0m,il) - 1.0_dp )
915  tmp = fhm_stable(dp_z1,il)
916  denoh = log_z1ovz0h &
917  - tmp + fhm_stable(dp_z0h,il) * dp_z0h / dp_z1 &
918  + rzh * ( fh_stable(dp_z0h,il) - 1.0_dp )
919  denoe = log_z1ovz0e &
920  - tmp + fhm_stable(dp_z0e,il) * dp_z0e / dp_z1 &
921  + rze * ( fh_stable(dp_z0e,il) - 1.0_dp )
922  else
923  denom = log_z1ovz0m - fm_stable(dp_z1,il) + fm_stable(dp_z0m,il)
924  tmp = fh_stable(dp_z1,il)
925  denoh = log_z1ovz0h - tmp + fh_stable(dp_z0h,il)
926  denoe = log_z1ovz0e - tmp + fh_stable(dp_z0e,il)
927  end if
928  ustar = karman / denom * uabs
929  tstar = karman / denoh * ( th1 - th0 )
930  qstar = karman / denoe * ( q1 - q0 )
931  if ( present(fracu10) ) then
932  fracu10 = ( log(10.0_dp/dp_z0m) - fm_stable(10.0_dp,il) + fm_stable(dp_z0m,il) ) / denom
933  tmp = fh_stable(2.0_dp,il)
934  fract2 = ( log(2.0_dp/dp_z0h) - tmp + fh_stable(dp_z0h,il) ) / denoh
935  fracq2 = ( log(2.0_dp/dp_z0e) - tmp + fh_stable(dp_z0e,il) ) / denoe
936  end if
937 
938  end if
939 
940  ! estimate buoyancy flux
941  bflx = - ustar * tstar - epstvap * ustar * qstar * tv0
942 
943  ! update free convection velocity scale
944  tmp = pbl * grav / tv0 * bflx
945  sw = 0.5_dp + sign( 0.5_dp, tmp ) ! if tmp is plus, sw = 1
946  wstar = ( tmp * sw )**( 1.0_dp / 3.0_dp )
947 
948  ! avoid zero division with UstarC = 0
949  ustar = sign( max( abs(ustar), eps ), ustar )
950 
951  return

References scale_const::const_epstvap, scale_const::const_grav, scale_const::const_karman, scale_const::const_pi, and fmm_unstable().

Referenced by bulkflux_diagnose_surface_2d().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fmm_unstable()

real(dp) function scale_bulkflux::fmm_unstable ( real(dp), intent(in)  Z,
real(dp), intent(in)  IL 
)

Definition at line 990 of file scale_bulkflux.F90.

990  use scale_const, only: &
991  pi => const_pi
992  implicit none
993 
994  ! argument
995  real(DP), intent(in) :: Z
996  real(DP), intent(in) :: IL
997 
998  ! function
999  real(DP) :: fmm_unstable
1000 
1001  ! Wilson (2001)
1002  real(DP), parameter :: gamma = 3.6_dp
1003 
1004  ! works
1005  real(DP) :: R
1006  real(DP) :: f, r3
1007  real(DP) :: r4R, r2R
1008  !---------------------------------------------------------------------------
1009 
1010  r = min( z * il, 0.0_dp )
1011 
1012  if ( flag_w01 ) then
1013  ! Wilson (2001)
1014  r3 = (-r)**(1.0_dp/3.0_dp)
1015  if ( r > -eps ) then
1016  fmm_unstable = 9.0_dp / 20.0_dp * gamma * r3**2
1017  else
1018  f = sqrt( 1.0_dp + gamma * r3**2 )
1019  fmm_unstable = 3.0_dp * log( ( 1.0_dp + f ) * 0.5_dp ) &
1020  + 1.5_dp / ( sqrt(gamma)**3 * r) * asinh( sqrt(gamma) * r3 ) &
1021  + 1.5_dp * f / ( gamma * r3**2 ) &
1022  - 1.0_dp
1023  end if
1024  else
1025  ! Beljaars and Holtslag (1991), originally Paulson (1974) and Dyer (1974)
1026  if ( r > -eps ) then ! |R|<EPS, now R < 0
1027  fmm_unstable = - 2.0_dp * r
1028  else
1029  r2r = sqrt( 1.0_dp - 16.0_dp * r )
1030  r4r = sqrt( r2r )
1031  fmm_unstable = log( ( 1.0_dp + r4r )**2 * ( 1.0_dp + r2r ) * 0.125_dp ) &
1032  - 2.0_dp * atan( r4r ) &
1033  + ( 1.0_dp - r4r*r2r ) / ( 12.0_dp * r ) &
1034  + pi * 0.5_dp - 1.0_dp
1035  end if
1036  end if
1037 
1038  return

References scale_const::const_pi.

Referenced by calc_scales_b91w01().

Here is the caller graph for this function:

Variable Documentation

◆ bulkflux

procedure(bc), pointer, public scale_bulkflux::bulkflux => NULL()

◆ bulkflux_type

character(len=h_short), public scale_bulkflux::bulkflux_type = 'B91W01'

Definition at line 85 of file scale_bulkflux.F90.

85  character(len=H_SHORT), public :: BULKFLUX_type = 'B91W01' ! 'U95', 'B91', and 'B91W01'

Referenced by mod_atmos_phy_bl_driver::atmos_phy_bl_driver_calc_tendency(), mod_atmos_phy_bl_driver::atmos_phy_bl_driver_setup(), bulkflux_diagnose_scales_0d(), and bulkflux_setup().

scale_const::const_grav
real(rp), public const_grav
standard acceleration of gravity [m/s2]
Definition: scale_const.F90:46
scale_prc::prc_abort
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:342
scale_const::const_epstvap
real(rp), public const_epstvap
1 / epsilon - 1
Definition: scale_const.F90:70
scale_const::const_eps
real(rp), public const_eps
small number
Definition: scale_const.F90:33
scale_prc
module PROCESS
Definition: scale_prc.F90:11
scale_const::const_pi
real(rp), public const_pi
pi
Definition: scale_const.F90:31
scale_const
module CONSTANT
Definition: scale_const.F90:11
scale_const::const_cpdry
real(rp), public const_cpdry
specific heat (dry air,constant pressure) [J/kg/K]
Definition: scale_const.F90:56
scale_const::const_karman
real(rp), parameter, public const_karman
von Karman constant
Definition: scale_const.F90:50
scale_bulkflux::bulkflux
procedure(bc), pointer, public bulkflux
Definition: scale_bulkflux.F90:78