/[MITgcm]/MITgcm/model/src/seawater.F
ViewVC logotype

Diff of /MITgcm/model/src/seawater.F

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

revision 1.7 by mmazloff, Wed Feb 4 18:54:35 2015 UTC revision 1.8 by jmc, Thu Feb 5 04:52:11 2015 UTC
# Line 122  C theta1 Line 122  C theta1
122  C--   here we swap P and PR in order to get in-situ temperature  C--   here we swap P and PR in order to get in-situ temperature
123  C     del_P  = PR - P ! to get potential from in-situ temperature  C     del_P  = PR - P ! to get potential from in-situ temperature
124        del_P  = P - PR ! to get in-situ from potential temperature        del_P  = P - PR ! to get in-situ from potential temperature
125        del_th = del_P*sw_adtg(S,T,PR)        del_th = del_P*sw_adtg(S,T,P)
126        th     = T + onehalf*del_th        th     = T + onehalf*del_th
127        q      = del_th        q      = del_th
128  C theta2  C theta2
129        del_th = del_P*sw_adtg(S,th,PR+onehalf*del_P)        del_th = del_P*sw_adtg(S,th,P+onehalf*del_P)
130    
131        th     = th + (1 - 1/sqrt(two))*(del_th - q)        th     = th + (1 - 1/sqrt(two))*(del_th - q)
132        q      = (two-sqrt(two))*del_th + (-two+three/sqrt(two))*q        q      = (two-sqrt(two))*del_th + (-two+three/sqrt(two))*q
133    
134  C theta3  C theta3
135        del_th = del_P*sw_adtg(S,th,PR+onehalf*del_P)        del_th = del_P*sw_adtg(S,th,P+onehalf*del_P)
136        th     = th + (1 + 1/sqrt(two))*(del_th - q)        th     = th + (1 + 1/sqrt(two))*(del_th - q)
137        q      = (two + sqrt(two))*del_th + (-two-three/sqrt(two))*q        q      = (two + sqrt(two))*del_th + (-two-three/sqrt(two))*q
138    
139  C theta4  C theta4
140        del_th = del_P*sw_adtg(S,th,PR+del_P)        del_th = del_P*sw_adtg(S,th,P+del_P)
141        SW_temp= th + (del_th - two*q)/(two*three)        SW_temp= th + (del_th - two*q)/(two*three)
142    
143        RETURN        RETURN

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.22