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

Created Climpact dialogue that exports station data in Climpact2 format #8708

Merged
merged 9 commits into from
Jan 31, 2024

Conversation

derekagorhom
Copy link
Contributor

Fixes #8634
Added the Climpact dialogue that exports station data
go to Climatic > File > Export to Climpact
This is not ready for preview
@jkmusyoka, this is the design preview.
image

this will not produce an output since we do not have the R function for Climpact yet

@jkmusyoka
Copy link
Contributor

@derekagorhom. Attached is a text file with the R function. I am also attaching an example dataset for usage.
Write_Data_For_Climpact.txt
Kisumu_Met.xlsx

Over to you!

@derekagorhom
Copy link
Contributor Author

@N-thony from @jkmusyoka, His R function looks like a stand alone function. please can you help me with the implementation since i have not done some before.
Thanks

@derekagorhom
Copy link
Contributor Author

@N-thony , the discussion we had was i make the design and he looks at it and come up with the R function

@N-thony
Copy link
Collaborator

N-thony commented Jan 8, 2024

@N-thony from @jkmusyoka, His R function looks like a stand alone function. please can you help me with the implementation since i have not done some before. Thanks

@derekagorhom my connection is not good now. But I think you need to check with @jkmusyoka about his R function that will reflect this Dialogue if you agreed about this design.

@N-thony
Copy link
Collaborator

N-thony commented Jan 8, 2024

@N-thony , the discussion we had was i make the design and he looks at it and come up with the R function

@jkmusyoka I think the Rfunction should have data, year, month, day, rain, mn_tmp, mx_tmp, missing_value_code as parameters

@jkmusyoka
Copy link
Contributor

@derekagorhom I have edited the earlier R function to now assume the data frame has year, month, day, etc columns. I hope this one works
Export_to_Climpact.txt
Let me know

@derekagorhom derekagorhom marked this pull request as ready for review January 19, 2024 08:15
@derekagorhom
Copy link
Contributor Author

@jkmusyoka The Pull request is ready for review

@jkmusyoka
Copy link
Contributor

@derekagorhom Thanks but there are some build up errors. Kindly check from your end

@derekagorhom
Copy link
Contributor Author

@jkmusyoka can you review this again, On the top menus you will see Build (it is after Project) click on build solution, i think that fixes the errors
image

Comment on lines 5112 to 5114
Me.Text = "R-Instat " + My.Application.Info.Version.Major.ToString + "." +
My.Application.Info.Version.Minor.ToString + "." +
My.Application.Info.Version.Build.ToString()
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you add the version number back?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It has been added

Comment on lines 151 to 153
Private Sub ucrReceiverElements_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverRR.ControlContentsChanged, ucrReceiverTN.ControlValueChanged, ucrReceiverDay.ControlValueChanged, ucrReceiverYear.ControlValueChanged, ucrInputExportFile.ControlContentsChanged, ucrReceiverTX.ControlValueChanged, ucrReceiverMonth.ControlValueChanged
TestOkEnabled()
End Sub
Copy link
Collaborator

Choose a reason for hiding this comment

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

move this after line 158

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have made the change

@jkmusyoka
Copy link
Contributor

Thanks @derekagorhom. @N-thony this is now approved and ready for merging

@N-thony
Copy link
Collaborator

N-thony commented Jan 30, 2024

@jkmusyoka you have approved but your approval is not giving access to merge this. I think it is something to check with Chris when he is back. @rdstern can you approve?

Copy link
Collaborator

@rdstern rdstern left a comment

Choose a reason for hiding this comment

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

Approved on James' behalf. @N-thony can you merge.

@N-thony N-thony merged commit 52aa5e0 into IDEMSInternational:master Jan 31, 2024
2 checks passed
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.

CLIMPACT2 and R-Instat for WMO work
4 participants