-
Notifications
You must be signed in to change notification settings - Fork 1
/
wwm_sbottom.F90
87 lines (68 loc) · 2.6 KB
/
wwm_sbottom.F90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
SUBROUTINE SBOTTOM (F, FL, IJS, IJL, IG, SL, SSBF, DSSBF)
!SHALLOW
! ----------------------------------------------------------------------
!**** *SBOTTOM* - COMPUTATION OF BOTTOM FRICTION.
! G.J.KOMEN AND Q.D.GAO
! OPTIMIZED BY L.F. ZAMBRESKY
! J. BIDLOT ECMWF FEBRUARY 1997 ADD SL IN SUBROUTINE CALL
!* PURPOSE.
! --------
! COMPUTATION OF BOTTOM FRICTION DISSIPATION
!** INTERFACE.
! ----------
! *CALL* *SBOTTOM (F, FL, IJS, IJL, IG, SL)*
! *F* - SPECTRUM.
! *FL* - DIAGONAL MATRIX OF FUNCTIONAL DERIVATIVE
! *IJS* - INDEX OF FIRST GRIDPOINT
! *IJL* - INDEX OF LAST GRIDPOINT
! *IG* - BLOCK NUMBER
! *SL* - TOTAL SOURCE FUNCTION ARRAY
! METHOD.
! -------
! SEE REFERENCES.
! REFERENCES.
! -----------
! HASSELMANN ET AL, D. HYDR. Z SUPPL A12(1973) (JONSWAP)
! BOUWS AND KOMEN, JPO 13(1983)1653-1658
! ----------------------------------------------------------------------
! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK
! USE YOWPARAM , ONLY : NANG ,NFRE
! USE YOWPCONS , ONLY : G
! USE YOWSHAL , ONLY : DEPTH ,TFAK ,INDEP
! USE YOMHOOK ,ONLY : LHOOK, DR_HOOK
USE DATAPOOL, ONLY : FR, WETAIL, FRTAIL, WP1TAIL, ISHALLO, FRINTF, COFRM4, CG, WK, &
& DFIM, DFIMOFR, DFFR, DFFR2, WK, RKIND, EMEAN, FMEAN, TH, DEP, &
& DELTH => DDIR, &
& G => G9, &
& ZPI => PI2, &
& EPSMIN => SMALL, &
& NANG => MDC, &
& NFRE => MSC, &
& INDEP => DEP
! ----------------------------------------------------------------------
PARAMETER (CONST = -2.0*0.076/G)
REAL(rkind),DIMENSION(IJS:IJL,NANG,NFRE) :: F,FL,SL
REAL(rkind),DIMENSION(NANG,NFRE) :: SSBF, DSSBF
DIMENSION SBO(IJS:IJL)
! REAL ZHOOK_HANDLE
DO M=1,NFRE
DO IJ=IJS,IJL
IF(DEP(IJ).LT.999) THEN
ARG = 2.* DEP(IJ)*WK(M,IJ)!TFAK(INDEP(IJ),M)
ARG = MIN(ARG,50.)
SBO(IJ) = CONST*WK(M,IJ)/SINH(ARG)
! SBO(IJ) = CONST*TFAK(INDEP(IJ),M)/SINH(ARG)
ENDIF
ENDDO
DO K=1,NANG
DO IJ=IJS,IJL
IF(DEP(IJ).LT.999) THEN
SL(IJ,K,M) = SL(IJ,K,M)+SBO(IJ)*F(IJ,K,M)
FL(IJ,K,M) = FL(IJ,K,M)+SBO(IJ)
SSBF(K,M) = SBO(IJ)*F(IJ,K,M)
DSSBF(K,M) = SBO(IJ)
ENDIF
ENDDO
ENDDO
ENDDO
END SUBROUTINE SBOTTOM