138 REAL ,
PARAMETER :: &
142 REAL ,
PARAMETER :: &
146 REAL ,
PARAMETER :: &
157 REAL ,
PARAMETER :: &
162 REAL ,
PARAMETER :: &
177 REAL,
PARAMETER,
PRIVATE ::
z_=-huge(0.0)
185 REAL ,
PARAMETER :: &
193 REAL ,
PARAMETER :: &
263 REAL ,
INTENT(IN) :: &
278 REAL ,
PARAMETER :: &
279 c_lmMGO_1 = 43.057924 , &
282 INTEGER ,
PARAMETER :: &
284 REAL ,
PARAMETER,
DIMENSION (nband_coef) :: &
285 corr_cl_tot = (/0.70, 0.45, 0.32, &
286 0.23, 0.18, 0.13/) , &
287 corr_cl_low = (/0.76, 0.49, 0.35, &
288 0.26, 0.20, 0.15/) , &
289 corr_cl_midhigh = (/0.46, 0.30, 0.21, &
291 REAL ,
PARAMETER :: &
297 REAL ,
PARAMETER :: &
298 c_watvap_corr_min = 0.6100 , &
299 c_watvap_corr_max = 0.7320 , &
300 c_watvap_corr_e = 0.0050
310 c_cl_midhigh_corr , &
314 REAL(KIND=JPRB) :: ZHOOK_HANDLE
321 IF (
lhook)
CALL dr_hook(
'SFCFLX:SFCFLX_LWRADATM',0,zhook_handle)
322 f_wvpres_corr = c_watvap_corr_min + c_watvap_corr_e*sqrt(e_a)
323 f_wvpres_corr = min(f_wvpres_corr, c_watvap_corr_max)
326 IF(t_a.LT.t_low)
THEN 327 c_cl_tot_corr = corr_cl_tot(1)
328 c_cl_low_corr = corr_cl_low(1)
329 c_cl_midhigh_corr = corr_cl_midhigh(1)
330 ELSE IF(t_a.GE.t_low+(nband_coef-1)*del_t)
THEN 331 c_cl_tot_corr = corr_cl_tot(nband_coef)
332 c_cl_low_corr = corr_cl_low(nband_coef)
333 c_cl_midhigh_corr = corr_cl_midhigh(nband_coef)
337 IF(t_a.GE.t_corr.AND.t_a.LT.t_corr+del_t)
THEN 338 c_cl_tot_corr = (t_a-t_corr)/del_t
339 c_cl_low_corr = corr_cl_low(i) + (corr_cl_low(i+1)-corr_cl_low(i))*c_cl_tot_corr
340 c_cl_midhigh_corr = corr_cl_midhigh(i) + (corr_cl_midhigh(i+1)-corr_cl_midhigh(i))*c_cl_tot_corr
341 c_cl_tot_corr = corr_cl_tot(i) + (corr_cl_tot(i+1)-corr_cl_tot(i))*c_cl_tot_corr
343 t_corr = t_corr + del_t
347 IF(cl_low.LT.0.)
THEN 348 f_cloud_corr = 1. + c_cl_tot_corr*cl_tot*cl_tot
350 f_cloud_corr = (1. + c_cl_low_corr*cl_low*cl_low) &
351 * (1. + c_cl_midhigh_corr*(cl_tot*cl_tot-cl_low*cl_low))
365 * f_wvpres_corr*f_cloud_corr
366 IF (
lhook)
CALL dr_hook(
'SFCFLX:SFCFLX_LWRADATM',1,zhook_handle)
429 REAL ,
INTENT(IN) :: &
436 REAL(KIND=JPRB) :: ZHOOK_HANDLE
444 IF (
lhook)
CALL dr_hook(
'SFCFLX:SFCFLX_LWRADWSFC',0,zhook_handle)
446 IF (
lhook)
CALL dr_hook(
'SFCFLX:SFCFLX_LWRADWSFC',1,zhook_handle)
462 U_a, T_a, q_a, T_s, P_a, h_ice, &
463 Q_momentum, Q_sensible, Q_latent, Q_watvap,&
464 Ri, z0u_ini, z0t_ini, Qsat_out, &
465 Q_latenti, Q_sublim )
525 REAL ,
INTENT(IN) :: &
543 REAL ,
INTENT(INOUT) :: &
545 REAL ,
INTENT(OUT) :: &
556 INTEGER ,
PARAMETER :: &
608 REAL(KIND=JPRB) :: ZHOOK_HANDLE
621 IF (
lhook)
CALL dr_hook(
'SFCFLX:SFCFLX_MOMSENLAT',0,zhook_handle)
638 IF(par_conv_visc.GT.0.)
THEN 642 q_sen_con = q_sen_con*(t_s-t_a)
644 q_lat_con = q_lat_con*(q_s-q_a)
646 l_conv_visc = .false.
656 r_z = height_tq/height_u
681 DO WHILE (delta.GT.
c_accur_sf.AND.n_iter.LT.n_iter_max)
682 fun = u_star_previter**2*(
c_mo_u_conv*u_star_previter-1.) &
686 zol = u_star_previter - fun/fun_prime
687 delta = abs(zol-u_star_previter)/max(
c_accur_sf, abs(zol+u_star_previter))
688 u_star_previter = zol
701 u_star_st = u_star_thresh
708 psi_u = 2.*(atan(psi_t)-atan(psi_q)) &
709 + 2.*log((1.+psi_q)/(1.+psi_t)) &
710 + log((1.+psi_q*psi_q)/(1.+psi_t*psi_t))
719 u_star_previter = max( sqrt( - q_momentum / rho_a ) , u_star_thresh )
722 IF(u_a.LE.u_a_thresh)
THEN 723 DO WHILE (delta.GT.
c_accur_sf.AND.n_iter.LT.n_iter_max)
724 CALL sfcflx_roughness (fetch, u_a, min(u_star_thresh, u_star_previter), h_ice, &
728 fun = log(height_u/
z0u_sf) + psi_u
730 fun = fun*u_star_previter/
c_karman - u_a
734 psi_u = 2.*(atan(psi_t)-atan(psi_q)) &
735 + 2.*log((1.+psi_q)/(1.+psi_t)) &
736 + log((1.+psi_q*psi_q)/(1.+psi_t*psi_t))
737 fun = log(height_u/
z0u_sf) + psi_u
738 fun_prime = (fun + 1./psi_q)/
c_karman 739 fun = fun*u_star_previter/
c_karman - u_a
741 u_star_st = u_star_previter - fun/fun_prime
742 delta = abs((u_star_st-u_star_previter)/(u_star_st+u_star_previter))
743 u_star_previter = u_star_st
748 CALL sfcflx_roughness (fetch, u_a, max(u_star_thresh, u_star_previter), h_ice, &
752 fun = log(height_u/
z0u_sf) + psi_u
754 fun = fun*u_star_previter/
c_karman - u_a
758 psi_u = 2.*(atan(psi_t)-atan(psi_q)) &
759 + 2.*log((1.+psi_q)/(1.+psi_t)) &
760 + log((1.+psi_q*psi_q)/(1.+psi_t*psi_t))
761 fun = log(height_u/
z0u_sf) + psi_u
762 fun_prime = (fun - 2./psi_q)/
c_karman 763 fun = fun*u_star_previter/
c_karman - u_a
765 IF(h_ice.GE.h_ice_min_flk)
THEN 767 u_star_previter = u_star_st
769 u_star_st = u_star_previter - fun/fun_prime
771 delta = abs((u_star_st-u_star_previter)/(u_star_st+u_star_previter))
772 u_star_previter = u_star_st
783 u_star_st = max( sqrt( - q_momentum / rho_a ) ,
u_star_min_sf )
802 q_mom_tur = -u_star_st*u_star_st
816 psi_t = 2.*log((1.+psi_t)/(1.+psi_u))
819 psi_q = 2.*log((1.+psi_q)/(1.+psi_u))
836 q_momentum = min(q_mom_tur, q_mom_mol, q_mom_con)
838 IF(abs(q_sen_tur).GE.abs(q_sen_con))
THEN 839 q_sensible = q_sen_tur
841 q_sensible = q_sen_con
843 IF(abs(q_sensible).LT.abs(q_sen_mol))
THEN 844 q_sensible = q_sen_mol
846 IF(abs(q_lat_tur).GE.abs(q_lat_con))
THEN 851 IF(abs(q_latent).LT.abs(q_lat_mol))
THEN 855 IF(abs(q_sen_tur).GE.abs(q_sen_mol))
THEN 856 q_sensible = q_sen_tur
858 q_sensible = q_sen_mol
860 IF(abs(q_lat_tur).GE.abs(q_lat_mol))
THEN 871 q_momentum = q_momentum*rho_a
873 q_watvap = q_latent*rho_a
875 IF(h_ice.GE.h_ice_min_flk)
THEN 887 IF (
lhook)
CALL dr_hook(
'SFCFLX:SFCFLX_MOMSENLAT',1,zhook_handle)
952 REAL ,
INTENT(IN) :: &
960 REAL(KIND=JPRB) :: ZHOOK_HANDLE
968 IF (
lhook)
CALL dr_hook(
'SFCFLX:SFCFLX_RHOAIR',0,zhook_handle)
970 IF (
lhook)
CALL dr_hook(
'SFCFLX:SFCFLX_RHOAIR',1,zhook_handle)
986 c_z0u_fetch, u_star_thresh, z0u, z0t, z0q)
1046 REAL ,
INTENT(IN) :: &
1053 REAL ,
INTENT(OUT) :: &
1064 REAL(KIND=JPRB) :: ZHOOK_HANDLE
1070 IF (
lhook)
CALL dr_hook(
'SFCFLX:SFCFLX_ROUGHNESS',0,zhook_handle)
1071 water_or_ice:
IF(h_ice.LT.h_ice_min_flk)
THEN 1086 IF(re_s.LE.re_s_thresh)
THEN 1089 z0u = c_z0u_fetch*u_star*u_star/
tpl_grav 1092 z0q = c_z0u_fetch*max(re_s, re_s_thresh)
1126 IF (
lhook)
CALL dr_hook(
'SFCFLX:SFCFLX_ROUGHNESS',1,zhook_handle)
1193 REAL ,
INTENT(IN) :: &
1202 REAL ,
PARAMETER :: &
1205 b2w_vap = 17.2693882 , &
1206 b2i_vap = 21.8745584 , &
1209 REAL(KIND=JPRB) :: ZHOOK_HANDLE
1217 IF (
lhook)
CALL dr_hook(
'SFCFLX:SFCFLX_SATWVPRES',0,zhook_handle)
1218 IF(h_ice.LT.h_ice_min_flk)
THEN 1219 sfcflx_satwvpres = b1_vap*exp(b2w_vap*(t-b3_vap)/(t-b4w_vap))
1221 sfcflx_satwvpres = b1_vap*exp(b2i_vap*(t-b3_vap)/(t-b4i_vap))
1223 IF (
lhook)
CALL dr_hook(
'SFCFLX:SFCFLX_SATWVPRES',1,zhook_handle)
1286 REAL ,
INTENT(IN) :: &
1293 REAL(KIND=JPRB) :: ZHOOK_HANDLE
1301 IF (
lhook)
CALL dr_hook(
'SFCFLX:SFCFLX_SPECHUM',0,zhook_handle)
1303 IF (
lhook)
CALL dr_hook(
'SFCFLX:SFCFLX_SPECHUM',1,zhook_handle)
1367 REAL ,
INTENT(IN) :: &
1375 sfcflx_wvpreswetbulb
1376 REAL(KIND=JPRB) :: ZHOOK_HANDLE
1384 IF (
lhook)
CALL dr_hook(
'SFCFLX:SFCFLX_WVPRESWETBULB',0,zhook_handle)
1385 sfcflx_wvpreswetbulb = satwvpres_bulb &
1387 IF (
lhook)
CALL dr_hook(
'SFCFLX:SFCFLX_WVPRESWETBULB',1,zhook_handle)
real, parameter c_z0q_rough_2
real, parameter c_mo_t_stab
real, parameter c_mo_q_exp
real, parameter tpsf_rd_o_rv
real, parameter z0u_ice_rough
real, parameter tpsf_alpha_q
real, parameter tpsf_r_watvap
real, parameter num_1o3_sf
real, parameter c_mo_u_conv
real, parameter c_z0u_rough
real, parameter c_z0u_smooth
real, parameter tpsf_nu_u_a
real, parameter c_z0q_ice_b0r
real, parameter c_z0q_rough_1
real, parameter c_z0u_rough_l
subroutine sfcflx_roughness(fetch, U_a, u_star, h_ice, c_z0u_fetch, u_star_thresh, z0u, z0t, z0q)
real function sfcflx_lwradatm(T_a, e_a, cl_tot, cl_low)
real, parameter c_z0t_rough_1
real, parameter sc_neutral
real, parameter u_star_min_sf
real, parameter c_z0u_ftch_ex
real, parameter pr_neutral
real, parameter c_z0t_ice_b1t
real function sfcflx_satwvpres(T, h_ice)
real, parameter c_mo_u_stab
real, parameter c_z0q_ice_b0s
real, parameter c_z0q_rough_3
real, parameter tpsf_c_a_p
real, parameter c_lwrad_emis
real, parameter c_mo_t_exp
real, parameter c_z0t_ice_b0r
real, parameter c_z0u_ftch_f
real, parameter c_z0q_ice_b2r
real, parameter re_z0u_thresh
real, parameter c_accur_sf
real, parameter c_free_conv
real, parameter c_z0q_ice_b1t
real function sfcflx_lwradwsfc(emis, pts)
real, parameter c_z0t_ice_b0t
real, parameter c_z0t_rough_2
real, parameter c_z0t_ice_b0s
real, parameter c_z0q_ice_b0t
real, parameter tpsf_c_stefboltz
real function sfcflx_spechum(wvpres, P)
real, parameter z0t_min_sf
real, parameter u_wind_min_sf
real, parameter c_mo_u_exp
real, parameter tpsf_r_dryair
real, parameter c_mo_q_stab
real, parameter c_mo_q_conv
real, parameter c_z0t_rough_3
real, parameter c_mo_t_conv
real function sfcflx_rhoair(T, q, P)
real, parameter tpsf_kappa_t_a
real, parameter c_z0t_ice_b1r
real, parameter re_z0s_ice_t
real, parameter c_z0t_ice_b2r
real, parameter c_small_sf
real, parameter c_z0q_ice_b1r
real, parameter tpsf_l_evap
real, parameter tpsf_kappa_q_a
real function sfcflx_wvpreswetbulb(T_dry, T_wetbulb, satwvpres_bulb, P)
real, parameter, private z_
subroutine sfcflx_momsenlat(height_u, height_tq, fetch, U_a, T_a, q_a, T_s, P_a, h_ice, Q_momentum, Q_sensible, Q_latent, Q_watvap, Ri, z0u_ini, z0t_ini, Qsat_out, Q_latenti, Q_sublim)