WAVEWATCH III  beta 0.0.1
w3sis1md Module Reference

Diffusion source term. More...

Functions/Subroutines

subroutine, public w3sis1 (A, ICE, S)
 Spectral reflection due to ice. More...
 

Detailed Description

Diffusion source term.

Author
S. Zieger
Date
20-Dec-2013

Function/Subroutine Documentation

◆ w3sis1()

subroutine, public w3sis1md::w3sis1 ( real, dimension(nspec), intent(in)  A,
real, intent(in)  ICE,
real, dimension(nspec), intent(out)  S 
)

Spectral reflection due to ice.

Parameters
[in]AAction density spectrum (1-D).
[in]ICESea ice concentration.
[out]SSource term (1-D version).
Author
S. Zieger
Date

Definition at line 75 of file w3sis1md.F90.

75  !/
76  !/ +-----------------------------------+
77  !/ | WAVEWATCH III NOAA/NCEP |
78  !/ | S. Zieger |
79  !/ | FORTRAN 90 |
80  !/ | Last update : 20-Dec-2013 |
81  !/ +-----------------------------------+
82  !/
83  !/ 16-Nov-2012 : Origination. ( version 4.14 )
84  !/ (S. Zieger)
85  ! 1. Purpose :
86  ! Spectral reflection due to ice.
87  !
88  !/ ------------------------------------------------------------------- /
89  !
90  ! 2. Method :
91  !
92  ! 3. Parameters :
93  !
94  ! Parameter list
95  ! ----------------------------------------------------------------
96  ! A R.A. I Action density spectrum (1-D)
97  ! ICE Real I Sea ice concentration.
98  ! S R.A. O Source term (1-D version).
99  ! ----------------------------------------------------------------
100  !
101  ! 4. Subroutines used :
102  !
103  ! Name Type Module Description
104  ! ----------------------------------------------------------------
105  ! ----------------------------------------------------------------
106  !
107  ! 5. Called by :
108  !
109  ! Name Type Module Description
110  ! ----------------------------------------------------------------
111  ! W3SRCE Subr. W3SRCEMD Source term integration.
112  ! W3EXPO Subr. N/A ASCII Point output post-processor.
113  ! W3EXNC Subr. N/A NetCDF Point output post-processor.
114  ! GXEXPO Subr. N/A GrADS point output post-processor.
115  ! ----------------------------------------------------------------
116  !
117  ! 6. Error messages :
118  !
119  ! None.
120  !
121  ! 7. Remarks :
122  !
123  ! If ice parameter 1 is zero, no calculations are made.
124  !
125  ! 8. Structure :
126  !
127  ! See source code.
128  !
129  ! 9. Switches :
130  !
131  ! !/S Enable subroutine tracing.
132  ! !/T Enable general test output.
133  ! 2-D print plot of source term.
134  !
135  ! 10. Source code :
136  !
137  !/ ------------------------------------------------------------------- /
138  USE w3odatmd, ONLY: ndse
139  USE w3servmd, ONLY: extcde
140  USE w3gdatmd, ONLY: nk, nth, nspec, sig, sig2, dden2
141  USE w3gdatmd, ONLY: dtmin, th, dth, ecos, dtmin
142  USE w3gdatmd, ONLY: is1c1, is1c2
143 #ifdef W3_T
144  USE w3odatmd, ONLY: ndst
145 #endif
146 #ifdef W3_S
147  USE w3servmd, ONLY: strace
148 #endif
149 #ifdef W3_T
150  USE w3arrymd, ONLY: prt2ds
151 #endif
152  !
153  IMPLICIT NONE
154  !/
155  !/ ------------------------------------------------------------------- /
156  !/ Parameter list
157  REAL, INTENT(IN) :: A(NSPEC), ICE
158  REAL, INTENT(OUT) :: S(NSPEC)
159  !/
160  !/ ------------------------------------------------------------------- /
161  !/ Local parameters
162  !/
163 #ifdef W3_S
164  INTEGER, SAVE :: IENT = 0
165 #endif
166  INTEGER :: IK, ITH, ITH2, IS, IS2
167  REAL :: ALPHA
168 #ifdef W3_T
169  REAL :: SOUT(NK,NTH)
170 #endif
171  !/
172  !/ ------------------------------------------------------------------- /
173  !/
174 #ifdef W3_S
175  CALL strace (ient, 'W3SIS1')
176 #endif
177  !
178  ! 0. Initializations ------------------------------------------------ *
179  !
180  s = 0.
181 #ifdef W3_T
182  sout = 0.
183 #endif
184  !
185  ! Calculate scattering coefficient (linear transfer function) ---- *
186  alpha = max(0., is1c1 * ice + is1c2)
187 #ifdef W3_T
188  WRITE(ndst,8000) alpha
189 #endif
190  !
191  IF (alpha.GT.0. .AND. ice.GT.0.) THEN
192  ! 1. Calculate the derivative ---------------------------------------- *
193  DO ik = 1,nk
194  DO ith = 1,nth
195  is = ith+(ik-1)*nth
196  IF (a(is).GE.0.) THEN
197  s(is) = s(is) - alpha * a(is)
198  DO ith2 = 1,nth
199  is2 = ith2+(ik-1)*nth
200  IF (is2.NE.is) THEN
201  s(is2) = s(is2) + alpha * a(is) / real(nth-1)
202  END IF
203  END DO
204  END IF
205  END DO
206  END DO
207  !
208  s = s / dtmin
209  !
210 #ifdef W3_T
211  DO ik = 1, nk
212  DO ith = 1, nth
213  is = ith+(ik-1)*nth
214  sout(ik,ith) = s(is)
215  END DO
216  END DO
217  CALL prt2ds (ndst, nk, nk, nth, sout, sig(1:nk), ' ', 1., &
218  0.0, 0.001, 'Diag Sir1', ' ', 'NONAME')
219 #endif
220  !
221  END IF
222  ! Formats
223 8000 FORMAT (' TEST W3SIS1 : ALPHA :',e10.3)
224  !
225  !/
226  !/ End of W3SIS1 ----------------------------------------------------- /
227  !/

References w3gdatmd::dden2, w3gdatmd::dth, w3gdatmd::dtmin, w3gdatmd::ecos, w3servmd::extcde(), w3gdatmd::is1c1, w3gdatmd::is1c2, w3odatmd::ndse, w3odatmd::ndst, w3gdatmd::nk, w3gdatmd::nspec, w3gdatmd::nth, w3arrymd::prt2ds(), w3gdatmd::sig, w3gdatmd::sig2, w3servmd::strace(), and w3gdatmd::th.

Referenced by w3srcemd::w3srce().

w3gdatmd::nk
integer, pointer nk
Definition: w3gdatmd.F90:1230
w3gdatmd::dth
real, pointer dth
Definition: w3gdatmd.F90:1232
w3gdatmd::nspec
integer, pointer nspec
Definition: w3gdatmd.F90:1230
w3gdatmd::is1c2
real, pointer is1c2
Definition: w3gdatmd.F90:1426
w3gdatmd::is1c1
real, pointer is1c1
Definition: w3gdatmd.F90:1426
w3gdatmd::sig
real, dimension(:), pointer sig
Definition: w3gdatmd.F90:1234
w3gdatmd::ecos
real, dimension(:), pointer ecos
Definition: w3gdatmd.F90:1234
w3gdatmd::dden2
real, dimension(:), pointer dden2
Definition: w3gdatmd.F90:1234
w3gdatmd::th
real, dimension(:), pointer th
Definition: w3gdatmd.F90:1234
w3odatmd::ndse
integer, pointer ndse
Definition: w3odatmd.F90:456
w3servmd
Definition: w3servmd.F90:3
w3gdatmd::dtmin
real, pointer dtmin
Definition: w3gdatmd.F90:1183
w3gdatmd::nth
integer, pointer nth
Definition: w3gdatmd.F90:1230
w3odatmd
Definition: w3odatmd.F90:3
w3gdatmd::sig2
real, dimension(:), pointer sig2
Definition: w3gdatmd.F90:1234
w3servmd::strace
subroutine strace(IENT, SNAME)
Definition: w3servmd.F90:148
w3wdatmd::ice
real, dimension(:), pointer ice
Definition: w3wdatmd.F90:183
w3arrymd
Definition: w3arrymd.F90:3
w3odatmd::ndst
integer, pointer ndst
Definition: w3odatmd.F90:456
w3gdatmd
Definition: w3gdatmd.F90:16
w3servmd::extcde
subroutine extcde(IEXIT, UNIT, MSG, FILE, LINE, COMM)
Definition: w3servmd.F90:736
w3arrymd::prt2ds
subroutine prt2ds(NDS, NFR0, NFR, NTH, E, FR, UFR, FACSP, FSC, RRCUT, PRVAR, PRUNIT, PNTNME)
Definition: w3arrymd.F90:1943