clamp_extreme_log_range Subroutine

public subroutine clamp_extreme_log_range(data_min, data_max, clamped_min, clamped_max)

Clamp extreme logarithmic ranges to ensure usable plots

This function prevents precision loss and overflow when dealing with extreme ranges like huge() to tiny() values. It preserves scientific correctness while ensuring practical visualization.

@param data_min: Original minimum data value @param data_max: Original maximum data value @param clamped_min: Output clamped minimum value @param clamped_max: Output clamped maximum value

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: data_min
real(kind=wp), intent(in) :: data_max
real(kind=wp), intent(out) :: clamped_min
real(kind=wp), intent(out) :: clamped_max