WAVEWATCH III  beta 0.0.1
w3flx1md.F90
Go to the documentation of this file.
1 
7 
8 #include "w3macros.h"
9 !/ ------------------------------------------------------------------- /
21 MODULE w3flx1md
22  !/
23  !/ +-----------------------------------+
24  !/ | WAVEWATCH III NOAA/NCEP |
25  !/ | H. L. Tolman |
26  !/ | FORTRAN 90 |
27  !/ | Last update : 29-May-2009 |
28  !/ +-----------------------------------+
29  !/
30  !/ 03-Jul-2006 : Origination. ( version 3.09 )
31  !/ 29-May-2009 : Preparing distribution version. ( version 3.14 )
32  !/
33  !/ Copyright 2009 National Weather Service (NWS),
34  !/ National Oceanic and Atmospheric Administration. All rights
35  !/ reserved. WAVEWATCH III is a trademark of the NWS.
36  !/ No unauthorized use without permission.
37  !/
38  ! 1. Purpose :
39  !
40  ! Flux/stress computations according to Wu (1980)
41  !
42  ! 2. Variables and types :
43  !
44  ! 3. Subroutines and functions :
45  !
46  ! Name Type Scope Description
47  ! ----------------------------------------------------------------
48  ! W3FLX1 Subr. Public Stresses according to Wu (1980).
49  ! ----------------------------------------------------------------
50  !
51  ! 4. Subroutines and functions used :
52  !
53  ! Name Type Module Description
54  ! ----------------------------------------------------------------
55  ! STRACE Subr. W3SERVMD Subroutine tracing.
56  ! ----------------------------------------------------------------
57  !
58  ! 5. Remarks :
59  !
60  ! - Originally used with source term !/ST1.
61  !
62  ! 6. Switches :
63  !
64  ! !/S Enable subroutine tracing.
65  !
66  ! 7. Source code :
67  !/
68  !/ ------------------------------------------------------------------- /
69  !/
70  PUBLIC
71  !/
72 CONTAINS
73  !/ ------------------------------------------------------------------- /
88  SUBROUTINE w3flx1 ( ZWND, U10, U10D, UST, USTD, Z0, CD )
89  !/
90  !/ +-----------------------------------+
91  !/ | WAVEWATCH III NOAA/NCEP |
92  !/ | H. L. Tolman |
93  !/ | FORTRAN 90 |
94  !/ | Last update : 03-Jul-2006 |
95  !/ +-----------------------------------+
96  !/
97  !/ 03-Jul-2006 : Origination. ( version 3.09 )
98  !/
99  ! 1. Purpose :
100  !
101  ! FLux/stress computations according to Wu (1980)
102  !
103  ! 2. Method :
104  !
105  ! 3. Parameters :
106  !
107  ! Parameter list
108  ! ----------------------------------------------------------------
109  ! ZWND Real I Wind height.
110  ! U10 Real I Wind speed.
111  ! U10D Real I Wind direction.
112  ! UST Real O Friction velocity.
113  ! USTD Real 0 Direction of friction velocity.
114  ! Z0 Real O z0 in profile law.
115  ! CD Real O Drag coefficient.
116  ! ----------------------------------------------------------------
117  !
118  ! 4. Subroutines used :
119  !
120  ! Name Type Module Description
121  ! ----------------------------------------------------------------
122  ! STRACE Subr. W3SERVMD Subroutine tracing.
123  ! ----------------------------------------------------------------
124  !
125  ! 5. Called by :
126  !
127  ! Name Type Module Description
128  ! ----------------------------------------------------------------
129  ! W3SRCE Subr. W3SRCEMD Source term integration.
130  ! ----------------------------------------------------------------
131  !
132  ! 6. Error messages :
133  !
134  ! None.
135  !
136  ! 7. Remarks :
137  !
138  ! 8. Structure :
139  !
140  ! See source code.
141  !
142  ! 9. Switches :
143  !
144  ! !/S Enable subroutine tracing.
145  !
146  ! 10. Source code :
147  !
148  !/ ------------------------------------------------------------------- /
149  USE w3odatmd, ONLY: ndse, iaproc, naperr
150  USE w3servmd, ONLY: extcde
151 #ifdef W3_S
152  USE w3servmd, ONLY: strace
153 #endif
154  !/
155  IMPLICIT NONE
156  !/
157  !/ ------------------------------------------------------------------- /
158  !/ Parameter list
159  !/
160  REAL, INTENT(IN) :: ZWND, U10, U10D
161  REAL, INTENT(OUT) :: UST, USTD, Z0, CD
162  !/
163  !/ ------------------------------------------------------------------- /
164  !/ Local parameters
165  !/
166 #ifdef W3_S
167  INTEGER, SAVE :: IENT = 0
168 #endif
169  !/
170  !/ ------------------------------------------------------------------- /
171  !/
172 #ifdef W3_S
173  CALL strace (ient, 'W3FLX1')
174 #endif
175  !
176  ! 1. Tests ---------------------------------------------------------- *
177  !
178  IF ( abs(zwnd-10.) .GT. 0.01 ) THEN
179  IF ( iaproc .EQ. naperr ) WRITE (ndse,1000) zwnd
180  CALL extcde (1)
181  END IF
182  !
183  ! 2. Computation ---------------------------------------------------- *
184  !
185  cd = 0.001 * (0.8+0.065*u10)
186  z0 = zwnd * exp( -0.4 / sqrt(cd) )
187  ust = u10 * sqrt(cd)
188  ustd = u10d
189  !
190  RETURN
191  !
192  ! Formats
193  !
194 1000 FORMAT (/' *** WAVEWATCH III ERROR IN W3STR1 : '/ &
195  ' HIGHT OF WIND SHOULD BE 10m IN THIS APPRACH '/ &
196  ' ZWND =',f8.2,'m'/)
197  !/
198  !/ End of W3FLX1 ----------------------------------------------------- /
199  !/
200  END SUBROUTINE w3flx1
201  !/
202  !/ End of module INFLX1MD -------------------------------------------- /
203  !/
204 END MODULE w3flx1md
w3odatmd::iaproc
integer, pointer iaproc
Definition: w3odatmd.F90:457
w3odatmd::ndse
integer, pointer ndse
Definition: w3odatmd.F90:456
w3flx1md
Flux/stress computations according to Wu (1980).
Definition: w3flx1md.F90:21
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
w3servmd::extcde
subroutine extcde(IEXIT, UNIT, MSG, FILE, LINE, COMM)
Definition: w3servmd.F90:736
w3flx1md::w3flx1
subroutine w3flx1(ZWND, U10, U10D, UST, USTD, Z0, CD)
FLux/stress computations according to Wu (1980).
Definition: w3flx1md.F90:89