pal icon indicating copy to clipboard operation
pal copied to clipboard

Possible problem with palRefco.c

Open davidneedelman opened this issue 3 years ago • 1 comments

I find that as I increase the relative humidity (fourth input argument), the values returned by the function give me a smaller refractive shift. I would think that I would get a larger refractive shift.

davidneedelman avatar Aug 15 '22 15:08 davidneedelman

palRefro is a direct port of the Fortran SLALIB and testing did show that it agrees with the original. I've had a quick look at the SOFA/ERFA code (which now can do atmospheric refraction -- it could not do it ten years ago) but there is no direct equivalent to palRefro that I can see.

It looks like the humidity only comes in to the algorithm in one place:

https://github.com/Starlink/pal/blob/master/palRefro.c#L261-L262

There seem to be six routines in SOFA/ERFA that now take relative humidity.

timj avatar Aug 15 '22 16:08 timj