Return the field vertically interpolated to the given the type of surface and a set of new levels. Args: wrfin (:class:`netCDF4.Dataset`, :class:`Nio.NioFile`,\ or an iterable): WRF-ARW NetCDF data as a :class:`netCDF4.Dataset`, :class:`Nio.NioFile` o
(wrfin, field, vert_coord, interp_levels, extrapolate=False,
field_type=None, log_p=False, timeidx=0, method="cat",
squeeze=True, cache=None, meta=True)
| 562 | |
| 563 | @set_interp_metadata("vinterp") |
| 564 | def vinterp(wrfin, field, vert_coord, interp_levels, extrapolate=False, |
| 565 | field_type=None, log_p=False, timeidx=0, method="cat", |
| 566 | squeeze=True, cache=None, meta=True): |
| 567 | """Return the field vertically interpolated to the given the type of |
| 568 | surface and a set of new levels. |
| 569 | |
| 570 | Args: |
| 571 | wrfin (:class:`netCDF4.Dataset`, :class:`Nio.NioFile`,\ |
| 572 | or an iterable): |
| 573 | WRF-ARW NetCDF data as a :class:`netCDF4.Dataset`, |
| 574 | :class:`Nio.NioFile` or an iterable sequence of the |
| 575 | aforementioned types. |
| 576 | |
| 577 | field (:class:`xarray.DataArray` or :class:`numpy.ndarray`): A |
| 578 | three-dimensional field. |
| 579 | |
| 580 | vert_coord (:obj:`str`): A string indicating the vertical coordinate |
| 581 | type to interpolate to. |
| 582 | |
| 583 | Valid strings are: |
| 584 | * 'pressure', 'pres', 'p': pressure [hPa] |
| 585 | * 'ght_msl': grid point height msl [km] |
| 586 | * 'ght_agl': grid point height agl [km] |
| 587 | * 'theta', 'th': potential temperature [K] |
| 588 | * 'theta-e', 'thetae', 'eth': equivalent potential \ |
| 589 | temperature [K] |
| 590 | |
| 591 | interp_levels (sequence): A 1D sequence of vertical levels to |
| 592 | interpolate to. Values must be in the same units as specified |
| 593 | above for the *vert_coord* parameter. |
| 594 | |
| 595 | extrapolate (:obj:`bool`, optional): Set to True to extrapolate |
| 596 | values below ground. This is only performed when *vert_coord* is |
| 597 | a pressure or height type, and the *field_type* is a pressure type |
| 598 | (with height vertical coordinate), a height type (with pressure as |
| 599 | the vertical coordinate), or a temperature type (with either height |
| 600 | or pressure as the vertical coordinate). If those conditions are |
| 601 | not met, or *field_type* is None, then the lowest model level |
| 602 | will be used. Extrapolation is performed using standard atmosphere. |
| 603 | Default is False. |
| 604 | |
| 605 | field_type (:obj:`str`, optional): |
| 606 | The type of field. Default is None. |
| 607 | |
| 608 | Valid strings are: |
| 609 | * 'none': None |
| 610 | * 'pressure', 'pres', 'p': pressure [Pa] |
| 611 | * 'pressure_hpa', 'pres_hpa', 'p_hpa': pressure [hPa] |
| 612 | * 'z', 'ght': geopotential height [m] |
| 613 | * 'z_km', 'ght_km': geopotential height [km] |
| 614 | * 'tc': temperature [degC] |
| 615 | * 'tk': temperature [K] |
| 616 | * 'theta', 'th': potential temperature [K] |
| 617 | * 'theta-e', 'thetae', 'eth': equivalent potential temperature |
| 618 | |
| 619 | log_p (:obj:`bool`, optional): Set to True to use the log of the |
| 620 | vertical coordinate for interpolation. This is mainly intended |
| 621 | for pressure vertical coordinate types, but note that the log |