PyREC scaffolding (from YREC development, 7be4133)/ kspline.fGlossary

kspline.f

29 lines · 1 definitions · on GitHub (7be4133)

Python version: kspline.py, 49 lines, on the right (switch to Python above the code).

Purpose

KSPLINE computes the second derivatives of a natural cubic spline through exactly 4 points (the size NM = 4 is fixed), as in Numerical Recipes' SPLINE. KSPLINT evaluates the spline.

How it fits

Called by the surface-pressure routines KCSURFP and SURFP, the SCV equation of state EQSCVE, and TAUINTNEW. No COMMON blocks, no calls.

The method

The tridiagonal system for the second derivatives $y''_i$ of a natural spline ($y''_1 = y''_4 = 0$), solved by forward elimination and back-substitution.

Definitions

subroutineKSPLINE

lines 2–29 · GitHub

Natural cubic spline on 4 points: returns $y''$ in Y2.

Called by EQSCVE ×8, KCSURFP ×4, SURFP ×4, TAUINTNEW ×4

Change log

The changes since rp_1

Changed since rp_1. Declarations only: IMPLICIT NONE with explicit declarations.