-
Notifications
You must be signed in to change notification settings - Fork 0
/
bright_m.f
67 lines (54 loc) · 1.76 KB
/
bright_m.f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
REAL FUNCTION BRIGHT_M(W, R)
c-----------------------------------------------------------------------
c!F77
c
c!DESCRIPTION:
c Compute brightness temperature given monochromatic Planck radiance
c (Radiance units: Watts per square meter per steradian per micron)
c
c!INPUT PARAMETERS:
c W (REAL) Wavelength (microns)
c R (REAL) Monochromatic Planck radiance (Watts per
c square meter per steradian per micron)
c
c!OUTPUT PARAMETERS:
c BRIGHT_M (REAL) Brightness temperature (Kelvin)
c
c!REVISION HISTORY:
c
c!TEAM-UNIQUE HEADER:
c
c!END
c-----------------------------------------------------------------------
IMPLICIT NONE
c ... Include files ...........................
!include 'fundamental_constants.inc'
c ... Planck constant (Joule second)
double precision h
parameter (h = 6.62606876d-34)
c ... Speed of light in vacuum (meters per second)
double precision c
parameter (c = 2.99792458d+08)
c ... Boltzmann constant (Joules per Kelvin)
double precision k
parameter (k = 1.3806503d-23)
c ... Derived constants
double precision c1, c2
parameter (c1 = 2.0d+0 * h * c * c)
parameter (c2 = (h * c) / k)
c ... Finish include files ......................
c ... Arguments
real w, r
c ... Local variables
double precision ws
c ... Set default return value
bright_m = -1.0
c ... Check input parameters and return if they are bad
if (w .le. 0.0 .or. r .le. 0.0) return
c ... Convert wavelength to meters
ws = 1.0d-6 * dble(w)
c ... Compute brightness temperature
bright_m = sngl(c2 /
& (ws * log(c1 / (1.0d+6 * dble(r) * ws**5) + 1.0d+0)))
END