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

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).

Variables on this page (5)

json, xtab, xval, ytab, yval

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 by OSPLIN. Each user fills them, calls OSPLIN with them as arguments and reads the result before returning: EQ2MOD, MIXCOM, MIXGRID and ROTGRID. OSPLIN itself 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

lines 19–33 · GitHub

Uses modules DIMENSIONS_MOD

Used by (4 units)

EQ2MOD, MIXCOM, MIXGRID, ROTGRID

Change log

The changes since rp_1

Changed since rp_1. New file: COMMON/SPLIN/ as a module.