Utility module containing miscellaneous tools that don't quite fit anywhere else.
Return a 2-vector comprising the minimum and maximum values of an array
Return [hi,low] for an array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x | Array to find extrema in |
Return [hi,low] for an array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:, :) | :: | x | Array to find extrema in |
Return [hi,low] for an array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:, :, :) | :: | x | Array to find extrema in |
Return a the maximum-minumum values of an array
Return hi-low for an array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x | Array to find span in |
Return hi-low for an array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:, :) | :: | x | Array to find span in |
Return hi-low for an array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:, :, :) | :: | x | Array to find span in |
Reduce an array to one dimension
Convert a 2d array to 1d
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:, :) | :: | A | Array to convert |
Convert a 3d array to 1d
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:, :, :) | :: | A | Array to convert |
Return an array of evenly-spaced values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | l | Low-bound for values |
||
real(kind=wp), | intent(in) | :: | h | High-bound for values |
||
integer, | intent(in), | optional | :: | N | Number of values (default 20) |
Test if text starts with str
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character, | intent(in) | :: | text | Text to search |
||
character, | intent(in) | :: | str | String to look for |
Test if text ends with str
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character, | intent(in) | :: | text | Text to search |
||
character, | intent(in) | :: | str | String to look for |
Return a sample from an approximate normal distribution with a mean of and a standard deviation of . In this approximate distribution, .
Return a sample from a uniform distribution in the range .
Construct a 2d array of X values from a structured grid
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x | x-positions in grid |
|
real(kind=wp), | intent(in), | dimension(:) | :: | y | y-positions in grid |
Construct a 2d array of Y values from a structured grid
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x | x-positions in grid |
|
real(kind=wp), | intent(in), | dimension(:) | :: | y | y-positions in grid |
Add terminal format codes to coloize a string
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character, | intent(in) | :: | s | String to colorize |
||
integer, | dimension(3) | :: | c | Color code in [r,g,b] where |
Convert a real to a character
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | a | Real value to convert |
||
character, | intent(in), | optional | :: | f | Format of result |
|
integer, | intent(in), | optional | :: | l | Length of result |
Convert an integer to a character
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | a | Integer value to convert |
||
character, | intent(in), | optional | :: | f | Format of result |
|
integer, | intent(in), | optional | :: | l | Length of result |
Compute the arithmetic mean of an array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | d |
Compute the standard deviation of an array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | d |
Show a progress bar with a message
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character, | intent(in) | :: | m | Message to show |
||
real(kind=wp), | intent(in) | :: | p | Progress level |