-
Notifications
You must be signed in to change notification settings - Fork 4
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
Migrate combustion and EPW-reader from Hive.Core to Hive.IO #692
Conversation
…eader, include icons in resources, create epw distributor, update env distributor
hey @maxenceryan , I suggest to keep an option for a simple workflow without needing to go through the whole environment->envDistributor pipeline. Yes, I think it makes sense to move the parsing to the EpwReader component. Please also note our naming convention of using a Prefix |
DA.SetData(0, Latitude); | ||
DA.SetData(1, Longitude); | ||
DA.SetData(2, City, Country); | ||
DA.SetData(3, GHI); | ||
DA.SetData(4, DNI); | ||
DA.SetData(5, DHI); | ||
DA.SetData(6, DryBulb); | ||
DA.SetData(7, DewPoint); | ||
DA.SetData(8, RH); | ||
DA.SetData(9, GHIMonthly); | ||
DA.SetData(10, DryBulbMonthly); | ||
DA.SetData(11, RHMonthly); | ||
DA.SetData(12, AmbientTemperatureCarrier); | ||
DA.SetData(13, Timezone); |
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.
so this is computationally very slow, because grasshopper turns everything into GH_Numbers. Could you only output an epw-object by default, and these separate outputs only get written if a boolean is set to true?
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.
this is actually the wrong cs file, i forgot to delete it... you'll see the other one in Hive.IO. but your comment still applies. So would the idea be that this distributor only functions when the bool input is true? Should I pass the EPW object to other components, such as sia380 and solar stuff instead of the gh numbers?
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.
That would be excellent! As much as possible, we should avoid dumping out gh numbers. It exceeds a bit the original scope of this issue, but if you can already implement that (pasing only the epw object instead of separate lists of gh numbers), that would be marvelous
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.
And , yes , only dump out those lists if a bool is set to true. From a novel grasshopper user perspective , that would be useful to access information from an epw
pManager.AddTextParameter("Path", "Path", "Path of the epw file", GH_ParamAccess.item); | ||
} |
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.
maybe add `pManager.AddBooleanParameter("write GH_Numbers", (...), "additionally to the epw-object, weather file data is output explicitly separately", ...)
an issue with having parsing only in the EPW distributor is that the GhEnvironment component actually needs EPW already parsed in order to set a couple of the default energy potentials, which are passed along at the EnvDistributor. l69-71 in Environment.SetDefaultEnergyPotentials() this.EnergyPotentials[6] = new Air(this.Horizon, null, null, null, this.EpwData.DryBulbTemperature);
this.EnergyPotentials[6].Name = "DryBulbTemperature";
this.EnergyPotentials[7] = new Radiation(this.Horizon, this.EpwData.GHI); We couuuld just say either plug in an Hive.IO.EPW class object OR the filepath into the EPW Distributor component, with priority given to the EPW object if not null. |
…rsing to epw dist
right. then let the the boolean, I might have explained it incorrectly. So the parsing should happen either way, but just dumping out the DataLists should be optional |
@maxenceryan this is what I meant. does it make sense?
sounds good, your comment and commit make sense to me. Hopefully I can wrap this up by monday |
@christophwaibel ok so I finished up the EPW reader stuff as per the comments. You can see how it compares to the python solution in You can also look in A few things;
Thanks! |
should I wait for another commit? otherwise, you can merge this PR, @maxenceryan
can't do yet, because there is a ghpython component in the main template that relies on following lines from
I'll make a separate issue about it.
done
as discussed before in the sprint: let's keep them for now |
{ | ||
pManager.AddNumberParameter("Latitude", "Latitude", "Latitude in deg", GH_ParamAccess.item); | ||
pManager.AddNumberParameter("Longitude", "Longitude", "Longitude in deg", GH_ParamAccess.item); |
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.
first output: pManager.AddCustom...?Parameter("EPW Hive object", ...)
?
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.
ah... I mean AddGenericObjectParameter
{ | ||
public class EpwReader : GH_Component | ||
{ |
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.
GhEpwReader
|
||
// TODO | ||
|
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.
we could just call Environment/epw.cs
here and leave the parsing script where it is
DA.SetData(0, Latitude); | ||
DA.SetData(1, Longitude); | ||
DA.SetData(2, City, Country); | ||
DA.SetData(3, GHI); | ||
DA.SetData(4, DNI); | ||
DA.SetData(5, DHI); | ||
DA.SetData(6, DryBulb); | ||
DA.SetData(7, DewPoint); | ||
DA.SetData(8, RH); | ||
DA.SetData(9, GHIMonthly); | ||
DA.SetData(10, DryBulbMonthly); | ||
DA.SetData(11, RHMonthly); | ||
DA.SetData(12, AmbientTemperatureCarrier); | ||
DA.SetData(13, Timezone); |
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.
That would be excellent! As much as possible, we should avoid dumping out gh numbers. It exceeds a bit the original scope of this issue, but if you can already implement that (pasing only the epw object instead of separate lists of gh numbers), that would be marvelous
DA.SetData(0, Latitude); | ||
DA.SetData(1, Longitude); | ||
DA.SetData(2, City, Country); | ||
DA.SetData(3, GHI); | ||
DA.SetData(4, DNI); | ||
DA.SetData(5, DHI); | ||
DA.SetData(6, DryBulb); | ||
DA.SetData(7, DewPoint); | ||
DA.SetData(8, RH); | ||
DA.SetData(9, GHIMonthly); | ||
DA.SetData(10, DryBulbMonthly); | ||
DA.SetData(11, RHMonthly); | ||
DA.SetData(12, AmbientTemperatureCarrier); | ||
DA.SetData(13, Timezone); |
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.
And , yes , only dump out those lists if a bool is set to true. From a novel grasshopper user perspective , that would be useful to access information from an epw
@maxenceryan when merging with the current master, you can keep the Also, I'm not sure if this PR already merged the updated PV / BIPV catalogues |
ok so merging now. Last thing I did:
|
Issues
Closes #686
Description
Migrate the epw-reader from ghpy to Hive.IO
TODO:
Checklist