From 2aa1080dff3952c2d593105518168c71f1d8b2e4 Mon Sep 17 00:00:00 2001 From: Hans Chen Date: Sun, 15 Jul 2018 20:43:53 -0400 Subject: [PATCH 1/2] Clarify 'as_int' parameter docstring in ll_to_xy and ll_to_xy_proj 'as_int' is True by default, so indicate that it can be set to False to return floating point values (rather than vice versa). --- src/wrf/g_latlon.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wrf/g_latlon.py b/src/wrf/g_latlon.py index 5d2dc08..fd91f6d 100755 --- a/src/wrf/g_latlon.py +++ b/src/wrf/g_latlon.py @@ -365,8 +365,8 @@ def ll_to_xy(wrfin, latitude, longitude, timeidx=0, - 'v': Use the same staggered grid as the v wind component, which has a staggered south_north (y) dimension. - as_int (:obj:`bool`): Set to True to return the x,y values as - :obj:`int`, otherwise they will be returned as :obj:`float`. + as_int (:obj:`bool`): Set to False to return the x,y values as + :obj:`float`, otherwise they will be returned as :obj:`int`. Returns: :class:`xarray.DataArray` or :class:`numpy.ndarray`: The @@ -421,8 +421,8 @@ def ll_to_xy_proj(latitude, longitude, meta=True, squeeze=True, as_int=True, return :class:`numpy.ndarray` instead of :class:`xarray.DataArray`. Default is True. - as_int (:obj:`bool`): Set to True to return the x,y values as - :obj:`int`, otherwise they will be returned as :obj:`float`. + as_int (:obj:`bool`): Set to False to return the x,y values as + :obj:`float`, otherwise they will be returned as :obj:`int`. map_proj (:obj:`int`): Model projection [1=Lambert Conformal, 2=Polar Stereographic, 3=Mercator, 6=Lat-Lon]. Required. From dff4538a9d068b2242b3b92629bdd01a3b616996 Mon Sep 17 00:00:00 2001 From: Hans Chen Date: Sun, 15 Jul 2018 21:40:23 -0400 Subject: [PATCH 2/2] Remove as_int docstring from xy_to_ll_proj function --- src/wrf/g_latlon.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/wrf/g_latlon.py b/src/wrf/g_latlon.py index fd91f6d..6066f3d 100755 --- a/src/wrf/g_latlon.py +++ b/src/wrf/g_latlon.py @@ -589,9 +589,6 @@ def xy_to_ll_proj(x, y, meta=True, squeeze=True, map_proj=None, truelat1=None, return :class:`numpy.ndarray` instead of :class:`xarray.DataArray`. Default is True. - as_int (:obj:`bool`): Set to True to return the x,y values as - :obj:`int`, otherwise they will be returned as :obj:`float`. - map_proj (:obj:`int`): Model projection [1=Lambert Conformal, 2=Polar Stereographic, 3=Mercator, 6=Lat-Lon]. Required.