Back to home page

MITgcm

 
 

    


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 C     /==========================================================\
                0005 C     | _RL FUNCTION SBO_RHO                                     |
                0006 C     | o Compute density for SBO package.                       |
                0007 C     |==========================================================|
                0008 C     | CHECK VALUE:                                             |
                0009 C     | DPT=5000; LAT=30; S=30; T=30; SBO_RHO=1038.298           |
                0010 C     \==========================================================/
                0011       IMPLICIT NONE
                0012 
                0013 C     == Routine arguments ==
                0014 C     SBO_RHO - density (kg/m^3)
                0015 C     DPT     - depth (m)
                0016 C     LAT     - latitude north (deg)
ba0b047096 Mart*0017 C     S       - salinity (g/kg)
6060ec2938 Dimi*0018 C     T       - potential temperature (deg C)
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 C     First convert depth to pressure
                0028 C     Ref: Saunders, "Practical Conversion of Pressure to Depth",
                0029 C     J. Phys. Oceanog., April 1981.
                0030 C     CHECK VALUE: P80=7500.004 DBARS;FOR LAT=30 DEG., DEPTH=7321.45 METERS
                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 C     Second convert temperature from potential to in situ
                0038 C     REF: BRYDEN,H.,1973,DEEP-SEA RES.,20,401-408
                0039 C     FOFONOFF,N.,1977,DEEP-SEA RES.,24,489-491
                0040 C     CHECKVALUE: THETA= 36.89073 C,S=40 (IPSS-78),T0=40 DEG C,
                0041 C     P0=10000 DECIBARS,PR=0 DECIBARS
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 C     Third compute density
                0078 C     BASED ON 1980 EQUATION
                0079 C     OF STATE FOR SEAWATER AND 1978 PRACTICAL SALINITY SCALE.
                0080 C     REFERENCES
                0081 C     MILLERO, ET AL (1980) DEEP-SEA RES.,27A,255-264
                0082 C     MILLERO AND POISSON 1981,DEEP-SEA RES.,28A PP 625-629.
                0083 C     BOTH ABOVE REFERENCES ARE ALSO FOUND IN UNESCO REPORT 38 (1981)
                0084 C     CHECK VALUE: SIGMA = 59.82037  KG/M**3 FOR S = 40 (IPSS-78) ,
                0085 C     T = 40 DEG C, P0= 10000 DECIBARS.
                0086 
                0087 C     CONVERT PRESSURE TO BARS AND TAKE SQUARE ROOT SALINITY.
                0088       P=P/10.
                0089       SR = sqrt(abs(S))
                0090 
                0091 C     INTERNATIONAL ONE-ATMOSPHERE EQUATION OF STATE OF SEAWATER
                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 C     SPECIFIC VOLUME AT ATMOSPHERIC PRESSURE
                0099       V350P = 1.0/1028.1063
                0100       x = -x*V350P/(1028.1063+x)
                0101 
                0102 C     COMPUTE COMPRESSION TERMS
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 C     EVALUATE PRESSURE POLYNOMIAL
                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