Add weather file header data to outputs Fix #453#908
Conversation
Add latitude, longitude, elevation, time zone to outputs for pvsamv1. Change labels and units for lat, lon, elev, tz outputs for pvwattsv8 to be consistent with pvsamv1. Add latitude, longitude, elevation, year to outputs for windpower. Note that windpower does not read time zone from weather file, so not reporting as an output. Also lat, lon, year do not appear to be used in calculations, but are read in, so I decided to include them in the outputs for completeness. Use "Location" group name for all.
mjprilliman
left a comment
There was a problem hiding this comment.
Looks good just some questions about user understanding
| { SSC_OUTPUT, SSC_NUMBER, "lat", "Latitude", "deg", "", "Location", "*", "", "" }, | ||
| { SSC_OUTPUT, SSC_NUMBER, "lon", "Longitude", "deg", "", "Location", "*", "", "" }, | ||
| { SSC_OUTPUT, SSC_NUMBER, "tz", "Time zone", "hr", "", "Location", "*", "", "" }, | ||
| { SSC_OUTPUT, SSC_NUMBER, "lat", "Latitude", "DD", "", "Location", "*", "", "" }, |
There was a problem hiding this comment.
What's the reason for specifying "from weather file" in pvsamv1 but not in pvwattsv8 and windpower (referring to output label).
There was a problem hiding this comment.
pvsamv1 uses "from weather file" for some outputs because of the POA as input solar resource data option. I decided to use it for these variables as well because they are passed through from the weather file and not really simulation outputs. I did not use "from weather file" for pvwattsv8 or windpower because no other variables in those cmods use it.
| { SSC_OUTPUT, SSC_ARRAY, "wfpoa", "Irradiance POA from weather file", "W/m2", "", "Time Series", "", "", "" }, | ||
|
|
||
| // header data from weather file | ||
| { SSC_OUTPUT, SSC_NUMBER, "lat", "Latitude from weather file", "DD", "", "Location", "", "", "" }, |
There was a problem hiding this comment.
Is DD understood by enough of the modeling community to use as a abbreviated unit (probably yes)
There was a problem hiding this comment.
I'm not sure how well known it is among the solar modeling community, but I've been using it based on information like this Wikipedia article since there has been confusion in the past about geographic coordinates in SAM, such as using both a negative sign and a "W" for longitude values for locations in the United States. I can change the units to "deg" or "degrees" if that seems clearer than "DD". (The Location and Resource input page uses "DD".)
There was a problem hiding this comment.
I didn't notice that we have been using DD, I would say keep as you've implemented it.
There was a problem hiding this comment.
Hm. there is this PV Terms project that uses degrees for latitude longitude: https://duramat.github.io/pv-terms/
latitude [degrees]: Latitude between -90 and 90 degrees. Positive north of the equator.
longitude [degrees]: Longitude between -180 to 180 degrees. Positive east of the meridian.
| assign("lat", wdprov->lat); | ||
| assign("lon", wdprov->lon); | ||
| assign("elev", wdprov->elev); | ||
| assign("year", wdprov->year); |
There was a problem hiding this comment.
The default wind - single owner year value is 1900. Will that be confusing to people?
There was a problem hiding this comment.
The default cases use "representative files" that have no year value in the header, hence the default 1900. When you download a wind resource file from the WIND Toolkit, the data has a more meaningful year value, which I think might be useful to some users to identify the data (especially SDK/PySAM).
I'm not sure why windpower reads the year value from the wind resource file because it does not seem to be used anywhere in the code. Note that it is required in Line 111.
Add latitude, longitude, elevation, time zone to outputs for pvsamv1.
Change labels and units for lat, lon, elev, tz outputs for pvwattsv8 to be consistent with pvsamv1.
Add latitude, longitude, elevation, year to outputs for windpower. Note that windpower does not read time zone from weather file, so not reporting as an output. Also lat, lon, year do not appear to be used in calculations, but are read in, so I decided to include them in the outputs for completeness.
Use "Location" group name for all.
This PR does not add outputs to CSP models.