| 313 |
|
int tstorage = 0; /* number of allocated time steps */ |
| 314 |
|
int nstored = 0; /* number of time steps in matrix */ |
| 315 |
|
int last_monthly = 0; /* month of last report */ |
| 316 |
– |
int inconsistent = 0; /* inconsistent options set? */ |
| 316 |
|
int mo, da; /* month (1-12) and day (1-31) */ |
| 317 |
|
double hr; /* hour (local standard time) */ |
| 318 |
|
double dir, dif; /* direct and diffuse values */ |
| 363 |
|
rhsubdiv = atoi(argv[++i]); |
| 364 |
|
break; |
| 365 |
|
case 'c': /* sky color */ |
| 367 |
– |
inconsistent |= (skycolor[1] <= 1e-4); |
| 366 |
|
skycolor[0] = atof(argv[++i]); |
| 367 |
|
skycolor[1] = atof(argv[++i]); |
| 368 |
|
skycolor[2] = atof(argv[++i]); |
| 369 |
|
break; |
| 370 |
|
case 'd': /* solar (direct) only */ |
| 371 |
|
skycolor[0] = skycolor[1] = skycolor[2] = 0; |
| 372 |
< |
if (suncolor[1] <= 1e-4) { |
| 375 |
< |
inconsistent = 1; |
| 376 |
< |
suncolor[0] = suncolor[1] = suncolor[2] = 1; |
| 377 |
< |
} |
| 372 |
> |
grefl[0] = grefl[1] = grefl[2] = 0; |
| 373 |
|
break; |
| 374 |
|
case 's': /* sky only (no direct) */ |
| 375 |
|
suncolor[0] = suncolor[1] = suncolor[2] = 0; |
| 381 |
– |
if (skycolor[1] <= 1e-4) { |
| 382 |
– |
inconsistent = 1; |
| 383 |
– |
skycolor[0] = skycolor[1] = skycolor[2] = 1; |
| 384 |
– |
} |
| 376 |
|
break; |
| 377 |
|
case 'r': /* rotate distribution */ |
| 378 |
|
if (argv[i][2] && argv[i][2] != 'z') |
| 397 |
|
} |
| 398 |
|
if (i < argc-1) |
| 399 |
|
goto userr; |
| 409 |
– |
if (inconsistent) |
| 410 |
– |
fprintf(stderr, "%s: WARNING: inconsistent -s, -d, -c options!\n", |
| 411 |
– |
progname); |
| 400 |
|
if (i == argc-1 && freopen(argv[i], "r", stdin) == NULL) { |
| 401 |
|
fprintf(stderr, "%s: cannot open '%s' for input\n", |
| 402 |
|
progname, argv[i]); |