Return the sea level pressure. 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: height (:class:`xarray.DataArray` or :class:`numpy.ndarray`):
(height, tkel, pres, qv, meta=True, units="hPa")
| 322 | @set_alg_metadata(2, "pres", refvarndims=3, description="sea level pressure") |
| 323 | @convert_units("pressure", "hpa") |
| 324 | def slp(height, tkel, pres, qv, meta=True, units="hPa"): |
| 325 | """Return the sea level pressure. |
| 326 | |
| 327 | This is the raw computational algorithm and does not extract any variables |
| 328 | from WRF output files. Use :meth:`wrf.getvar` to both extract and compute |
| 329 | diagnostic variables. |
| 330 | |
| 331 | Args: |
| 332 | |
| 333 | height (:class:`xarray.DataArray` or :class:`numpy.ndarray`): |
| 334 | Geopotential height in [m] with the rightmost dimensions being |
| 335 | bottom_top x south_north x west_east. |
| 336 | |
| 337 | tkel (:class:`xarray.DataArray` or :class:`numpy.ndarray`): Temperature |
| 338 | in [K] with same dimensionality as *height*. |
| 339 | |
| 340 | pres (:class:`xarray.DataArray` or :class:`numpy.ndarray`): Full |
| 341 | pressure (perturbation + base state pressure) in [Pa] with |
| 342 | the same dimensionality as *height*. |
| 343 | |
| 344 | Note: |
| 345 | |
| 346 | This variable must be |
| 347 | supplied as a :class:`xarray.DataArray` in order to copy the |
| 348 | dimension names to the output. Otherwise, default names will |
| 349 | be used. |
| 350 | |
| 351 | qv (:class:`xarray.DataArray` or :class:`numpy.ndarray`): Water vapor |
| 352 | mixing ratio in [kg/kg] with the same dimensionality as *height*. |
| 353 | |
| 354 | meta (:obj:`bool`): Set to False to disable metadata and return |
| 355 | :class:`numpy.ndarray` instead of |
| 356 | :class:`xarray.DataArray`. Default is True. |
| 357 | |
| 358 | units (:obj:`str`): The desired units. Refer to the :meth:`getvar` |
| 359 | product table for a list of available units for 'slp'. Default |
| 360 | is 'hPa'. |
| 361 | |
| 362 | Warning: |
| 363 | |
| 364 | The input arrays must not contain any missing/fill values or |
| 365 | :data:`numpy.nan` values. |
| 366 | |
| 367 | Returns: |
| 368 | |
| 369 | :class:`xarray.DataArray` or :class:`numpy.ndarray`: The |
| 370 | sea level pressure. If xarray is enabled and |
| 371 | the *meta* parameter is True, then the result will be an |
| 372 | :class:`xarray.DataArray` object. Otherwise, the result will |
| 373 | be a :class:`numpy.ndarray` object with no metadata. |
| 374 | |
| 375 | See Also: |
| 376 | |
| 377 | :meth:`wrf.getvar`, :meth:`wrf.temp`, :meth:`wrf.tk` |
| 378 | |
| 379 | """ |
| 380 | return _slp(height, tkel, pres, qv) |
| 381 |