-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add capability of deriving sky temperature from weather file horizontal infrared radiation #492
Conversation
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.
Code looks fine. Just some clean up of testing/debugging/experimenting needed.
doc/src/records/top-members.md
Outdated
@@ -532,6 +532,7 @@ DEFAULT, Default: tSky from weather file if available else Berdahl-Martin | |||
BERDAHLMARTIN, Berdahl-Martin (tSky depends on dew point, cloud cover, and hour) | |||
DRYBULB, tSky = dry-bulb temperature (for testing) | |||
BLAST, Blast model (tSky depends on dry-bulb) | |||
IRHORIZ, Experimental model that derives tSky for horizonal infrared data from the weather file (available on some EPW files only) |
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.
It's not experimental once it's merged.
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.
- Reworded.
- I don't agree that there can be no experimental models in merged code. New stuff has to be merged to allow external users to test.
//-------------------------------------------------------------------------- | ||
#if defined( _DEBUG) | ||
void WDHR::wd_WriteCSV( // data writer for ad-hoc exports | ||
int jDayST, | ||
int iH) const | ||
{ | ||
static FILE* pF = NULL; // file | ||
if (!pF) | ||
{ | ||
const char* fName = "wdhr.csv"; | ||
pF = fopen(fName, "wt"); | ||
if (pF) | ||
fprintf(pF, "doy,hr,tdb,dni,dhi,ghi\n"); | ||
} | ||
if (pF) | ||
fprintf(pF, "%d,%d,%0.1f,%0.1f,%0.1f,%0.1f\n", | ||
jDayST, iH, wd_db, wd_DNI, wd_DHI, wd_glrad); | ||
|
||
} // WDHR::wd_WriteCSV | ||
#endif |
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.
Not clear what this is or if it's intended to be merged. Looks like temporary test code?
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.
Left for possible future use.
src/wfpak.cpp
Outdated
#if 0 | ||
// sky temp experiment | ||
float tSkyIR = DegRtoF(pow( IrSItoIP( irhoriz)/sigmaSB, 0.25)); | ||
float tSkyIR = DegRtoF(pow( IrSItoIP( irHoriz)/sigmaSB, 0.25)); | ||
static FILE* pF = NULL; // file | ||
if (!pF) | ||
{ | ||
const char* fName = "tSky.csv"; | ||
pF = fopen(fName, "wt"); | ||
fprintf(pF, "yr,mon,day,hr,osc,tsc,tSky_CSE,tSky_IR\n"); | ||
fprintf(pF, "yr,mon,day,hr,osc,tsc,tSky_CSE (F),tSky_IR (F)\n"); | ||
} | ||
fprintf(pF, "%d,%d,%d,%d,%0.1f,%0.1f,%0.1f,%0.1f\n", yr, m, d, h, osc, tsc, wd_tSky, tSkyIR); | ||
#endif |
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.
Is this still an experiment? I imagine this can all be deleted now?
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.
Updated this code and left it in. We are not yet done with testing sky models.
Description
By default, CSE derives sky temperature from total sky cover, dry-bulb temperature, and dew-point temperature using the Berdahl-Martin model.
This PR adds the capability of deriving sky temperature from horizontal infrared radiation available in (some) EPW files. The capability is preliminary -- missing weatherfile IR data is not detected / diagnosed.
Added an IRHORIZ case to test file wthr01.cse.
Updated documentation.