28 use mom_time_manager,
only : time_type,
operator(+),
operator(/), time_type_to_real
33 implicit none ;
private
35 #include <MOM_memory.h>
49 real :: pressure_ambient
50 real :: pressure_central
53 real :: hurr_translation_spd
54 real :: hurr_translation_dir
65 real :: holland_axbxdp
67 logical :: relative_tau
77 real :: dy_from_center
86 #include "version_variable.h"
88 character(len=40) ::
mdl =
"idealized_hurricane"
94 type(time_type),
intent(in) :: time
103 #include "version_variable.h"
105 if (
associated(cs))
then
106 call mom_error(fatal,
"idealized_hurricane_wind_init called "// &
107 "with an associated control structure.")
113 cs%pi = 4.0*atan(1.0)
114 cs%Deg2Rad = cs%pi/180.
120 call get_param(param_file,
mdl,
"IDL_HURR_RHO_AIR", cs%rho_a, &
121 "Air density used to compute the idealized hurricane "//&
122 "wind profile.", units=
'kg/m3', default=1.2)
123 call get_param(param_file,
mdl,
"IDL_HURR_AMBIENT_PRESSURE", &
124 cs%pressure_ambient,
"Ambient pressure used in the "//&
125 "idealized hurricane wind profile.", units=
'Pa', &
127 call get_param(param_file,
mdl,
"IDL_HURR_CENTRAL_PRESSURE", &
128 cs%pressure_central,
"Central pressure used in the "//&
129 "idealized hurricane wind profile.", units=
'Pa', &
131 call get_param(param_file,
mdl,
"IDL_HURR_RAD_MAX_WIND", &
132 cs%rad_max_wind,
"Radius of maximum winds used in the "//&
133 "idealized hurricane wind profile.", units=
'm', &
135 call get_param(param_file,
mdl,
"IDL_HURR_MAX_WIND", cs%max_windspeed, &
136 "Maximum wind speed used in the idealized hurricane"// &
137 "wind profile.", units=
'm/s', default=65.)
138 call get_param(param_file,
mdl,
"IDL_HURR_TRAN_SPEED", cs%hurr_translation_spd, &
139 "Translation speed of hurricane used in the idealized "//&
140 "hurricane wind profile.", units=
'm/s', default=5.0)
141 call get_param(param_file,
mdl,
"IDL_HURR_TRAN_DIR", cs%hurr_translation_dir, &
142 "Translation direction (towards) of hurricane used in the "//&
143 "idealized hurricane wind profile.", units=
'degrees', &
145 cs%hurr_translation_dir = cs%hurr_translation_dir * cs%Deg2Rad
146 call get_param(param_file,
mdl,
"IDL_HURR_X0", cs%Hurr_cen_X0, &
147 "Idealized Hurricane initial X position", &
148 units=
'm', default=0.)
149 call get_param(param_file,
mdl,
"IDL_HURR_Y0", cs%Hurr_cen_Y0, &
150 "Idealized Hurricane initial Y position", &
151 units=
'm', default=0.)
152 call get_param(param_file,
mdl,
"IDL_HURR_TAU_CURR_REL", cs%relative_tau, &
153 "Current relative stress switch "//&
154 "used in the idealized hurricane wind profile.", &
155 units=
'', default=.false.)
158 call get_param(param_file,
mdl,
"IDL_HURR_SCM_BR_BENCH", cs%BR_BENCH, &
159 "Single column mode benchmark case switch, which is "// &
160 "invoking a modification (bug) in the wind profile meant to "//&
161 "reproduce a previous implementation.", units=
'', default=.false.)
162 call get_param(param_file,
mdl,
"IDL_HURR_SCM", cs%SCM_MODE, &
163 "Single Column mode switch "//&
164 "used in the SCM idealized hurricane wind profile.", &
165 units=
'', default=.false.)
166 call get_param(param_file,
mdl,
"IDL_HURR_SCM_LOCY", cs%DY_from_center, &
167 "Y distance of station used in the SCM idealized hurricane "//&
168 "wind profile.", units=
'm', default=50.e3)
174 "The mean ocean density used with BOUSSINESQ true to "//&
175 "calculate accelerations and the mass for conservation "//&
176 "properties, or with BOUSSINSEQ false to convert some "//&
177 "parameters from vertical units of m to kg m-2.", &
178 units=
"kg m-3", default=1035.0, scale=us%kg_m3_to_R, do_not_log=.true.)
179 call get_param(param_file,
mdl,
"GUST_CONST", cs%gustiness, &
180 "The background gustiness in the winds.", units=
"Pa", &
181 default=0.0, scale=us%kg_m3_to_R*us%m_s_to_L_T**2*us%L_to_Z, do_not_log=.true.)
184 if (cs%BR_BENCH)
then
187 dp = cs%pressure_ambient - cs%pressure_central
188 c = cs%max_windspeed / sqrt( dp )
189 cs%Holland_B = c**2 * cs%rho_a * exp(1.0)
190 cs%Holland_A = (cs%rad_max_wind)**cs%Holland_B
191 cs%Holland_AxBxDP = cs%Holland_A*cs%Holland_B*dp
199 type(time_type),
intent(in) :: day
205 integer :: i, j, is, ie, js, je, isq, ieq, jsq, jeq
206 integer :: isd, ied, jsd, jed, isdb, iedb, jsdb, jedb
221 is = g%isc ; ie = g%iec ; js = g%jsc ; je = g%jec
222 isq = g%IscB ; ieq = g%IecB ; jsq = g%JscB ; jeq = g%JecB
223 isd = g%isd ; ied = g%ied ; jsd = g%jsd ; jed = g%jed
224 isdb = g%IsdB ; iedb = g%IedB ; jsdb = g%JsdB ; jedb = g%JedB
229 if (cs%relative_tau)
then
236 xc = cs%Hurr_cen_X0 + (time_type_to_real(day)*cs%hurr_translation_spd*&
237 cos(cs%hurr_translation_dir))
238 yc = cs%Hurr_cen_Y0 + (time_type_to_real(day)*cs%hurr_translation_spd*&
239 sin(cs%hurr_translation_dir))
242 if (cs%BR_Bench)
then
254 uocn = state%u(i,j)*rel_tau_fac
255 vocn = 0.25*(state%v(i,j)+state%v(i+1,j-1)&
256 +state%v(i+1,j)+state%v(i,j-1))*rel_tau_fac
257 f = abs(0.5*us%s_to_T*(g%CoriolisBu(i,j)+g%CoriolisBu(i,j-1)))*fbench_fac + fbench
259 if (cs%SCM_mode)
then
260 yy = yc + cs%dy_from_center
263 lat = g%geoLatCu(i,j)*1000.
264 lon = g%geoLonCu(i,j)*1000.
269 forces%taux(i,j) = g%mask2dCu(i,j) * us%kg_m3_to_R*us%m_s_to_L_T**2*us%L_to_Z * tx
275 uocn = 0.25*(state%u(i,j)+state%u(i-1,j+1)&
276 +state%u(i-1,j)+state%u(i,j+1))*rel_tau_fac
277 vocn = state%v(i,j)*rel_tau_fac
278 f = abs(0.5*us%s_to_T*(g%CoriolisBu(i-1,j)+g%CoriolisBu(i,j)))*fbench_fac + fbench
280 if (cs%SCM_mode)
then
281 yy = yc + cs%dy_from_center
284 lat = g%geoLatCv(i,j)*1000.
285 lon = g%geoLonCv(i,j)*1000.
290 forces%tauy(i,j) = g%mask2dCv(i,j) * us%kg_m3_to_R*us%m_s_to_L_T**2*us%L_to_Z * ty
298 forces%ustar(i,j) = g%mask2dT(i,j) * sqrt(us%L_to_Z * (cs%gustiness/cs%Rho0 + &
299 sqrt(0.5*(forces%taux(i-1,j)**2 + forces%taux(i,j)**2) + &
300 0.5*(forces%tauy(i,j-1)**2 + forces%tauy(i,j)**2))/cs%Rho0))
316 real,
intent(in) :: absf
317 real,
intent(in) :: YY
318 real,
intent(in) :: XX
319 real,
intent(in) :: UOCN
320 real,
intent(in) :: VOCN
321 real,
intent(out) :: Tx
322 real,
intent(out) :: Ty
350 radius = sqrt(xx**2 + yy**2)
358 if (cs%BR_Bench)
then
359 radius_km = radius/1000.
364 radiusb = (radius)**cs%Holland_B
369 if ( (radius/cs%rad_max_wind .gt. 0.001) .and. &
370 (radius/cs%rad_max_wind .lt. 10.) )
then
371 u10 = sqrt(cs%Holland_AxBxDP*exp(-cs%Holland_A/radiusb)/(cs%rho_A*radiusb)&
372 +0.25*(radius_km*absf)**2) - 0.5*radius_km*absf
373 elseif ( (radius/cs%rad_max_wind .gt. 10.) .and. &
374 (radius/cs%rad_max_wind .lt. 15.) )
then
376 radius10 = cs%rad_max_wind*10.
378 if (cs%BR_Bench)
then
379 radius_km = radius10/1000.
383 radiusb=radius10**cs%Holland_B
385 u10 = (sqrt(cs%Holland_AxBxDp*exp(-cs%Holland_A/radiusb)/(cs%rho_A*radiusb)&
386 +0.25*(radius_km*absf)**2)-0.5*radius_km*absf) &
387 * (15.-radius/cs%rad_max_wind)/5.
396 rstr = min(10.,radius / cs%rad_max_wind)
397 a0 = -0.9*rstr - 0.09*cs%max_windspeed - 14.33
398 a1 = -a0*(0.04*rstr + 0.05*cs%Hurr_translation_spd + 0.14)
399 p1 = (6.88*rstr - 9.60*cs%Hurr_translation_spd + 85.31) * cs%Deg2Rad
400 alph = a0 - a1*cos(cs%hurr_translation_dir-adir-p1)
401 if ( (radius/cs%rad_max_wind.gt.10.) .and.&
402 (radius/cs%rad_max_wind.lt.15.) )
then
403 alph = alph*(15.0-radius/cs%rad_max_wind)/5.
404 elseif (radius/cs%rad_max_wind.gt.15.)
then
407 alph = alph * cs%Deg2Rad
410 u_ts = cs%hurr_translation_spd/2.*cos(cs%hurr_translation_dir)
411 v_ts = cs%hurr_translation_spd/2.*sin(cs%hurr_translation_dir)
414 du = u10*sin(adir-cs%Pi-alph) - uocn + u_ts
415 dv = u10*cos(adir-alph) - vocn + v_ts
418 du10 = sqrt(du**2+dv**2)
419 if (du10.lt.11.)
then
421 elseif (du10.lt.20.0)
then
422 cd = (0.49 + 0.065*u10)*1.e-3
428 tx = cs%rho_A * cd * sqrt(du**2 + dv**2) * du
429 ty = cs%rho_A * cd * sqrt(du**2 + dv**2) * dv
440 type(time_type),
intent(in) :: day
445 integer :: i, j, is, ie, js, je, isq, ieq, jsq, jeq
446 integer :: isd, ied, jsd, jed, isdb, iedb, jsdb, jedb
448 real :: u10, a, b, c, r, f, du10, rkm
455 real :: alph,rstr, a0, a1, p1, adir, transdir, v_ts, u_ts
458 is = g%isc ; ie = g%iec ; js = g%jsc ; je = g%jec
459 isq = g%IscB ; ieq = g%IecB ; jsq = g%JscB ; jeq = g%JecB
460 isd = g%isd ; ied = g%ied ; jsd = g%jsd ; jed = g%jed
461 isdb = g%IsdB ; iedb = g%IedB ; jsdb = g%JsdB ; jedb = g%JedB
466 pie = 4.0*atan(1.0) ; deg2rad = pie/180.
474 dp = cs%pressure_ambient - cs%pressure_central
475 c = cs%max_windspeed / sqrt( dp )
476 b = c**2 * cs%rho_a * exp(1.0)
479 b = c**2 * 1.2 * exp(1.0)
481 a = (cs%rad_max_wind/1000.)**b
482 f = us%s_to_T*g%CoriolisBu(is,js)
489 xx = ( t0 - time_type_to_real(day)) * cs%hurr_translation_spd * cos(transdir)
490 r = sqrt(xx**2 + cs%DY_from_center**2)
509 if (r/cs%rad_max_wind > 0.001 .AND. r/cs%rad_max_wind < 10.)
then
510 u10 = sqrt( a*b*dp*exp(-a/rb)/(1.2*rb) + 0.25*(rkm*f)**2 ) - 0.5*rkm*f
511 elseif (r/cs%rad_max_wind > 10. .AND. r/cs%rad_max_wind < 12.)
then
512 r=cs%rad_max_wind*10.
520 u10 = ( sqrt( a*b*dp*exp(-a/rb)/(1.2*rb) + 0.25*(rkm*f)**2 ) - 0.5*rkm*f) &
521 * (12. - r/cs%rad_max_wind)/2.
525 adir = atan2(cs%DY_from_center,xx)
530 rstr = min(10.,r / cs%rad_max_wind)
531 a0 = -0.9*rstr -0.09*cs%max_windspeed - 14.33
532 a1 = -a0 *(0.04*rstr +0.05*cs%hurr_translation_spd+0.14)
533 p1 = (6.88*rstr -9.60*cs%hurr_translation_spd+85.31)*pie/180.
534 alph = a0 - a1*cos( (transdir - adir ) - p1)
535 if (r/cs%rad_max_wind > 10. .AND. r/cs%rad_max_wind < 12.)
then
536 alph = alph* (12. - r/cs%rad_max_wind)/2.
537 elseif (r/cs%rad_max_wind > 12.)
then
540 alph = alph * deg2rad
545 u_ts = cs%hurr_translation_spd/2.*cos(transdir)
546 v_ts = cs%hurr_translation_spd/2.*sin(transdir)
552 do j=js,je ;
do i=is-1,ieq
562 du = u10*sin(adir-pie-alph) - uocn + u_ts
563 dv = u10*cos(adir-alph) - vocn + v_ts
568 du10=sqrt(du**2+dv**2)
571 elseif (du10 < 20.)
then
572 cd = (0.49 + 0.065 * u10 )*0.001
576 forces%taux(i,j) = cs%rho_a * us%kg_m3_to_R*us%m_s_to_L_T**2*us%L_to_Z * &
577 g%mask2dCu(i,j) * cd*sqrt(du**2+dv**2)*du
581 do j=js-1,jeq ;
do i=is,ie
585 du = u10*sin(adir-pie-alph) - uocn + u_ts
586 dv = u10*cos(adir-alph) - vocn + v_ts
587 du10=sqrt(du**2+dv**2)
590 elseif (du10 < 20.)
then
591 cd = (0.49 + 0.065 * u10 )*0.001
595 forces%tauy(i,j) = cs%rho_a * us%kg_m3_to_R*us%m_s_to_L_T**2*us%L_to_Z * &
596 g%mask2dCv(i,j) * cd*du10*dv
599 do j=js,je ;
do i=is,ie
601 forces%ustar(i,j) = g%mask2dT(i,j) * sqrt(us%L_to_Z * (cs%gustiness/cs%Rho0 + &
602 sqrt(0.5*(forces%taux(i-1,j)**2 + forces%taux(i,j)**2) + &
603 0.5*(forces%tauy(i,j-1)**2 + forces%tauy(i,j)**2))/cs%Rho0))