886 INTEGER FSHAPL, DSHAPL
896 INTEGER ID, IS, LSHAPE
920 REAL APSHAP, AUX1, AUX2, AUX3
921 REAL COEFF ,SYF ,MPER ,CTOT ,CTOTT,PKPER ,DIFPER
923 REAL RA ,SALPHA,SF ,SF4 ,SF5 ,FPK ,FPK4, FAC
928 LOGICAL LOGPM, DVERIF
1007 CALL strace(ient,
'SSHAPE')
1009 IF (
itest >= 80)
WRITE (
prtest, 8) fshapl, dshapl, &
1011 8
FORMAT (
' entry SSHAPE ', 2i3, 4e12.4)
1022 CALL msgerr(1,
' sign. wave height at boundary is not positive')
1040 100 fpk = (1./pkper)
1043 salpha = ((
spparm(1) ** 2) * (fpk4)) * 5. / 16.
1044 ELSE IF(lshape == 2)
THEN 1046 salpha = (
spparm(1)**2 * fpk4) / &
1047 ((0.06533*(
pshape(1)**0.8015)+0.13467)*16.)
1048 ELSE IF(lshape == 4)
THEN 1061 ra = (salpha/sf5)*exp(-(5.*fpk4)/(4.*sf4))/(
pi2_w*
spcsig(is))
1063 ELSE IF(lshape == 2)
THEN 1068 cpshap = 1.25 * fpk4 / sf4
1069 IF(cpshap > 10.)
THEN 1072 ra = (salpha/sf5) * exp(-cpshap)
1079 apshap = 0.5 * ((sf-fpk) / (coeff*fpk)) **2
1080 IF(apshap > 10.)
THEN 1083 ppshap = exp(-apshap)
1089 sf, salpha, cpshap, apshap, syf, ra
1090 112
FORMAT (
' SSHAPE freq. ', 8e12.4)
1091 ELSE IF(lshape == 3)
THEN 1101 ELSE IF(lshape == 4)
THEN 1106 ra = aux1 * exp( -1. * aux2 / aux3 ) /
spcsig(is)
1110 CALL msgerr (2,
'Wrong type for frequency shape')
1111 WRITE (
printf, *)
' -> ', fshapl, lshape
1119 hstmp = 4. * sqrt(ctott)
1122 303
FORMAT (
' SSHAPE, deviation in Hs, should be ', f8.3, &
1123 ', calculated ', f8.3)
1129 IF (.NOT.logpm .AND. itper < 10)
THEN 1142 aptail = 1. / (pptail * (1. + pptail * (
frinth-1.)))
1143 am0 = am0 *
frintf + aptail * as2
1145 eptail = 1. / (pptail * (1. + pptail * (
frinth-1.)))
1146 am1 = am1 *
frintf + eptail * as3
1149 mper =
pi2_w * am0 / am1
1151 CALL msgerr(3,
' first moment is zero in calculating the')
1152 CALL msgerr(3,
' spectrum at boundary using param. bc.')
1156 72
FORMAT (
' SSHAPE iter=', i2,
' period values:', 3f7.2)
1159 pkper = (
spparm(2) / mper) * pkper
1164 IF (itper >= 10)
THEN 1165 CALL msgerr(3,
'No convergence calculating the spectrum')
1166 CALL msgerr(3,
'at the boundary using parametric bound. cond.')
1174 ms = max(dspr**(-2) - 2., 1.)
1181 ctot = sqrt(0.5*ms/
pi_w) / (1. - 0.25/ms)
1183 IF(
itest >= 100)
THEN 1188 WRITE (
prtest, *)
' SSHAPE dir ', 4.*sqrt(
abs(esom)), &
1195 acos = cos(
spcdir(id,1) - adir)
1197 cdir = ctot * max(acos**ms, 1.e-10)
1199 IF(acos >= cos(
ddir)) dverif = .true.
1204 IF(
itest >= 10) ctott = ctott + cdir *
ddir 1206 360
FORMAT (
' ID Spcdir Cdir: ',i3,3(1x,e11.4))
1208 acloc(id,is) = cdir * acloc(
mdc,is)
1212 IF(
abs(ctott-1.) > 0.1)
WRITE (
printf, 363) ctott
1213 363
FORMAT (
' SSHAPE, integral of Cdir is not 1, but:', f6.3)
1215 IF (.NOT.
fulcir .AND. .NOT.dverif) &
1216 CALL msgerr (1,
'incident direction is outside sector')
real, dimension(:), allocatable, save spcsig
subroutine strace(IENT, SUBNAM)
real, dimension(:,:), allocatable, save spcdir
real, dimension(mshape) pshape
real, dimension(msppar) spparm
real function degcnv(DEGREE)
subroutine msgerr(LEV, STRING)
real, dimension(10) pwtail