# Law of world temperature change(Take the measured data as an example)

## Recommended Posts

A friend of my said that the thermal stone turned yellow from white after eating hot dragon chili salad in winter. I think it is caused by the rapid change of world temperature rather than the increased temperature of thermal stone. Therefore, the idea of exploring the change law of world temperature came into being.

Data source:build a server and enter the instructions in the server:

`"TheWorld.task1 = TheWorld:DoPeriodicTask(1, function() print("Season:"..TheWorld.state.season, "Cycles:"..TheWorld.state.cycles,"Phase:"..TheWorld.state.phase, "World Temperature:"..TheWorld.state.temperature) end )"`

The instruction establishes a timing task by establishing the function doperiodictask, and records the data of three variables: season, phase and world temperature in the world state component per second. The statistical time is from the 2nd day to the 79th day of the world. The statistical results are as follows:

1.The change low of global temperature

Spoiler

It can be seen from this figure that the world temperature has a stable change trend. From the beginning of the world to winter, the temperature continues to decrease, the average temperature throughout the autumn continues to decline, and the temperature reaches the lowest point in the deep winter. Since then, the average temperature continues to rise and finally reaches the maximum one day in summer. Upon considering a whole year, The average temperature changes slowest in autumn. The daily temperature fluctuates regularly as well while having a stable change trend.

2.Daily variation of temperature

Daily temperature has its variation law as well. Shown in the figure:

Spoiler

the upper and lower limits of the color map are the upper and lower quartiles of temperature, the line in the middle of the color map is the average temperature of the whole season, the abscissa and ordinate are the day-time respectively. It can be seen from this figure that after dawn, the temperature rises and reaches its peak at about 90s, and then decline in a fluctuation way. The temperature meets its minimum value of the day at about 400s, then rises rapidly.

At the same time, an interesting phenomenon was found that the world temperature would not change for tens of seconds at some time of dusk shown in the figure:

Spoiler

3.Daily phase length change

The time of each phase is counted and displayed in the form of histogram, as shown in the figure:

Spoiler

The figure shows that the change of phase time is carried out by a way of step-by-step instead of per day. Some interesting phenomena are also observed: the length of day is almost the same in winter and spring; In summer, the time of night increases a little.

4. problem of the function “doperiodictask”

Meanwhile I found a problem of the function “doperiodictask”, as we all know, the total day time in DST is 480s. I set the function doperiodictask to per second. Then there will be 480 data point in an in-game-day I will get. But in fact, I get 496 or 497 data point an in-game-day.

Spoiler

There are two reason result this:

If the total in-game-day time is 480s, then per task take a time of 0.96s. We all know that one second equal to 30 flame in the game DST, so it takes 29 frame(0.96s) to run the task. Where does the frame 0.04s go?

If per task spend 1s, then the in-game-day time should be 496s or 497s.

Thank you for coming to my post. Here are some summaries:

1. The annual variation of world temperature is a bit like a trigonometric function

2. The diurnal variation of world temperature increases first and then decreases

3. Phase change is not effective every day, but step-by-step

4. The function "doperiodictask" may be completed one frame earlier than expected

Wish you all have a nice day, and i now go to my bed to rest.

##### Share on other sites

This thread is amazing, you could fool me into thinking those graphs are for recording irl climate temperatures. Great data!

##### Share on other sites

So many amazing charts and diagrams, this is wonderful!

##### Share on other sites

5 hours ago, dish-order man said:

Meanwhile I found a problem of the function “doperiodictask”, as we all know, the total day time in DST is 480s. I set the function doperiodictask to per second. Then there will be 480 data point in an in-game-day I will get. But in fact, I get 496 or 497 data point an in-game-day.

Aye, I reported on this issue a while ago here:

Your sample here checks out, 480/30 = 16, 480 + 16 = 496.  These small errors add up when using periodic tasks.

##### Share on other sites

Jimmy Neutron moment

##### Share on other sites

8 hours ago, CarlZalph said:

Aye, I reported on this issue a while ago here:

amazing! i newly experience this problem and you have already solved it,  you are strong on codingthat is why  professionals are called  professionals

##### Share on other sites

Wow! This was an absolute joy to read. Graphs are very well constructed and the data is clear. Especially the first graph, that one's my favourite