浙江瞬时单位线代码

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Sub ZjssDWS()

'Rem 浙江瞬时单位线洪水计算程序

Dim NsF As String

Dim AsF As String

Dim AsF2 As String

Dim Ts As Integer

Dim FJa As String

Dim TT As Integer

TT = 230

Dim D(1000) '-------------

Dim M(1000) '---------------

Dim A(10)

Dim B(10, 100)

Dim SS(10, 100)

Dim AcSheet

Dim Cel As Range

Set AcSheet = ThisWorkbook.Sheets("输入")

For Each Cel In edRange

If Cel.Value = "参数" Then

NsF = Cel.Offset(1, 1)

A0 = Cel.Offset(2, 1)

PL = Cel.Offset(3, 1)

DT = Cel.Offset(4, 1)

NDT = Cel.Offset(5, 1)

FDT = Cel.Offset(6, 1)

FF = Cel.Offset(7, 1)

L = Cel.Offset(8, 1)

SL = Cel.Offset(9, 1)

CS = Cel.Offset(10, 1)

WS = Cel.Offset(11, 1)

IM = Cel.Offset(12, 1)

End If

Next

Ts = 0

For Each Cel In edRange

If Cel.Value = "单位线" Then

Do

Ts = Ts + 1

Loop Until Cel.Offset(Ts, 0).Value < 1 End If

Next

Ts = Ts - 1

ReDim C(Ts + 1)

For Each Cel In edRange

If Cel.Value = "单位线" Then

For I = 1 To Ts

C(I) = Cel.Offset(I, 0).Value

C(I) = C(I) / 10000 * FF

Next I

End If

Next

Ts = 0

For Each Cel In edRange

If Cel.Value = "毛雨量" Then

Do

Ts = Ts + 1

' Loop Until Cel.Offset(Ts, 0).Value < 1

Loop Until Cel.Offset(Ts, 0).Value = 0 End If

Next

Ts = Ts - 1

AcSheet.Range("B6").Value = Ts

ReDim Rg(Ts) '-------------------------------

For Each Cel In edRange

If Cel.Value = "毛雨量" Then

For I = 1 To Ts

Rg(I) = Cel.Offset(I, 0).Value

Next I

End If

Next

ReDim F(Ts): ReDim R(Ts)

SL = SL / 1000

WS = WS * DT

If FF < 50 Then N = 1.5: GoTo 60

If FF < 250 Then N = 2: GoTo 60

If FF < 400 Then N = 2.5: GoTo 60

If FF < 600 Then N = 3: GoTo 60

If FF < 850 Then N = 3.6: GoTo 60

N = 4.2

60 JF = SL ^ (1 / 3) * FF ^ -0.25: LJ = L / SL ^ (1 / 3): Fa = FF / 3.6 / DT

M1 = 0.0065 * LJ + 6.8

If JF < 0.037 Then Bk = Sqr(5 * (JF - 0.019)) + 0.15: GoTo 85

If JF < 0.06 Then Bk = Sqr((JF - 0.0294) / 0.45) + 0.32: GoTo 85

Bk = Sqr((JF - 0.054) / 1.56) + 0.516

85 Ak = M1 * 10 ^ Bk

AcSheet.Range("L3").Value = M1

AcSheet.Range("L4").Value = Ak

AcSheet.Range("L5").Value = Bk

If AcSheet.Range("M3").Value <> 0 Then M1 = AcSheet.Range("M3").Value If AcSheet.Range("M4").Value <> 0 Then Ak = AcSheet.Range("M4").Value If AcSheet.Range("M5").Value <> 0 Then Bk = AcSheet.Range("M5").Value

For I = 5 To IM Step 5: K = Ak / I ^ Bk / N: NN = Int(I / 5): LL = 0

A(NN - 1) = K: SS(NN, LL) = 0: NT = 0

101 NT = NT + DT

TK = NT / K

Call ASA(N, TK, US)

SS(NN, LL + 1) = US

ES = SS(NN, LL + 1) - SS(NN, LL)

If ES < 0.001 And 1! - SS(NN, LL + 1) < 0.002 Then

SS(NN, LL + 1) = 1!

GoTo 110

End If

LL = LL + 1

GoTo 101

110 If I = 5 Then PT = LL + 1

B(NN, 0) = SS(NN, 0) * Fa

For IJ = 0 To LL

B(NN, IJ + 1) = SS(NN, IJ + 1) - SS(NN, IJ)

B(NN, IJ + 1) = B(NN, IJ + 1) * Fa

Next IJ

Next I

AcSheet.Range("J2").Value = NsF

相关文档
最新文档