NatLabRockies / NatLabRockies/H2Integrate
Fix/update warning filtering in electrolyzer models (and elsewhere)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 26
- Forks
- 44
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 16
Description
In PR #462 some warning filters in files for the electrolyzer models were modified. The changes were:
h2integrate/converters/hydrogen/pem_model/run_PEM_main.py: modifiedwarnings.filterwarnings("ignore")towarnings.filterwarnings("ignore", category=RuntimeWarning). The run-time warnings may occur through-out this function and some of the calculations inPEM_H2_LT_electrolyzer_Clusters.pybecause of divide by zeros resulting from a case when a stack is off and does not produce hydrogen, then efficiency calculations (power/hydrogen production) result in nans which are handled elsewhere in the wrappers of these methods.h2integrate/converters/hydrogen/pem_model/PEM_H2_LT_electrolyzer_Clusters.pyadded a warning filter to filter outspicy.optimize.OptimizeWarningto the methodiv_curve(). This is to filter out a warning about the "covariance of the parameters" not being able to be calculated, but this warning does not impact performance or indicate anything unexpected in happening in this method, this method only requires that the coefficients are estimated (which is done successfully)
So - to remove filtering warnings would require updating calculations that may divide by zero.
Other warning filtering should be removed throughout the code, I am not sure if that is done in many other places.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing PR #462 and the warning handling in h2integrate/converters/hydrogen/pem_model/run_PEM_main.py and PEM_H2_LT_electrolyzer_Clusters.py. Search the repository for other warning filters, then determine which filters are masking divide-by-zero behavior or the noted OptimizeWarning. Done means unnecessary filtering is removed while the electrolyzer-specific cases are handled intentionally.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100