pvlib-python icon indicating copy to clipboard operation
pvlib-python copied to clipboard

Describe what happens if temperature_model_parameters are not specified in pvsystem.PVSystem

Open AdamRJensen opened this issue 1 year ago • 4 comments

It seems that PVSystem chooses some temperature model parameters if they are not specified (None) when defining a PVSystem. However, this doesn't seem very clear from the docstring.

https://github.com/pvlib/pvlib-python/blob/eb7b34aa1131782e74119c91f7f1aadf3fdbe19f/pvlib/pvsystem.py#L154-L156

I suggest adding a description of the default behavior.

AdamRJensen avatar Sep 15 '23 15:09 AdamRJensen

Semi-related is a better error message from ModelChain when neither racking_model nor temperature_model_parameters is supplied. Right now you get AttributeError: 'PVSystem' object has no attribute 'racking_model', but ideally it would mention the temperature_model_parameters as well.

kandersolar avatar Sep 15 '23 17:09 kandersolar

Semi-related is a better error message from ModelChain when neither racking_model nor temperature_model_parameters is supplied. Right now you get AttributeError: 'PVSystem' object has no attribute 'racking_model', but ideally it would mention the temperature_model_parameters as well.

I ran into this exact issue earlier today!

AdamRJensen avatar Sep 15 '23 20:09 AdamRJensen

Semi-related is a better error message from ModelChain when neither racking_model nor temperature_model_parameters is supplied. Right now you get AttributeError: 'PVSystem' object has no attribute 'racking_model', but ideally, it would mention the temperature_model_parameters as well.

If a user aims to pass in cell_temperature to model.run_model_from_poa, then it doesn't really make sense to throw an error when defining the modelchain model without racking_model or temperature coefficients (as neither of these two parameters will be used when passing in cell_temperature)... am I correct in that observation?

AdamRJensen avatar Sep 15 '23 22:09 AdamRJensen

If a user aims to pass in cell_temperature to model.run_model_from_poa, then it doesn't really make sense to throw an error when defining the modelchain model without racking_model or temperature coefficients (as neither of these two parameters will be used when passing in cell_temperature)... am I correct in that observation?

The only way I see around this is to change the default value of racking_model/temperature coefficients to something like infer and then have the None value be specific to the case when you are planning on passing in a cell or module temperature series when running modelchain (and thus avoid the AttributeError when defining the PVSystem).

AdamRJensen avatar Sep 18 '23 22:09 AdamRJensen