TransWikia.com

Charting sun location throughout the year from a specified geographic location

Mathematica Asked on February 11, 2021

I’d like to chart the location of the sun (azimuth and elevation) from a given location (e.g., Chicago) throughout the year for a stated year (e.g., 2010).

Here is the basic extraction of the current location of the sun, but it doesn’t include a specified location or time.

Dataset[EntityValue[
   Entity["Star", "Sun"], 
  {EntityProperty["Star", "RightAscension"], 
   EntityProperty["Star", "Declination"]}, 
   "PropertyAssociation"]]

(Here is a good background description.)

solar paths

Plotting one path per month would be sufficient. (365 such paths would be too crowded.)

Any suggestions?

One Answer

@chuy provided the key functionality... for which I'm grateful.

Here's the solution:

sunPosition = 
 SunPosition[Entity["City", {"Delft", "ZuidHolland", "Netherlands"}], 
    TimeZoneConvert[DateObject[{2020, 6, 21, #}, TimeZone -> 0], 
     Entity["City", {"Delft", "ZuidHolland", "Netherlands"}]]] & /@ 
  Range[1, 15];

ListPlot[sunPosition,
 PlotRange -> {-20, 70},
 Joined -> True,
 Ticks -> {Table[{i, 
     Text[Style[i^o, 14, FontFamily -> "Latin Modern Roman", 
       Italic]]}, {i, 0, 360, 30}], 
   Table[{j, 
     Text[Style[j^o, 14, FontFamily -> "Latin Modern Roman", 
       Italic]] }, {j, 0, 60, 20}]}]

enter image description here

Answered by David G. Stork on February 11, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP