GenericMappingTools / gmt

The Generic Mapping Tools
https://www.generic-mapping-tools.org
Other
860 stars 359 forks source link

Time zone not changing when passing datetime to solar function #4695

Closed willschlitzer closed 3 years ago

willschlitzer commented 3 years ago

Using the +z modifier, I'm attempting to change the time zone for the -T parameter for solar. However, changing the time zone does not result in a different display of the day/night terminator as would be expected. This is an error I found when attempting to wrap the function in PyGMT, and @joa-quim asked me to open an issue at this forum post.

Full script that generated the error

The scripts that I'm passing will be with my PyGMT wrapped version of solar, but I believe it will adequately demonstrate the issue. Using identical Figure.coast commands, these different solar plots result in identical figures.

fig.solar(Td="+d1990-02-24T10:57:00+z0", fill="navyblue@80")

fig.solar(Td="+d1990-02-24T10:57:00+z10", fill="navyblue@80")

fig.solar(Td="+d2021-01-24T10:57:00+z-8", fill="navyblue@80")

Actual outcome

Screenshot from 2021-01-24 11-00-50

Expected outcome

The plots to have different day/night terminators.

System information

welcome[bot] commented 3 years ago

👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible. We appreciate that you took the time to contribute!

Please make sure you read our Contributing Guide and abide by our Code of Conduct.

joa-quim commented 3 years ago

Thanks. Reproducible with (change +z value at will)

gmt solar -Rd -Td+d2021-01-24T10:57:00+z10 -JW0/15c -Ba -png map