(d_lon, d_lat)
return grid_2d(-180, 180, d_lon, -90, 90, d_lat)
Global 2D rectilinear grid centers and bounds

    Parameters
    ----------
    d_lon : float
        Longitude step size, i.e. grid resolution

    d_lat : float
        Latitude step size, i.e. grid resolution

    Returns
    -------
    ds : xarray DataSet with coordinate values
Global 2D rectilinear grid centers and bounds
Global 2D rectilinear grid centers and bounds
def grid_global(d_lon, d_lat):
    '''
    Global 2D rectilinear grid centers and bounds

    Parameters
    ----------
    d_lon : float
        Longitude step size, i.e. grid resolution

    d_lat : float
        Latitude step size, i.e. grid resolution

    Returns
    -------
    ds : xarray DataSet with coordinate values

    '''

    if not np.isclose(360/d_lon, 360//d_lon):
        warnings.warn('360 cannot be divided by d_lon = {}, '
                      'might not cover the globe uniformally'.format(d_lon))

    if not np.isclose(180/d_lat, 180//d_lat):
        warnings.warn('180 cannot be divided by d_lat = {}, '
                      'might not cover the globe uniformally'.format(d_lat))

    return grid_2d(-180, 180, d_lon, -90, 90, d_lat)
def grid_global ( d_lon , d_lat ) : if not np . isclose ( 360 / d_lon , 360 // d_lon ) : warnings . warn ( '360 cannot be divided by d_lon = {}, ' 'might not cover the globe uniformally' . format ( d_lon ) ) if not np . isclose ( 180 / d_lat , 180 // d_lat ) : warnings . warn ( '180 cannot be divided by d_lat = {}, ' 'might not cover the globe uniformally' . format ( d_lat ) ) return grid_2d ( - 180 , 180 , d_lon , - 90 , 90 , d_lat )