Skip to content

Add weather file header data to outputs Fix #453#908

Merged
cpaulgilman merged 3 commits into
developfrom
wf-header-data
Oct 28, 2022
Merged

Add weather file header data to outputs Fix #453#908
cpaulgilman merged 3 commits into
developfrom
wf-header-data

Conversation

@cpaulgilman

Copy link
Copy Markdown
Collaborator

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.

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 mjprilliman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good just some questions about user understanding

Comment thread ssc/cmod_pvwattsv8.cpp Outdated
{ 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", "*", "", "" },

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What's the reason for specifying "from weather file" in pvsamv1 but not in pvwattsv8 and windpower (referring to output label).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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.

Comment thread ssc/cmod_pvsamv1.cpp Outdated
{ 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", "", "", "" },

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is DD understood by enough of the modeling community to use as a abbreviated unit (probably yes)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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".)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I didn't notice that we have been using DD, I would say keep as you've implemented it.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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.

Comment thread ssc/cmod_windpower.cpp
assign("lat", wdprov->lat);
assign("lon", wdprov->lon);
assign("elev", wdprov->elev);
assign("year", wdprov->year);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The default wind - single owner year value is 1900. Will that be confusing to people?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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.

@cpaulgilman cpaulgilman merged commit e492025 into develop Oct 28, 2022
@cpaulgilman cpaulgilman deleted the wf-header-data branch October 28, 2022 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants