1
0
Fork 0

Undulatus-based AW clouds make use of transparency parameter

This commit is contained in:
Thorsten Renk 2014-11-17 13:35:48 +02:00
parent 403c35d544
commit a6ff6a6199
2 changed files with 24 additions and 9 deletions

View file

@ -119,7 +119,7 @@ for (i=0; i< max_num_streaks; i=i+1)
y = y - arg.Dy + 2.0 * rand() * arg.Dy; y = y - arg.Dy + 2.0 * rand() * arg.Dy;
var flag = 0; var flag = 0;
var bias =1.0 - (1.0* math.abs(i-0.5 * max_num_streaks)/max_num_streaks + 1.0* math.abs(j-0.5 * aspect_num_clouds)/aspect_num_clouds); var bias =1.0 - (math.abs(i-0.5 * max_num_streaks)/max_num_streaks + math.abs(j-0.5 * aspect_num_clouds)/aspect_num_clouds);
var comp = -.25 * rnd_array[j] + 0.75 * bias; var comp = -.25 * rnd_array[j] + 0.75 * bias;
comp = comp + arg.size_bias; comp = comp + arg.size_bias;
@ -134,6 +134,9 @@ for (i=0; i< max_num_streaks; i=i+1)
path = select_cloud_model(arg.type,"small") path = select_cloud_model(arg.type,"small")
} }
var edge = math.pow(bias, arg.edge_power);
local_weather.alpha_factor = edge * arg.core_alpha + (1.0-edge) * arg.edge_alpha;
var lat = arg.blat + m_to_lat * (y * math.cos(arg.dir) - x * math.sin(arg.dir)); var lat = arg.blat + m_to_lat * (y * math.cos(arg.dir) - x * math.sin(arg.dir));
var lon = arg.blon + m_to_lon * (x * math.cos(arg.dir) + y * math.sin(arg.dir)); var lon = arg.blon + m_to_lon * (x * math.cos(arg.dir) + y * math.sin(arg.dir));
@ -145,7 +148,7 @@ for (i=0; i< max_num_streaks; i=i+1)
} }
#print("Cloud count: ",counter); #print("Cloud count: ",counter);
local_weather.alpha_factor = 1.0;
} }
@ -232,7 +235,7 @@ for (var j=0; j<arg.n_domains; j=j+1)
if ((math.abs(x-domain_pos_x) < 0.3 * domain_size_x) or (math.abs(y-domain_pos_y) < 0.3 * domain_size_y)) if ((math.abs(x-domain_pos_x) < 0.3 * domain_size_x) or (math.abs(y-domain_pos_y) < 0.3 * domain_size_y))
{path = select_cloud_model(arg.htype,arg.hsubtype); {path = select_cloud_model(arg.htype,arg.hsubtype);
create_cloud_vec(path, lat, lon, alt, 0.0);} create_cloud_vec(path, lat, lon, alt, 0.0);}
local_weather.alpha_factor = 1.0;
} }
for (i=0; i<n_bulk; i=i+1) for (i=0; i<n_bulk; i=i+1)
{ {
@ -247,7 +250,6 @@ for (var j=0; j<arg.n_domains; j=j+1)
path = select_cloud_model(arg.type,arg.subtype); path = select_cloud_model(arg.type,arg.subtype);
create_cloud_vec(path, lat, lon, alt, 0.0); create_cloud_vec(path, lat, lon, alt, 0.0);
} }
local_weather.alpha_factor = 1.0;
} }
for (i=0; i<n_node; i=i+1) for (i=0; i<n_node; i=i+1)
{ {
@ -259,12 +261,11 @@ for (var j=0; j<arg.n_domains; j=j+1)
local_weather.alpha_factor = arg.node_alpha - 0.2 + rand() * 0.2; local_weather.alpha_factor = arg.node_alpha - 0.2 + rand() * 0.2;
path = select_cloud_model(arg.ntype,arg.nsubtype); path = select_cloud_model(arg.ntype,arg.nsubtype);
create_cloud_vec(path, lat, lon, alt, 0.0); create_cloud_vec(path, lat, lon, alt, 0.0);
}
}
local_weather.alpha_factor = 1.0; local_weather.alpha_factor = 1.0;
}
}
} }

View file

@ -669,7 +669,7 @@ if (rand() < small_scale_persistence)
else else
{rnd_store = rn;} {rnd_store = rn;}
rn = 0.91; # rn = 0.91;
if (rn > 0.9) if (rn > 0.9)
{ {
@ -681,8 +681,10 @@ if (rn > 0.9)
#y = 2.0 * (rand()-0.5) * 5000; #y = 2.0 * (rand()-0.5) * 5000;
#local_weather.create_streak("Altocumulus",blat+get_lat(x,y,phi), blon+get_lon(x,y,phi), 12000.0+alt+alt_offset,1500.0,30,1000.0,0.2,1200.0,30,1000.0,0.2,1200.0,alpha ,1.0); #local_weather.create_streak("Altocumulus",blat+get_lat(x,y,phi), blon+get_lon(x,y,phi), 12000.0+alt+alt_offset,1500.0,30,1000.0,0.2,1200.0,30,1000.0,0.2,1200.0,alpha ,1.0);
#create_2_8_altocumulus_domains(blat, blon, alt+alt_offset +12000.0, alpha); create_2_8_altocumulus_domains(blat, blon, alt+alt_offset +12000.0, alpha);
create_2_8_cirrocumulus_domains(blat, blon, alt+alt_offset +12000.0, alpha);
# and specify the atmosphere # and specify the atmosphere
local_weather.set_atmosphere_ipoint(blat, blon, vis + 10000.0, alt+alt_offset, vis + 15000.0, 0.0, alt+alt_offset +20000.0, alt+alt_offset + 25000.0, 0.85, alt+alt_offset, alt+alt_offset + 2500.0); local_weather.set_atmosphere_ipoint(blat, blon, vis + 10000.0, alt+alt_offset, vis + 15000.0, 0.0, alt+alt_offset +20000.0, alt+alt_offset + 25000.0, 0.85, alt+alt_offset, alt+alt_offset + 2500.0);
@ -3140,6 +3142,9 @@ arg.balt = alt;
arg.alt_var = 0.0; arg.alt_var = 0.0;
arg.dir = alpha; arg.dir = alpha;
arg.size_bias = 0.5; arg.size_bias = 0.5;
arg.core_alpha = 0.8;
arg.edge_alpha = 0.0;
arg.edge_power = 1.0;
arg.type = "Stratus (thin)"; arg.type = "Stratus (thin)";
local_weather.create_adv_undulatus(arg); local_weather.create_adv_undulatus(arg);
@ -3760,6 +3765,9 @@ arg.balt = alt;
arg.alt_var = 0.0; arg.alt_var = 0.0;
arg.dir = alpha; arg.dir = alpha;
arg.size_bias = 0.0; arg.size_bias = 0.0;
arg.core_alpha = 1.0;
arg.edge_alpha = 0.0;
arg.edge_power = 2.0;
arg.type = "Cirrostratus (small)"; arg.type = "Cirrostratus (small)";
local_weather.create_adv_undulatus(arg); local_weather.create_adv_undulatus(arg);
@ -3789,6 +3797,9 @@ arg.balt = alt;
arg.alt_var = 0.0; arg.alt_var = 0.0;
arg.dir = alpha; arg.dir = alpha;
arg.size_bias = 0.0; arg.size_bias = 0.0;
arg.core_alpha = 1.0;
arg.edge_alpha = 0.0;
arg.edge_power = 2.0;
arg.type = "Cirrocumulus (cloudlet)"; arg.type = "Cirrocumulus (cloudlet)";
local_weather.create_adv_undulatus(arg); local_weather.create_adv_undulatus(arg);
@ -4118,6 +4129,9 @@ arg.balt = alt;
arg.alt_var = 0.0; arg.alt_var = 0.0;
arg.dir = alpha; arg.dir = alpha;
arg.size_bias = 0.0; arg.size_bias = 0.0;
arg.core_alpha = 1.0;
arg.edge_alpha = 0.0;
arg.edge_power = 3.0;
arg.type = "Cirrocumulus (new)"; arg.type = "Cirrocumulus (new)";
#arg.type = "Fogpatch"; #arg.type = "Fogpatch";