Skip to content
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

Kempe standoff #43

Merged
merged 61 commits into from
Jan 31, 2024
Merged

Kempe standoff #43

merged 61 commits into from
Jan 31, 2024

Conversation

MDKempe
Copy link
Collaborator

@MDKempe MDKempe commented Jan 11, 2024

Hi Martin, I'm at a point where I want to add this to the main. Hopefully I am doing this correctly.

MDKempe and others added 30 commits December 27, 2023 13:29
overall major reworking of the standoff calculations. Too many things to list.
Just added in a print statement to indicate the humidity was finished calculating.
Just a bunch of updates to make it into the tool I want.
I updated it to have a theoretical measured set of module data.
Just small formating issues here.
Major revision underway. I have most of the program working but the last few sections are still needing a bit of work.
Lots of reworking on the code to get it to have more methods for calculations. there is still a lot to be done.
Put in defaults in get_NSRDB
just working on it
Put in code to start a get_satellite function
typos fixed
fixed now.
Hopefully now it is patched correctly.
now it could work.
fixed import nsrdbx as f
Updated the demo module data to be calculated from the cell temperature instead of the module surface temperature.
Updated the manufactured module data.
Incldues the modeled POA data from Python and an updated module temperature calculation.
I changed it to instead of just having 180 degrees south be the default azimuth, it will point north or 0 degrees by default in the southern hemisphere.
It's a complete overhaul. I'm going to merge it now, but I would like it put in the main as is and to have it's name changed to "Standoff.ipynb"
Making the default azimuth be equatorial facing instead of always south. No northern-centric bias here. ;)
I fixed the cell temperature calculation to default to a wind speed factor of 1.7 instead of 1 and to allow that to be passed in. My guess is that this change will cause problems elsewhere.
Massive changes here but for the most part it is all about the standoff calculation which is working. One change to be aware of is that the prior calculations were using the module surface temperature for the standoff calculation but now it is using the cell temperature calculation.
It now uses the desired power factor for wind speed height adjustment.
It now uses the desired power factor for wind speed height adjustment.
It now uses the desired power factor for wind speed height adjustment.

I found an error in the standoff calculation. It was previously using the module surface temperature and it should be using the module cell temperature. It makes the required standoff calculations a bit higher.
@MDKempe
Copy link
Collaborator Author

MDKempe commented Jan 24, 2024

Martin, this time I went through and made sure all the pytests work. It should be ready to commit now. However, I do not believe that all the other programs have sufficient tests and there will be issues. Primarily we need to look for the usage of the variable "wind_speed_factor" with a default of 1.7. That needs to be changed to "wind_factor" with a default of 0.33.

pvdeg/weather.py Outdated
weather_df = humidity._ambient(weather_df)
print('\r ', end='')
Copy link
Collaborator

Choose a reason for hiding this comment

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

you can do a line break with \n

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What it is doing here is that when it prints that message that it is calculating the relative humidity, it prints the message without a line feed and when it is done with the calculation it does a carriage return without a line feed and writes over the message so that one doesn't see the annoying message on their screen except for when the calculations are in progress. If you have a better way to do this, please do so.

@martin-springer martin-springer mentioned this pull request Jan 30, 2024
@martin-springer
Copy link
Collaborator

is there a reason why the tests/data/h5_pytest.h5 was changed compared to the main branch?

Fixed some documentation for wind speed dependence and made it so the T98 calculation will default to equatorial facing, open rack and latitude tilt.
fixed the improper importing NSRDBX as f and did some documentation work.
Fixed the functions with capitals issue.
Fixed the functions with capitals issue.
I fixed an error check for the case of now wind height specification in the meta data of a dataset by removing it. that error check is managed in temperature.py.
Just some documentation changes.
just some documentation changes

"""

parameters = ["temp_air", "wind_speed", "dhi", "ghi", "dni", "Module_Temperature"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Module_Temperature can not be in the weather data frame

Copy link
Collaborator

Choose a reason for hiding this comment

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

the main purpose of this list is to only load the necessary parameters for the analysis to reduce the time it takes to load the data for geospatial analysis.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This method is doing a special calculation. To calculated x_eff you need to measure the actual module temperature along with the irradiance and wind speed to be able to calculate the theoretical insulated back temperature and open rack temperature. So for this function we are not using satellite data, but are using data from an actual test location not from the NSRDB which does not have a module temperature.

Is this clear now?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Okay this makes sense, but why would you add the measured module temperature to the weather data frame? Shouldn't this just be it's own input? That way, users can use whatever meteorological data they have and include the measured module temperature.

By adding module temperature to the weather dataframe this functions breaks with the conventions used in all the other functions. So, I'm trying to understand what benefit this has to combine the measured temperature with the weather data. If you only want to provide one dataframe, we should rename it to measured_df or something like this. So, it's immediately clear that this is different to what is used in the other functions.

Also lines 90 to 96 won't work with the parameter list as it's written now.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I just wanted to use the same format so I put it in a weather data frame. I thought this would facilitate other uses that might be envisioned in the future. Just making all the variables to be formatted in the same way. The module data needs to be matched up with the meteorological data. Also, I found that the read file function was fully functional enough to pull in another column of data easily. This is a good feature for flexibility just in case someone else wants to add another type of data such as voltage, shading, rain, snow, or anything else in a custom supplied data set. We also need to consider that any of these functions should work with custom ground based data sets.

Reading the next paragraph, are you just saying I should change the name? I'm fine with that. Maybe that is better just from an ability to understand the code. But technically both are measured, one is based on custom ground based data. Let me know your thoughts and I can fix this either was very quickly. Maybe there is a third option for a variable name?

Copy link
Collaborator

Choose a reason for hiding this comment

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

okay, I'll suggest renaming it so that there's no confusion with the weather dataframes.

@martin-springer martin-springer merged commit b7a4cb3 into main Jan 31, 2024
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants