This fixes a bug related to finite-difference mode. When diagnostic output quantities are requested that require a second radial derivative, that derivative is calculated at output time. The subroutine that handles the derivative calculations at output time was lacking any logic that would call the appropriate finite-difference derivative routine. Instead, a Chebyshev derivative routine was called, which caused a crash because the Chebyshev grid object had not been initialized. This PR fixes this bug by adding appropriate finite-difference logic to Diagnostics_Second_Derivatives.F90.
This fixes a bug related to finite-difference mode. When diagnostic output quantities are requested that require a second radial derivative, that derivative is calculated at output time. The subroutine that handles the derivative calculations at output time was lacking any logic that would call the appropriate finite-difference derivative routine. Instead, a Chebyshev derivative routine was called, which caused a crash because the Chebyshev grid object had not been initialized. This PR fixes this bug by adding appropriate finite-difference logic to Diagnostics_Second_Derivatives.F90.