splin_mod.f
33 lines · 1 definitions · on GitHub (7be4133)
Python version: splin_mod.py, 19 lines, on the right (switch to Python above the code).
Purpose
SPLIN_MOD holds the work arrays of the interpolations by OSPLIN (the shape-preserving spline) in the routines that move quantities between the model's grid and the even grid in $\chi$ of rotational mixing: the table (XTAB, YTAB) and the points of evaluation (XVAL) with the values found (YVAL). Shared by 4 routines. It replaces COMMON/SPLIN/ (MHP via Claude, 10/14/26); JSON comes from DIMENSIONS_MOD.
What its variables hold, who sets them, who reads them.
XTAB(JSON),YTAB(JSON): the table to interpolate;XVAL(JSON): the abscissas at which to evaluate;YVAL(JSON): the values returned byOSPLIN. Each user fills them, callsOSPLINwith them as arguments and reads the result before returning:EQ2MOD,MIXCOM,MIXGRIDandROTGRID.OSPLINitself does not use the module (its arguments have the same names).
Design
A blanket USE SPLIN_MOD in each routine. The arrays are scratch space: no value is passed from one routine to another through them, so they could be local arrays of each user.
Definitions
moduleSPLIN_MOD
Uses modules DIMENSIONS_MOD
Change log
The changes since rp_1
Changed since rp_1. New file: COMMON/SPLIN/ as a module.