WAVEWATCH III  beta 0.0.1
w3flx4md.F90
Go to the documentation of this file.
1 
9 
10 #include "w3macros.h"
11 !/ ------------------------------------------------------------------- /
27 MODULE w3flx4md
28  !/
29  !/ +-----------------------------------+
30  !/ | WAVEWATCH III NOAA/NCEP |
31  !/ | H. L. Tolman |
32  !/ | S. Zieger |
33  !/ | Q. Liu |
34  !/ | FORTRAN 90 |
35  !/ | Last update : 24-Nov-2017 |
36  !/ +-----------------------------------+
37  !/
38  !/ 03-Jul-2006 : Origination. ( version 3.09 )
39  !/ 29-May-2009 : Preparing distribution version. ( version 3.14 )
40  !/ 15-Mar-2011 : Implementation of Hwang (2011)
41  !/ parameterization.
42  !/ 24-Nov_2017 : Modifying CDFAC ( Q. Liu)
43  !/
44  !/ Copyright 2009 National Weather Service (NWS),
45  !/ National Oceanic and Atmospheric Administration. All rights
46  !/ reserved. WAVEWATCH III is a trademark of the NWS.
47  !/ No unauthorized use without permission.
48  !/
49  ! 1. Purpose :
50  !
51  ! Flux/stress computations according to Hwang ( 2011).
52  !
53  ! References:
54  ! Hwang 2011: J Atmos Ocean Tech 28(3) 436-443
55  !
56  ! 2. Variables and types :
57  !
58  ! 3. Subroutines and functions :
59  !
60  ! Name Type Scope Description
61  ! ----------------------------------------------------------------
62  ! W3FLX4 Subr. Public Stresses according to Hwang (JTech, 2011)
63  ! ----------------------------------------------------------------
64  !
65  ! 4. Subroutines and functions used :
66  !
67  ! Name Type Module Description
68  ! ----------------------------------------------------------------
69  ! STRACE Subr. W3SERVMD Subroutine tracing.
70  ! ----------------------------------------------------------------
71  !
72  ! 5. Remarks :
73  !
74  ! 6. Switches :
75  !
76  ! !/S Enable subroutine tracing.
77  !
78  ! 7. Source code :
79  !/
80  !/ ------------------------------------------------------------------- /
81  !/
82  PUBLIC
83  !/
84 CONTAINS
85  !/ ------------------------------------------------------------------- /
105  SUBROUTINE w3flx4 ( ZWND, U10, U10D, UST, USTD, Z0, CD )
106  !/
107  !/ +-----------------------------------+
108  !/ | WAVEWATCH III NOAA/NCEP |
109  !/ | H. L. Tolman |
110  !/ | FORTRAN 90 |
111  !/ | Last update : 03-Jul-2006 |
112  !/ +-----------------------------------+
113  !/
114  !/ 03-Jul-2006 : Origination. ( version 3.09 )
115  !/
116  ! 1. Purpose :
117  !
118  ! Flux/stress computations according to Hwang (JTECH, 2011)
119  !
120  ! 2. Method :
121  !
122  ! CD = 1E-4 ( -0.016 U10**2 + 0.967U10 + 8.058)
123  ! USTAR = U10 * SQRT( U10 )
124  !
125  ! 3. Parameters :
126  !
127  ! Parameter list
128  ! ----------------------------------------------------------------
129  ! ZWND Real I Wind height.
130  ! U10 Real I Wind speed.
131  ! U10D Real I Wind direction.
132  ! UST Real O Friction velocity.
133  ! USTD Real 0 Direction of friction velocity.
134  ! Z0 Real O z0 in profile law.
135  ! CD Real O Drag coefficient.
136  ! ----------------------------------------------------------------
137  !
138  ! 4. Subroutines used :
139  !
140  ! Name Type Module Description
141  ! ----------------------------------------------------------------
142  ! STRACE Subr. W3SERVMD Subroutine tracing.
143  ! ----------------------------------------------------------------
144  !
145  ! 5. Called by :
146  !
147  ! Name Type Module Description
148  ! ----------------------------------------------------------------
149  ! W3SRCE Subr. W3SRCEMD Source term integration.
150  ! ----------------------------------------------------------------
151  !
152  ! 6. Error messages :
153  !
154  ! None.
155  !
156  ! 7. Remarks :
157  !
158  ! 8. Structure :
159  !
160  ! See source code.
161  !
162  ! 9. Switches :
163  !
164  ! !/S Enable subroutine tracing.
165  !
166  ! 10. Source code :
167  !
168  !/ ------------------------------------------------------------------- /
169  USE w3odatmd, ONLY: ndse, iaproc, naperr
170  USE w3gdatmd, ONLY: flx4a0
171  USE w3servmd, ONLY: extcde
172 #ifdef W3_S
173  USE w3servmd, ONLY: strace
174 #endif
175  !/
176  IMPLICIT NONE
177  !/
178  !/ ------------------------------------------------------------------- /
179  !/ Parameter list
180  !/
181  REAL, INTENT(IN) :: ZWND, U10, U10D
182  REAL, INTENT(OUT) :: UST, USTD, Z0, CD
183  !/
184  !/ ------------------------------------------------------------------- /
185  !/ Local parameters
186  !/
187 #ifdef W3_S
188  INTEGER, SAVE :: IENT = 0
189 #endif
190  !/
191  !/ ------------------------------------------------------------------- /
192  !/
193 #ifdef W3_S
194  CALL strace (ient, 'W3FLX4')
195 #endif
196  !
197  ! 1. Tests ---------------------------------------------------------- *
198  !
199  IF ( abs(zwnd-10.) .GT. 0.01 ) THEN
200  IF ( iaproc .EQ. naperr ) WRITE (ndse,1000) zwnd
201  CALL extcde (1)
202  END IF
203  !
204  ! 2. Computation ---------------------------------------------------- *
205  !
206  ! To prevent the drag coefficient from dropping to zero at extreme
207  ! wind speeds, we use a simple modification UST = 2.026 m/s for
208  ! U10 greater than 50.33 m/s.
209  !
210  IF (u10 .GE. 50.33) THEN
211  ust = 2.026 * sqrt(flx4a0)
212  cd = (ust/u10)**2
213  ELSE
214  cd = flx4a0 * ( 8.058 + 0.967*u10 - 0.016*u10**2 ) * 1e-4
215  ust = u10 * sqrt(cd)
216  END IF
217  !
218  z0 = zwnd * exp( -0.4 / sqrt(cd) )
219  ustd = u10d
220  !
221  RETURN
222  !
223  ! Formats
224  !
225 1000 FORMAT (/' *** WAVEWATCH III ERROR IN W3FLX4 : '/ &
226  ' HIGHT OF WIND SHOULD BE 10m IN THIS APPRACH '/ &
227  ' ZWND =',f8.2,'m'/)
228  !/
229  !/ End of W3FLX4 ----------------------------------------------------- /
230  !/
231  END SUBROUTINE w3flx4
232  !/
233  !/ End of module W3FLX4MD -------------------------------------------- /
234  !/
235 END MODULE w3flx4md
w3flx4md::w3flx4
subroutine w3flx4(ZWND, U10, U10D, UST, USTD, Z0, CD)
Flux/stress computations according to Hwang (JTECH, 2011).
Definition: w3flx4md.F90:106
w3gdatmd::flx4a0
real, pointer flx4a0
Definition: w3gdatmd.F90:1289
w3odatmd::iaproc
integer, pointer iaproc
Definition: w3odatmd.F90:457
w3odatmd::ndse
integer, pointer ndse
Definition: w3odatmd.F90:456
w3flx4md
Flux/stress computations according to Hwang ( 2011).
Definition: w3flx4md.F90:27
w3odatmd::naperr
integer, pointer naperr
Definition: w3odatmd.F90:457
w3servmd
Definition: w3servmd.F90:3
w3odatmd
Definition: w3odatmd.F90:3
w3servmd::strace
subroutine strace(IENT, SNAME)
Definition: w3servmd.F90:148
w3gdatmd
Definition: w3gdatmd.F90:16
w3servmd::extcde
subroutine extcde(IEXIT, UNIT, MSG, FILE, LINE, COMM)
Definition: w3servmd.F90:736