29 {
30
31
32 if (argc != 3 && argc != 7)
34 ("Give parameters: [ <rad> <nu> | "
35 " <rad0> <rad1> <drad> <nu0> <nu1> <dnu> ]");
36
37
38 if (argc == 3) {
39
40
41 double rad = atof(argv[1]);
42 double nu = atof(argv[2]);
43
44
45 printf(
"%.10g\n",
BRIGHT(rad, nu));
46
47 }
48
49
50 else if (argc == 7) {
51
52
53 double rad0 = atof(argv[1]);
54 double rad1 = atof(argv[2]);
55 double drad = atof(argv[3]);
56 double nu0 = atof(argv[4]);
57 double nu1 = atof(argv[5]);
58 double dnu = atof(argv[6]);
59
60
61 printf("# $1 = radiance [W/(m^2 sr cm^-1)]\n"
62 "# $2 = wavenumber [cm^-1]\n"
63 "# $3 = brightness temperature [K]\n");
64
65
66 for (double rad = rad0; rad <= rad1; rad += drad) {
67 printf("\n");
68 for (double nu = nu0; nu <= nu1; nu += dnu)
69 printf(
"%.10g %.4f %.10g\n", rad, nu,
BRIGHT(rad, nu));
70 }
71 }
72
73 return EXIT_SUCCESS;
74}
#define BRIGHT(rad, nu)
Compute brightness temperature.
#define ERRMSG(...)
Print error message and quit program.