c2f(3f) - [M_units:TEMPERATURE] convert Celsius to Fahrenheit (LICENSE:PD)
Synopsis
Description
Options
Example
Author
License
elemental real function c2f(celsius)
class(*),intent(in) :: celsius
Converts Celsius temperatures to Fahrenheit using the formula:
fahrenheit=(celsius+40.0)*9.0/5.0 - 40.0
celsius any standard scalar value supported by anyscalar_to_real(3f).
Sample program
program demo_c2f use M_units, only : c2f implicit none write(*,*)With REAL array input , c2f([ -40.0, 0.0, 100.0 ]) write(*,*)With INTEGER array input , c2f([ -40, 0, 100 ]) write(*,*)With DOUBLEPRECISION , c2f(-40.0d0),c2f(0.0d0),c2f(100.0d0) end program demo_c2fResults
With REAL array input -40.0000000 32.0000000 212.000000 With INTEGER array input -40.0000000 32.0000000 212.000000 With DOUBLEPRECISION -40.0000000 32.0000000 212.000000
John S. Urban
Public Domain
Nemo Release 3.1 | c2f (3) | February 23, 2025 |