Commit cb37129
Calculate Relative Humidity via Magnus Tetens Equation (#2286)
* changed default types to float in solarposition.py
* switched to floats in the docstrings and removed type hints
* added magnus_tetens equations
* line too long in solarposition.py
* revert solarposition.py to pre-PR state
* set default magnus coefficients per conversation in #1744
* moved equations to atmosphere.py, updated function names to suggested, changed type hints in docstring, changed to suggested coefficient format
* moved tests to atmosphere.py tests
* changed reference to WMO
* dry-bult temperature in the docstring
* revert pyproject.toml
* remove uv.lock
* Update pvlib/atmosphere.py
Co-authored-by: Anton Driesse <anton.driesse@pvperformancelabs.com>
* fixing flake8 errors for tdew/rh functions
I have left the formatting of functions outside of the tdew and rh
conversion functions. I can format them to satisfy flake8 linter if
that is desired by maintainers.
Just let me know how I can help.
* Update pvlib/atmosphere.py
Co-authored-by: Kevin Anderson <kevin.anderso@gmail.com>
* Update pvlib/atmosphere.py
Co-authored-by: Kevin Anderson <kevin.anderso@gmail.com>
* Update pvlib/atmosphere.py
Co-authored-by: Kevin Anderson <kevin.anderso@gmail.com>
* Update pvlib/atmosphere.py
Co-authored-by: Kevin Anderson <kevin.anderso@gmail.com>
* Update pvlib/atmosphere.py
Co-authored-by: Kevin Anderson <kevin.anderso@gmail.com>
* Update pvlib/atmosphere.py
Co-authored-by: Kevin Anderson <kevin.anderso@gmail.com>
* added some unit tests for different coefficients and input types
* refactored tests, removed magnus_tetens, updated whatsnew
* reference and whatsnew
* revert line 36 (linter)
* Update pvlib/atmosphere.py
Co-authored-by: Anton Driesse <anton.driesse@pvperformancelabs.com>
* Update docs/sphinx/source/whatsnew/v0.11.2.rst
Co-authored-by: Kevin Anderson <kevin.anderso@gmail.com>
* Update pvlib/atmosphere.py
Co-authored-by: Kevin Anderson <kevin.anderso@gmail.com>
* Update pvlib/tests/test_atmosphere.py
Co-authored-by: Kevin Anderson <kevin.anderso@gmail.com>
* Update pyproject.toml
Co-authored-by: Kevin Anderson <kevin.anderso@gmail.com>
* Update pvlib/atmosphere.py
Co-authored-by: Kevin Anderson <kevin.anderso@gmail.com>
* Update pvlib/atmosphere.py
Co-authored-by: Adam R. Jensen <39184289+AdamRJensen@users.noreply.github.com>
* Update pvlib/atmosphere.py
Co-authored-by: Adam R. Jensen <39184289+AdamRJensen@users.noreply.github.com>
* Update pvlib/atmosphere.py
Co-authored-by: Adam R. Jensen <39184289+AdamRJensen@users.noreply.github.com>
* Update pvlib/atmosphere.py
Co-authored-by: Adam R. Jensen <39184289+AdamRJensen@users.noreply.github.com>
* added a round-trip test for magnus tetens
Added a new test to show that you can calculate relative humidity from
dewpoint and then calculate dewpoint from relative humidity and it will
be the same as the original dewpoint values
* temperature -> temp_air; dewpoint -> temp_dew
* miscellaneous other cleanup
* tests: put assertions next to calculations
* linter
---------
Co-authored-by: Kurt Rhee <kurt@Mac.attlocal.net>
Co-authored-by: Anton Driesse <anton.driesse@pvperformancelabs.com>
Co-authored-by: Kurt Rhee <kurt@Kurts-MacBook-Air.local>
Co-authored-by: Kevin Anderson <kevin.anderso@gmail.com>
Co-authored-by: Adam R. Jensen <39184289+AdamRJensen@users.noreply.github.com>1 parent c12a477 commit cb37129
File tree
4 files changed
+231
-0
lines changed- docs/sphinx/source
- reference
- whatsnew
- pvlib
- tests
4 files changed
+231
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| 30 | + | |
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
340 | 419 | | |
341 | 420 | | |
342 | 421 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
91 | 238 | | |
92 | 239 | | |
93 | 240 | | |
| |||
0 commit comments