Return a :class:`Ngl.Resources` object for the map projection. Args: var (:class:`xarray.DataArray`, optional): A :class:`xarray.DataArray` variable that includes latitude,longitude coordinate information. If not used, then *wrfin* must be provided. geo
(var=None, wrfin=None, varname=None, timeidx=0, method="cat",
squeeze=True, cache=None, **kwargs)
| 3612 | |
| 3613 | |
| 3614 | def get_pyngl(var=None, wrfin=None, varname=None, timeidx=0, method="cat", |
| 3615 | squeeze=True, cache=None, **kwargs): |
| 3616 | """Return a :class:`Ngl.Resources` object for the map projection. |
| 3617 | |
| 3618 | Args: |
| 3619 | |
| 3620 | var (:class:`xarray.DataArray`, optional): A :class:`xarray.DataArray` |
| 3621 | variable that includes latitude,longitude coordinate information. |
| 3622 | If not used, then *wrfin* must be provided. |
| 3623 | |
| 3624 | geobounds (:class:`wrf.GeoBounds`, optional): The geobounds to |
| 3625 | get the extents. If set to None and using the *var* parameter, |
| 3626 | the geobounds will be taken from the variable. If using a |
| 3627 | file, then the geobounds will be taken from the native grid. |
| 3628 | |
| 3629 | wrfin (:class:`netCDF4.Dataset`, :class:`Nio.NioFile`, or an \ |
| 3630 | iterable, optional): WRF-ARW NetCDF |
| 3631 | data as a :class:`netCDF4.Dataset`, :class:`Nio.NioFile` |
| 3632 | or an iterable sequence of the aforementioned types. If not used, |
| 3633 | then *var* must be provided. |
| 3634 | |
| 3635 | varname (:obj:`str`, optional): If using *wrfin*, then this will be the |
| 3636 | variable name to use to determine the geobounds. The variable |
| 3637 | can be a coordinate variable, or a regular variable that contains |
| 3638 | coordinate attributes. If None, |
| 3639 | then the 'XLAT', 'XLAT_M', 'XLONG', 'XLONG_M' variables |
| 3640 | will be used. |
| 3641 | |
| 3642 | timeidx (:obj:`int` or :data:`wrf.ALL_TIMES`, optional): The |
| 3643 | desired time index. This value can be a positive integer, |
| 3644 | negative integer, or |
| 3645 | :data:`wrf.ALL_TIMES` (an alias for None) to return |
| 3646 | all times in the file or sequence. Default is 0. |
| 3647 | |
| 3648 | method (:obj:`str`, optional): The aggregation method to use for |
| 3649 | sequences. Must be either 'cat' or 'join'. |
| 3650 | 'cat' combines the data along the Time dimension. |
| 3651 | 'join' creates a new dimension for the file index. |
| 3652 | The default is 'cat'. |
| 3653 | |
| 3654 | squeeze (:obj:`bool`, optional): Set to False to prevent dimensions |
| 3655 | with a size of 1 from being automatically removed from the shape |
| 3656 | of the output. Default is True. |
| 3657 | |
| 3658 | cache (:obj:`dict`, optional): A dictionary of (varname, ndarray) |
| 3659 | that can be used to supply pre-extracted NetCDF variables to the |
| 3660 | computational routines. It is primarily used for internal |
| 3661 | purposes, but can also be used to improve performance by |
| 3662 | eliminating the need to repeatedly extract the same variables |
| 3663 | used in multiple diagnostics calculations, particularly when using |
| 3664 | large sequences of files. |
| 3665 | Default is None. |
| 3666 | |
| 3667 | **kwargs: Additional PyNGL resources to set while creating the |
| 3668 | :class:`Ngl.Resources` object. |
| 3669 | |
| 3670 | Returns: |
| 3671 |
nothing calls this directly
no test coverage detected