Skip to content
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

Rail weather script with LUA #7

Closed
wants to merge 6 commits into from
Closed

Rail weather script with LUA #7

wants to merge 6 commits into from

Conversation

tackandr
Copy link
Contributor

@tackandr tackandr commented May 24, 2021

This is implementation for regulation 5 railroad weather
macro
Jira ticket is
here

@tackandr tackandr requested review from mpartio and vkuvaja May 24, 2021 09:29
Copy link
Member

@mpartio mpartio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok to me.

return pmin
end

function MaxT(TMinus,TPlus,curTime,par,curLevel)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does the "T" in the function name signal?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Time I assume. That's how they are named in smartmet macro.


result:SetParam(param("RAIL-N"))
result:SetValues(res)
luatool:WriteToFile(result)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tried running this when min_t is missing? What happens if empty "res" is written to a file? (Don't want to crash Himan because of it)

end

-- adjust time
mytime:GetValidDateTime():Adjust(HPTimeResolution.kHourResolution, -1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is ok but it will waste a lot of effort when we know that 144h onwards data is present only every 6hrs. Means more log spam of "data not found" :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be run in combination with transformer time interpolation to mimic the behavior of the smartmet functions.

@tackandr tackandr closed this May 3, 2023
@tackandr tackandr deleted the STU-15936 branch May 3, 2023 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants