-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update of boundary layer turbulence algorithm #10
Conversation
himan-scripts/bl-turbulence.lua
Outdated
if currentProducerName == "ECGMTA" then | ||
gustlevel = level(HPLevelType.kGround, 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just did this:
radon=> insert into param_level_transform values (default, 131, (select id from param where name = 'FFG-MS'), 1, 0, 6, 10);
INSERT 0 1
So Himan automatically knows to fetch FFG-MS from ground/0 if it's requested for height/10.
himan-scripts/bl-turbulence.lua
Outdated
local surface = {} | ||
if currentProducerName == "ECGMTA" then | ||
surface = level(HPLevelType.kGround, 0) | ||
landseamask = param("N-0TO1") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why cloud cover for ECMWF?
himan-scripts/bl-turbulence.lua
Outdated
turb = 4 | ||
end | ||
if wskt>22 and maxTKE>3.5 then | ||
if wskt>22 and (wgust>18 or maxshear>20) then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wgust-conditional should be:
wgust>16
|
||
local maxshear = math.max(shear, shear12, shear23, shear34) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice way to reduce the verbose if-statements in the original macro 👍
@@ -48,116 +72,145 @@ logger:Info("Calculating wind shear") | |||
-- because only change in wind direction and speed is needed, not absolutely correct direction | |||
|
|||
local dz = 304.8 | |||
-- 2) Use lowest model level wind for sfc shear in ***Hirlam: | |||
-- Wind component differences between Hirlam lowest model level (L65 ~12m) and 1000ft (above it) | |||
local U_HIR = param("U-MS") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these two variables called "HIR" ?
@@ -1344,6 +1344,7 @@ void BindLib(lua_State* L) | |||
.def("Empty", &raw_time::Empty), | |||
class_<forecast_time>("forecast_time") | |||
.def(constructor<const raw_time&, const raw_time&>()) | |||
.def(constructor<const raw_time&, const time_duration&>()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
-- SEV over sea | ||
if wskt>40 and wgust>23 then | ||
turb = 5 | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good to me and I can't find any problems, good work.
https://jira.fmi.fi/browse/STU-16161