/[MITgcm]/MITgcm/pkg/sbo/sbo_rho.F
ViewVC logotype

Annotation of /MITgcm/pkg/sbo/sbo_rho.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (hide annotations) (download)
Tue Feb 18 05:33:55 2003 UTC (21 years, 4 months ago) by dimitri
Branch: MAIN
CVS Tags: checkpoint50c_post, checkpoint50c_pre, checkpoint48i_post, checkpoint50d_pre, checkpoint51, checkpoint50, checkpoint50d_post, checkpoint50b_pre, checkpoint51f_post, checkpoint51d_post, checkpoint51j_post, checkpoint48f_post, checkpoint48h_post, checkpoint51b_pre, checkpoint51h_pre, checkpoint50f_post, checkpoint50a_post, checkpoint50f_pre, branchpoint-genmake2, checkpoint51b_post, checkpoint51c_post, checkpoint50g_post, checkpoint50h_post, checkpoint50e_pre, checkpoint50i_post, checkpoint51i_pre, checkpoint50e_post, checkpoint51e_post, checkpoint49, checkpoint51f_pre, checkpoint48g_post, checkpoint51g_post, checkpoint50b_post, checkpoint51a_post
Branch point for: branch-genmake2, ecco-branch
Changes since 1.1: +120 -0 lines
Merging from release1_p12:
o Modifications for using pkg/exf with pkg/seaice
  - improved description of the various forcing configurations
  - added basic radiation bulk formulae to pkg/exf
  - units/sign fix for evap computation in exf_getffields.F
  - updated verification/global_with_exf/results/output.txt
o Added pkg/sbo for computing IERS Special Bureau for the Oceans
  (SBO) core products, including oceanic mass, center-of-mass,
  angular, and bottom pressure (see pkg/sbo/README.sbo).
o Lower bound for viscosity/diffusivity in pkg/kpp/kpp_routines.F
  to avoid negative values in shallow regions.
  - updated verification/natl_box/results/output.txt
  - updated verification/lab_sea/results/output.txt
o MPI gather, scatter: eesupp/src/gather_2d.F and scatter_2d.F
o Added useSingleCpuIO option (see PARAMS.h).
o Updated useSingleCpuIO option in mdsio_writefield.F to
  work with multi-field files, e.g., for single-file pickup.
o pkg/seaice:
  - bug fix in growth.F: QNET for no shortwave case
  - added HeffFile for specifying initial sea-ice thickness
  - changed SEAICE_EXTERNAL_FLUXES wind stress implementation
o Added missing /* */ to CPP comments in pkg/seaice, pkg/exf,
  kpp_transport_t.F, forward_step.F, and the_main_loop.F
o pkg/seaice:
  - adjoint-friendly modifications
  - added a SEAICE_WRITE_PICKUP at end of the_model_main.F

1 dimitri 1.2 C $Header:
2    
3     #include "SBO_OPTIONS.h"
4    
5     _RL FUNCTION SBO_RHO( DPT, LAT, S, T )
6     C /==========================================================\
7     C | _RL FUNCTION SBO_RHO |
8     C | o Compute density for SBO package. |
9     C |==========================================================|
10     C | CHECK VALUE: |
11     C | DPT=5000; LAT=30; S=30; T=30; SBO_RHO=1038.298 |
12     C \==========================================================/
13     IMPLICIT NONE
14    
15     C == Routine arguments ==
16     C SBO_RHO - density (kg/m^3)
17     C DPT - depth (m)
18     C LAT - latitude north (deg)
19     C S - salinity (PSU)
20     C T - potential temperature (deg C)
21    
22     _RL DPT,LAT,S,T
23    
24     _RL PLAT,D,C1,P,PR,Q,X,SR,V350P,B
25    
26     Real*8 PI
27     PARAMETER ( PI = 3.14159265358979323844D0 )
28    
29     C First convert depth to pressure
30     C Ref: Saunders, "Practical Conversion of Pressure to Depth",
31     C J. Phys. Oceanog., April 1981.
32     C CHECK VALUE: P80=7500.004 DBARS;FOR LAT=30 DEG., DEPTH=7321.45 METERS
33    
34     PLAT=abs(LAT*pi/180.)
35     D=sin(PLAT)
36     C1=5.92E-3+(D*D)*5.25E-3
37     P=((1-C1)-sqrt(((1-C1)**2)-(8.84E-6*abs(DPT))))/4.42E-6
38    
39     C Second convert temperature from potential to in situ
40     C REF: BRYDEN,H.,1973,DEEP-SEA RES.,20,401-408
41     C FOFONOFF,N.,1977,DEEP-SEA RES.,24,489-491
42     C CHECKVALUE: THETA= 36.89073 C,S=40 (IPSS-78),T0=40 DEG C,
43     C P0=10000 DECIBARS,PR=0 DECIBARS
44    
45     PR = P
46     P = 0.
47     Q = PR*((((-2.1687E-16*T+1.8676E-14)*T-4.6206E-13)*P+
48     & ((2.7759E-12*T-1.1351E-10)*(S-35.0)+
49     & ((-5.4481E-14*T+8.733E-12)*T-6.7795E-10)*T+
50     & 1.8741E-8))*P+(-4.2393E-8*T+1.8932E-6)*(S-35.0)+
51     & ((6.6228E-10*T-6.836E-8)*T+8.5258E-6)*T+3.5803E-5)
52    
53     T = T + 0.5*Q
54     P = P + 0.5*PR
55     x = PR*((((-2.1687E-16*T+1.8676E-14)*T-4.6206E-13)*P+
56     & ((2.7759E-12*T-1.1351E-10)*(S-35.0)+
57     & ((-5.4481E-14*T+8.733E-12)*T-6.7795E-10)*T+
58     & 1.8741E-8))*P+(-4.2393E-8*T+1.8932E-6)*(S-35.0)+
59     & ((6.6228E-10*T-6.836E-8)*T+8.5258E-6)*T+3.5803E-5)
60    
61     T = T + 0.29289322*(x-Q)
62     Q = 0.58578644*x + 0.121320344*Q
63     x = PR*((((-2.1687E-16*T+1.8676E-14)*T-4.6206E-13)*P+
64     & ((2.7759E-12*T-1.1351E-10)*(S-35.0)+
65     & ((-5.4481E-14*T+8.733E-12)*T-6.7795E-10)*T+
66     & 1.8741E-8))*P+(-4.2393E-8*T+1.8932E-6)*(S-35.0)+
67     & ((6.6228E-10*T-6.836E-8)*T+8.5258E-6)*T+3.5803E-5)
68    
69     T = T + 1.707106781*(x-Q)
70     Q = 3.414213562*x - 4.121320344*Q
71     P = P + 0.5*PR
72     x = PR*((((-2.1687E-16*T+1.8676E-14)*T-4.6206E-13)*P+
73     & ((2.7759E-12*T-1.1351E-10)*(S-35.0)+
74     & ((-5.4481E-14*T+8.733E-12)*T-6.7795E-10)*T+
75     & 1.8741E-8))*P+(-4.2393E-8*T+1.8932E-6)*(S-35.0)+
76     & ((6.6228E-10*T-6.836E-8)*T+8.5258E-6)*T+3.5803E-5)
77     T = T + (x-2.0*Q)/6.0
78    
79     C Third compute density
80     C BASED ON 1980 EQUATION
81     C OF STATE FOR SEAWATER AND 1978 PRACTICAL SALINITY SCALE.
82     C REFERENCES
83     C MILLERO, ET AL (1980) DEEP-SEA RES.,27A,255-264
84     C MILLERO AND POISSON 1981,DEEP-SEA RES.,28A PP 625-629.
85     C BOTH ABOVE REFERENCES ARE ALSO FOUND IN UNESCO REPORT 38 (1981)
86     C CHECK VALUE: SIGMA = 59.82037 KG/M**3 FOR S = 40 (IPSS-78) ,
87     C T = 40 DEG C, P0= 10000 DECIBARS.
88    
89     C CONVERT PRESSURE TO BARS AND TAKE SQUARE ROOT SALINITY.
90     P=P/10.
91     SR = sqrt(abs(S))
92    
93     C INTERNATIONAL ONE-ATMOSPHERE EQUATION OF STATE OF SEAWATER
94     x = (4.8314E-4 * S +
95     & ((-1.6546E-6*T+1.0227E-4)*T-5.72466E-3) * SR +
96     & (((5.3875E-9*T-8.2467E-7)*T+7.6438E-5)*T-4.0899E-3)*T
97     & +8.24493E-1)*S + ((((6.536332E-9*T-1.120083E-6)
98     & *T+1.001685E-4)*T-9.095290E-3)*T+6.793952E-2)*T-28.263737
99    
100     C SPECIFIC VOLUME AT ATMOSPHERIC PRESSURE
101     V350P = 1.0/1028.1063
102     x = -x*V350P/(1028.1063+x)
103    
104     C COMPUTE COMPRESSION TERMS
105     SR = ((((9.1697E-10*T+2.0816E-8)*T-9.9348E-7) * S +
106     & (5.2787E-8*T-6.12293E-6)*T+3.47718E-5) *P +
107     & (1.91075E-4 * SR + (-1.6078E-6*T-1.0981E-5)*T+2.2838E-3) *
108     & S + ((-5.77905E-7*T+1.16092E-4)*T+1.43713E-3)*T-0.1194975)
109     & *P + (((-5.3009E-4*T+1.6483E-2)*T+7.944E-2) * SR +
110     & ((-6.1670E-5*T+1.09987E-2)*T-0.603459)*T+54.6746) * S +
111     & (((-5.155288E-5*T+1.360477E-2)*T-2.327105)*T+148.4206)*T-1930.06
112    
113     C EVALUATE PRESSURE POLYNOMIAL
114     B = (5.03217E-5*P+3.359406)*P+21582.27
115     x = x*(1.0 - P/B) + (V350P+x)*P*SR/(B*(B+SR))
116     SR = V350P*(1.0 - P/B)
117     SBO_RHO = 1028.106331 + P/B/SR - x / (SR*(SR+x))
118    
119     RETURN
120     END

  ViewVC Help
Powered by ViewVC 1.1.22