Building an EPW: Creating Normal Solar Radiation from a ASHRAE Revised Clear Sky Model (“Tau Model”)

Nice to hear! Well, Ill be looking forward to that then.

@LudvigNyman ,
Here is an example that shows how to replace the radiation values in the EPW with clear sky ones:
clearskyEPW.gh (481.5 KB)

Make sure to update your HB+ libraries before using.
-Chris

1 Like

Thanks! This is really neat. I don´t even have to leave GH to tinker in Elements/Excel.

Since the normal LBupdateGHfile doesnt work for LB+, im wondering if there is any way to update an existing LB+ def. without having to replace individual objects?

@LudvigNyman,
Sorry for the late response. After realizing the clunkiness of the script I wrote, I made a couple of improvements to Ladybug core that make the code within the custom component I made cleaner:


clearskyEPW.gh (481.5 KB)

This should generally make it easier for people to use the WEA class to make custom EPW files and I imagine that it will become particularly relevant once I add the Zhang-Huang sky model to the WEA class, which is pretty much what all companies that synthesize EPW files use to fill in missing solar radiation data.

The update Honeybee+ component should update both the LB+ and the HB+ libraries. Is this not the case on your system? Also, remember that you need to restart Rhino after updating you libraries to have it re-load in the new libraries.

-Chris

Thanks. So there will be no update to the UpdateGHfile, its no longer necessary as all components in script now updates with the updater.

I also have a question regarding the standard Ashrae clear sky. It seems the clearness number does nothing to the irradiation in the WEA.

This must be a bug right? or am I getting something very wrong?

https://bigladdersoftware.com/epx/docs/8-4/engineering-reference/climate-calculations.html#ashrae-clear-sky-solar-model

@LudvigNyman ,

I’m sorry that I made one more change to the HB+ Wea object after @mostapha showed me the right way that I’m supposed to edit Ladybug epw objects. So I have one final version of a clearsky EPW component, which should not change for a while:
clearskyEPW.gh (482.1 KB)

And, yes, you found a bug there in the original ASHRAE Clearsky. I just pushed the fix here:

Thanks for finding that one!

1 Like

Concerning the update issues: I just updated H+ with the H+ installer. Closed and reopened rhino. loaded an old script. its components were old. I ran both the H+ installer and the legacy update file. None of them updates the script. Whats wrong there?

The june 07 component is one that I dropped on the canvas.

Thanks for fixing the clear sky component!

@LudvigNyman ,
The situation that you see there is a bug that was introduced by the fact that we’ve recently been cleaning up the folder structure of the Plus plugin userobjects to be more organized:

However we hadn’t yet updated the “Update File” component. I just fixed this with this commit:

So, if you sync with the github, you should now see that the “Update File” component runs without issues.

2 Likes

Hi @chris,

I downloaded your ClearskyEPW but doesn’t work. The WEA component gives me this error message: "Solution exception: ‘type’ object has no attribute ‘from_stat_file’. (you can see the screenshot attached).
I tried to change EPW but always the same error.

Can you help me?
Best
Andrea

@AndreaZani905,

The example file works fine at my end ! Make sure to update LB and HB +.

Hi,

Thanks. I have updated everything using updateladybug components but unfortunately doesn’t work.

Hi,

I also tried using the grasshopper file to create an EPW with ASHRAE Revised Clear Sky Model, but it didn’t work. I updated HB, LB and HB+ with the update components and restarted Rhino. The WEA component does work, but the python script to rewrite the epw file gives this error: “1. Solution exception:‘EPW’ object has no attribute ‘import_data’”.

How can I solve this error?

Thanks!

@sg,

If your goal is to get an EPW where the radiation values are replaced with Clear Sky ones, you would probably be best off starting from this example file. You will see that there is a component in there that is meant to overwrite streams of data in an EPW for you. You will have to plug the deconstructed values of the WEA radiation into the two radiation fields of the component in order to overwrite them.

However, to make use of that example file, you must have an up-to-date version of the ladybug libraries. It appears that you have bee successfully able to update your libraries because the error message you are getting if because that python component was written with old API calls (so you definitely have newer libraries there). You may have to run the HoneybeePlus updater component again, though, in order to get the absolute most recent version.

@chris,

Thank you very much!
I will take a look at the example file and try to build my own EPW file.

I managed to create all my customized data and transformed them into Ladybug DataCollection items, but when I tried to create the EPW file with the component it returns an error. I encounter the same error if I try to run the example file without adapting it.

This is the error:
"Runtime error (UnboundNameException): name ‘Sunpath’ is not defined

Traceback:
line 153, in script"

@sg ,

Sorry for the late response. Glad that you were able to create the DataCollection objects and the issue that you experienced was a bug. I just pushed a fix to the Dragonfly repo:

… and I updated the hydra example file:

So, if you re-download the new hydra example and use the new “Create EPW” component, everything should work. Thank you for reporting the issue!

Hi Chris,

Is there any component similar to this Clear Sky Tau Model component but for cloudy sky?

Thanks!

The official answer to all of these types of Legacy questions is now “check what the LB Legacy Updater component says”.

In this case, it says to use the new LB Cumulative Sky Matrix component and get the Clear Sky Radiation from the LB Import STAT component.