Skip to content

Commit

Permalink
Merge branch 'main' into 513-add-required-uid-to-cds-api-key-for-era5…
Browse files Browse the repository at this point in the history
…-download
  • Loading branch information
veenstrajelmer authored Sep 15, 2023
2 parents c7be976 + 5160e7e commit c30bcb2
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions dfm_tools/deprecated.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,9 @@ def read_timfile(filename=None, converttime=False, refdate=None):
"""
raise DeprecationWarning('the function dfm_tools.read_timfile() is deprecated, please use the new hydrolib alternative: https://github.com/Deltares/dfm_tools/blob/301-convert-timmodel-to-pandasdataframe/tests/examples/preprocess_hydrolib_readtim.py.')


def generate_bndpli(**kwargs):
"""
deprecated
"""
raise DeprecationWarning('the function dfmt.generate_bndpli() is deprecated, please use dfmt.generate_bndpli_cutland() instead.')
2 changes: 1 addition & 1 deletion dfm_tools/get_nc.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ def rasterize_ugrid(uds:xu.UgridDataset, ds_like:xr.Dataset = None, resolution:f
regy = np.arange(ymin + 0.5 * d, ymax, d)
ds_like = xr.DataArray(np.empty((len(regy), len(regx))), {"y": regy, "x": regx}, ["y", "x"])

print(f'>> rasterizing ugrid {face_str} to shape=({len(ds_like.y)},{len(ds_like.y)}): ',end='')
print(f'>> rasterizing ugrid {face_str} to shape=({len(ds_like.y)},{len(ds_like.x)}): ',end='')
dtstart = dt.datetime.now()
ds = uds.ugrid.rasterize_like(other=ds_like)
print(f'{(dt.datetime.now()-dtstart).total_seconds():.2f} sec')
Expand Down
2 changes: 1 addition & 1 deletion docs/notebooks/postprocessing_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"source": [
"#open hisfile with xarray and print netcdf structure\n",
"if file_nc_his is not None:\n",
" ds_his = xr.open_mfdataset([file_nc_his], preprocess=dfmt.preprocess_hisnc)\n"
" ds_his = xr.open_mfdataset(file_nc_his, preprocess=dfmt.preprocess_hisnc)\n"
]
},
{
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ bottleneck
xugrid>=0.6.4
cdsapi
pydap>=3.3.0
pooch
hydrolib-core>=0.5.1
meshkernel>=2.1.0
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ install_requires =
xugrid>=0.6.4
cdsapi
pydap>=3.3.0
pooch
hydrolib-core>=0.5.1
meshkernel>=2.1.0
packages = find:
Expand Down

0 comments on commit c30bcb2

Please sign in to comment.