3 saturation_fraction, ctfreezing_sa, ctfreezing_p)
33 real (r8),
intent(in) :: sa, p, saturation_fraction
34 real (r8),
intent(out),
optional :: ctfreezing_sa, ctfreezing_p
36 real (r8) :: tf_sa, tf_p, ct_sa_wrt_t, ct_t_wrt_t, ct_p_wrt_t, tf
40 if (
present(ctfreezing_sa) .and.
present(ctfreezing_p))
then 43 tfreezing_sa=tf_sa,tfreezing_p=tf_p)
45 ct_sa_wrt_t=ct_sa_wrt_t,ct_t_wrt_t=ct_t_wrt_t,ct_p_wrt_t=ct_p_wrt_t)
47 ctfreezing_sa = ct_sa_wrt_t + ct_t_wrt_t*tf_sa
48 ctfreezing_p = ct_p_wrt_t + ct_t_wrt_t*tf_p
50 else if (
present(ctfreezing_sa) .and. .not.
present(ctfreezing_p))
then 55 ct_sa_wrt_t=ct_sa_wrt_t,ct_t_wrt_t=ct_t_wrt_t)
57 ctfreezing_sa = ct_sa_wrt_t + ct_t_wrt_t*tf_sa
59 else if (.not.
present(ctfreezing_sa) .and.
present(ctfreezing_p))
then 64 ct_t_wrt_t=ct_t_wrt_t,ct_p_wrt_t=ct_p_wrt_t)
66 ctfreezing_p = ct_p_wrt_t + ct_t_wrt_t*tf_p
elemental subroutine gsw_ct_freezing_first_derivatives(sa, p, saturation_fraction, ctfreezing_sa, ctfreezing_p)