/[MITgcm]/MITgcm/pkg/ecco/sw_ptmp.F
ViewVC logotype

Contents of /MITgcm/pkg/ecco/sw_ptmp.F

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


Revision 1.1 - (show annotations) (download)
Thu Nov 6 22:10:08 2003 UTC (20 years, 6 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint57t_post, checkpoint58l_post, checkpoint53f_post, checkpoint54a_pre, checkpoint55c_post, checkpoint53b_pre, checkpoint57m_post, checkpoint52l_pre, checkpoint52e_pre, hrcube4, checkpoint58e_post, checkpoint57v_post, checkpoint52n_post, checkpoint52j_post, checkpoint57f_post, checkpoint52e_post, checkpoint57s_post, checkpoint57j_post, checkpoint58b_post, checkpoint58m_post, checkpoint57b_post, checkpoint52d_pre, checkpoint53c_post, checkpoint53d_post, checkpoint57f_pre, checkpoint57k_post, checkpoint55d_pre, checkpoint57d_post, checkpoint57g_post, checkpoint57a_post, checkpoint58r_post, checkpoint55j_post, checkpoint56b_post, checkpoint57h_pre, checkpoint57y_post, checkpoint58g_post, checkpoint57x_post, checkpoint52j_pre, checkpoint54a_post, branch-netcdf, checkpoint52l_post, checkpoint55h_post, checkpoint58n_post, checkpoint58x_post, checkpoint52k_post, checkpoint52b_pre, checkpoint57g_pre, checkpoint54b_post, checkpoint58h_post, checkpoint57e_post, checkpoint58w_post, checkpoint54d_post, checkpoint56c_post, checkpoint54e_post, checkpoint58j_post, checkpoint55b_post, checkpoint57h_post, checkpoint52m_post, checkpoint57y_pre, checkpoint55, checkpoint53a_post, checkpoint55a_post, checkpoint57c_pre, hrcube5, checkpoint53b_post, checkpoint57o_post, checkpoint55g_post, checkpoint57r_post, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint55f_post, checkpoint57i_post, checkpoint59b, checkpoint59h, checkpoint59, checkpoint58, checkpoint57a_pre, checkpoint54, checkpoint57, checkpoint56, checkpoint53, checkpoint52, checkpoint52d_post, checkpoint52a_post, checkpoint57h_done, checkpoint58f_post, checkpoint59c, checkpoint53g_post, checkpoint52f_post, checkpoint57n_post, checkpoint52c_post, checkpoint58d_post, checkpoint57w_post, checkpoint57p_post, checkpint57u_post, checkpoint58a_post, checkpoint58i_post, checkpoint57q_post, ecco_c52_e35, checkpoint58o_post, checkpoint57z_post, checkpoint54f_post, eckpoint57e_pre, checkpoint58c_post, checkpoint58k_post, checkpoint57c_post, checkpoint58u_post, checkpoint58y_post, checkpoint52a_pre, checkpoint52b_post, checkpoint58v_post, checkpoint53d_pre, checkpoint58s_post, checkpoint55e_post, checkpoint54c_post, checkpoint58p_post, checkpoint52i_post, checkpoint58t_post, checkpoint58q_post, checkpoint55i_post, checkpoint57l_post, checkpoint52i_pre, checkpoint51u_post, checkpoint52h_pre, checkpoint52f_pre, hrcube_1, hrcube_2, hrcube_3, checkpoint56a_post, checkpoint55d_post
Branch point for: netcdf-sm0
o merging from ecco-branch
o pkg/ecco now containes ecco-specific part of cost function
o top level routines the_main_loop, forward_step
  supersede those in model/src/
  previous input data.cost now in data.ecco
  (new namelist ecco_cost_nml)

1 C $Header: /u/gcmpack/MITgcm/pkg/cost/Attic/sw_ptmp.F,v 1.1.2.1 2002/04/04 10:58:59 heimbach Exp $
2
3 #include "CPP_OPTIONS.h"
4
5
6 _RL function SW_PTMP (S,T,P,PR)
7
8 c ==================================================================
9 c SUBROUTINE SW_PTMP
10 c ==================================================================
11 c
12 c o Calculates potential temperature as per UNESCO 1983 report.
13 c
14 c started:
15 c
16 c Armin Koehl akoehl@ucsd.edu
17 c
18 c ==================================================================
19 c SUBROUTINE SW_PTMP
20 c ==================================================================
21 C S = salinity [psu (PSS-78) ]
22 C T = temperature [degree C (IPTS-68)]
23 C P = pressure [db]
24 C PR = Reference pressure [db]
25
26 implicit none
27
28 c routine arguments
29 _RL S,T,P,PR
30
31 c local arguments
32 _RL del_P ,del_th, th, q
33 _RL onehalf, two, three
34 parameter ( onehalf = 0.5 _d 0, two = 2. _d 0, three = 3. _d 0 )
35
36 c externals
37 _RL sw_adtg
38 external sw_adtg
39 c theta1
40 del_P = PR - P
41 del_th = del_P*sw_adtg(S,T,P)
42 th = T + onehalf*del_th
43 q = del_th
44 c theta2
45 del_th = del_P*sw_adtg(S,th,P+onehalf*del_P)
46
47 th = th + (1 - 1/sqrt(two))*(del_th - q)
48 q = (two-sqrt(two))*del_th + (-two+three/sqrt(two))*q
49
50 c theta3
51 del_th = del_P*sw_adtg(S,th,P+onehalf*del_P)
52 th = th + (1 + 1/sqrt(two))*(del_th - q)
53 q = (two + sqrt(two))*del_th + (-two-three/sqrt(two))*q
54
55 c theta4
56 del_th = del_P*sw_adtg(S,th,P+del_P)
57 SW_PTMP = th + (del_th - two*q)/(two*three)
58 return
59 end

  ViewVC Help
Powered by ViewVC 1.1.22