I was just discussing the normalisation of the mode inertiae and I suddenly can't see that the code (version 5.2) reproduces what the documentation says. From the docs,

Code: Select all

`x_ref : reference fractional radius for photosphere, normalizations etc. (default 1 or outer grid point, whichever is smaller)`

Code: Select all

```
$ cd $GYRE_DIR
$ grep x_ref src/*/*.fpp
src/common/gyre_osc_par.fpp: real(WP) :: x_ref
src/common/gyre_osc_par.fpp: real(WP) :: x_ref
src/common/gyre_osc_par.fpp: namelist /osc/ x_ref, rotation_method, inner_bound, outer_bound, &
src/common/gyre_osc_par.fpp: x_ref = HUGE(0._WP)
src/common/gyre_osc_par.fpp: os_p(i) = osc_par_t(x_ref=x_ref, &
src/common/gyre_osc_par.fpp: call bcast(os_p%x_ref, root_rank)
src/mode/gyre_mode.fpp: real(WP) :: x_ref
src/mode/gyre_mode.fpp: x_ref = MIN(MAX(os_p%x_ref, gr%pt(1)%x), gr%pt(gr%n_k)%x)
src/mode/gyre_mode.fpp: md%k_ref = MINLOC(ABS(gr%pt%x - x_ref), DIM=1)
src/mode/gyre_mode.fpp: ! Calculate the effective temperature perturbation at x_ref
src/mode/gyre_mode.fpp: ! Calculate the effective gravity perturbation at x_ref (assumed
src/mode/gyre_mode.fpp: $WARN(Amplitude at x_ref is zero; not normalizing inertia)
src/output/gyre_output.fpp: $OUTPUT_MODES(r,x_ref,gr%pt(md(i_md)%k_ref)%x)
src/output/gyre_output.fpp: case ('x_ref')
src/output/gyre_output.fpp: call wr%write('x_ref', pt(md%k_ref)%x)
src/search/gyre_c_search.fpp: ! real(WP) :: x_ref
src/search/gyre_c_search.fpp: ! x_ref = x(n)
src/search/gyre_c_search.fpp: ! call bp%recon(cmplx(omega), x, x_ref, y, y_ref, discrim)
src/search/gyre_c_search.fpp: ! x, y, x_ref, y_ref)
```

Code: Select all

```
src/common/gyre_osc_par.fpp: x_ref = HUGE(0._WP)
src/mode/gyre_wave.fpp: x_ref = MIN(MAX(os_p%x_ref, gr%pt(1)%x), gr%pt(gr%n_k)%x)
```

Code: Select all

```
x_ref = 1._WP
```

I have no opinion on what the default behaviour should be, just that the documentation should match.

Cheers,

Warrick