Return the relative humidity. This is the raw computational algorithm and does not extract any variables from WRF output files. Use :meth:`wrf.getvar` to both extract and compute diagnostic variables. Args: qv (:class:`xarray.DataArray` or :class:`numpy.ndarray`): Water v
(qv, pres, tkel, meta=True)
| 494 | |
| 495 | @set_alg_metadata(3, "pres", description="relative humidity", units=None) |
| 496 | def rh(qv, pres, tkel, meta=True): |
| 497 | """Return the relative humidity. |
| 498 | |
| 499 | This is the raw computational algorithm and does not extract any variables |
| 500 | from WRF output files. Use :meth:`wrf.getvar` to both extract and compute |
| 501 | diagnostic variables. |
| 502 | |
| 503 | Args: |
| 504 | |
| 505 | qv (:class:`xarray.DataArray` or :class:`numpy.ndarray`): Water vapor |
| 506 | mixing ratio in [kg/kg] with at least three dimensions. The |
| 507 | rightmost dimensions are bottom_top x south_north x west_east. |
| 508 | |
| 509 | pres (:class:`xarray.DataArray` or :class:`numpy.ndarray`): Full |
| 510 | pressure (perturbation + base state pressure) in [Pa] with the |
| 511 | same dimensionality as *qv*. |
| 512 | |
| 513 | Note: |
| 514 | |
| 515 | This variable must be |
| 516 | supplied as a :class:`xarray.DataArray` in order to copy the |
| 517 | dimension names to the output. Otherwise, default names will |
| 518 | be used. |
| 519 | |
| 520 | tkel (:class:`xarray.DataArray` or :class:`numpy.ndarray`): Temperature |
| 521 | in [K] with same dimensionality as *qv*. |
| 522 | |
| 523 | Note: |
| 524 | |
| 525 | This variable must be |
| 526 | supplied as a :class:`xarray.DataArray` in order to copy the |
| 527 | dimension names to the output. Otherwise, default names will |
| 528 | be used. |
| 529 | |
| 530 | meta (:obj:`bool`): Set to False to disable metadata and return |
| 531 | :class:`numpy.ndarray` instead of |
| 532 | :class:`xarray.DataArray`. Default is True. |
| 533 | |
| 534 | Warning: |
| 535 | |
| 536 | The input arrays must not contain any missing/fill values or |
| 537 | :data:`numpy.nan` values. |
| 538 | |
| 539 | Returns: |
| 540 | |
| 541 | :class:`xarray.DataArray` or :class:`numpy.ndarray`: The |
| 542 | relative humidity. If xarray is enabled and |
| 543 | the *meta* parameter is True, then the result will be an |
| 544 | :class:`xarray.DataArray` object. Otherwise, the result will |
| 545 | be a :class:`numpy.ndarray` object with no metadata. |
| 546 | |
| 547 | See Also: |
| 548 | |
| 549 | :meth:`wrf.getvar`, :meth:`wrf.td` |
| 550 | |
| 551 | """ |
| 552 | return _rh(qv, pres, tkel) |
| 553 |