MOM6
Idealized_Hurricane.F90
Go to the documentation of this file.
1 !> Forcing for the idealized hurricane and SCM_idealized_hurricane examples.
3 
4 ! This file is part of MOM6. See LICENSE.md for the license.
5 
6 ! History
7 !--------
8 ! November 2014: Origination.
9 ! October 2018: Renamed module from SCM_idealized_hurricane to idealized_hurricane
10 ! This module is no longer exclusively for use in SCM mode.
11 ! Legacy code that can be deleted is at the bottom (currently maintained
12 ! only to preserve exact answers in SCM mode).
13 ! The T/S initializations have been removed since they are redundant
14 ! w/ T/S initializations in CVMix_tests (which should be moved
15 ! into the main state_initialization to their utility
16 ! for multiple example cases)..
17 ! To do
18 ! 1. Remove the legacy SCM_idealized_hurricane_wind_forcing code
19 ! 2. Make the hurricane-to-background wind transition a runtime parameter
20 !
21 
22 use mom_error_handler, only : mom_error, fatal
26 use mom_grid, only : ocean_grid_type
28 use mom_time_manager, only : time_type, operator(+), operator(/), time_type_to_real
32 
33 implicit none ; private
34 
35 #include <MOM_memory.h>
36 
37 public idealized_hurricane_wind_init !Public interface to initialize the idealized
38  ! hurricane wind profile.
39 public idealized_hurricane_wind_forcing !Public interface to update the idealized
40  ! hurricane wind profile.
41 public scm_idealized_hurricane_wind_forcing !Public interface to the legacy idealized
42  ! hurricane wind profile for SCM.
43 
44 !> Container for parameters describing idealized wind structure
45 type, public :: idealized_hurricane_cs ; private
46 
47  ! Parameters used to compute Holland radial wind profile
48  real :: rho_a !< Mean air density [kg m-3]
49  real :: pressure_ambient !< Pressure at surface of ambient air [Pa]
50  real :: pressure_central !< Pressure at surface at hurricane center [Pa]
51  real :: rad_max_wind !< Radius of maximum winds [m]
52  real :: max_windspeed !< Maximum wind speeds [m s-1]
53  real :: hurr_translation_spd !< Hurricane translation speed [m s-1]
54  real :: hurr_translation_dir !< Hurricane translation speed [m s-1]
55  real :: gustiness !< Gustiness (optional, used in u*) [R L Z T-1 ~> Pa]
56  real :: rho0 !< A reference ocean density [R ~> kg m-3]
57  real :: hurr_cen_y0 !< The initial y position of the hurricane
58  !! This experiment is conducted in a Cartesian
59  !! grid and this is assumed to be in meters [m]
60  real :: hurr_cen_x0 !< The initial x position of the hurricane
61  !! This experiment is conducted in a Cartesian
62  !! grid and this is assumed to be in meters [m]
63  real :: holland_a !< Parameter 'A' from the Holland formula
64  real :: holland_b !< Parameter 'B' from the Holland formula
65  real :: holland_axbxdp !< 'A' x 'B' x (Pressure Ambient-Pressure central)
66  !! for the Holland prorfile calculation
67  logical :: relative_tau !< A logical to take difference between wind
68  !! and surface currents to compute the stress
69 
70 
71  ! Parameters used if in SCM (single column model) mode
72  logical :: scm_mode !< If true this being used in Single Column Model mode
73  logical :: br_bench !< A "benchmark" configuration (which is meant to
74  !! provide identical wind to reproduce a previous
75  !! experiment, where that wind formula contained
76  !! an error)
77  real :: dy_from_center !< (Fixed) distance in y from storm center path [m]
78 
79  ! Par
80  real :: pi !< Mathematical constant
81  real :: deg2rad !< Mathematical constant
82 
83 end type
84 
85 ! This include declares and sets the variable "version".
86 #include "version_variable.h"
87 
88 character(len=40) :: mdl = "idealized_hurricane" !< This module's name.
89 
90 contains
91 
92 !> Initializes wind profile for the SCM idealized hurricane example
93 subroutine idealized_hurricane_wind_init(Time, G, US, param_file, CS)
94  type(time_type), intent(in) :: time !< Model time
95  type(ocean_grid_type), intent(in) :: g !< Grid structure
96  type(unit_scale_type), intent(in) :: us !< A dimensional unit scaling type
97  type(param_file_type), intent(in) :: param_file !< Input parameter structure
98  type(idealized_hurricane_cs), pointer :: cs !< Parameter container for this module
99 
100  real :: dp, c
101 
102 ! This include declares and sets the variable "version".
103 #include "version_variable.h"
104 
105  if (associated(cs)) then
106  call mom_error(fatal, "idealized_hurricane_wind_init called "// &
107  "with an associated control structure.")
108  return
109  endif
110 
111  allocate(cs)
112 
113  cs%pi = 4.0*atan(1.0)
114  cs%Deg2Rad = cs%pi/180.
115 
116  ! Read all relevant parameters and write them to the model log.
117  call log_version(param_file, mdl, version, "")
118 
119  ! Parameters for computing a wind profile
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', &
126  default=101200.)
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', &
130  default=96800.)
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', &
134  default=50.e3)
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', &
144  default=180.0)
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.)
156 
157  ! Parameters for SCM mode
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)
169 
170  ! The following parameters are model run-time parameters which are used
171  ! and logged elsewhere and so should not be logged here. The default
172  ! value should be consistent with the rest of the model.
173  call get_param(param_file, mdl, "RHO_0", cs%Rho0, &
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.)
182 
183 
184  if (cs%BR_BENCH) then
185  cs%rho_a = 1.2
186  endif
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
192 
193 end subroutine idealized_hurricane_wind_init
194 
195 !> Computes the surface wind for the idealized hurricane test cases
196 subroutine idealized_hurricane_wind_forcing(state, forces, day, G, US, CS)
197  type(surface), intent(in) :: state !< Surface state structure
198  type(mech_forcing), intent(inout) :: forces !< A structure with the driving mechanical forces
199  type(time_type), intent(in) :: day !< Time in days
200  type(ocean_grid_type), intent(inout) :: g !< Grid structure
201  type(unit_scale_type), intent(in) :: us !< A dimensional unit scaling type
202  type(idealized_hurricane_cs), pointer :: cs !< Container for idealized hurricane parameters
203 
204  ! Local variables
205  integer :: i, j, is, ie, js, je, isq, ieq, jsq, jeq
206  integer :: isd, ied, jsd, jed, isdb, iedb, jsdb, jedb
207 
208  real :: tx,ty !< wind stress
209  real :: uocn, vocn !< Surface ocean velocity components
210  real :: lat, lon !< Grid location
211  real :: yy, xx !< storm relative position
212  real :: xc, yc !< Storm center location
213  real :: f !< Coriolis
214  real :: fbench !< The benchmark 'f' value
215  real :: fbench_fac !< A factor that is set to 0 to use the
216  !! benchmark 'f' value
217  real :: rel_tau_fac !< A factor that is set to 0 to disable
218  !! current relative stress calculation
219 
220  ! Bounds for loops and memory allocation
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
225 
226  ! Allocate the forcing arrays, if necessary.
227  call allocate_mech_forcing(g, forces, stress=.true., ustar=.true.)
228 
229  if (cs%relative_tau) then
230  rel_tau_fac = 1.
231  else
232  rel_tau_fac = 0. !Multiplied to 0 surface current
233  endif
234 
235  !> Compute storm center location
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))
240 
241 
242  if (cs%BR_Bench) then
243  ! f reset to value used in generated wind for benchmark test
244  fbench = 5.5659e-05
245  fbench_fac = 0.0
246  else
247  fbench = 0.0
248  fbench_fac = 1.0
249  endif
250 
251  !> Computes taux
252  do j=js,je
253  do i=is-1,ieq
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
258  ! Calculate position as a function of time.
259  if (cs%SCM_mode) then
260  yy = yc + cs%dy_from_center
261  xx = xc
262  else
263  lat = g%geoLatCu(i,j)*1000. ! Convert Lat from km to m.
264  lon = g%geoLonCu(i,j)*1000. ! Convert Lon from km to m.
265  yy = lat - yc
266  xx = lon - xc
267  endif
268  call idealized_hurricane_wind_profile(cs,f,yy,xx,uocn,vocn,tx,ty)
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
270  enddo
271  enddo
272  !> Computes tauy
273  do j=js-1,jeq
274  do i=is,ie
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
279  ! Calculate position as a function of time.
280  if (cs%SCM_mode) then
281  yy = yc + cs%dy_from_center
282  xx = xc
283  else
284  lat = g%geoLatCv(i,j)*1000. ! Convert Lat from km to m.
285  lon = g%geoLonCv(i,j)*1000. ! Convert Lon from km to m.
286  yy = lat - yc
287  xx = lon - xc
288  endif
289  call idealized_hurricane_wind_profile(cs, f, yy, xx, uocn, vocn, tx, ty)
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
291  enddo
292  enddo
293 
294  !> Get Ustar
295  do j=js,je
296  do i=is,ie
297  ! This expression can be changed if desired, but need not be.
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))
301  enddo
302  enddo
303 
304  return
306 
307 !> Calculate the wind speed at a location as a function of time.
308 subroutine idealized_hurricane_wind_profile(CS, absf, YY, XX, UOCN, VOCN, Tx, Ty)
309  ! Author: Brandon Reichl
310  ! Date: Nov-20-2014
311  ! Aug-14-2018 Generalized for non-SCM configuration
312 
313  ! Input parameters
314  type(idealized_hurricane_cs), &
315  pointer :: CS !< Container for SCM parameters
316  real, intent(in) :: absf !<Input coriolis magnitude
317  real, intent(in) :: YY !< Location in m relative to center y
318  real, intent(in) :: XX !< Location in m relative to center x
319  real, intent(in) :: UOCN !< X surface current
320  real, intent(in) :: VOCN !< Y surface current
321  real, intent(out) :: Tx !< X stress
322  real, intent(out) :: Ty !< Y stress
323 
324  ! Local variables
325 
326  ! Wind profile terms
327  real :: U10
328  real :: radius
329  real :: radius10
330  real :: radius_km
331  real :: radiusB
332  real :: fcor
333  real :: du10
334  real :: du
335  real :: dv
336  real :: CD
337 
338  !Wind angle variables
339  real :: Alph !< The resulting inflow angle (positive outward)
340  real :: Rstr
341  real :: A0
342  real :: A1
343  real :: P1
344  real :: Adir
345  real :: V_TS
346  real :: U_TS
347 
348  ! Implementing Holland (1980) parameteric wind profile
349 
350  radius = sqrt(xx**2 + yy**2)
351 
352  !/ BGR
353  ! rkm - r converted to km for Holland prof.
354  ! used in km due to error, correct implementation should
355  ! not need rkm, but to match winds w/ experiment this must
356  ! be maintained. Causes winds far from storm center to be a
357  ! couple of m/s higher than the correct Holland prof.
358  if (cs%BR_Bench) then
359  radius_km = radius/1000.
360  else
361  ! if not comparing to benchmark, then use correct Holland prof.
362  radius_km = radius
363  endif
364  radiusb = (radius)**cs%Holland_B
365 
366  !/
367  ! Calculate U10 in the interior (inside of 10x radius of maximum wind),
368  ! while adjusting U10 to 0 outside of 12x radius of maximum wind.
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
375 
376  radius10 = cs%rad_max_wind*10.
377 
378  if (cs%BR_Bench) then
379  radius_km = radius10/1000.
380  else
381  radius_km = radius10
382  endif
383  radiusb=radius10**cs%Holland_B
384 
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.
388  else
389  u10 = 0.
390  endif
391  adir = atan2(yy,xx)
392  !\
393 
394  ! Wind angle model following Zhang and Ulhorn (2012)
395  ! ALPH is inflow angle positive outward.
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
405  alph = 0.0
406  endif
407  alph = alph * cs%Deg2Rad
408 
409  ! Calculate translation speed components
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)
412 
413  ! Set output (relative) winds
414  du = u10*sin(adir-cs%Pi-alph) - uocn + u_ts
415  dv = u10*cos(adir-alph) - vocn + v_ts
416 
417  ! Use a simple drag coefficient as a function of U10 (from Sullivan et al., 2010)
418  du10 = sqrt(du**2+dv**2)
419  if (du10.lt.11.) then
420  cd = 1.2e-3
421  elseif (du10.lt.20.0) then
422  cd = (0.49 + 0.065*u10)*1.e-3
423  else
424  cd = 1.8e-3
425  endif
426 
427  ! Compute stress vector
428  tx = cs%rho_A * cd * sqrt(du**2 + dv**2) * du
429  ty = cs%rho_A * cd * sqrt(du**2 + dv**2) * dv
430 
432 
433 !> This subroutine is primarily needed as a legacy for reproducing answers.
434 !! It is included as an additional subroutine rather than padded into the previous
435 !! routine with flags to ease its eventual removal. Its functionality is replaced
436 !! with the new routines and it can be deleted when answer changes are acceptable.
437 subroutine scm_idealized_hurricane_wind_forcing(state, forces, day, G, US, CS)
438  type(surface), intent(in) :: state !< Surface state structure
439  type(mech_forcing), intent(inout) :: forces !< A structure with the driving mechanical forces
440  type(time_type), intent(in) :: day !< Time in days
441  type(ocean_grid_type), intent(inout) :: g !< Grid structure
442  type(unit_scale_type), intent(in) :: us !< A dimensional unit scaling type
443  type(idealized_hurricane_cs), pointer :: cs !< Container for SCM parameters
444  ! Local variables
445  integer :: i, j, is, ie, js, je, isq, ieq, jsq, jeq
446  integer :: isd, ied, jsd, jed, isdb, iedb, jsdb, jedb
447  real :: pie, deg2rad
448  real :: u10, a, b, c, r, f, du10, rkm ! For wind profile expression
449  real :: xx, t0 !for location
450  real :: dp, rb
451  real :: cd ! Air-sea drag coefficient
452  real :: uocn, vocn ! Surface ocean velocity components
453  real :: du, dv ! Air-sea differential motion
454  !Wind angle variables
455  real :: alph,rstr, a0, a1, p1, adir, transdir, v_ts, u_ts
456  logical :: br_bench
457  ! Bounds for loops and memory allocation
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
462 
463  ! Allocate the forcing arrays, if necessary.
464 
465  call allocate_mech_forcing(g, forces, stress=.true., ustar=.true.)
466  pie = 4.0*atan(1.0) ; deg2rad = pie/180.
467  !/ BR
468  ! Implementing Holland (1980) parameteric wind profile
469  !------------------------------------------------------|
470  br_bench = .true. !true if comparing to LES runs |
471  t0 = 129600. !TC 'eye' crosses (0,0) at 36 hours|
472  transdir = pie !translation direction (-x) |
473  !------------------------------------------------------|
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)
477  if (br_bench) then
478  ! rho_a reset to value used in generated wind for benchmark test
479  b = c**2 * 1.2 * exp(1.0)
480  endif
481  a = (cs%rad_max_wind/1000.)**b
482  f = us%s_to_T*g%CoriolisBu(is,js) ! f=f(x,y) but in the SCM is constant
483  if (br_bench) then
484  ! f reset to value used in generated wind for benchmark test
485  f = 5.5659e-05 !### A constant value in s-1.
486  endif
487  !/ BR
488  ! Calculate x position as a function of time.
489  xx = ( t0 - time_type_to_real(day)) * cs%hurr_translation_spd * cos(transdir)
490  r = sqrt(xx**2 + cs%DY_from_center**2)
491  !/ BR
492  ! rkm - r converted to km for Holland prof.
493  ! used in km due to error, correct implementation should
494  ! not need rkm, but to match winds w/ experiment this must
495  ! be maintained. Causes winds far from storm center to be a
496  ! couple of m/s higher than the correct Holland prof.
497  if (br_bench) then
498  rkm = r/1000.
499  rb = (rkm)**b
500  else
501  ! if not comparing to benchmark, then use correct Holland prof.
502  rkm = r
503  rb = r**b
504  endif
505  !/ BR
506  ! Calculate U10 in the interior (inside of 10x radius of maximum wind),
507  ! while adjusting U10 to 0 outside of 12x radius of maximum wind.
508  ! Note that rho_a is set to 1.2 following generated wind for experiment
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.
513  if (br_bench) then
514  rkm = r/1000.
515  rb=rkm**b
516  else
517  rkm = r
518  rb = r**b
519  endif
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.
522  else
523  u10 = 0.
524  endif
525  adir = atan2(cs%DY_from_center,xx)
526 
527  !/ BR
528  ! Wind angle model following Zhang and Ulhorn (2012)
529  ! ALPH is inflow angle positive outward.
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
538  alph = 0.0
539  endif
540  alph = alph * deg2rad
541  !/BR
542  ! Prepare for wind calculation
543  ! X_TS is component of translation speed added to wind vector
544  ! due to background steering wind.
545  u_ts = cs%hurr_translation_spd/2.*cos(transdir)
546  v_ts = cs%hurr_translation_spd/2.*sin(transdir)
547 
548  ! Set the surface wind stresses, in [Pa]. A positive taux
549  ! accelerates the ocean to the (pseudo-)east.
550  ! The i-loop extends to is-1 so that taux can be used later in the
551  ! calculation of ustar - otherwise the lower bound would be Isq.
552  do j=js,je ; do i=is-1,ieq
553  !/BR
554  ! Turn off surface current for stress calculation to be
555  ! consistent with test case.
556  uocn = 0.!state%u(I,j)
557  vocn = 0.!0.25*( (state%v(i,J) + state%v(i+1,J-1)) &
558  ! +(state%v(i+1,J) + state%v(i,J-1)) )
559  !/BR
560  ! Wind vector calculated from location/direction (sin/cos flipped b/c
561  ! cyclonic wind is 90 deg. phase shifted from position angle).
562  du = u10*sin(adir-pie-alph) - uocn + u_ts
563  dv = u10*cos(adir-alph) - vocn + v_ts
564  !/----------------------------------------------------|
565  !BR
566  ! Add a simple drag coefficient as a function of U10 |
567  !/----------------------------------------------------|
568  du10=sqrt(du**2+dv**2)
569  if (du10 < 11.) then
570  cd = 1.2e-3
571  elseif (du10 < 20.) then
572  cd = (0.49 + 0.065 * u10 )*0.001
573  else
574  cd = 0.0018
575  endif
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
578  enddo ; enddo
579  !/BR
580  ! See notes above
581  do j=js-1,jeq ; do i=is,ie
582  uocn = 0.!0.25*( (state%u(I,j) + state%u(I-1,j+1)) &
583  ! +(state%u(I-1,j) + state%u(I,j+1)) )
584  vocn = 0.!state%v(i,J)
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)
588  if (du10 < 11.) then
589  cd = 1.2e-3
590  elseif (du10 < 20.) then
591  cd = (0.49 + 0.065 * u10 )*0.001
592  else
593  cd = 0.0018
594  endif
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
597  enddo ; enddo
598  ! Set the surface friction velocity [m s-1]. ustar is always positive.
599  do j=js,je ; do i=is,ie
600  ! This expression can be changed if desired, but need not be.
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))
604  enddo ; enddo
605 
607 
608 end module idealized_hurricane
mom_time_manager
Wraps the FMS time manager functions.
Definition: MOM_time_manager.F90:2
mom_forcing_type::allocate_forcing_type
subroutine, public allocate_forcing_type(G, fluxes, water, heat, ustar, press, shelf, iceberg, salt)
Conditionally allocate fields within the forcing type.
Definition: MOM_forcing_type.F90:2811
mom_forcing_type::mech_forcing
Structure that contains pointers to the mechanical forcing at the surface used to drive the liquid oc...
Definition: MOM_forcing_type.F90:187
mom_variables::surface
Pointers to various fields which may be used describe the surface state of MOM, and which will be ret...
Definition: MOM_variables.F90:38
mom_safe_alloc
Convenience functions for safely allocating memory without accidentally reallocating pointer and caus...
Definition: MOM_safe_alloc.F90:3
mom_verticalgrid
Provides a transparent vertical ocean grid type and supporting routines.
Definition: MOM_verticalGrid.F90:2
mom_file_parser::log_version
An overloaded interface to log version information about modules.
Definition: MOM_file_parser.F90:109
mom_variables::thermo_var_ptrs
Pointers to an assortment of thermodynamic fields that may be available, including potential temperat...
Definition: MOM_variables.F90:78
mom_forcing_type::allocate_mech_forcing
subroutine, public allocate_mech_forcing(G, forces, stress, ustar, shelf, press, iceberg)
Conditionally allocate fields within the mechanical forcing type.
Definition: MOM_forcing_type.F90:2879
mom_file_parser::param_file_type
A structure that can be parsed to read and document run-time parameters.
Definition: MOM_file_parser.F90:54
mom_file_parser::get_param
An overloaded interface to read and log the values of various types of parameters.
Definition: MOM_file_parser.F90:102
idealized_hurricane::idealized_hurricane_wind_profile
subroutine idealized_hurricane_wind_profile(CS, absf, YY, XX, UOCN, VOCN, Tx, Ty)
Calculate the wind speed at a location as a function of time.
Definition: Idealized_Hurricane.F90:309
mom_unit_scaling::unit_scale_type
Describes various unit conversion factors.
Definition: MOM_unit_scaling.F90:14
idealized_hurricane::mdl
character(len=40) mdl
This module's name.
Definition: Idealized_Hurricane.F90:88
mom_forcing_type
This module implements boundary forcing for MOM6.
Definition: MOM_forcing_type.F90:2
mom_verticalgrid::verticalgrid_type
Describes the vertical ocean grid, including unit conversion factors.
Definition: MOM_verticalGrid.F90:24
mom_variables
Provides transparent structures with groups of MOM6 variables and supporting routines.
Definition: MOM_variables.F90:2
mom_file_parser
The MOM6 facility to parse input files for runtime parameters.
Definition: MOM_file_parser.F90:2
idealized_hurricane
Forcing for the idealized hurricane and SCM_idealized_hurricane examples.
Definition: Idealized_Hurricane.F90:2
mom_grid
Provides the ocean grid type.
Definition: MOM_grid.F90:2
mom_unit_scaling
Provides a transparent unit rescaling type to facilitate dimensional consistency testing.
Definition: MOM_unit_scaling.F90:2
idealized_hurricane::idealized_hurricane_wind_forcing
subroutine, public idealized_hurricane_wind_forcing(state, forces, day, G, US, CS)
Computes the surface wind for the idealized hurricane test cases.
Definition: Idealized_Hurricane.F90:197
mom_forcing_type::forcing
Structure that contains pointers to the boundary forcing used to drive the liquid ocean simulated by ...
Definition: MOM_forcing_type.F90:50
mom_error_handler::mom_error
subroutine, public mom_error(level, message, all_print)
This provides a convenient interface for writing an mpp_error message with run-time filter based on a...
Definition: MOM_error_handler.F90:72
idealized_hurricane::scm_idealized_hurricane_wind_forcing
subroutine, public scm_idealized_hurricane_wind_forcing(state, forces, day, G, US, CS)
This subroutine is primarily needed as a legacy for reproducing answers. It is included as an additio...
Definition: Idealized_Hurricane.F90:438
idealized_hurricane::idealized_hurricane_cs
Container for parameters describing idealized wind structure.
Definition: Idealized_Hurricane.F90:45
mom_safe_alloc::safe_alloc_ptr
Allocate a pointer to a 1-d, 2-d or 3-d array.
Definition: MOM_safe_alloc.F90:12
mom_error_handler
Routines for error handling and I/O management.
Definition: MOM_error_handler.F90:2
mom_grid::ocean_grid_type
Ocean grid type. See mom_grid for details.
Definition: MOM_grid.F90:26
idealized_hurricane::idealized_hurricane_wind_init
subroutine, public idealized_hurricane_wind_init(Time, G, US, param_file, CS)
Initializes wind profile for the SCM idealized hurricane example.
Definition: Idealized_Hurricane.F90:94