### Author Topic: Understanding climates and snowlines  (Read 2924 times)

0 Members and 1 Guest are viewing this topic.

#### uci

• Posts: 118
• Without owner
• Languages: EN, RO
##### Understanding climates and snowlines
« on: February 13, 2018, 01:31:35 PM »
THIS TUTORIAL WILL BECOME OBSOLETE. PLEASE USE THE NEW VERSION HERE:
https://forum.simutrans.com/index.php?topic=18041.0

Below are my own findings regarding landscape settings (climates and snowlines).

Snowlines are relative to water level.

summer snowline = maximum height relative to water level which is snow-free in mid summer;
winter snowline = maximum height relative to water level which is snow-free in mid winter;

Example:

water_level = -2
summer_snowline = 10
winter_snowline = 2

and I get the following snow coverage on map:

minimum absolute height with snow in mid summer is: water_level + summer_snowline + 1 = -2+10+1 = 9;
minimum absolute height with snow in mid winter is: water_level + winter_snowline + 1 = -2+2+1 = 1;

Climate heights are NOT relative to water level (except alpine and arctic).

desert/tropical/mediterranean/temperate/tundra climates = maximum absolute height in which that climate appears (if two climates have the same value only the first climate is shown);

alpine (rocky) climate = maximum height relative to water level in which this climate appear (it equals summer snowline);

arctic climate =
extends above alpine climate (always covered by snow);

Example:

water_level = -2
desert = -1
tropical_climate = -1
mediterranean_climate = 1
temperate_climate = 0
tundra_climate = 0
alpine_climate = 10

and I get the following climate levels on map:

minimum absolute height of desert is: water_level + 1 = -2+1=-1;
maximum absolute height of desert is: desert = -1;
no tropical climate (because it equals desert);
minimum absolute height of mediterranean climate is: desert + 1 = -1+1 = 0;
maximum absolute height of mediterranean climate is: mediterranean_climate = 1;
no temperate or tundra climates (because they equal mediterranean_climate);
minimum absolute height of alpine climate is: mediterranean_climate + 1 = 1+1 = 2;
maximum absolute height of alpine climate is: water_level + alpine_climate = -2+10 = 8;
minimum absolute height of arctic climate is: water_level + alpine_climate + 1 = -2+10+1 = 9;

in other words:

water (-2)
desert (-1)
mediterranean climate (0..1)
alpine climate (2..8 )
arctic climate (9+)

It seems that in-game description of climates and snowlines is incomplete and a bit outdated!

These findings are quite useful when using heightmaps of real world.

Example: Map of Northwest Italy

I use a heightmap with a height resolution of 250m, prepared for water_level = -2 and height_conversion_factor = 2.
Horizontal resolution is 500m, but this is not important here.

I want the following climate profile (tile height / altitude / climate):

-2 /    0m / water
-1 /  250m / mediterranean
0 /  500m / mediterranean
1 /  750m / temperate
2 / 1000m / temperate - winter snow
3 / 1250m / temperate
4 / 1500m / temperate
5 / 1750m / temperate
6 / 2000m / temperate
7 / 2250m / tundra
8 / 2500m / tundra
9 / 2750m / tundra
10 / 3000m / tundra
11 / 3250m / alpine
12 / 3500m / alpine
13 / 3750m / alpine
14 / 4000m / arctic - summer snow
15 / 4250m / arctic
16 / 4500m / arctic
17 / 4750m / arctic (max height on map)

So I set:

winter_snowline = 1000/250 - 1 = 4-1 = 3
desert = water_level = -2
tropical_climate = water_level = -2
mediterranean_climate = 500/250 + water_level = 2-2 = 0
temperate_climate = 2000/250 + water_level = 8-2 = 6
tundra_climate = 3000/250 + water_level = 12-2 = 10
alpine_climate (summer snowline) = 4000/250 - 1 = 16-1 = 15

General formula for heightmaps:

Input

w - water level
h - height resolution (meters)
a - maximum altitude for a particular climate (meters, multiple of h)
b - minimum altitude for snow in summer/winter (meters, multiple of h)

Output

c - climate setting (from desert to tundra)
s - snowline setting (and implicit alpine and arctic climates)

c = a/h + w
s = b/h - 1

Edit: correction of climate names
« Last Edit: March 29, 2018, 07:54:17 PM by uci »

#### Leartin

• Devotee
• Posts: 1100
• PAK-DEV P192C
• Languages: DE, EN
##### Re: Understanding climates and snowlines
« Reply #1 on: February 13, 2018, 02:42:07 PM »

It seems that in-game description of climates and snowlines is incomplete and a bit outdated!

Certainly. Once upon a time, the climates were dependent of the water level. Meaning if you set desert to 1, you'd get the lowest land as beaches, no matter how high the water was. It has it's benefits how it is now though, so I wouldn't really change it back.

However, it might be a good idea to seperate climates from snowlines completely. Add a designated "snow texture" or even seasons to the climate textures, get additional dialog options for rocky and alpine climate, and allow to set the snowline independently. I think that would be cleaner (although existing paksets would likely continue to use alpine with snow textures, which might be confusing again). Either way, both snowline and climates should use the same definition, either depending on the water level or not.

Current landscape settings are certainly not ideal, there is a general extension request for them: https://forum.simutrans.com/index.php?topic=17745.0

#### uci

• Posts: 118
• Without owner
• Languages: EN, RO
##### Re: Understanding climates and snowlines
« Reply #2 on: February 13, 2018, 06:50:06 PM »
Current landscape settings are certainly not ideal, there is a general extension request for them: https://forum.simutrans.com/index.php?topic=17745.0

Thanks for pointing to that topic. Maybe is worth submitting a bug report to match climate ranges in both dialog settings. I think is an easy fix for developers.