July 31, 2020

Temperature V: Big Picture

To find the temperature, I created functions that more or less followed the guidelines from this post. The best way I found was to have slightly different functions for each category.

'normal': lambda x: -42.5 * (x / 90) ** 2 + 25 if x >=0 else -20 * (-x / 90) ** 2 + 25,
'hot': lambda x: -42.5 * (x / 90) ** 2 + 25 if x >=0 else -20 * (-x / 90) ** 4 + 25,
'cold': lambda x: -42.5 * (x / 90) ** 1.5 + 25 if x >=0 else -20 * (-x / 90) ** 1 + 25,
'cont': lambda x: -63 * (x / 90) ** 2 + 25 if x >=0 else -56.5 * (-x / 90) ** 2 + 25,
'cont+': lambda x: -63 * (x / 90) ** 2 + 25 if x >=0 else -20 * (-x / 90) ** 2 + 25

Then I just flip it around (reverse the latitude) in the opposite season. The common theme remains: the important thing is that this code exists and can be easily applied.
The next step is a small blur to smooth out the transitions, and then I lapse the temperature up based on height (-3.5 F per 1000 ft).

January
January

Looks reasonable to me, although I probably should fiddle with the map colors so that the hot and cold areas pop a bit more.

2 comments:

  1. Where'd you get the -3.5 degrees figure? Not trying to criticize, just interested in your source and might do further research

    ReplyDelete
    Replies
    1. No worries. I'm not as rigorous with sources this time around. That value is the environmental lapse rate.

      Delete