yp wrote:
> On Mar 8, 6:22 pm, David Fanning <n...@dfanning.com> wrote:
>> yp writes:
>>> Why is such discrepancy? In my problem the accuracy after 3rd decimal
>>> point is not so important, however, after seeing the results I lose
>>> confidence on IDL's capability on Real number arithmetic!
>>> May be I am missing something?
>> Well, maybe because I can't see it, but I'm immediately
>> suspicious of what is going on in OPERATION. If you
>> perform these two calls in the opposite order do you
>> get the same result? That is, do you know for a fact
>> that A, B, and F are not changing? (You have compared
>> them before and after?)
>>
>> If it was some other number, perhaps, but zero!? It seems
>> to me all computers can represent 0 accurately. :-)
>>
>> Cheers,
>>
>> David
>> --
>> David Fanning, Ph.D.
>> Fanning Software Consulting, Inc.
>> Coyote's Guide to IDL Programming:http://www.dfanning.com/
>> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
>
>
> Thanks David, for your suggestion. I am pretty sure that none of the
> argunet values change before or after the "Operation". And yes, the
> discrepancy occurs both ways...
>
> Here is the section from my running script.
>
> ;-------------
> PRO test_brdf
>
> wave = [412.5, 442.5, 490., 510., 560., 620., 660.] ;A (static)
> nwave = n_elements(wave) ;B (static)
> sza = 45.0D ;C (static)
> vza = 1.078D ;D (static)
> dphi = 0.0D ;E (static)
> chl = 0.03D ;F (static)
> null = 0.0D
>
> print,'BEFORE: ', wave, nwave, sza, vza, dphi, chl
> foq = (foq0 = (dblarr(nwave)))
>
> for i=0, n_elements(chl)-1 do begin
> int_LUT, wave, nwave, 0.0D, 0.0D, 0.0D, chl[i], foq0 ;Case1
> ; int_LUT, wave, nwave, null, null, null, chl[i], foq0 ;Case2
> int_LUT, wave, nwave, sza[i], vza[i], dphi[i], chl[i], foq
>
> print,'AFTER: ',wave, nwave, sza, vza, dphi, chl
> help,BRDF
>
> print,'BRDF: ',double(foq0[*]) / double(foq[*])
why are you using DOUBLE in the above line?
It seems all your numbers are exactly the same until you print the resultant foq0/foq. All
the (internal to int_LUN I assume) f/Q numbers are the same.
Why not just do,
print,'BRDF: ',foq0/foq
?
--
Paul van Delst Ride lots.
CIMSS @ NOAA/NCEP/EMC Eddy Merckx
Ph: (301)763-8000 x7748
Fax:(301)763-8545
|