Skip to content

Commit

Permalink
add docstring to get_proj_info_kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
akorosov committed Jan 13, 2022
1 parent 6c9f982 commit 3b1bcea
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions geodataset/geodataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,14 @@ def get_xy_dims_from_lonlat(self, lon, lat, accuracy=1e3):
return [np.round(v/accuracy)*accuracy for v in [x, y]]

def get_proj_info_kwargs(self):
""" Create dictionary with NC attributes for grid mapping variable
Returns
-------
kwargs : dict
NC attributes for grid mapping variable + proj
"""
g = self.projection.crs.get_geod()
d = self.projection.crs.to_dict()
kwargs = dict(
Expand All @@ -439,8 +447,8 @@ def get_proj_info_kwargs(self):
)
return kwargs

def get_var_for_nextsim(
self, var_name, nbo, distance=5, on_elements=True, fill_value=np.nan):
def get_var_for_nextsim(self, var_name, nbo,
distance=5, on_elements=True, fill_value=np.nan, **kwargs):
""" Interpolate netCDF data onto mesh from NextsimBin object
Parameters
Expand All @@ -455,6 +463,8 @@ def get_var_for_nextsim(
perform interpolation on elements or nodes?
fill_value : bool
value for filling out of bound regions
kwargs : dict
dummy
Returns
-------
Expand Down

0 comments on commit 3b1bcea

Please sign in to comment.