WAVEWATCH III  beta 0.0.1
w3sic2md Module Reference

Calculate ice dissipation source term S_{ice}. More...

Functions/Subroutines

subroutine, public w3sic2 (A, DEPTH, ICEH, ICEF, CG, WN, IX, IY, S, D, WN_R, CG_ICE, ALPHA, R)
 S_{ice} source term using 5 parameters read from input files. More...
 

Detailed Description

Calculate ice dissipation source term S_{ice}.

Author
E. Rogers
S. Zieger
F. Ardhuin
G. Boutin
Date
05-Jan-2018

Function/Subroutine Documentation

◆ w3sic2()

subroutine, public w3sic2md::w3sic2 ( real, dimension(nspec), intent(in)  A,
real, intent(in)  DEPTH,
real, intent(in)  ICEH,
real, intent(in)  ICEF,
real, dimension(nk), intent(in)  CG,
real, dimension(nk), intent(in)  WN,
integer, intent(in)  IX,
integer, intent(in)  IY,
real, dimension(nspec), intent(out)  S,
real, dimension(nspec), intent(out)  D,
real, dimension(nk), intent(in)  WN_R,
real, dimension(nk), intent(in)  CG_ICE,
real, dimension(nk), intent(in)  ALPHA,
real, dimension(nk), intent(in)  R 
)

S_{ice} source term using 5 parameters read from input files.

Parameters
[in]AAction density spectrum (1-D).
[in]DEPTHLocal water depth.
[in]ICEHIce thickness.
[in]ICEFIce Floe diameter.
[in]CGGroup velocities.
[in]WNWavenumbers.
[in]IXGrid index.
[in]IYGrid index.
[out]SSource term (1-D version).
[out]DDiagonal term of derivative (1-D version).
[in]WN_RWavenumbers in ice.
[in]CG_ICEGroup velocities in ice.
[in]ALPHAExponential decay rate of energy.
[in]RRatio of energy to wave energy without ice.
Author
E. Rogers
S. Zieger
F. Ardhuin
G. Boutin
Date
04-Jan-2018

Definition at line 122 of file w3sic2md.F90.

122  !/
123  !/ +-----------------------------------+
124  !/ | WAVEWATCH III NOAA/NCEP |
125  !/ | E. Rogers |
126  !/ | S. Zieger |
127  !/ | F. Ardhuin & G. Boutin |
128  !/ | FORTRAN 90 |
129  !/ | Last update : 04-Jan-2018 |
130  !/ +-----------------------------------+
131  !/
132  !/ 16-Oct-2012 : Origination. ( version 4.04 )
133  !/ (E. Rogers)
134  !/ 09-Oct-2013 : W3SIC1 SUBTYPE=2 outsourced to W3SIC2 (S. Zieger)
135  !/ 10-Mar-2014 : Generalization with turbulent BL ( version 5.01 )
136  !/ 16-Feb-2016 : Passes ICEH as parameter ( version 5.10 )
137  !/ 02-May-2016 : Call to Liu disp moved to w3srce ( version 5.10 )
138  !/ 04-Jan-2018 : Includes floe size dependance ( version 6.02 )
139  !/ FIXME : Move field input to W3SRCE and provide
140  !/ (S.Zieger) input parameter to W3SIC1 to make the subroutine
141  !/ : versatile for point output processors ww3_outp
142  !/ and ww3_ounp.
143  !/
144  !/ Copyright 2009 National Weather Service (NWS),
145  !/ National Oceanic and Atmospheric Administration. All rights
146  !/ reserved. WAVEWATCH III is a trademark of the NWS.
147  !/ No unauthorized use without permission.
148  !/
149  ! 1. Purpose :
150  !
151  ! S_{ice} source term using 5 parameters read from input files.
152  ! These parameters are allowed to vary in space and time.
153  ! The parameters control the exponential decay rate k_i
154  ! Since there are 5 parameters, this permits description of
155  ! dependence of k_i on frequency or wavenumber.
156  !
157  !/ ------------------------------------------------------------------- /
158  !
159  ! 2. Method :
160  !
161  ! Regarding i/o (general to all Sice modules): S_{ice} source term
162  ! is calculated using up to 5 parameters read from input files.
163  ! These parameters are allowed to vary in space and time.
164  ! The parameters control the exponential decay rate k_i
165  ! Since there are 5 parameters, this permits description of
166  ! dependence of k_i on frequency or wavenumber.
167  !
168  ! Sea ice affects the wavenumber k of wind-generated ocean waves.
169  ! The ice-modified wavenumber can be expressed as a complex number
170  ! k = k_r + i*k_i, with the real part k_r representing impact of
171  ! the sea ice on the physical wavelength and propagation speeds,
172  ! producing something analogous to shoaling and refraction by
173  ! bathymetry, whereas the imaginary part of the complex
174  ! wavenumber, k_i, is an exponential decay coefficient
175  ! k_i(x,y,t,sigma) (depending on location, time and frequency,
176  ! respectively), representing wave attenuation, and can be
177  ! introduced in a wave model such as WW3 as S_ice/E=-2*Cg*k_i,
178  ! where S_ice is one of several dissipation mechanisms, along
179  ! with whitecapping, for example, S_ds=S_wc+S_ice+⋯. The k_r -
180  ! modified by ice would enter the model via the C calculations
181  ! on the left-hand side of the governing equation.The fundamentals
182  ! are straightforward, e.g. Rogers and Holland (2009 and
183  ! subsequent unpublished work) modified a similar model, SWAN
184  ! (Booij et al. 1999) to include the effects of a viscous mud
185  ! layer using the same approach (k = k_r + i*k_i) previously.
186  !
187  ! General approach is analogous to Rogers and Holland (2009)
188  ! approach for mud.
189  ! See text near their eq. 1 :
190  ! k = k_r + i * k_i
191  ! eta(x,t) = Real( a * exp( i * ( k * x - sigma * t ) ) )
192  ! a = a0 * exp( -k_i * x )
193  ! S / E = -2 * Cg * k_i (see also Komen et al. (1994, pg. 170)
194  !
195  ! Please note that S is source term for action.
196  !
197  ! Notes regarding numerics:
198  ! (Note by F. Ardhuin: these may not apply in version 5 thanks to splitting
199  ! of ice source terms and implicit integration in W3SRCE)
200  ! Experiments with constant k_i values suggest that :
201  ! for dx=20.0 km, k_i should not exceed 3.5e-6
202  ! (assumes 2.7% Hs error in my particular test case is intolerable)
203  ! for dx=5.0 km, k_i should not exceed 2.0e-5
204  ! for dx=2.5 km, k_i should not exceed 5.0e-5
205  ! for dx=1.0 km, k_i should not exceed 2.0e-4
206  ! for dx=0.35 km, error is less than 2.1% for all k_i tested
207  ! for dx=0.10 km, error is less than 1.3% for all k_i tested
208  ! "Ground truth" used for this is an exponential decay profile.
209  !
210  ! For reference, ACNFS is 1/12th deg, so delta_latitude=9.25 km.
211  !
212  ! {put more equations here}
213  !
214  ! The laminar to turbulent transition is described in
215  ! Stopa et al. (The Cryosphere, 2016).
216  !
217  ! 3. Parameters :
218  !
219  ! Parameter list
220  ! ----------------------------------------------------------------
221  ! A R.A. I Action density spectrum (1-D)
222  ! DEPTH Real I Local water depth
223  ! ICEH Real I Ice thickness
224  ! CG R.A. I Group velocities
225  ! WN R.A. I Wavenumbers
226  ! IX,IY I.S. I Grid indices
227  ! S R.A. O Source term (1-D version)
228  ! D R.A. O Diagonal term of derivative (1-D version)
229  ! WN_R R.A. I Wavenumbers in ice
230  ! CG_ICE R.A. I Group velocities in ice
231  ! ALPHA R.A. I Exponential decay rate of energy
232  ! R R.A. I Ratio of energy to wave energy without ice
233  ! ICEF Real I Ice Floe diameter
234  !
235  ! imported via module:
236  ! ICEP2 R.A. I Eddy viscosity
237  ! ----------------------------------------------------------------
238  !
239  ! 4. Subroutines used :
240  !
241  ! Name Type Module Description
242  ! ----------------------------------------------------------------
243  ! STRACE Subr. W3SERVMD Subroutine tracing (!/S switch).
244  ! PRT2DS Subr. W3ARRYMD Print plot output (!/T1 switch).
245  ! OUTMAT Subr. W3ARRYMD Matrix output (!/T2 switch).
246  ! ----------------------------------------------------------------
247  !
248  ! 5. Called by :
249  !
250  ! Name Type Module Description
251  ! ----------------------------------------------------------------
252  ! W3SRCE Subr. W3SRCEMD Source term integration.
253  ! W3EXPO Subr. N/A ASCII Point output post-processor.
254  ! W3EXNC Subr. N/A NetCDF Point output post-processor.
255  ! GXEXPO Subr. N/A GrADS point output post-processor.
256  ! ----------------------------------------------------------------
257  !
258  ! 6. Error messages :
259  !
260  ! None.
261  !
262  ! 7. Remarks :
263  !
264  ! If ice parameter 1 is zero, no calculations are made.
265  !
266  ! 8. Structure :
267  !
268  ! See source code.
269  !
270  ! 9. Switches :
271  !
272  ! !/S Enable subroutine tracing.
273  ! !/T Enable general test output.
274  ! !/T0 2-D print plot of source term.
275  ! !/T1 Print arrays.
276  !
277  ! 10. Source code :
278  !
279  !/ ------------------------------------------------------------------- /
280  USE constants
281  USE w3odatmd, ONLY: ndse
282  USE w3servmd, ONLY: extcde
283  USE w3dispmd
284  USE w3gdatmd, ONLY: nk, nth, nspec, sig, mapwn, ic2pars, dden, &
286  USE w3idatmd, ONLY: inflags2,icep1,icep2,icep3,icep4,icep5,icei
287 #ifdef W3_T
288  USE w3odatmd, ONLY: ndst
289 #endif
290 #ifdef W3_S
291  USE w3servmd, ONLY: strace
292 #endif
293 #ifdef W3_T0
294  USE w3arrymd, ONLY: prt2ds
295 #endif
296 #ifdef W3_T1
297  USE w3arrymd, ONLY: outmat
298 #endif
299  !
300  IMPLICIT NONE
301  !/
302  !/ ------------------------------------------------------------------- /
303  !/ Parameter list
304  REAL, INTENT(IN) :: A(NSPEC), DEPTH, ICEH
305  REAL, INTENT(IN) :: CG(NK), WN(NK)
306  REAL, INTENT(OUT) :: S(NSPEC), D(NSPEC)
307  REAL, INTENT(IN) :: ALPHA(NK) ! exponential (spatial) decay rate for energy (1/m)
308  INTEGER, INTENT(IN) :: IX, IY
309  REAL, INTENT(IN) :: WN_R(NK), CG_ICE(NK), R(NK)
310  REAL, INTENT(IN) :: ICEF ! Hypothesis: friction does not occur for broken ice
311 
312  !/
313  !/ ------------------------------------------------------------------- /
314  !/ Local parameters
315  !/
316 #ifdef W3_S
317  INTEGER, SAVE :: IENT = 0
318 #endif
319 #ifdef W3_T0
320  REAL :: DOUT(NK,NTH)
321 #endif
322  INTEGER :: IKTH, IK
323  REAL :: D1D(NK) !In SBT1: D1D was named "CBETA"
324  REAL :: ICECOEF1, ICECOEF2, ICECONC
325  REAL, ALLOCATABLE :: WN_I(:) ! exponential (spatial) decay rate for amplitude (1/m)
326  REAL :: VISCM=1.83e-6 ! molecular viscosity of water at freezing
327  REAL :: PTURB, PVISC, DTURB, DVISC, &
328  SMOOTH, RE, UORB, AORB, EB, &
329  DELI1, DELI2, FW, XI, FTURB, &
330  CG_EFF(NK), WLG_R(NK), SMOOTH_DMAX(NK)
331  INTEGER :: IND, ITH, IS
332  LOGICAL :: NOICE=.false.
333  ! Warning, ALPHA = 2 * WN_I -> Makes WN_I useless, doesnt it ?
334  !/
335  !/ ------------------------------------------------------------------- /
336  !/
337 #ifdef W3_S
338  CALL strace (ient, 'W3SIC2')
339 #endif
340  !
341  ! 0. Initializations ------------------------------------------------ *
342  !
343  d = 0.0
344  !
345  ALLOCATE(wn_i(nk))
346  wn_i = 0.0
347  icecoef1 = iceh
348  icecoef2 = 0.0
349  iceconc = 0.0
350  cg_eff = 0.
351  smooth_dmax(:)=1.
352  !
353  IF (inflags2(-7))icecoef1 = iceh
354  IF (inflags2(-6))icecoef2 = icep2(ix,iy)
355  IF (inflags2(4)) iceconc = icei(ix,iy)
356  !
357  !
358  ! 1. No ice --------------------------------------------------------- /
359  !
360  noice=.false.
361  IF (icecoef1==0.0) noice=.true.
362  IF (inflags2(4).AND.(iceconc==0.0)) noice=.true.
363 
364  IF ( noice ) THEN
365  d = 0.0
366  !
367  ! 2. Ice ------------------------------------------------------------ /
368  ELSE
369  !
370  ! 2.a Set constant(s) and write test output -------------------------- /
371  !
372  ! (none)
373  !
374 #ifdef W3_T38
375  WRITE (ndst,9000) depth,icecoef1,icecoef2
376 #endif
377  !
378  ! 2.b Make calculations ---------------------------------------------- /
379 
380  ! ICECOEF1 = H_ICE
381  ! ICECOEF2 = VISC
382  !
383  ! Branches out depending on choice of dispersion relation...
384  ! by default IC2PARS(1)=0, and attenuation computed as described in Stopa et al. 2016
385  !
386  IF (ic2pars(1).GT.0.5) THEN
387  IF (.NOT.inflags2(-7))THEN
388  WRITE (ndse,1001) 'ICE PARAMETER 1'
389  CALL extcde(2)
390  ENDIF
391  IF (.NOT.inflags2(-6))THEN
392  WRITE (ndse,1001) 'ICE PARAMETER 2'
393  CALL extcde(2)
394  ENDIF
395  !
396  wn_i(:) = 0.5 * alpha(:) ! ALPHA=2*WN_I
397  DO ik=1, nk
398  ! recall that D=S/E=-2*Cg*k_i
399  ! Note: We should not use CG_ICE here unless CG_ICE is also
400  ! used for advection in w3wavemd.ftn (see lines for IC3
401  ! there).
402  d1d(ik)= -2.0 * cg(ik) * wn_i(ik)
403  END DO
404  !
405  ! Alternative by F.A.: generalization to a turbulent boundary layer
406  ! uses the ice-free dispersion, to be updated later
407  !
408  ELSE ! goes here if IC2PARS(1).LE.0.5 (this is the default behavior)
409  IF (ic2pars(2).GT.0.) THEN
410  uorb=0.
411  aorb=0.
412  fturb = ic2pars(2)
413  ! Special treatment in the southern ocean ...
414  IF (ic2pars(7).GT.0) THEN
415  IF (ygrd(iy,ix).LT.0.AND.gtype.EQ.rlgtype.AND.flagll) fturb = ic2pars(7)
416  END IF
417  DO ik=1, nk
418  eb = 0.
419  DO ith=1, nth
420  is=ith+(ik-1)*nth
421  eb = eb + a(is)
422  END DO
423  !
424  ! UORB and AORB are the variances of the orbital velocity and surface elevation
425  ! of the water relative to the ice ... this is only correct if the ice layer
426  ! does not move. This should is changed by taking into account DMAX when IC2DMAX > 0:
427  !
428 #ifdef W3_IS2
429  IF (ic2pars(8).GT.0) THEN
430  wlg_r(ik)=tpi/wn_r(ik)
431  smooth_dmax(ik)= (0.5*(1+tanh((icef-ic2pars(8)*wlg_r(ik))/(icef*0.5))))**2
432  END IF
433 #endif
434  !
435  IF (r(ik).GT.1.) THEN
436  uorb = uorb + eb * smooth_dmax(ik)* sig(ik)**2 * dden(ik) / cg(ik) &
437  / (r(ik)*cg_ice(ik)/cg(ik))
438  aorb = aorb + eb * smooth_dmax(ik) * dden(ik) / cg(ik) &
439  / (r(ik)*cg_ice(ik)/cg(ik)) !deep water only
440  ELSE
441  uorb = uorb + eb * smooth_dmax(ik) *sig(ik)**2 * dden(ik) / cg(ik)
442  aorb = aorb + eb * smooth_dmax(ik) * dden(ik) / cg(ik) !deep water only
443  END IF
444 
445  END DO
446  !
447  aorb = 2*sqrt(aorb) ! significant amplitude
448  uorb = 2*sqrt(uorb) ! significant amplitude
449 
450  re = uorb*aorb / viscm
451  smooth = 0.5*tanh((re-ic2pars(4))/ic2pars(5))
452  pturb=(0.5+smooth)
453  pvisc=(0.5-smooth)
454 
455  xi=(alog10(max(aorb/ic2pars(3),3.))-abmin)/delab
456  ind = min(sizefwtable-1, int(xi))
457  deli1= min(1. ,xi-float(ind))
458  deli2= 1. - deli1
459  fw =fwtable(ind)*deli2+fwtable(ind+1)*deli1
460  dturb= fturb*fw*uorb/grav
461  ELSE ! so case of IC2PARS(2).LE.0.
462  dturb = 0.
463  pturb = 0.
464  pvisc = 1.
465  END IF ! IF (IC2PARS(2).GT.0.)
466  !
467  DO ik=1, nk
468  ! WN_R is used here but warning, this is only OK for unbroken ice
469  dvisc = ic2pars(6) * wn_r(ik) * sqrt(viscm* sig(ik) / 2.)
470  d1d(ik) = -1.*(pturb*max(dturb*sig(ik)**2,dvisc) + pvisc*dvisc) &
471  *smooth_dmax(ik)
472  END DO
473  END IF ! IF (IC2PARS(1).GT.0.5)
474 
475  !
476  ! 2.c Fill diagional matrix
477  !
478  DO ikth=1, nspec
479  d(ikth) = d1d(mapwn(ikth))
480  END DO
481  !
482  END IF ! IF ( NOICE ) THEN
483  !
484  s = d * a
485  !
486  ! ... Test output of arrays
487  !
488 #ifdef W3_T0
489  DO ik=1, nk
490  DO ith=1, nth
491  dout(ik,ith) = d(ith+(ik-1)*nth)
492  END DO
493  END DO
494  CALL prt2ds (ndst, nk, nk, nth, dout, sig(1:), ' ', 1., &
495  0.0, 0.001, 'Diag Sice', ' ', 'NONAME')
496 #endif
497  !
498 #ifdef W3_T1
499  CALL outmat (ndst, d, nth, nth, nk, 'diag Sice')
500 #endif
501  !
502  ! Formats
503  !
504 1001 FORMAT (/' *** WAVEWATCH III ERROR IN W3SIC2 : '/ &
505  ' ',a,' REQUIRED BUT NOT SELECTED'/)
506  !
507 #ifdef W3_T38
508 9000 FORMAT (' TEST W3SIC2 : DEPTH,ICECOEF1 : ',2e10.3)
509 #endif
510  !/
511  !/ End of W3SIC2 ----------------------------------------------------- /
512  !/

References constants::abmin, w3gdatmd::dden, constants::delab, w3servmd::extcde(), w3gdatmd::flagll, constants::fwtable, constants::grav, w3gdatmd::gtype, w3gdatmd::ic2pars, w3idatmd::inflags2, w3gdatmd::mapwn, w3odatmd::ndse, w3odatmd::ndst, w3gdatmd::nk, w3gdatmd::nspec, w3gdatmd::nth, w3arrymd::outmat(), w3arrymd::prt2ds(), w3gdatmd::rlgtype, w3gdatmd::sig, constants::sizefwtable, w3servmd::strace(), constants::tpi, and w3gdatmd::ygrd.

Referenced by gxexpo(), and w3srcemd::w3srce().

w3gdatmd::nk
integer, pointer nk
Definition: w3gdatmd.F90:1230
constants::abmin
real, parameter abmin
ABMIN.
Definition: constants.F90:94
w3wdatmd::iceh
real, dimension(:), pointer iceh
Definition: w3wdatmd.F90:183
w3gdatmd::ygrd
double precision, dimension(:,:), pointer ygrd
Definition: w3gdatmd.F90:1205
w3gdatmd::nspec
integer, pointer nspec
Definition: w3gdatmd.F90:1230
w3gdatmd::rlgtype
integer, parameter rlgtype
Definition: w3gdatmd.F90:624
w3idatmd::inflags2
logical, dimension(:), pointer inflags2
Definition: w3idatmd.F90:260
w3gdatmd::sig
real, dimension(:), pointer sig
Definition: w3gdatmd.F90:1234
w3wdatmd::icef
real, dimension(:), pointer icef
Definition: w3wdatmd.F90:183
w3arrymd::outmat
subroutine outmat(NDS, A, MX, NX, NY, MNAME)
Definition: w3arrymd.F90:988
w3odatmd::ndse
integer, pointer ndse
Definition: w3odatmd.F90:456
constants::sizefwtable
integer, parameter sizefwtable
SIZEFWTABLE.
Definition: constants.F90:91
w3servmd
Definition: w3servmd.F90:3
w3gdatmd::nth
integer, pointer nth
Definition: w3gdatmd.F90:1230
w3odatmd
Definition: w3odatmd.F90:3
constants::tpi
real, parameter tpi
TPI 2*Pi.
Definition: constants.F90:72
w3servmd::strace
subroutine strace(IENT, SNAME)
Definition: w3servmd.F90:148
constants::fwtable
real, dimension(0:sizefwtable) fwtable
FWTABLE.
Definition: constants.F90:92
w3gdatmd::gtype
integer, pointer gtype
Definition: w3gdatmd.F90:1094
w3idatmd
Define data structures to set up wave model input data for several models simultaneously.
Definition: w3idatmd.F90:16
w3gdatmd::mapwn
integer, dimension(:), pointer mapwn
Definition: w3gdatmd.F90:1231
w3arrymd
Definition: w3arrymd.F90:3
w3gdatmd::ic2pars
real, dimension(:), pointer ic2pars
Definition: w3gdatmd.F90:1145
w3odatmd::ndst
integer, pointer ndst
Definition: w3odatmd.F90:456
constants
Define some much-used constants for global use (all defined as PARAMETER).
Definition: constants.F90:20
constants::delab
real delab
DELAB.
Definition: constants.F90:93
w3gdatmd::dden
real, dimension(:), pointer dden
Definition: w3gdatmd.F90:1234
w3gdatmd
Definition: w3gdatmd.F90:16
w3arrymd::prt2ds
subroutine prt2ds(NDS, NFR0, NFR, NTH, E, FR, UFR, FACSP, FSC, RRCUT, PRVAR, PRUNIT, PNTNME)
Definition: w3arrymd.F90:1943
w3dispmd
Definition: w3dispmd.F90:3
constants::grav
real, parameter grav
GRAV Acc.
Definition: constants.F90:61
w3gdatmd::flagll
logical, pointer flagll
Definition: w3gdatmd.F90:1219