FV3 Bundle
gsw_gibbs_pt0_pt0.f90
Go to the documentation of this file.
1 !==========================================================================
2 elemental function gsw_gibbs_pt0_pt0 (sa, pt0)
3 !==========================================================================
4 !
5 ! gibbs_tt at (sa,pt,0)
6 !
7 ! sa : Absolute Salinity [g/kg]
8 ! pt0 : potential temperature [deg C]
9 !
10 ! gsw_gibbs_pt0_pt0 : gibbs_tt at (sa,pt,0)
11 !--------------------------------------------------------------------------
12 
14 
15 use gsw_mod_kinds
16 
17 implicit none
18 
19 real (r8), intent(in) :: sa, pt0
20 
21 real (r8) :: gsw_gibbs_pt0_pt0
22 
23 real (r8) :: x2, x, y, g03, g08
24 
25 x2 = gsw_sfac*sa
26 x = sqrt(x2)
27 y = pt0*0.025_r8
28 
29 g03 = -24715.571866078_r8 + &
30  y*(4420.4472249096725_r8 + &
31  y*(-1778.231237203896_r8 + &
32  y*(1160.5182516851419_r8 + &
33  y*(-569.531539542516_r8 + y*128.13429152494615_r8))))
34 
35 g08 = x2*(1760.062705994408_r8 + x*(-86.1329351956084_r8 + &
36  x*(-137.1145018408982_r8 + y*(296.20061691375236_r8 + &
37  y*(-205.67709290374563_r8 + 49.9394019139016_r8*y))) + &
38  y*(-60.136422517125_r8 + y*10.50720794170734_r8)) + &
39  y*(-1351.605895580406_r8 + y*(1097.1125373015109_r8 + &
40  y*(-433.20648175062206_r8 + 63.905091254154904_r8*y))))
41 
42 gsw_gibbs_pt0_pt0 = (g03 + g08)*0.000625_r8
43 
44 return
45 end function
46 
47 !--------------------------------------------------------------------------
elemental real(r8) function gsw_gibbs_pt0_pt0(sa, pt0)