So just now, following your code I entered:

>>> import ephem
>>> moon = ephem.Moon()
>>> moon.compute()
>>> print moon.phase
*and got*
41.6761169434

When I enter:

>>> import datetime
>>> import ephem
>>> print(ephem.Moon(datetime.date.today()).moon_phase)
*now I get*
0.31187416036

That's too large a difference between midnight and the actual time.

I'm clearly confused or doing something wrong (or both).

Plus that doesn't explain why weewx is still indicating 24% on Standard and 
Belchertown skins for me.

Best,
Phil

On Saturday, September 15, 2018 at 7:53:44 PM UTC-4, gjr80 wrote:
>
> Likewise on the first part.
>
> Just now my pyephem enabled page shows 41%, a non-pyephem enabled VM shows 
> 34%, timeanddate.com shows 40.5%, best I could get from USNO is 41% but I 
> am not sure as of what time that is, it is just shown as a 'day' figure. 
> Pyephem gives me 40.5641403198% but that is using:
>
> >>> import ephem
> >>> moon = ephem.Moon()
> >>> moon.compute()
> >>> print moon.phase
> 40.5641403198
>
> Your pyephem code gives me
>
> >>> import ephem
> >>> print(ephem.Moon(datetime.date.today()).moon_phase)
> 0.408785965463
> >>> datetime.date.today()
> datetime.date(2018, 9, 16)
>
> but I suspect the variance there is because datetime.date.today() returns 
> a date with no time so I suspect that will mean pyephem returns the moon 
> phase at midnight today whereas ephem.Moon()  will cause the current time 
> to be used instead. 
>
> Might need to look into the non-pyephem page 34% value but all the others 
> seem completely consistent to me.
>
> Gary
>
> On Sunday, 16 September 2018 09:26:30 UTC+10, Thomas Keffer wrote:
>>
>> Can't help you with the first of your two questions.
>>
>> Regarding the second, when I look at my own skin 
>> <http://www.threefools.org/weewx/>, it shows 41% for today. Are you sure 
>> you're not looking at an old, perhaps cached, version?
>>
>> -tk
>>
>> On Sat, Sep 15, 2018 at 2:45 PM Philip Kutzenco <[email protected]> 
>> wrote:
>>
>>> I've noticed that some information from the DarkSky API as well as 
>>> calculated moon phase don't seem to be correct or consistent with other 
>>> sources of data on WeeWX. Here's what I have seen:
>>>
>>> *DarkSky API* - I display a minimal 8 day forecast on the Belchertown 
>>> Skin. When I pull down the values using the SPI directly with my lat and 
>>> long, the values pulled down match what the skin shows. However, If I go to 
>>> DarkSky.net using the same location, the values (like min & max temp, 
>>> weather icon, precip probability etc.) are usually very different. I'm 
>>> pretty tuned into the weather right now as I live in Western North Carolina 
>>> and will be impacted by the remains of Florence over the next several days. 
>>> What's going on with the DarkSky API?
>>>
>>> *Moon phase* - WeeWX shows the moon phase for today to be a waxing 
>>> crescent - 24% (I think that means 24% visible or illuminated). When I do 
>>> the calculation using python's ephem module - 
>>> *print(ephem.Moon(datetime.date.today()).moon_phase)* - the answer I 
>>> get for moon phase is 31.19%. I thought that WeeWX used ephem for that 
>>> calculation. On timeanddate.com today's moon phase is 39.5%. At 
>>> http://aa.usno.navy.mil, 37% of the moon is illuminated today. Why such 
>>> a variation?
>>>
>>> These two items are vexing me. Can someone help explain these anomalies?
>>>
>>> Phil
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "weewx-user" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to