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

getgrid.f

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

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

Variables on this page (8)

chi, cln, dchi, echi, es1, hpttol, json, ntot

Purpose

GETGRID builds the equally spaced grid on which the diffusion equations for rotational mixing and angular momentum transport are solved. The grid variable is the combination of $\log m$, $L$ and $\log P$ that HPOINT uses to place the model's points, with one difference: HPOINT scales $\Delta_L$ by the largest $L$ in the model, GETGRID by the surface $L$.

How it fits

The method

With the model's spacing criteria $\Delta_m$ = HPTTOL(2), $\Delta_L$ = HPTTOL(9)$\cdot L_\mathrm{surf}$ (with $L_\mathrm{surf}$ = HL(M)), $\Delta_P$ = HPTTOL(11), $$\chi_i = \frac{\log m_i}{\Delta_m} + \frac{L_i}{\Delta_L} - \frac{\log P_i}{\Delta_P}.$$ The equally spaced grid runs from $\chi_1$ to $\chi_N$ with $N$ = NTOT points, $\Delta\chi = (\chi_N - \chi_1)/(N-1)$, and $\log m$ is interpolated onto it with OSPLIN, then unlogged.

Definitions

subroutineGETGRID

lines 2–94 · GitHub

Equally spaced grid in $\chi = \log m/\Delta_m + L/\Delta_L - \log P/\Delta_P$, with the mass of each grid point by spline interpolation.

Uses modules CONSTANTS_MOD, DIMENSIONS_MOD, EGRID_MOD, NMLPAR_MOD

Called by MIXGRID, ROTGRID

Flowchart of its calls, in order (1)

Change log

The changes since rp_1

Changed since rp_1. Declarations only: COMMON blocks to modules, IMPLICIT NONE.