File indexing completed on 2021-04-08 05:12:22 UTC
view on githubraw file Latest commit ba0b0470 on 2021-04-08 01:06:32 UTC
6060ec2938 Dimi*0001 #include "SBO_OPTIONS.h"
0002
0003 _RL FUNCTION SBO_RHO( DPT, LAT, S, T )
0004
0005
0006
0007
0008
0009
0010
0011 IMPLICIT NONE
0012
0013
0014
0015
0016
ba0b047096 Mart*0017
6060ec2938 Dimi*0018
ba0b047096 Mart*0019
6060ec2938 Dimi*0020 _RL DPT,LAT,S,T
0021
0022 _RL PLAT,D,C1,P,PR,Q,X,SR,V350P,B
0023
0024 Real*8 PI
0025 PARAMETER ( PI = 3.14159265358979323844D0 )
ba0b047096 Mart*0026
6060ec2938 Dimi*0027
0028
0029
0030
0031
0032 PLAT=abs(LAT*pi/180.)
0033 D=sin(PLAT)
0034 C1=5.92E-3+(D*D)*5.25E-3
0035 P=((1-C1)-sqrt(((1-C1)**2)-(8.84E-6*abs(DPT))))/4.42E-6
0036
0037
0038
0039
0040
0041
ba0b047096 Mart*0042
6060ec2938 Dimi*0043 PR = P
0044 P = 0.
0045 Q = PR*((((-2.1687E-16*T+1.8676E-14)*T-4.6206E-13)*P+
0046 & ((2.7759E-12*T-1.1351E-10)*(S-35.0)+
0047 & ((-5.4481E-14*T+8.733E-12)*T-6.7795E-10)*T+
0048 & 1.8741E-8))*P+(-4.2393E-8*T+1.8932E-6)*(S-35.0)+
0049 & ((6.6228E-10*T-6.836E-8)*T+8.5258E-6)*T+3.5803E-5)
ba0b047096 Mart*0050
6060ec2938 Dimi*0051 T = T + 0.5*Q
0052 P = P + 0.5*PR
0053 x = PR*((((-2.1687E-16*T+1.8676E-14)*T-4.6206E-13)*P+
0054 & ((2.7759E-12*T-1.1351E-10)*(S-35.0)+
0055 & ((-5.4481E-14*T+8.733E-12)*T-6.7795E-10)*T+
0056 & 1.8741E-8))*P+(-4.2393E-8*T+1.8932E-6)*(S-35.0)+
0057 & ((6.6228E-10*T-6.836E-8)*T+8.5258E-6)*T+3.5803E-5)
ba0b047096 Mart*0058
6060ec2938 Dimi*0059 T = T + 0.29289322*(x-Q)
0060 Q = 0.58578644*x + 0.121320344*Q
0061 x = PR*((((-2.1687E-16*T+1.8676E-14)*T-4.6206E-13)*P+
0062 & ((2.7759E-12*T-1.1351E-10)*(S-35.0)+
0063 & ((-5.4481E-14*T+8.733E-12)*T-6.7795E-10)*T+
0064 & 1.8741E-8))*P+(-4.2393E-8*T+1.8932E-6)*(S-35.0)+
0065 & ((6.6228E-10*T-6.836E-8)*T+8.5258E-6)*T+3.5803E-5)
ba0b047096 Mart*0066
6060ec2938 Dimi*0067 T = T + 1.707106781*(x-Q)
0068 Q = 3.414213562*x - 4.121320344*Q
ba0b047096 Mart*0069 P = P + 0.5*PR
6060ec2938 Dimi*0070 x = PR*((((-2.1687E-16*T+1.8676E-14)*T-4.6206E-13)*P+
0071 & ((2.7759E-12*T-1.1351E-10)*(S-35.0)+
0072 & ((-5.4481E-14*T+8.733E-12)*T-6.7795E-10)*T+
0073 & 1.8741E-8))*P+(-4.2393E-8*T+1.8932E-6)*(S-35.0)+
0074 & ((6.6228E-10*T-6.836E-8)*T+8.5258E-6)*T+3.5803E-5)
0075 T = T + (x-2.0*Q)/6.0
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088 P=P/10.
0089 SR = sqrt(abs(S))
0090
0091
0092 x = (4.8314E-4 * S +
0093 & ((-1.6546E-6*T+1.0227E-4)*T-5.72466E-3) * SR +
0094 & (((5.3875E-9*T-8.2467E-7)*T+7.6438E-5)*T-4.0899E-3)*T
0095 & +8.24493E-1)*S + ((((6.536332E-9*T-1.120083E-6)
0096 & *T+1.001685E-4)*T-9.095290E-3)*T+6.793952E-2)*T-28.263737
ba0b047096 Mart*0097
6060ec2938 Dimi*0098
0099 V350P = 1.0/1028.1063
0100 x = -x*V350P/(1028.1063+x)
0101
0102
ba0b047096 Mart*0103 SR = ((((9.1697E-10*T+2.0816E-8)*T-9.9348E-7) * S +
0104 & (5.2787E-8*T-6.12293E-6)*T+3.47718E-5) *P +
0105 & (1.91075E-4 * SR + (-1.6078E-6*T-1.0981E-5)*T+2.2838E-3) *
0106 & S + ((-5.77905E-7*T+1.16092E-4)*T+1.43713E-3)*T-0.1194975)
0107 & *P + (((-5.3009E-4*T+1.6483E-2)*T+7.944E-2) * SR +
0108 & ((-6.1670E-5*T+1.09987E-2)*T-0.603459)*T+54.6746) * S +
9e35920dc8 Oliv*0109 & (((-5.155288E-5*T+1.360477E-2)*T-2.327105)*T+148.4206)*T -
0110 & 1930.06
ba0b047096 Mart*0111
6060ec2938 Dimi*0112
0113 B = (5.03217E-5*P+3.359406)*P+21582.27
0114 x = x*(1.0 - P/B) + (V350P+x)*P*SR/(B*(B+SR))
0115 SR = V350P*(1.0 - P/B)
0116 SBO_RHO = 1028.106331 + P/B/SR - x / (SR*(SR+x))
0117
0118 RETURN
0119 END