FE-Project
Loading...
Searching...
No Matches
scale_atm_phy_sf_bulk_simple.F90
Go to the documentation of this file.
1!-------------------------------------------------------------------------------
2!> module atmosphere / physics / surface / simple
3!!
4!! @par Description
5!! Flux from/to bottom wall of atmosphere (surface)
6!! Constant bulk coefficient
7!!
8!! @author Team SCALE
9!!
10!<
11!-------------------------------------------------------------------------------
12#include "scaleFElib.h"
14 !-----------------------------------------------------------------------------
15 !
16 !++ Used modules
17 !
18 use scale_precision
19 use scale_io
20 use scale_prc
21 use scale_prof
22 use scale_const, only: &
23 undef => const_undef8, &
24 grav => const_grav, &
25 pres00 => const_pre00, &
26 cpdry => const_cpdry, &
27 epsvap => const_epsvap
28
29 !-----------------------------------------------------------------------------
30 implicit none
31 private
32 !-----------------------------------------------------------------------------
33 !
34 !++ Public procedure
35 !
38
39 !-----------------------------------------------------------------------------
40 !
41 !++ Public parameters & variables
42 !
43 !-----------------------------------------------------------------------------
44 !
45 !++ Private procedure
46 !
47 !-----------------------------------------------------------------------------
48 !
49 !++ Private parameters & variables
50 !
51 real(RP), private, parameter :: ATMOS_PHY_SF_U_maxM = 100.0_rp !> maximum limit of absolute velocity for momentum [m/s]
52 real(RP), private :: ATMOS_PHY_SF_U_minM = 0.0_rp !> minimum limit of absolute velocity for momentum [m/s]
53
54 real(RP), private :: ATMOS_PHY_SF_Const_Cm = 0.0011_rp !> constant bulk coefficient for momentum [NIL]
55 real(RP), private :: ATMOS_PHY_SF_Const_Ch = 0.0044_rp !> constant bulk coefficient for heat [NIL]
56 real(RP), private :: ATMOS_PHY_SF_Const_Ce = 0.0044_rp !> constant bulk coefficient for evaporation [NIL]
57
58 real(RP), private :: ATMOS_PHY_SF_BULK_beta = 1.0_rp !> evaporation efficiency (0-1)
59
60 !-----------------------------------------------------------------------------
61 contains
62 !-----------------------------------------------------------------------------
63 !> Setup
65 use scale_prc, only: &
66 prc_abort
67 implicit none
68
69 namelist / param_atmos_phy_sf_simple / &
70 atmos_phy_sf_u_minm, &
71 atmos_phy_sf_const_cm, &
72 atmos_phy_sf_const_ch, &
73 atmos_phy_sf_const_ce, &
74 atmos_phy_sf_bulk_beta
75
76 integer :: ierr
77 !---------------------------------------------------------------------------
78
79 log_newline
80 log_info("ATMOS_PHY_SF_simple_setup",*) 'Setup'
81 log_info("ATMOS_PHY_SF_simple_setup",*) 'Simple flux'
82
83 !--- read namelist
84 rewind(io_fid_conf)
85 read(io_fid_conf,nml=param_atmos_phy_sf_simple,iostat=ierr)
86 if( ierr < 0 ) then !--- missing
87 log_info("ATMOS_PHY_SF_simple_setup",*) 'Not found namelist. Default used.'
88 elseif( ierr > 0 ) then !--- fatal error
89 log_error("ATMOS_PHY_SF_simple_setup",*) 'Not appropriate names in namelist PARAM_ATMOS_PHY_SF_SIMPLE. Check!'
90 call prc_abort
91 endif
92 log_nml(param_atmos_phy_sf_simple)
93
94 return
95 end subroutine atmos_phy_sf_simple_setup
96
97 !-----------------------------------------------------------------------------
98 !> Calculate surface fluxes with constant bulk coefficients
99 !!
101 IA, IS, IE, JA, JS, JE, &
102 ATM_W, ATM_U, ATM_V, ATM_TEMP, ATM_PRES, ATM_QV, &
103 SFC_DENS, SFC_TEMP, SFC_PRES, &
104 ATM_Z1, &
105 SFLX_MW, SFLX_MU, SFLX_MV, SFLX_SH, SFLX_LH, &
106 SFLX_QV, &
107 U10, V10 )
108 use scale_const, only: &
109 pi => const_pi
110 use scale_atmos_hydrometeor, only: &
111 hydrometeor_lhv => atmos_hydrometeor_lhv
112 use scale_atmos_saturation, only: &
113 saturation_psat_all => atmos_saturation_psat_all
114 use scale_time, only: &
115 time_nowsec
116 implicit none
117 integer, intent(in) :: ia, is, ie
118 integer, intent(in) :: ja, js, je
119
120 real(rp), intent(in) :: atm_w (ia,ja) !< velocity w at the lowermost layer (cell center) [m/s]
121 real(rp), intent(in) :: atm_u (ia,ja) !< velocity u at the lowermost layer (cell center) [m/s]
122 real(rp), intent(in) :: atm_v (ia,ja) !< velocity v at the lowermost layer (cell center) [m/s]
123 real(rp), intent(in) :: atm_temp(ia,ja) !< temperature at the lowermost layer (cell center) [K]
124 real(rp), intent(in) :: atm_pres(ia,ja) !< pressure at the lowermost layer (cell center) [Pa]
125 real(rp), intent(in) :: atm_qv (ia,ja) !< qv at the lowermost layer (cell center) [kg/kg]
126 real(rp), intent(in) :: sfc_dens(ia,ja) !< density at the surface atmosphere [kg/m3]
127 real(rp), intent(in) :: sfc_temp(ia,ja) !< temperature at the surface atmosphere [K]
128 real(rp), intent(in) :: sfc_pres(ia,ja) !< pressure at the surface atmosphere [Pa]
129 real(rp), intent(in) :: atm_z1 (ia,ja) !< height of the lowermost grid from surface (cell center) [m]
130
131 real(rp), intent(out) :: sflx_mw(ia,ja) !< surface flux for z-momentum (area center) [m/s*kg/m2/s]
132 real(rp), intent(out) :: sflx_mu(ia,ja) !< surface flux for x-momentum (area center) [m/s*kg/m2/s]
133 real(rp), intent(out) :: sflx_mv(ia,ja) !< surface flux for y-momentum (area center) [m/s*kg/m2/s]
134 real(rp), intent(out) :: sflx_sh(ia,ja) !< surface flux for sensible heat (area center) [J/m2/s]
135 real(rp), intent(out) :: sflx_lh(ia,ja) !< surface flux for latent heat (area center) [J/m2/s]
136 real(rp), intent(out) :: sflx_qv(ia,ja) !< surface flux for qv (area center) [kg/m2/s]
137 real(rp), intent(out) :: u10 (ia,ja) !< velocity u at 10m height
138 real(rp), intent(out) :: v10 (ia,ja) !< velocity v at 10m height
139
140 real(rp) :: atm_uabs(ia,ja) ! absolute velocity at z1 [m/s]
141 real(rp) :: r10
142
143 real(rp) :: sfc_psat (ia,ja) ! saturated water vapor pressure [Pa]
144 real(rp) :: lhv(ia,ja)
145
146 real(rp) :: sfc_qsat ! saturated water vapor mixing ratio [kg/kg]
147 real(rp) :: sfc_qv(ia,ja) ! water vapor mixing ratio [kg/kg]
148
149 integer :: i, j
150 !---------------------------------------------------------------------------
151
152 log_progress(*) 'atmosphere / physics / surface flux / simple'
153
154 !$omp parallel do
155 do j = js, je
156 do i = is, ie
157 atm_uabs(i,j) = min( atmos_phy_sf_u_maxm, max( atmos_phy_sf_u_minm, &
158 sqrt( atm_w(i,j)**2 + atm_u(i,j)**2 + atm_v(i,j)**2 ) ) ) ! at cell center
159 enddo
160 enddo
161
162 !-----< momentum >-----
163
164 !$omp parallel do
165 do j = js, je
166 do i = is, ie
167 sflx_mw(i,j) = - atmos_phy_sf_const_cm * atm_uabs(i,j) * sfc_dens(i,j) * atm_w(i,j)
168 sflx_mu(i,j) = - atmos_phy_sf_const_cm * atm_uabs(i,j) * sfc_dens(i,j) * atm_u(i,j)
169 sflx_mv(i,j) = - atmos_phy_sf_const_cm * atm_uabs(i,j) * sfc_dens(i,j) * atm_v(i,j)
170 enddo
171 enddo
172
173 !-----< heat & mass flux >-----
174 call saturation_psat_all( ia, is, ie, ja, js, je, &
175 sfc_temp(:,:), & ! [IN]
176 sfc_psat(:,:) ) ! [OUT]
177
178 call hydrometeor_lhv( &
179 ia, is, ie, ja, js, je, &
180 sfc_temp(:,:), & ! [IN]
181 lhv(:,:) ) ! [OUT]
182
183 !$omp parallel do private( SFC_QSAT )
184 do j = js, je
185 do i = is, ie
186 sfc_qsat = epsvap * sfc_psat(i,j) / ( sfc_pres(i,j) - ( 1.0_rp-epsvap ) * sfc_psat(i,j) )
187 sfc_qv(i,j) = ( 1.0_rp - atmos_phy_sf_bulk_beta ) * atm_qv(i,j) + atmos_phy_sf_bulk_beta * sfc_qsat
188
189 sflx_sh(i,j) = atmos_phy_sf_const_ch * atm_uabs(i,j) * sfc_dens(i,j) * cpdry * ( sfc_temp(i,j) - atm_temp(i,j) )
190 sflx_lh(i,j) = atmos_phy_sf_const_ce * atm_uabs(i,j) * sfc_dens(i,j) * lhv(i,j) * ( sfc_qv(i,j) - atm_qv(i,j) )
191
192 sflx_qv(i,j) = sflx_lh(i,j) / lhv(i,j)
193 enddo
194 enddo
195
196 !-----< U10, V10 >-----
197
198 !$omp parallel do &
199 !$omp private(R10)
200 do j = js, je
201 do i = is, ie
202 r10 = 10.0_rp / atm_z1(i,j)
203
204 u10(i,j) = r10 * atm_u(i,j)
205 v10(i,j) = r10 * atm_v(i,j)
206 enddo
207 enddo
208
209 return
210 end subroutine atmos_phy_sf_simple_flux
211
module atmosphere / physics / surface / simple
subroutine, public atmos_phy_sf_simple_setup
Setup.
subroutine, public atmos_phy_sf_simple_flux(ia, is, ie, ja, js, je, atm_w, atm_u, atm_v, atm_temp, atm_pres, atm_qv, sfc_dens, sfc_temp, sfc_pres, atm_z1, sflx_mw, sflx_mu, sflx_mv, sflx_sh, sflx_lh, sflx_qv, u10, v10)
Calculate surface fluxes with constant bulk coefficients.