WAVEWATCH III  beta 0.0.1
w3sln1md Module Reference

Functions/Subroutines

subroutine w3sln1 (K, FHIGH, USTAR, USDIR, S)
 

Function/Subroutine Documentation

◆ w3sln1()

subroutine w3sln1md::w3sln1 ( real, dimension(nk), intent(in)  K,
real, intent(in)  FHIGH,
real, intent(in)  USTAR,
real, intent(in)  USDIR,
real, dimension(nth,nk), intent(out)  S 
)

Definition at line 57 of file w3sln1md.F90.

57  !/
58  !/ +-----------------------------------+
59  !/ | WAVEWATCH III NOAA/NCEP |
60  !/ | H. L. Tolman |
61  !/ | FORTRAN 90 |
62  !/ | Last update : 23-Jun-2006 |
63  !/ +-----------------------------------+
64  !/
65  !/ 23-Jun-2006 : Origination. ( version 3.09 )
66  !/
67  ! 1. Purpose :
68  !
69  ! Linear wind input according to Cavaleri and Melanotte-Rizzoli
70  ! (1982) filtered for low frequencies according to Tolman (1992).
71  !
72  ! 2. Method :
73  !
74  ! The expression of Cavaleri and Melanotte-Rizzoli, converted to
75  ! action spectra defined in terms of wavenumber and direction
76  ! becomes
77  !
78  ! -1 / / \ \ 4
79  ! Sln = SLNC1 * k * max | 0., | U* cos(Dtheta) | | (1)
80  ! \ \ / /
81  !
82  ! 2 -2
83  ! SLNC1 = 80 RHOr GRAV FILT (2)
84  !
85  ! Where :
86  !
87  ! RHOr Density of air dev. by density of water.
88  ! U* Wind friction velocity.
89  ! Dtheta Difference in wind and wave direction.
90  ! FILT Filter based on PM and cut-off frequencies.
91  !
92  ! 3. Parameters :
93  !
94  ! Parameter list
95  ! ----------------------------------------------------------------
96  ! K R.A. I Wavenumber for entire spectrum.
97  ! FHIGH R.A. I Cut-off frequency in integration (rad/s)
98  ! USTAR Real I Friction velocity.
99  ! USDIR Real I Direction of USTAR.
100  ! S R.A. O Source term.
101  ! ----------------------------------------------------------------
102  ! *) Stored as 1-D array with dimension NTH*NK
103  !
104  ! 4. Subroutines used :
105  !
106  ! Name Type Module Description
107  ! ----------------------------------------------------------------
108  ! STRACE Subr. W3SERVMD Subroutine tracing.
109  ! ----------------------------------------------------------------
110  !
111  ! 5. Called by :
112  !
113  ! Name Type Module Description
114  ! ----------------------------------------------------------------
115  ! W3SRCE Subr. W3SRCEMD Source term integration.
116  ! W3EXPO Subr. N/A Point output post-processor.
117  ! GXEXPO Subr. N/A GrADS point output post-processor.
118  ! ----------------------------------------------------------------
119  !
120  ! 6. Error messages :
121  !
122  ! None.
123  !
124  ! 7. Remarks :
125  !
126  ! 8. Structure :
127  !
128  ! See source code.
129  !
130  ! 9. Switches :
131  !
132  ! !/S Enable subroutine tracing.
133  ! !/T Test output.
134  !
135  ! 10. Source code :
136  !
137  !/ ------------------------------------------------------------------- /
138  USE constants
139  USE w3gdatmd, ONLY: nth, nk, ecos, esin, sig, slnc1, fspm, fshf
140  USE w3odatmd, ONLY: ndse, ndst
141  USE w3servmd, ONLY: extcde
142 #ifdef W3_S
143  USE w3servmd, ONLY: strace
144 #endif
145  !/
146  IMPLICIT NONE
147  !/
148  !/ ------------------------------------------------------------------- /
149  !/ Parameter list
150  !/
151  REAL, INTENT(IN) :: K(NK), FHIGH, USTAR, USDIR
152  REAL, INTENT(OUT) :: S(NTH,NK)
153  !/
154  !/ ------------------------------------------------------------------- /
155  !/ Local parameters
156  !/
157  INTEGER :: ITH, IK
158 #ifdef W3_S
159  INTEGER, SAVE :: IENT = 0
160 #endif
161  REAL :: COSU, SINU, DIRF(NTH), FAC, FF1, FF2, &
162  FFILT, RFR, WNF(NK)
163  !/
164  !/ ------------------------------------------------------------------- /
165  !/
166 #ifdef W3_S
167  CALL strace (ient, 'W3SLN1')
168 #endif
169  !
170  ! 1. Set up factors ------------------------------------------------- *
171  !
172 #ifdef W3_T
173  WRITE (ndst,900) ustar, usdir*rade
174 #endif
175  !
176  cosu = cos(usdir)
177  sinu = sin(usdir)
178  !
179  DO ith=1, nth
180  dirf(ith) = max( 0. , (ecos(ith)*cosu+esin(ith)*sinu) )**4
181  END DO
182  !
183  fac = slnc1 * ustar**4
184  ff1 = fspm * grav/(28.*ustar)
185  ff2 = fshf * min(sig(nk),fhigh)
186  ffilt = min( max(ff1,ff2) , 2.*sig(nk) )
187  DO ik=1, nk
188  rfr = sig(ik) / ffilt
189  IF ( rfr .LT. 0.5 ) THEN
190  wnf(ik) = 0.
191  ELSE
192  wnf(ik) = fac / k(ik) * exp(-rfr**(-4))
193  END IF
194  END DO
195  !
196  ! 2. Compose source term -------------------------------------------- *
197  !
198  DO ik=1, nk
199  s(:,ik) = wnf(ik) * dirf(:)
200  END DO
201  !
202  RETURN
203  !
204  ! Formats
205  !
206 #ifdef W3_T
207 900 FORMAT ( ' TEST W3SLN1 : USTAR, DIR :',f6.3, f6.1)
208 #endif
209  !/
210  !/ End of W3SLN1 ----------------------------------------------------- /
211  !/

References w3gdatmd::ecos, w3gdatmd::esin, w3servmd::extcde(), w3gdatmd::fshf, w3gdatmd::fspm, constants::grav, w3odatmd::ndse, w3odatmd::ndst, w3gdatmd::nk, w3gdatmd::nth, constants::rade, w3gdatmd::sig, w3gdatmd::slnc1, and w3servmd::strace().

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

w3gdatmd::nk
integer, pointer nk
Definition: w3gdatmd.F90:1230
w3gdatmd::sig
real, dimension(:), pointer sig
Definition: w3gdatmd.F90:1234
w3gdatmd::ecos
real, dimension(:), pointer ecos
Definition: w3gdatmd.F90:1234
constants::rade
real, parameter rade
RADE Conversion factor from radians to degrees.
Definition: constants.F90:76
w3gdatmd::slnc1
real, pointer slnc1
Definition: w3gdatmd.F90:1295
w3odatmd::ndse
integer, pointer ndse
Definition: w3odatmd.F90:456
w3gdatmd::esin
real, dimension(:), pointer esin
Definition: w3gdatmd.F90:1234
w3servmd
Definition: w3servmd.F90:3
w3gdatmd::nth
integer, pointer nth
Definition: w3gdatmd.F90:1230
w3odatmd
Definition: w3odatmd.F90:3
w3gdatmd::fshf
real, pointer fshf
Definition: w3gdatmd.F90:1295
w3servmd::strace
subroutine strace(IENT, SNAME)
Definition: w3servmd.F90:148
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
w3gdatmd
Definition: w3gdatmd.F90:16
w3servmd::extcde
subroutine extcde(IEXIT, UNIT, MSG, FILE, LINE, COMM)
Definition: w3servmd.F90:736
w3tidemd::fac
double precision, parameter fac
Definition: w3tidemd.F90:87
w3gdatmd::fspm
real, pointer fspm
Definition: w3gdatmd.F90:1295
constants::grav
real, parameter grav
GRAV Acc.
Definition: constants.F90:61